Collada import/export

The interface, modeling, 3d editing tools, import/export, feature requests, etc

Moderators: jesterKing, stiv

Post Reply
Syron
Posts: 0
Joined: Fri Nov 20, 2009 5:02 am
Location: Germany

Collada import/export

Post by Syron »

I ran across some issues on importing and exporting DAE files with materials using multiple textures. I have looked at the code, but I am just to unexperienced in the Blender internals to provide a patch here. I am even not really sure if they are related to Blender's code or to Collada limitations.
The problems are:

1) Sometimes the images assigned to an UV layer in a DAE do not get assigned to them in Blender. They're loaded and assigned as a texture in the material, but they don't show up in the UV editor, where I have to manually load the images. It seems to be totally random on which images this happens.

2) Only the first texture layer gets exported to a DAE, and only the first one gets imported. This is bad, because I wrote a game file converter that needs to use diffuse, alpha, normal and lightning textures.

FYI, I am using the Blender SVN code as a reference for writing the export code of my tool.

blender --version
Blender 2.56 (sub 1) Build
[ the one shipped with openSuSE 11.4 ]
Holy wars are arguments about who's imaginary friend is better.

Myrmecophagavir
Posts: 0
Joined: Tue Aug 24, 2010 1:40 am

Post by Myrmecophagavir »

I certainly encountered a fair few issues with Collada support when I evaluated Blender a while back. Have you put these on the bug tracker?

Syron
Posts: 0
Joined: Fri Nov 20, 2009 5:02 am
Location: Germany

Post by Syron »

Not yet, I wanted to be sure that it is not a collada format related issue.
Holy wars are arguments about who's imaginary friend is better.

Myrmecophagavir
Posts: 0
Joined: Tue Aug 24, 2010 1:40 am

Post by Myrmecophagavir »

I don't know about the first problem; but if it happens at random it sounds like a bug.

The second issue is more complex. The Collada format is extensible: it comes with some built-in material structures, which correspond to common rendering pipelines. Most DCC apps use only the "common profile" - which is defined in terms of the old-style fixed function pipeline. You can use Lambert, Phong, Blinn etc. specifications for materials, but they just define slots for ambient, diffuse, specular, emissive, transparency and reflectivity colours/textures. It doesn't include normal or light maps, or multiple texture layers in each slot.

However, the Collada spec also defines other profiles: GLES which maps to the OpenGL ES 1 feature set (i.e. register combiners!), and Cg and GLSL which are of course more open.

So what we really need is Blender to output versions of its materials in as many formats as it can - ideally, it would output all properties to a technique in a Blender-specific profile, and also emit successively cruder approximations to the GLES and Common profiles. The icing on the cake would be for it to output GLSL shaders in that profile, which would allow client apps to replicate Blender's rendering setup with no need to write their own code...

A similar thing applies to lights. I spoke to Nathan Letwory, one of the developers, about this some months ago and apparently some progress was made. I haven't checked up on it for a while though.

Unfortunately in the short term I don't know what to suggest. If Blender isn't making use of the more advanced Collada profiles when it outputs its DAE files, information will be lost. More pressure in the feature trackers might push it up the schedule though... :)

Post Reply