Horde3D

Next-Generation Graphics Engine
It is currently 22.11.2024, 00:54

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Collada Converter Bug
PostPosted: 07.11.2010, 03:31 
Offline

Joined: 07.11.2010, 03:21
Posts: 3
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?


Top
 Profile  
Reply with quote  
PostPosted: 07.11.2010, 09:45 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
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.


Top
 Profile  
Reply with quote  
PostPosted: 07.11.2010, 16:14 
Offline

Joined: 07.11.2010, 03:21
Posts: 3
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.


Top
 Profile  
Reply with quote  
PostPosted: 07.11.2010, 17:00 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
I don't have 3Ds max. Maybe you can upload the DAE file somewhere else.


Top
 Profile  
Reply with quote  
PostPosted: 07.11.2010, 20:54 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
You can also send the file via email.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 29 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group