Jump to content
Sign in to follow this  
ch3

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×