Results 1 to 3 of 3

Thread: Geometry ->Triangle: normal's index out of range?

  1. #1
    Sutiv
    Guest

    Geometry ->Triangle: normal's index out of range?

    Hello!

    I'm working on DAE 3d models importer for my custom app.
    DAE files generates by Autodesk FBX Converter tool from FBX files, and in the one of produced DAE file I have following:

    Code :
        <geometry id="?? 15 ???? 0.000 [372420]-lib" name="?? 15 ???? 0.000 [372420]Mesh">
          <mesh>
            <source id="?? 15 ???? 0.000 [372420]-POSITION">
              <float_array id="?? 15 ???? 0.000 [372420]-POSITION-array" count="24">
    0.524934 0.000000 0.026247
    0.524934 0.262467 0.026247
    0.000000 0.262467 0.026247
    -0.000000 0.000000 0.026247
    0.524934 0.000000 0.000000
    -0.000000 0.000000 0.000000
    0.000000 0.262467 0.000000
    0.524934 0.262467 0.000000
    </float_array>
              <technique_common>
                <accessor source="#?? 15 ???? 0.000 [372420]-POSITION-array" count="8" stride="3">
                  <param name="X" type="float"/>
                  <param name="Y" type="float"/>
                  <param name="Z" type="float"/>
                </accessor>
              </technique_common>
            </source>
            <source id="?? 15 ???? 0.000 [372420]-Normal0">
              <float_array id="?? 15 ???? 0.000 [372420]-Normal0-array" count="18">
    0.000000 0.000000 1.000000
    0.000000 0.000000 -1.000000
    1.000000 0.000000 0.000000
    0.000000 1.000000 0.000000
    -1.000000 0.000000 0.000000
    0.000000 -1.000000 0.000000
    </float_array>
              <technique_common>
                <accessor source="#?? 15 ???? 0.000 [372420]-Normal0-array" count="6" stride="3">
                  <param name="X" type="float"/>
                  <param name="Y" type="float"/>
                  <param name="Z" type="float"/>
                </accessor>
              </technique_common>
            </source>
            <source id="?? 15 ???? 0.000 [372420]-UV0">
              <float_array id="?? 15 ???? 0.000 [372420]-UV0-array" count="32">
    0.000000 0.524934
    0.000000 0.000000
    0.262467 0.524934
    0.262467 0.000000
    -0.262467 0.524934
    -0.262467 0.000000
    -0.000000 0.000000
    -0.000000 0.524934
    0.000000 0.262467
    0.000000 0.000000
    0.026247 0.262467
    0.026247 0.000000
    0.000000 0.524934
    0.026247 0.524934
    0.000000 0.524934
    0.026247 0.524934
    </float_array>
              <technique_common>
                <accessor source="#?? 15 ???? 0.000 [372420]-UV0-array" count="16" stride="2">
                  <param name="S" type="float"/>
                  <param name="T" type="float"/>
                </accessor>
              </technique_common>
            </source>
            <vertices id="?? 15 ???? 0.000 [372420]-VERTEX">
              <input semantic="POSITION" source="#?? 15 ???? 0.000 [372420]-POSITION"/>
            </vertices>
            <triangles count="12">
              <input semantic="VERTEX" offset="0" source="#?? 15 ???? 0.000 [372420]-VERTEX"/>
              <input semantic="NORMAL" offset="1" source="#?? 15 ???? 0.000 [372420]-Normal0"/>
              <input semantic="TEXCOORD" offset="2" set="0" source="#?? 15 ???? 0.000 [372420]-UV0"/>
     
     
     3 3 0 0 0 1 2 2 2 1 1 3 2 2 2 0 0 1 6 6 4 7 7 5 4 4 6 4 4 6 5 5 7 6 6 4 1 1 8 0 0 9 7 7 10 4 4 11 7 7 10 0 0 9 2 2 12 1 1 9 6 6 13 7 7 11 6 6 13 1 1 9 3 3 8 2 2 9 5 5 10 6 6 11 5 5 10 2 2 9 0 0 14 3 3 9 5 5 11 5 5 11 4 4 15 0 0 14</p>
            </triangles>
          </mesh>
        </geometry>

    So, for this section we have following:
    1) 8 positions
    2) 6 normals
    3) 16 texture coords
    4) mesh consist of 12 triangles

    And for one of triangle's vertex IAW

    section data we have 6 6 4 indices.


    As I understood, index is zero-based, so value "6" is invalid - out of range (because max normal's array index is 5, because it has 6 elements)

    So, may be any special cases for such situation exist?
    What the value of normal's I must use to create vertex?


    Thanks in advance!

    P.S. I suppose, that my DAE file is correct, because when I try to convert back DAE -> FBX with the same Autodesk FBX Converter tool, I got a valid FBX file.

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

    Re: Geometry ->Triangle: normal's index out of range?

    Your assertions are correct. I think you should file a bug at Autodesk because it appears that your version of the FBX Converter is not parsing the <source> element properly.

    You should run that .dae document through an XML validating parser as I think the id values are invalid and there may be other problems at that level too.

  3. #3
    Junior Member
    Join Date
    Jul 2012
    Posts
    2

    Re: Geometry ->Triangle: normal's index out of range?



    3

    Delete the space so it looks like this. Had same issue.



    3

Posting Permissions

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