Hi,
I'm trying to set the Kd_color attribute of an Alembic packed primitive by using the Set Parameter ROP.
Based on a reply I had here, I've set the following parameters:
Selection Parameter:
*.(@node == 'polymesh')
Assignment_1 Parameter:
Kd_color = [1 0 0]
I've assigned a standard material to a cube and saved it out as Alembic. I then bring it back in to be rendered as a packed primitive. To debug, I took a look at the Ass file:
set_parameter { name /out/set_parameter1 enable on selection "*.(@node == 'polymesh')" assignment "Kd_color = [1 0 0]" }
So the Set Parameter ROP seems to be doing what it should, but the rendered cube remains white, not red. Any thoughts as to what I'm doing wrong?
Thanks,
Andy
Solved! Go to Solution.
Solved by julian.hodgson. Go to Solution.
Kd_color is a shader parameter (of the old deprecated Standard shader), not a polymesh parameter
Right - you should be able to change the shader's parameters with an operator if you select the shader.
But you also can create a colour parameter on the shape with an operator, and then tell the shader to look for the new parameter:
and then pick that up in the shader:
and you should see a red sphere if you connect the operator:
See the example file set-parameter-cd.zip
Cheers,
Julian
Thanks Julian, I'll give that a go!
@stephenblair Okay, yep that makes sense. I think I was looking at the wrong thing in the ass file. Thanks.