When applying shaders in the Render Tree to ICE strands I’ve come across something “weird” that I can’t explain.
When adding a Color_Attribute node (XSI 2011) to e.g. a Constant node and set the ‘Attribute’ parameter to ‘Color’, and then rerender, the render region does not render the ICE color, even not when I rerun the simulation.
I’ve experienced that only when I first set the ‘Attribute’ parameter to ‘StrandColor’ and THEN to ‘Color’, that only then does it render the ICE color.
Steps taken :
- create grid
- emit particles
- create_strands : execute on emit
- in Emit from Surface node : set color to e.g. green and size to e.g. 2 and shape to segment
- assign a Constant material to particles
- go to render tree
- get a Color_Attribute node and plug its Out port into the Constant node’s Color port
- set the ‘Attribute’ parameter of the Color_Attribute node to ‘Color’
- take a render region : the strands should be green if you have set the color to green in the Emit from Surface node, but the color of the strands is white.
- then set the ‘Attribute’ parameter of the Color_Attribute node to ‘StrandColor’, and then back to ‘Color’ : now the strands render green.
Can anyone confirm and/or explain this behavior ?
EDIT : maybe I’ve found the answer myself?
When I FIRST plug in the Color_Attribute node into the Constant node, and ONLY then set the ‘Attribute’ param to ‘Color’, then it renders green.
If I first set the param to ‘Color’ and then plug in the node, then it doesn’t render the ICE color but I have to set it to something else than ‘Color’ and then back to ‘Color’.
Am I missing something fundamental to working with shaders here ?