Question about node hierarchy in the visual_scene

Hello.
I’m currently covertning collada files into my own game friendly format.

I have some questions about how the “sane” way to divide the information from collada.

let’s tak’e the seymore_plane as an example:


 <node id="plane" name="plane">
                <rotate sid="rotateZ">0 0 1 0</rotate>
                <rotate sid="rotateY">0 1 0 0</rotate>
                <rotate sid="rotateX">1 0 0 0</rotate>
                <instance_geometry url="#planeShape-lib">
                    <bind_material>
                        <technique_common>
                            <instance_material symbol="matteSG" target="#matte">
                                <bind_vertex_input semantic="TEX0" input_semantic="TEXCOORD" input_set="0"/>
                            </instance_material>
                            <instance_material symbol="shineSG" target="#shine">
                                <bind_vertex_input semantic="TEX0" input_semantic="TEXCOORD" input_set="0"/>
                            </instance_material>
                        </technique_common>
                    </bind_material>
                </instance_geometry>
                <node id="prop" name="prop">
                    <translate sid="translate">0 0 5.40413</translate>
                    <rotate sid="rotateZ">0 0 1 15</rotate>
                    <rotate sid="rotateY">0 1 0 0</rotate>
                    <rotate sid="rotateX">1 0 0 0</rotate>
                    <instance_geometry url="#propShape-lib">
                        <bind_material>
                            <technique_common>
                                <instance_material symbol="shineSG" target="#shine">
                                    <bind_vertex_input semantic="TEX0" input_semantic="TEXCOORD" input_set="0"/>
                                </instance_material>
                            </technique_common>
                        </bind_material>
                    </instance_geometry>
                </node>
            </node>

I’, really just intressted in the models, not light camera etc.

What I’m thinking right now is to take each Node that cotains geometry and make that into a separate model. each child of the node would become a model node.

in this case:

Model :plane
{
ModelNode:prop
}

now this is very straight forward.
What I’, worried about is if I would get something like this:


 <node id="plane" name="plane">
                <rotate sid="rotateZ">0 0 1 0</rotate>
                <rotate sid="rotateY">0 1 0 0</rotate>
                <rotate sid="rotateX">1 0 0 0</rotate>
                <instance_geometry url="#planeShape-lib">
                    <bind_material>
                        <technique_common>
                            <instance_material symbol="matteSG" target="#matte">
                                <bind_vertex_input semantic="TEX0" input_semantic="TEXCOORD" input_set="0"/>
                            </instance_material>
                            <instance_material symbol="shineSG" target="#shine">
                                <bind_vertex_input semantic="TEX0" input_semantic="TEXCOORD" input_set="0"/>
                            </instance_material>
                        </technique_common>
                    </bind_material>
                </instance_geometry>
                <node id="prop" name="prop">
                    <translate sid="translate">0 0 5.40413</translate>
                    <rotate sid="rotateZ">0 0 1 15</rotate>
                    <rotate sid="rotateY">0 1 0 0</rotate>
                    <rotate sid="rotateX">1 0 0 0</rotate>
                    <instance_geometry url="#propShape-lib">
                        <bind_material>
                            <technique_common>
                                <instance_material symbol="shineSG" target="#shine">
                                    <bind_vertex_input semantic="TEX0" input_semantic="TEXCOORD" input_set="0"/>
                                </instance_material>
                            </technique_common>
                        </bind_material>
                    </instance_geometry>
					
					<node id="prop_detal" name="prop_detail">
                    <info.....>
                    </node>
                </node>
            </node>

There could be nodes that has nodes that has nodes and so on, right?
I really would’t like to end up like that in a game format.

I’s it reasonable/fair to trust the 3D artist not to model in such a way?

//HermanssoN

Yes, keeping in mind that a COLLADA node is a local coordinate system (a place) in which to instantiate things. Nesting nodes is a concise way to represent hierarchical spaces and a model is an object in a (local) space.

you should not impose such limitations on artists/tools. It is very easy to process the COLLADA document off-line or at load time to flatten the hierarchy if it is what your application needs.