In Copernicus, can you drive a switch with an attirbute?

   382   2   0
User Avatar
Member
58 posts
Joined: March 2018
Offline
Using Karma in the stage context, I have a simulation I made of some ropes, I would like to use the same material for all of them, but for them to have different diffuse patterns. In rendering engines I am comfortable with, I would give each rope an "index" with connectivity, then use that attribute on a switch in that material so that the materials diffuse is different depending on that attribute on the different geometry. I am not sure how to do this in the Copernicus context, or if it is even possible. Thank you
User Avatar
Member
8723 posts
Joined: July 2007
Offline
Most likely you want to generate separate textures in Copernicus and use switch in the shader based on your index primvar

Copernicus textures are created before the render so there is no way to regenerate the texture on the fly based on which object is being rendered if they overlap the same portions of the uv space

If however you have your ropes occupy different portions of the same uv space you can Rasterize your rope index into a layer and use that to switch the pattern in Copernicus to generate a single texture
Edited by tamte - July 25, 2024 16:58:56
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
58 posts
Joined: March 2018
Offline
Thank you for your reply. I think I am starting to understand. I tried to rasterize my index, but as soon as I click on the rasterize node, Houdini immediately crashes. I got it to work once for a tutorial I was doing once after trying, but cannot seem to get it to work again.
  • Quick Links