Page MenuHome

Collada export -> import materials don't work
Closed, ResolvedPublic

Description

System Information
Windows 7 64bits

Blender Version
Blender 2.73a

Short description of error
If I export a mesh with collada and import to blender the material and textures don't work and only import the specular texture. I have tried differents options to import/export, with lambert specular 0,...

Exact steps for others to reproduce the error

Event Timeline

Alberto Velázquez (dcvertice) raised the priority of this task from to Needs Triage by Developer.
Alberto Velázquez (dcvertice) updated the task description. (Show Details)
Bastien Montagne (mont29) lowered the priority of this task from Needs Triage by Developer to Normal.
Julian Eisel (Severin) triaged this task as Needs Information from User priority.Jan 22 2015, 2:16 PM

Works fine here. And again, I'd blame your graphics card (See your other reports).

@Bastien Montagne (mont29) any reason why using BF Blender or was that done by accident?

@Julian Eisel (Severin) Collada is BF-Blender (core C/C++ code), not addon! ;)

I will try to explain a few more the bug.

If you see the collada file you will see the problem exporting the file. For some reason the collada don't write properly the texture. In the example if I import the collada I obtain one box with one material with two textures with the same image file (spec.png). Instead of three textures (normal, difuse and spec)

This happens with a hundred of files of our proyect.

If in Normal texture Influence->Geometry->Normal is checked, the texture would be exported propertly,but will fail to import back properly.
so if you have any normal texture drag it down to the bottom, because while importing back it would stop importing from the point where normal map texture is encountered.
say the texture are in the order.

  1. Diffuse
  2. specular
  3. Normal
  4. Ambient

Then the ones that will be imported back will consist only of

  1. Diffuse
  2. specular

Textures after Normal and ambient wont import back in.

I will try to fix the Import Normal texture after later.

Windows 8.1 Blender 2.73 Collada Export/Import - Round trip

Steps to reprooduce
Load blend file with an image texture material
or an image texture material with also a normal map

  1. Export from Blender as Collada file
  2. Clear objects from scene and import the Collada file just exported
  3. Note that the texture do not successfully make it round trip.

Verify that the round trip is successful if the objects are exported/imported as .obj

Related:
Import a .dae file created elsewhere (MakeHuman in my case) that has both a texture and a normal mapped material. Note that the texture map imports, but not the normal map. There also seem to be import errors related to the handling of transparency.

If any or all of this is a separate issue I can make a separate bug report.

So what's the status here? @Saurabh Wankhade (sauraedron), any luck so far?

@Julian Eisel (Severin) D1028 fixes wrong(spec color -> diff) mappping, need some one to verify, test and commit it.
@Rob Baer (rwbaer) Transparency issue : already mentioned here T27161. Transparency value is exported to the collada file, but in the collada libs there is no way to access transparency(unless there is a workaround).. so it can be fixed only when libs are fixed.(See COLLADAFWEffectCommon.h, there is api for getting value from collada file like getShininess () etc., but not for transparency.. for some reason parts of code are commented out i.e. mTransparency, mTransparent)

Attaching test files..

I have tested the test files with the actual version, 2.73a, and the last in the builder blender-2.73-1dddcfb-OSX-10.6-x86_64.zip. And in all the version I only obtain two textures, not three.

patched_normal_at_bottom > Normal map and Spec (in this order) with the normal map like a diffuse map
patched_normal_at_bottom_with_normal_enabled > Diffuse map and Spec
patched_original > Diffuse map and Spec

unpatched_normal_at_bottom > Normal map and Spec (in this order) with the normal map like a diffuse map
unpatched_normal_at_bottom_with_normal_enabled > Spec and spec, the first spec like a diffuse map
unpatched_original > Spec and spec, the first spec like a diffuse map

in other way, now OSX can read the diffuse texture in the preview of the file system in the patched versions, at least the diffuse.

@Alberto Velázquez (dcvertice) : the patch is not yet commited, so it wont show up in the nightly build. :)
patched_normal_at_bottom -> The name "normal map" has color enabled(and not the normal mapping), so it is exported as diffuse texture.
patched_normal_at_bottom_with_normal_enabled -> "normal map" wont load, bug.

@Saurabh Wankhade (sauraedron) I suppose that, anyway I want test it and tell the results if this wasn't be the case.

thanks to sauraedron (Saurabh Wankhade) for this patch :)