PDA

View Full Version : Bug in 2011 or me? Problem with rendering strands with Color_attribute node.


dOMINUSMess
05-18-2010, 04:56 PM
Hi,

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 ?


Thanks, Dominiek.

PiotrekM
05-22-2010, 01:30 PM
Yes there is some funky stuff happening with color attributes. One workaround I found is to store your color to custom variable in icetree, and use this var in rendertree

dOMINUSMess
05-23-2010, 06:27 AM
Thank you Piotrek : good idea.

CGTalk Moderation
05-23-2010, 06:27 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.