PassNode and scene graphs

Using testIsland as an example, suppose I want to add many rocks to the island, the rocks are splattered also and would require their own PassNode



Would I would need to maintain a seperate scengraph for these rocks ??



Is there an alternative way of doing this - eg to have a repository of pass states that each spatial is instructed to use.

u dont need a seperate scene graph for ur rocks.



if ur rocks r not moving which i assume they r  :D, all u need to do is add in another pass with a rock texture and an alpha map to indicate where the texutre should be applied.

Ahhh - so there is a golden rule ???

If a passnode has a normal node attached - that normal node will be rendered by the pass

If a passnode A has a passnode B attached to it - any normal nodes attached to passnode B will only be rendered by passnode B and not A.



So, if you want to use a passnode as a parent within a scenegraph, do not attach normally rendered children



please confirm if that is correct

Made a PassEnabled node, it allows you to specify to draw the child using pass states or as normal. That way you only need one scenegraph to support both pass states and normal child drawing.



If anyone wants the code i will post it up.