Results 1 to 3 of 3

Thread: Question about node hierarchy in the visual_scene

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    6

    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:
    Code :
     <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 lane
    {
    ModelNoderop
    }

    now this is very straight forward.
    What I', worried about is if I would get something like this:
    Code :
     <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

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: Question about node hierarchy in the visual_scene

    Quote Originally Posted by HermanssoN
    There could be nodes that has nodes that has nodes and so on, right?
    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.

  3. #3
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356

    Re: Question about node hierarchy in the visual_scene

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •