Results 1 to 3 of 3

Thread: <node>s

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    13

    <node>s

    I don`t understand concept of <node type="Node">. How I must use their transformation?
    I know what is hierarchy and I must multiply a parent matrix to a this matrix and etc.
    For example in this case what does it mean:
    Code :
    <library_visual_scenes>
            <visual_scene id="VisualSceneNode" name="fin_moonlander">
                <node id="Scene_Root" name="Scene_Root">
                    <rotate sid="rotateZ">0 0 1 0</rotate>
                    <rotate sid="rotateY">0 1 0 0</rotate>
                    <rotate sid="rotateX">1 0 0 0</rotate>
                    <node id="Camera_Root" name="Camera_Root">
                        <translate sid="translate">0 200 2000</translate>
                        <rotate sid="rotateZ">0 0 1 0</rotate>
                        <rotate sid="rotateY">0 1 0 0</rotate>
                        <rotate sid="rotateX">1 0 0 0</rotate>
                    </node>
                    <node id="l_eye" name="l_eye">
                        <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="#_lib"/>
                    </node>
                </node>
                <node id="group2" name="group2">
                    <rotate sid="rotateZ">0 0 1 0</rotate>
                    <rotate sid="rotateY">0 1 0 0</rotate>
                    <rotate sid="rotateX">1 0 0 0</rotate>
                    <scale sid="scale">0.009769 0.009769 0.009769</scale>
                    <node id="group1" name="group1">
                        <rotate sid="rotateZ">0 0 1 0</rotate>
                        <rotate sid="rotateY">0 1 0 0</rotate>
                        <rotate sid="rotateX">1 0 0 0</rotate>
                        <scale sid="scale">0.263384 0.263384 0.263384</scale>
                    </node>
                </node>
    How I must use group2 group1 Camera_Root nodes?
    Or this one:
    Code :
                <node id="right_foot" name="right_foot">
                    <translate sid="translate">-0.049375 -0.280828 -0.005699</translate>
                    <rotate sid="rotateZ">0 0 1 0</rotate>
                    <rotate sid="rotateY">0 1 0 180</rotate>
                    <rotate sid="rotateX">1 0 0 0</rotate>
                    <scale sid="scale">0.002256 0.002425 -0.002284</scale>
                <node id="geometries_5" name="geometries_5">
                    <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_controller url="#geometries_5-lib-skin">
                        <skeleton>#right_knee</skeleton>
                        <bind_material>
                            <technique_common>
                                <instance_material symbol="mat_feet1SG" target="#phong_feet">
                                    <bind_vertex_input semantic="TEX0" input_semantic="TEXCOORD" input_set="0"/>
                                    <bind_vertex_input semantic="TEX1" input_semantic="TEXCOORD" input_set="0"/>
                                </instance_material>
                            </technique_common>
                        </bind_material>
                    </instance_controller>
                </node>
                </node>
    Where I must use geometries_5-node`s matrix in instance_controller?
    If I replace instance_controller by instance_geometry, where in geometry that matrix is used?

  2. #2
    Junior Member
    Join Date
    Jan 2011
    Posts
    13

    Re: <node>s

    If you cannot explain, may be somebody gives me a link to read it. I repeat that I need the concept of <node>s and the examples of using nodes` matrices in <instance>s. Thank you.

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

    Re: <node>s

    Please read the section about the node element in the COLLADA 1.5 specification, page 5-98 (pdf page 13.

    In short, each node is a local coordinate system (LCS) that is defined by the transformations in its scope. You must use them, as you say, to compute the LCS for each node.

    Your first example all the nodes have several identity rotations that are exported with sid, as they might be animated. The group1 and group2 nodes each have a non-identity scale.

    Your second example questions... the instances are placed in the LCS of the node (a COLLADA node is a "place") they are in the scope of. I.e. the local origin of the instance is the encompassing node LCS.

    I hope that helps.

Posting Permissions

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