Horde3D
http://horde3d.org/forums/

Collada Converter Bug
http://horde3d.org/forums/viewtopic.php?f=3&t=1301
Page 1 of 1

Author:  softwareguy256 [ 07.11.2010, 03:31 ]
Post subject:  Collada Converter Bug

Collada 3DS Exporter: OpenCOLLADA_3ds_Max_1.2.5_x86
3DS Max model: http://www.3dm3.com/modelsbank/model445.htm
Horde SDK: Horde3D_SDK_1.0.0_Beta4 (no modifications to engine)

Problem:
ColladaConverter returns without any error in the console, there is a geometry and anim files as well as a scene.xml, but there is obviously no geometry in the file. The scene XML is just:
<Model name="tank" geometry="models/tank/tank.geo">

</Model>

Root cause:
I tried to attach the DAE XML output from the converter, but could not because of size-limit. Basically:

bool DaeNode::parse( const XMLNode &nodeNode )
{
reference = false;
id = nodeNode.getAttribute( "id", "" );
if( id == "" ) return false;

This code cannot parse the following DAE section:
Code:
<visual_scene id="MaxScene">
  <node name="EnvironmentAmbientLight">
    <instance_light url="#EnvironmentAmbientLight" />
  </node>
  <node id="node-Cylinder01" name="Cylinder01">
    <translate>0 8.635203 20.67684</translate>
    <rotate>-0.5773503 -0.5773503 -0.5773503 -120</rotate>
    <scale>1.040209 1.040209 0.9999999</scale>
    <node>
      <matrix>1 0 0 -41.72702 0 1 0 -10.16675 0 0 1 33.30056 0 0 0 1</matrix>
      <instance_geometry url="#geom-Cylinder01">
        <bind_material>
          <technique_common>
            <instance_material symbol="_1_-_Default_1" target="#_1_-_Default-material">
              <bind_vertex_input semantic="CHANNEL1" input_semantic="TEXCOORD" input_set="1" />
            </instance_material>
          </technique_common>
        </bind_material>
      </instance_geometry>
    </node>
  </node>

Is this a code bug or did I export incorrectly?

Author:  Volker [ 07.11.2010, 09:45 ]
Post subject:  Re: Collada Converter Bug

Couldn't you zip the dae? Should make a big difference in size due to the fact that it's an XML file.

In the collada specification the id attribute is specified as optional so I guess, the code
Code:
if( id == "" ) return false;

should be changed to accept nodes without an id. Without looking into the code of the collada converter, I would propose to use the address of the nodeNode variable as a replacement, if the id must be non empty within the converter. But I'm currently not sure if that would cause some problems within the rest of the converter code.

If you could provide the DAE file in some way, it would help me to find a solution.

Author:  softwareguy256 [ 07.11.2010, 16:14 ]
Post subject:  Re: Collada Converter Bug

The XML file is over 1.5 megs and the attachment limit here is only 64kb. The XML can be created though by selecting the two tank objects from 3DS max and using the open-collada exporter or let me know if there is another way I can send the file. Just for experimental purposes, I have commented that line out, and I get an access violation:

converter.cpp (574): Vertex &v = _vertices[vertList[l]];

Where:
vector< unsigned int > &vertList = oTriGroup.posIndexToVertices[iIndex];
int iIndex = iTriGroup.indices[k].posIndex; (iIndex = 5139)

oTriGroup.posIndexToVertices = new vector< unsigned int >[oTriGroup.numPosIndices];

but oTriGroup.numPosIndices = 5139 too resulting in an out of bounds error.

I should add I got this access violation on another file also.

Author:  Volker [ 07.11.2010, 17:00 ]
Post subject:  Re: Collada Converter Bug

I don't have 3Ds max. Maybe you can upload the DAE file somewhere else.

Author:  marciano [ 07.11.2010, 20:54 ]
Post subject:  Re: Collada Converter Bug

You can also send the file via email.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/