PDA

View Full Version : Collada


Toronto
28th June 2009, 07:05 PM
Is anyone working on a pluggin to import/export the Collada file format which is now considered an industry standard format.

Mossie
29th June 2009, 06:07 AM
This is already in the latest version, without animation, as AC3D doesn't have this feature.

Toronto
29th June 2009, 08:29 AM
Thanks Mossie,
I did not see Collada listed on the features page which lists the other import/export files.

http://www.inivis.com/features.html

Gus
12th July 2009, 01:23 AM
I did test it with the "Blue Mars" project that uses Collada, but sadly AC3D failed the test, so it needs fixing/updating.

However, Unwrap3d Pro did pass the Collada test. Tested Milkshape3D's Collada and it passed compatibility...

For your information here's link address to Blue Mars project:
http://www.bluemarsonline.com/

Mossie
12th July 2009, 03:23 AM
So which part of the test did it fail?

Any indications would be useful for Andy to fix, if it is not to do with animation.

Gus
12th July 2009, 03:25 AM
Failed to import; mesh cannot be found.......



<bmImportCmd> log start, file"C:\Blue Mars Tools\Developer\Game\Objects\MyData\ac3dcrate\ac3d crate.log"
bmImportCmd v3.6.0 : 19 June 2009

Command line:
bmImportCmd.exe -log -autoProxy -useFauxMap -fauxMapFilePath textures/ar/Common/ar_solid_255_255_255_diffuse.dds -mtl -texturePath objects/mydata/ac3dcrate/ C:\Blue Mars Tools\Developer\Game\Objects\MyData\ac3dcrate\ac3d crate.dae C:\Blue Mars Tools\Developer\Game\Objects\MyData\ac3dcrate\ac3d crate.cgf

Progress:
--> Executing name fix pass.
--> Executing triangulator.
--> Executing check pass.
ERROR : checkPassFn() : No valid mesh geometry found, ..\ColladaCry\check.cpp
ERROR : processSceneGraph() : Process function failed, ..\ColladaCry\process.cpp
ERROR : main() : Data check failed, .\main.cpp
--> Aborting.
<bmImportCmd> log ends



so which part of the test did it fail?

Any indications would be useful for andy to fix, if it is not to do with animation.

Toronto
28th July 2009, 12:41 PM
So from Gus's post above, does the Collada format work (minus animation) ??? ...... is the Collada import/export usable ??? .................. or is it being updated ??? ..............

Gus
1st October 2009, 03:02 AM
Since the las time I posted it still doesn't work, nada, nothing. I did test Milkshap3d and unwrap3d pro and those did work. I hope they fix this asap cuz I wanna make a video demonstrating its use with Blue Mars... for reference look at my current videos..

http://wildwestgames.org/forums/forumdisplay.php?f=24

The whole point? Budget 3d modelers for high end game engines... :)

So from Gus's post above, does the Collada format work (minus animation) ??? ...... is the Collada import/export usable ??? .................. or is it being updated ??? ..............

epatel
3rd October 2009, 03:07 PM
I have used Blender successfully to convert Collada to AC3D

http://www.blender.org/features-gallery/features/

Andy
5th October 2009, 07:03 AM
Don't assume that it's AC3D's Collada output at fault here - it could be the way it's being interpreted by your loader.

I'm not saying that there may not be a problem in AC3D's output - bugs happen. It worked with the loaders we tested.

If you can send me a simple file e.g. a plain triangle that does load in, we can check it against the AC3D output of a similar model. Better still, ask the developers of the loader what they think is wrong with AC3D generated Collada and report that. Once we have this info., I'm sure we can fix it.

Gus
5th October 2009, 01:15 PM
I did more tests, this time tested Bonzai3d and Sketchup and they both worked with Blue Mars development SDK......

For you reference and testing here's a simple cylinder exported from Sketchup as .DAE and imported into Blue Mars item editor.......




http://wildwestgames.org/cylinder.dae




Preview inside Blue Mars Item Editor

http://i33.tinypic.com/11lr7nr.jpg




Don't assume that it's AC3D's Collada output at fault here - it could be the way it's being interpreted by your loader.

I'm not saying that there may not be a problem in AC3D's output - bugs happen. It worked with the loaders we tested.

If you can send me a simple file e.g. a plain triangle that does load in, we can check it against the AC3D output of a similar model. Better still, ask the developers of the loader what they think is wrong with AC3D generated Collada and report that. Once we have this info., I'm sure we can fix it.

Dennis
6th October 2009, 11:36 AM
I've been working with the Collada format lately, and thought I'd take a swing at this one.

I compared a cylinder exported in AC3D against the exported cylinder provided in the above link. The fundamental difference is that the cylinder in the link above uses <triangles> to describe geometry, while AC3D uses <polylist>. Both formats look syntactically correct, however, and I can find no problems in the AC3D export --- I was also unable to get any other Collada importer to break when loading an AC3D Collada file.

I've attached a cylinder exported from LightWave -> Collada - can you see if that one imports? ( NOTE: I had to rename it to cyl_lw.dae.txt - you can rename it to cyl_lw.dae )

If the attached file imports, then we can more easily compare the AC3D and LightWave files, since they both use the same geometry descriptors.

Dennis
6th October 2009, 11:41 AM
One more thing - I'm also attaching a LightWave exported cylinder that's been triangulated, in the event Blue Mars doesn't like polys with > 3 sides.

As before, can you try this out in the Blue Mars importer and let us know the results?

Gus
6th October 2009, 02:57 PM
Niether of the two dae files you supplied worked, I suppose you didn't uv map them? For your information .DAE will not import into Blue Mars SDK if it ain't uvmapped....

Keep in mind that Lightwave is supported on Blue Mars, we have a few Lightwave users on there....

Try uvmapping them and send them again and will try......



I've been working with the Collada format lately, and thought I'd take a swing at this one.

I compared a cylinder exported in AC3D against the exported cylinder provided in the above link. The fundamental difference is that the cylinder in the link above uses <triangles> to describe geometry, while AC3D uses <polylist>. Both formats look syntactically correct, however, and I can find no problems in the AC3D export --- I was also unable to get any other Collada importer to break when loading an AC3D Collada file.

I've attached a cylinder exported from LightWave -> Collada - can you see if that one imports? ( NOTE: I had to rename it to cyl_lw.dae.txt - you can rename it to cyl_lw.dae )

If the attached file imports, then we can more easily compare the AC3D and LightWave files, since they both use the same geometry descriptors.

One more thing - I'm also attaching a LightWave exported cylinder that's been triangulated, in the event Blue Mars doesn't like polys with > 3 sides.

As before, can you try this out in the Blue Mars importer and let us know the results?

lisa
6th October 2009, 05:37 PM
Just wondering... if you triangulate the model first, will AC3D export it as triangles into the Collada file?

I haven't played with the Collada export nearly enough yet.

Dennis
7th October 2009, 12:13 AM
Hi Gus - try this one - it has texture coordinates.

Just wondering... if you triangulate the model first, will AC3D export it as triangles into the Collada file?

Hi Lisa - it still writes out a polylist, even with a fully triangulated geometry.

Gus
7th October 2009, 12:51 AM
Okay, I went back for a second try and checked the previous lightwave .DAE files again, including this one here and all passed........ the problem from previous attempt was that the cylinders were so tiny but once scaled they all imported successfully.

However, AC3D still doesn't import the .DAE...same error as posted in previous threads........


<bmImportCmd> log start, file"C:\Blue Mars Tools\Developer\Game\Objects\MyData\ac3dcrate\ac3d crate.log"
bmImportCmd v3.6.0 : 19 June 2009

Command line:
bmImportCmd.exe -log -autoProxy -useFauxMap -fauxMapFilePath textures/ar/Common/ar_solid_255_255_255_diffuse.dds -mtl -texturePath objects/mydata/ac3dcrate/ C:\Blue Mars Tools\Developer\Game\Objects\MyData\ac3dcrate\ac3d crate.dae C:\Blue Mars Tools\Developer\Game\Objects\MyData\ac3dcrate\ac3d crate.cgf

Progress:
--> Executing name fix pass.
--> Executing triangulator.
--> Executing check pass.
ERROR : checkPassFn() : No valid mesh geometry found, ..\ColladaCry\check.cpp
ERROR : processSceneGraph() : Process function failed, ..\ColladaCry\process.cpp
ERROR : main() : Data check failed, .\main.cpp
--> Aborting.
<bmImportCmd> log ends



Hi Gus - try this one - it has texture coordinates.



Hi Lisa - it still writes out a polylist, even with a fully triangulated geometry.

Dennis
7th October 2009, 01:40 AM
Okay, one last test and this should give us something we can pick apart.

I've attached 2 files, one export from LightWave and one from AC3D, both of a single triangle with a red material applied, both around 30 units square on the XZ plane so scaling shouldn't be an issue.

Gus - can you try exporting these, and verify whether the LW triangle passes and the AC3D triangle fails?

If so, this will be a very good file to check for diffs with, as both files contain very little content and are much easier to compare than files with lots of geometry (like the earlier cylinder tests).

Thanks

Gus
7th October 2009, 03:02 AM
Your Lightwave .DAE on this one passed, but the AC3D failed again.......



Okay, one last test and this should give us something we can pick apart.

I've attached 2 files, one export from LightWave and one from AC3D, both of a single triangle with a red material applied, both around 30 units square on the XZ plane so scaling shouldn't be an issue.

Gus - can you try exporting these, and verify whether the LW triangle passes and the AC3D triangle fails?

If so, this will be a very good file to check for diffs with, as both files contain very little content and are much easier to compare than files with lots of geometry (like the earlier cylinder tests).

Thanks

Dennis
7th October 2009, 10:23 AM
Hi Gus,

There are a handful of differences in the LW and AC Collada files, but the majority should not affect imports at all (i.e., the AC file contains normals and texture coords, different poly shading model, different close tag methods used for "empty" keys, etc).

The only one that stood out as a possible issue is that the AC export doesn't include a <bind_material> key.

Without the <bind_material>, the triangle loses its red material when importing into LW. Because different Collada importers will define this behavior differently, it's possible that Blue Mars is throwing an error because it cannot map the material to the mesh.

I added the <bind_material> tag to the AC triangle, and now the red material shows up in LW --- hopefully this will also fix the Blue Mars import issues. Can you try the attached file in Blue Mars and let us know how that goes?

Thanks

Gus
7th October 2009, 11:37 AM
Sorry, but it failed again. Though the errors may be bit different than last error report.........


COLLADA IMPORT: C:\BLUEMA~1\Bin32\bmImportCmd.exe -log -useFauxMap -fauxMapFilePath textures/ar/Common/ar_solid_255_255_255_diffuse.dds -autoProxy -mtl -texturePath "c:/users/gus/desktop/su test/lightwave/" "C:\Users\gus\Desktop\SU Test\lightwave\ac_tri.dae" "C:\Users\gus\Desktop\SU Test\lightwave\ac_tri.cgf"
bmImportCmd v3.7.0 : 26 Aug 2009

Command line:
C:\BLUEMA~1\Bin32\bmImportCmd.exe -log -useFauxMap -fauxMapFilePath textures/ar/Common/ar_solid_255_255_255_diffuse.dds -autoProxy -mtl -texturePath c:/users/gus/desktop/su test/lightwave/ C:\Users\gus\Desktop\SU Test\lightwave\ac_tri.dae C:\Users\gus\Desktop\SU Test\lightwave\ac_tri.cgf

Progress:
--> Executing name fix pass.
--> Executing triangulator.
--> Executing check pass.
--> Executing faux map pass.
--> Executing auto proxy pass.
--> Executing conforming pass.
--> Executing conversion pass.
ERROR : retrieveTextureVertexArrayData() : Geometry problem
ERROR : convert_Mesh() : Retrieve texture vertex array data failed
--> Writing geometry/animation file.
--> Executing material pass.
--> Writing material file.
--> Finished.



Hi Gus,

There are a handful of differences in the LW and AC Collada files, but the majority should not affect imports at all (i.e., the AC file contains normals and texture coords, different poly shading model, different close tag methods used for "empty" keys, etc).

The only one that stood out as a possible issue is that the AC export doesn't include a <bind_material> key.

Without the <bind_material>, the triangle loses its red material when importing into LW. Because different Collada importers will define this behavior differently, it's possible that Blue Mars is throwing an error because it cannot map the material to the mesh.

I added the <bind_material> tag to the AC triangle, and now the red material shows up in LW --- hopefully this will also fix the Blue Mars import issues. Can you try the attached file in Blue Mars and let us know how that goes?

Thanks

Dennis
7th October 2009, 12:37 PM
That's actually good news - think we're getting closer.

This actually looks like another <bind_material> issue. Unfortunately, I'm not sure how to specify a <bind_material> for texture coordinates when there's no actual texture assigned.

I gave it a try using the material name as a semantic for binding the texture coordinates to the mesh --- would you mind trying this file?

Thanks again,
Dennis

Gus
7th October 2009, 12:43 PM
Sorry, but failed again....... :confused:



COLLADA IMPORT: C:\BLUEMA~1\Bin32\bmImportCmd.exe -log -useFauxMap -fauxMapFilePath textures/ar/Common/ar_solid_255_255_255_diffuse.dds -autoProxy -mtl -texturePath "c:/users/gus/desktop/su test/lightwave/" "C:\Users\gus\Desktop\SU Test\lightwave\ac_tri.dae" "C:\Users\gus\Desktop\SU Test\lightwave\ac_tri.cgf"
bmImportCmd v3.7.0 : 26 Aug 2009

Command line:
C:\BLUEMA~1\Bin32\bmImportCmd.exe -log -useFauxMap -fauxMapFilePath textures/ar/Common/ar_solid_255_255_255_diffuse.dds -autoProxy -mtl -texturePath c:/users/gus/desktop/su test/lightwave/ C:\Users\gus\Desktop\SU Test\lightwave\ac_tri.dae C:\Users\gus\Desktop\SU Test\lightwave\ac_tri.cgf

Progress:
Warning: The DOM was unable to create an element named bind_vertex_input at line 105. Probably a schema violation.

--> Executing name fix pass.
--> Executing triangulator.
--> Executing check pass.
--> Executing faux map pass.
--> Executing auto proxy pass.
--> Executing conforming pass.
--> Executing conversion pass.
ERROR : retrieveTextureVertexArrayData() : Geometry problem
ERROR : convert_Mesh() : Retrieve texture vertex array data failed
--> Writing geometry/animation file.
--> Executing material pass.
--> Writing material file.
--> Finished.






That's actually good news - think we're getting closer.

This actually looks like another <bind_material> issue. Unfortunately, I'm not sure how to specify a <bind_material> for texture coordinates when there's no actual texture assigned.

I gave it a try using the material name as a semantic for binding the texture coordinates to the mesh --- would you mind trying this file?

Thanks again,
Dennis

Dennis
7th October 2009, 02:27 PM
thanks Gus.

Unfortunately, I'm out of approaches from this end, --- not much I can do at this point without access to the Blue Mars importer. But we have identified a couple of potential issues with the Collada exporter:

* No <bind_material> tag is written. This is obviously impacting Blue Mars, and it also prevents the material from being applied when importing the Collada file into LightWave.

* No <bind_vertex_input> is written to bind the texture coordinates to the mesh. This may be causing issues with Blue Mars, but I'm not sure if that's exactly what's breaking with it.

* When a texture is assigned in AC3D, no <library_images> section specifying the texture is included in the Collada export file.

With the first two issues, I'm not sure how much it affects other importers outside of Blue Mars and LightWave, but the third issue (no texture written) is definitely an issue.

Dennis

Gus
7th October 2009, 02:42 PM
If you wish to further research this you can apply as Blue Mars Developer at http://www.bluemarsdev.com/ ... once your in you will have access to the tools/editors ....

Note: Blue Mars is a platform technology and not a game. It uses CryEngine2 ....

On the list of Officially supported 3d applications include 3dsMax, Maya, Blender, Sketchup, Lightwave, and Shade.

I have tested Milkshape3d, Unwrap3d, and Bonzai3d ...these passed import of collada files to Blue Mars....


I've been an avid AC3D user for awhile now, but sadly didn't work with BM and hope the issue will be solved sometime....


thanks Gus.

Unfortunately, I'm out of approaches from this end, --- not much I can do at this point without access to the Blue Mars importer. But we have identified a couple of potential issues with the Collada exporter:

* No <bind_material> tag is written. This is obviously impacting Blue Mars, and it also prevents the material from being applied when importing the Collada file into LightWave.

* No <bind_vertex_input> is written to bind the texture coordinates to the mesh. This may be causing issues with Blue Mars, but I'm not sure if that's exactly what's breaking with it.

* When a texture is assigned in AC3D, no <library_images> section specifying the texture is included in the Collada export file.

With the first two issues, I'm not sure how much it affects other importers outside of Blue Mars and LightWave, but the third issue (no texture written) is definitely an issue.

Dennis

Dennis
7th October 2009, 05:40 PM
Andy/Inivis,

I pulled the Blue Mars dev kit so I could run the import with AC3D test data, and I think I've found the issues.

I've attached 2 AC3D Collada exports - one is a textured triangle created with AC3D (actri.dae) and the other is an edited version of that triangle (actri_EDITED.dae). The edited version contained indented/spaced/commented code that handles material/texture data that Blue Mars was erroring on.

Note that these changes also allow the materials and textures to show up when I import this into LightWave --- without the changes, the material colors/textures don't show. I can't guarantee that LightWave is doing everything correctly, of course, but it's the most trustworthy Collada importer that I own.

The changes that were made to make this import correctly into LightWave follow. Just to stress this, the import already worked for geometry, but materials/textures weren't showing up, and UV maps weren't being applied.


Added a <library_images> tag to specify a texture.
Updated the <library_effects>'s <profile_COMMON> tag to describe the texture format/source.
Updated the <library_effects>'s <profile_COMMON>'s common techique <diffuse> tag to include the texture description.
Updated the <visual_scene>'s <instance_geometry> tag to bind the material and texture coordinates to the mesh.


Beyond this, I made one other change that may be a problem with the Blue Mars importer. If the texture coordinate accessor is assigned to X/Y, Blue Mars apparently gets confused, probably with the position or normal array, but setting these coordinates to any other value worked (I used S/T). However, I don't see that using a different nomenclature than X/Y hurts anything, and I also notice that other Collada exporters do the same.

Gus,

I'm not sure whether these changes will be trivial to introduce into the exporter - it was very easy when the geometry consisted of only a single triangle, but in order to support more complex scenes it might not be that easy.

Here's hoping it turns out to be an easy fix, though ;).

Dennis

Gus
7th October 2009, 06:24 PM
Lightwave along with other 3d applications as I previously posted are officially listed of being compatible with Blue Mars. As long AC3D's .DAE doesn't work with Blue Mars it will not make it to the Blue Mars list.

The edited version you supplied did work........ :D




Andy/Inivis,

I pulled the Blue Mars dev kit so I could run the import with AC3D test data, and I think I've found the issues.

I've attached 2 AC3D Collada exports - one is a textured triangle created with AC3D (actri.dae) and the other is an edited version of that triangle (actri_EDITED.dae). The edited version contained indented/spaced/commented code that handles material/texture data that Blue Mars was erroring on.

Note that these changes also allow the materials and textures to show up when I import this into LightWave --- without the changes, the material colors/textures don't show. I can't guarantee that LightWave is doing everything correctly, of course, but it's the most trustworthy Collada importer that I own.

The changes that were made to make this import correctly into LightWave follow. Just to stress this, the import already worked for geometry, but materials/textures weren't showing up, and UV maps weren't being applied.


Added a <library_images> tag to specify a texture.
Updated the <library_effects>'s <profile_COMMON> tag to describe the texture format/source.
Updated the <library_effects>'s <profile_COMMON>'s common techique <diffuse> tag to include the texture description.
Updated the <visual_scene>'s <instance_geometry> tag to bind the material and texture coordinates to the mesh.


Beyond this, I made one other change that may be a problem with the Blue Mars importer. If the texture coordinate accessor is assigned to X/Y, Blue Mars apparently gets confused, probably with the position or normal array, but setting these coordinates to any other value worked (I used S/T). However, I don't see that using a different nomenclature than X/Y hurts anything, and I also notice that other Collada exporters do the same.

Gus,

I'm not sure whether these changes will be trivial to introduce into the exporter - it was very easy when the geometry consisted of only a single triangle, but in order to support more complex scenes it might not be that easy.

Here's hoping it turns out to be an easy fix, though ;).

Dennis

Imsaho
8th October 2009, 04:36 PM
I'm pretty interested in this, for the same reason as Gus. Been looking at AC3D as a collada output for Blue Mars.

If it's any help, there is this post from Blue Mars admin. It's about sketchup but may apply here...

The issue is not that Blue Mars doesn't support untextured meshes, but that SketchUp exports untextured meshes without vertex normals and UVs. Blue Mars importer doesn't support the import of meshes without vertex normals or UVs. FBX Converter is probably adding normals and UVs in the conversion process.

The exact details of what is and isn't supported can be found at the Blue Mars COLLADA compatibility guide
I'll keep watching this thread :-)

Andy
12th October 2009, 06:45 AM
Thanks to Dennis for a lot of hard work, we now have a new Collada exporter.

Please download the attached Windows .zip file, unzip and put the collada_export.p file into the plugins folder. This plugin patches the existing exporter of AC3D 6.5.

Let us know here if it fixes the problems you were getting before.

Gus
12th October 2009, 02:56 PM
On first round test it passed, will test more along the way.... thanks for the BIG cash box!! :)


Thanks to Dennis for a lot of hard work, we now have a new Collada exporter.

Please download the attached Windows .zip file, unzip and put the collada_export.p file into the plugins folder. This plugin patches the existing exporter of AC3D 6.5.

Let us know here if it fixes the problems you were getting before.

Gus
18th October 2009, 12:11 AM
For your viewing pleasure I made this video demoing AC3D for Blue Mars... target audience is 3d artists on a budget and want to build for Blue Mars...

http://www.youtube.com/watch?v=2XH_bzFI_VE

Check it out, I was showcased!!
http://blue-news.com/category/showcase/

Andy
18th October 2009, 07:46 AM
Great video - very well put together.

Have you tried it with more detailed/complicated models?

Gus
22nd October 2009, 01:13 AM
Here it is, a more complex model, from AC3D to Blue Mars.......


http://i34.tinypic.com/33kuhww.jpg (http://www.youtube.com/watch?v=F3Ctg4Y0-58)





Great video - very well put together.

Have you tried it with more detailed/complicated models?

Klyde
25th October 2009, 11:59 PM
Very nice, very very nice. Been reading this post form the begining. Learned lots from it. All of you have put in a lot of hard work.

lisa
27th October 2009, 05:49 PM
Very nice work! Love the lamp.

Seems like the collada is working well with Blue Mars, too... appeared pretty painless from the video.

sierracharlie
29th October 2009, 05:21 PM
If we could import from a Collada file life would be sweet.

Toronto
30th October 2009, 12:28 PM
Not being able to import collada files is a serious issue as you can't import game models to work on them.

example:
If you design a car with AC3D and want to add wheels from another car ...... hmmmmmm...... now what ....... your stuck???

We need a Collada importer to make this work.

Dain Shan
7th January 2010, 12:50 PM
I love you Guys ...
Thats something i was looking for ..
YAY for the AC3D crew ..