Jump to content

Passing an attribute to the shader, using packed geometry


Recommended Posts

hi,

 

I have an animated character cached in an alembic file, which I want to duplicate a few thousand times. The shader looks for a geometry attribute to control the emission, so the copies are varied. What's the most optimized way to do that?

 

I was hoping that just by transferring the attribute to the points or primitives of the duplicates via the copy node, would be enough for the shader to read it. But it seems that either I should not pack them (which off course is very expensive), or I should set the attribute using the stamp expression, which also slows it down a bit.

 

I am not sure if alembic's packing and the way I am loading the cache, has something to do with the problem.

 

 

In the attached file, I've set up an example with the two different approaches.

 

thanks

packed.zip

Link to comment
Share on other sites

hmmm did it work for you in the render?

First with your file I get a bunch of warnings on file open. Maybe we use different houdini versions.
Warning:
/shop/mantrasurface/useBaseColor: Too many elements found for parameter "... and goes on with another 20-30 of these

 

I created a new shader and used the renderState node instead of the bind, I set it to use packed:lit, but still the shader doesn't pick it up.

 

Does it matter if the attribute is on the points or the elements of the packed geo?

 

 

thank you for your input

Link to comment
Share on other sites

after smashing my head on the wall for a whole afternoon, I remembered I needed to add a render attribute on the mantra node. Declare materials: Declare All SHOPS

 

thank you for the help

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...