I found that one can dive into deeper levels by tracking the Childs property of an ILGroup node (or find parent nodes via the Parent property on any ILNode object). The enumerator on ILScene gives a "flattened" version of the whole scene graph. Thus, enumerating the ILScene and using the Childs property on group nodes gives indeed a tree-like scene graph, but many nodes are referenced more than once. Of course, one could track the nodes already visited to prevent them from appearing again. But I though there must be some 'official' way for hierarchical scene graph traversal.

what do you mean by: "but many nodes are referenced more than once."? From the enumerator (or from the method given in the answer) there is only one reference to every node? If not, I suppose, It's a bug?
–
Paul WendlerJun 26 '13 at 6:30

Note that the generic type T in Find<T> determines the type of nodes to consider for output. Here, only group nodes are considered. In order to recognize ALL nodes within the scene, one may use Find<ILNode>() instead.

You're saying, that I should use scene.Find() to enumerate through all nodes (or nodes of a certain type) and then re-build the hierarchy by looking at the Parent property and comparing it with the previous item in the list!? All methods I found on ILScene just give a flat list of scene graph items. It would already help, if one could obtain the root node. But your comment made me look at the order of items returned from .Find or the enumerator. If I'm not mistaken the order of items in the list corresponds to a depth-first tree traversal. Correct?
–
profix898Jun 25 '13 at 17:55

P.S. Using Find<ILNode>() is the same as using the enumerator on ILScene, isnt it? Just without the overhead of "filtering" the results.
–
profix898Jun 25 '13 at 18:25

From your question it was not clear to me that you are trying to actually rebuild the tree hierarchy. My answer shows how to traverse the scene. Could you describe, what you are trying to achieve? A clone of the scene? And what is the final goal? There might be easier ways to achieve the same result?
–
numbers303Jun 26 '13 at 7:22

The final goal is to visualize the scene graph with all its nodes. Meanwhile, I found that the root node is actually there. Its simply hidden with an internal modifier: internal ILGroup Root { get; set; } There are basically two solutions I tried so far: 1. using reflection to obtain the Root node and do a manual traversal 2. using "build-in" traversal via .Find or enumerator and rebuild hierarchy from parent/childs properties Both work, but both are not exactly straight forward. Anyway thanks for your help and for the hint given with your original answer.
–
profix898Jun 26 '13 at 7:53

Another simple way of obtaining the Root node: scene.Camera.Parent. I think scene.First<ILGroup>() should work as well.
–
Paul WendlerJun 26 '13 at 9:16