Can't load dae models.

Is there a test.dae file in the current working directory?

This implies that the libxml reader failed to be created for that URI. Did it really say “<filepath>” and not “test.dae”?

Make sure your libxml2 is linked properly and debug the open call. You can learn more about libxml2 reader here:

http://www.xmlsoft.org/examples/index.html#xmlReader

Hi There…

I’m having some similar problems with my parser… everything worked fine, i have loaded like 20 different maya models… but then i started to have the following error with some files:

Error: Failed to open file:/e:/Proyectos/collada-dom/dom/projects/vc8-1.4/ambulante_anim2.dae in daeLIBXMLPlugin::readFromFile

Error: Failed to load file:/e:/Proyectos/collada-dom/dom/projects/vc8-1.4/ambulante_anim2.dae

And the funny thing is, when i change the file name for “ambulante_anim1.dae”, it works just fine… please if anyone can help, i’ll appreciate it deeply

Argilliath.

Sounds like you are trying to load a 1.5 document with a 1.4 DOM or similar mismatch. Can you post the <COLLADA> element with the version attribute from your test.dae document?

Well that URL is technically a syntax error (should begin with “file:///e:”).

What did you change the filename to? Do you get a message saying what file was opened on success? Just interested in seeing the URL that works vs the one that you shown that doesn’t.

Changing the document version like that is invalid.

I think that means you have using a 1.5 DOM build though.

Hi, thanks for the reply:

This is the uri I got when loading the file with the name “ambulante_anim1.dae” which works fine:

"file:/e:/Proyectos/collada-dom/dom/projects/vc8-1.4/ambulante_anim1.dae"

and this is the other uri of the same file but with the name changed to “ambulante_anim2.dae” which doesn’t work and gives me the same error as before:

"file:/e:/Proyectos/collada-dom/dom/projects/vc8-1.4/ambulante_anim2.dae"
Error: Failed to open file:/e:/Proyectos/collada-dom/dom/projects/vc8-1.4/ambulante_anim2.dae in daeLIBXMLPlugin::readFromFile

Error: Failed to load file:/e:/Proyectos/collada-dom/dom/projects/vc8-1.4/ambulante_anim2.dae

I am working with collada 1.4 for visualc++ 2005, thanks in advance.

Argilliath

Can you post the line containing the <COLLADA> element from each of those files?

None that I’m aware of (possibly polytrans?) although there are more applications supporting both versions appearing on the market lately. Importing and exporting between versions effectively handles that use-case.

Going back to your original post, I think you should build the DOM for 1.4.1 instead since you are using other tools that export 1.4.1 content (like Milkshape).

Thanks for the reply:

This is the line for the <COLLADA> tag, didn’t now if you need the childs, but to be sure:

<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
  <asset>
    <contributor>
      <author>Nestor</author>
      <authoring_tool>Maya8.5 | ColladaMaya v3.05B</authoring_tool>
      <comments>ColladaMaya export options: bakeTransforms=1;exportPolygonMeshes=1;bakeLighting=0;isSampling=0;
curveConstrainSampling=0;removeStaticCurves=1;exportCameraAsLookat=0;
exportLights=0;exportCameras=0;exportJointsAndSkin=0;
exportAnimations=1;exportTriangles=1;exportInvisibleNodes=0;
exportNormals=0;exportTexCoords=1;
exportVertexColors=0;exportVertexColorsAnimation=0;exportTangents=0;
exportTexTangents=0;exportConstraints=0;exportPhysics=0;exportXRefs=0;
dereferenceXRefs=0;cameraXFov=0;cameraYFov=0</comments>
      <source_data>file:///C:/DOCUMENTOS/trabajo/juegos/desarrollo/iphone/SurviveBot/Maya/scenes/test.ma</source_data>
    </contributor>
    <created>2009-05-18T17:18:24Z</created>
    <modified>2009-05-18T17:18:24Z</modified>
    <unit meter="1" name="meter"/>
    <up_axis>Y_UP</up_axis>
  </asset>

And this is the line from the other file, but it’s the same one, since the only thing i did was to copy the first file and then renamed it. (But just to be sure, I paste here the line here copied from the second file)

<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
  <asset>
    <contributor>
      <author>Nestor</author>
      <authoring_tool>Maya8.5 | ColladaMaya v3.05B</authoring_tool>
      <comments>ColladaMaya export options: bakeTransforms=1;exportPolygonMeshes=1;bakeLighting=0;isSampling=0;
curveConstrainSampling=0;removeStaticCurves=1;exportCameraAsLookat=0;
exportLights=0;exportCameras=0;exportJointsAndSkin=0;
exportAnimations=1;exportTriangles=1;exportInvisibleNodes=0;
exportNormals=0;exportTexCoords=1;
exportVertexColors=0;exportVertexColorsAnimation=0;exportTangents=0;
exportTexTangents=0;exportConstraints=0;exportPhysics=0;exportXRefs=0;
dereferenceXRefs=0;cameraXFov=0;cameraYFov=0</comments>
      <source_data>file:///C:/DOCUMENTOS/trabajo/juegos/desarrollo/iphone/SurviveBot/Maya/scenes/test.ma</source_data>
    </contributor>
    <created>2009-05-18T17:18:24Z</created>
    <modified>2009-05-18T17:18:24Z</modified>
    <unit meter="1" name="meter"/>
    <up_axis>Y_UP</up_axis>
  </asset>

Thank you, this problem is giving me so much trouble, since i don’t know why some dae files work and other don’t, and for further info, the problem appears from the very beginning, when i try to open the file in this line:

	daeElement* root = dae.open(nombresArchivos.at(arc));	

nombresArchivos is the name of a string vector with all dae files of a folder, and arc is the counter in a for structure.

Hope this helps, thanks!!!

It could just be a file system issue then. Try making a copy with a different name that won’t collide (thinking 8.3 hashing) such as “test1234.dae” and see if that loads.

Hi Marcus:

Thanks for the reply, i tested with the name you suggested, and it gave me the same error:

Error: Failed to open file:/e:/Proyectos/collada-dom/dom/projects/vc8-1.4/test12
34.dae in daeLIBXMLPlugin::readFromFile

Error: Failed to load file:/e:/Proyectos/collada-dom/dom/projects/vc8-1.4/test12
34.dae

So, does that confirms is a filesystem issue?

Thank you for your help.

Argilliath.

Maybe. It seems to confirm an issue within libxml2 readFromfile(). You are going to have to debug into it and discover why libxml2 is having a problem with your copied file. It could be file permissions, invalid XML or UTF encoding, or something else.

I’m basically having the same exact problem. It’s not that anything I built is buggy nor is how I attempt to open a .DAE the problem (the library I wrote for converting .DAE files at the end of a production pipeline into a binary format worked great with 1.4.1) but rather I can’t find any export tools for 3DS Max 9 that export in 1.5; or if they do, I can’t figure out how to make them do so (they all export in 1.4.1). So, my main problem is that I have a working COLLADA 1.5 importer, but no exporter :frowning:

I’m using colladadom 2.2 built with COLLADA 1.5 for opening .DAE files.

Also, I should add that I can load the COLLADA 1.5 files with my tool that are included in the colladadom 2.2 package under:
[packageRoot]\dom est\1.5\data

with absolutely no errors. So I’m at an impasse unless I can find or write my own exporter (I’d prefer the former, as I’ve zero experience writing 3DS max plugins at the moment… necessity might soon change that though).

Try the OpenCOLLADA (beta) plug-ins for Max and Maya that support COLLADA 1.4 and 1.5.

Thanks for the suggestion. I downloaded the source last night and built the plugin this morning; however, I’ve run into another problem.

I started by downloading the OpenCOLLADA project via Subversion:

svn co https://opencollada.svn.sourceforge.net/svnroot/opencollada/trunk opencollada 

Per the prerequisites for OpenCOLLADA, I have 3DS Max 2009
and the SDK installed. Also, I built Boost 1.39.0 from source
for my platform, and set up the build environment as dictated
by BUILD in the COLLADAMax solution directory. I didn’t have
trouble building COLLADAMaxNew.dle (besides changing cp
to copy in the pre-build event) and it even seemed like
everything was going smoothly until I loaded up 3DS Max 2009
after building and installing the plugin. Upon load, I recieved
the following error message:

Caption: “Error loading DLLs”
Body: “DLL <COLLADAMaxNew.dle> failed to initialize.
Error code 193 - %1 is not a valid Win32 application.”

I built the plugin using both the “Debug Max2009” and
“Release Max2009” configurations and attempted to load each
manually via the Plugin Manager in 3DS Max 2009 with no
success (the same error came up with each attempt).
Unfortunately I’m not really versed in how Autodesk handles
plugins so I’m slightly mystified by this error.

I’m running Windows Vista Ultimate x64 and the 3DS Max 2009
64-bit build. Also, I compiled the project in Visual Studio
2008 (with which I converted the project from VS 2005).

I’ve also submitted this question to the project maintainer on SourceForge.net, but I also wanted to see if you had any insight into my problem :slight_smile:

Looks like you have a space in the file name (between 12 and 34?)
Not sure what the syntax shold be, but space characters surely need to be escaped?