Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Assistance required troubleshooting my DAE export.

  1. #1
    Member
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    33

    Assistance required troubleshooting my DAE export.

    I have written a C++ application using the COLLADA-dom to export models into dae. At eye value it looks very correct. I have gone over the syntax many times, double checked against examples and ran through the COLLADA coherencytest which returned no errors (after I had fixed the ones it did find).

    I have attached the export below, its very small and just contains the geometries.

    The 3Ds MAX importer will crash when importing without any indication of where the parser crashed. The Blender importer will give the error in the console: ValueError: invalid literal for float(): 52-08

    I really am stumped here, I wouldn't post here without exhausting my own attempts. Thanks in advance! COLLADA will give me a real advantage in my project once I get it going.

    Peace, Maeyan
    Don't dream what to be; be what you always dreamed.
    I use Collada in my project Revival

  2. #2
    Member
    Join Date
    Feb 2005
    Location
    San Jose, CA
    Posts
    63

    Re: Assistance required troubleshooting my DAE export.

    Your mesh has 200 triangles.
    That means you have 200 * 3 = 600 sets of point data.
    For each set of point data, you have 1 index for vertex position, 1 index of normals, 1 index for texcoords.

    That means you should have 600 * 3 =1800 indices in your

    </p>, but you only have 1200 index in your


    Check if you export the index of your position, normal, and texcoord correctly in that order.

    I am surprise that the coherencytest couldn't catch that, may I have the full version of the dae file you ran against coherencytest.

    Herbert

  3. #3
    Member
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    33

    Re: Assistance required troubleshooting my DAE export.

    Quote Originally Posted by uclahklaw
    Your mesh has 200 triangles.
    That means you have 200 * 3 = 600 sets of point data.
    For each set of point data, you have 1 index for vertex position, 1 index of normals, 1 index for texcoords.

    That means you should have 600 * 3 =1800 indices in your

    </p>, but you only have 1200 index in your


    Check if you export the index of your position, normal, and texcoord correctly in that order.

    I am surprise that the coherencytest couldn't catch that, may I have the full version of the dae file you ran against coherencytest.

    Herbert
    I did have trouble understanding those tags. The specification documentation isn't as clear as your explanation, thank you! Actually the dae I attached is the one I ran through the coherencytest. I will keep posted, cheers.

    EDIT: I used the latest version of coherencytest from Sourceforge.
    Don't dream what to be; be what you always dreamed.
    I use Collada in my project Revival

  4. #4
    Member
    Join Date
    Feb 2005
    Location
    San Jose, CA
    Posts
    63

    Re: Assistance required troubleshooting my DAE export.

    I ran it against the new coherencytest_win32_x86.exe here
    http://sourceforge.net/project/showfile ... _id=229663
    It caught 3 problems.
    1. semantic="POSTION" is spelled wrong.
    2. the count of

    is not match
    3. some of the indices value in

    is greater than 239, the max value you can index in <source>

    Herbert

  5. #5
    Member
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    33

    Re: Assistance required troubleshooting my DAE export.

    How embarrassing. I realize now I didn't use the coherencytest properly.

    Thanks again for your great help.
    Don't dream what to be; be what you always dreamed.
    I use Collada in my project Revival

  6. #6
    Member
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    33

    Re: Assistance required troubleshooting my DAE export.

    Below is how I cast the mesh index in OGRE xml format but I don't understand how I would cast this in COLLADA. I don't suppose you could help me one more time?

    Code :
    <mesh>
        <submeshes>
            <submesh material="agitator_mesh" usesharedvertices="false" use32bitindexes="false" operationtype="triangle_list">
                <faces count="200">
                    <face v1="129" v2="104" v3="103" />
                    <face v1="103" v2="100" v3="127" />
     ....
                    <face v1="0" v2="6" v3="1" />
                    <face v1="1" v2="15" v3="0" />
                    <face v1="8" v2="29" v3="19" />
                </faces>
                <geometry vertexcount="239">
                    <vertexbuffer positions="true" normals="true" texture_coord_dimensions_0="2" texture_coords="1">
                        <vertex>
                            <position x="0.031929" y="-0.4131" z="0.214812" />
                            <normal x="0.703114" y="-0.24763" z="0.666566" />
                            <texcoord u="0.513141" v="0.217319" />
                        </vertex>
                        <vertex>
                            <position x="0.0304611" y="-0.237615" z="0.231583" />
                            <normal x="0.479395" y="0.342587" z="0.807969" />
                            <texcoord u="0.245871" v="0.350954" />
                        </vertex>
    etc etc....

    EDIT: I removed most of the body from the example above for convenience.
    Don't dream what to be; be what you always dreamed.
    I use Collada in my project Revival

  7. #7
    Member
    Join Date
    Feb 2005
    Location
    San Jose, CA
    Posts
    63

    Re: Assistance required troubleshooting my DAE export.

    You can represent this mesh in many different ways, the most traditional way is
    Code :
    <geometry>
      <mesh>
        <source id="position_id"> 
           <float_array id="position_array_id" count="717"> 0.031929 -0.4131 0.214812   0.0304611 -0.237615 0.231583 ..... </float_array> ... </source>
        <source id="normal_id"> 
           <float_array id="normal_array_id" count="717"> 0.703114 -0.24763 0.666566   0.479395 0.342587 0.807969..... </float_array>  ... </source>
        <source id="texcoord_id"> 
           <float_array id="texcoord_array_id" count="478"> 0.513141 0.217319   0.245871 0.350954 ..... </float_array> .... </source>
        <vertices id="vertices_id">
          <input semantic="POSITION" source="#position_id"/>
        </vertices>
        <triangles count="200">
          <input semantic="VERTEX" source="#vertices_id" offset="0"/>
          <input semantic="NORMAL" source="#normal_id" offset="1"/>
          <input semantic="TEXCOORD" source="#texcoord_id" offset="2"/>
     
     
    129 129 129 104 104 104 103 103 103                                    
                 103 103 103 100 100 100 127 127 127 ... </p>
       </triangles>
      </mesh>
    </geometry>
    You can optimize the document by replacing the <vertices> and <triangles> with the following
    Code :
        <vertices id="vertices_id">
          <input semantic="POSITION" source="#position_id"/>
          <input semantic="NORMAL" source="#normal_id"/>
          <input semantic="TEXCOORD" source="#texcoord_id"/>
        </vertices>
        <triangles count="200">
          <input semantic="VERTEX" source="#vertices_id" offset="0"/>
     
     
    129 104 103
                 103 100 127 ... </p>
       </triangles>
    Both versions are valid and represent the same mesh.

    Herbert

  8. #8
    Member
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    33

    Re: Assistance required troubleshooting my DAE export.

    The import now works correctly and I clearly understand how it works thanks to your thorough advice. Again, thank you so much. I'm so grateful.
    Don't dream what to be; be what you always dreamed.
    I use Collada in my project Revival

  9. #9
    Junior Member
    Join Date
    Jun 2008
    Posts
    12

    Re: Assistance required troubleshooting my DAE export.

    Ok, so both meshes represent the same geometry, but isn't there a difference when using these meshes for morphing?

    If I understand correctly the first mesh will only blend positions and the second mesh will blend positions, normals and texcoords.

    Roland

  10. #10
    Member
    Join Date
    Feb 2005
    Location
    San Jose, CA
    Posts
    63

    Re: Assistance required troubleshooting my DAE export.

    Yes Roland is correct.
    The two meshes means different when it comes to morphing.
    Morphing only morphs everything you put in <vertices>.

    Herbert

Page 1 of 2 12 LastLast

Posting Permissions

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