ch3 Posted July 30, 2014 Share Posted July 30, 2014 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 Quote Link to comment Share on other sites More sharing options...
teratera Posted July 30, 2014 Share Posted July 30, 2014 Hi, You can use Render State VOP in your shader with packed:attribute syntax. packed_01_fix.hip 1 1 Quote Link to comment Share on other sites More sharing options...
ch3 Posted July 30, 2014 Author Share Posted July 30, 2014 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 Quote Link to comment Share on other sites More sharing options...
teratera Posted July 30, 2014 Share Posted July 30, 2014 Yes, it worked for me. Both as point and primitive attributes too. Quote Link to comment Share on other sites More sharing options...
ch3 Posted July 30, 2014 Author Share Posted July 30, 2014 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.