Collada export -> import materials don't work #43366

Closed
opened 2015-01-22 12:44:15 +01:00 by Alberto Velázquez · 20 comments

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
error.zip

**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** [error.zip](https://archive.blender.org/developer/F138756/error.zip)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @AlbertoVelazquez

Added subscriber: @AlbertoVelazquez
Gaia Clary was assigned by Bastien Montagne 2015-01-22 13:19:11 +01:00
Member

Added subscribers: @mont29, @JulianEisel

Added subscribers: @mont29, @JulianEisel
Member

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

@mont29 any reason why using BF Blender or was that done by accident?

Works fine here. And again, I'd blame your graphics card (See your other reports). @mont29 any reason why using BF Blender or was that done by accident?

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

@JulianEisel 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.

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.

Added subscriber: @SaurabhWankhade

Added subscriber: @SaurabhWankhade

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.

  • Diffuse
  • specular
  • Normal
  • Ambient

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

  • Diffuse
  • specular

Textures after Normal and ambient wont import back in.

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

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. - Diffuse - specular - Normal - Ambient Then the ones that will be imported back will consist only of - Diffuse - specular Textures after Normal and ambient wont import back in. I will try to fix the Import Normal texture after later.

Added subscriber: @RobertBaer

Added subscriber: @RobertBaer

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.

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 2. Export from Blender as Collada file 3. Clear objects from scene and import the Collada file just exported 4. 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.
Member

So what's the status here? @SaurabhWankhade, any luck so far?

So what's the status here? @SaurabhWankhade, any luck so far?

@JulianEisel D1028 fixes wrong(spec color -> diff) mappping, need some one to verify, test and commit it.
@RobertBaer Transparency issue : already mentioned here #27161. 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)

@JulianEisel [D1028](https://archive.blender.org/developer/D1028) fixes wrong(spec color -> diff) mappping, need some one to verify, test and commit it. @RobertBaer Transparency issue : already mentioned here #27161. 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..
file.tar.gz

Attaching test files.. [file.tar.gz](https://archive.blender.org/developer/F140969/file.tar.gz)

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.

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.

@AlbertoVelazquez : 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.

@AlbertoVelazquez : 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.

@SaurabhWankhade I suppose that, anyway I want test it and tell the results if this wasn't be the case.

@SaurabhWankhade I suppose that, anyway I want test it and tell the results if this wasn't be the case.

This issue was referenced by a78a17bad5

This issue was referenced by a78a17bad5433f78db8991bba4c25aa6fdaef0d4
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

Closed by commit a78a17bad5.

Closed by commit a78a17bad5.
Member

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

thanks to sauraedron (Saurabh Wankhade) for this patch :)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#43366
No description provided.