Import dae file problem. The materials color are always white. #77212

Open
opened 2020-05-31 01:58:09 +02:00 by Daniel · 10 comments

System Information
Operating system: Windows 10
Graphics card: MD Radeon R7 Graphics

Blender Version
2.82 sub 7

When I imported objetcs from dae files, all materials are white.

  1. I select the file > Import > Collada
  2. Select the dae file
  3. All materials color are white

When I import the same dae file in unity it works fine.

Regards
Daniel

**System Information** Operating system: Windows 10 Graphics card: MD Radeon R7 Graphics **Blender Version** 2.82 sub 7 When I imported objetcs from dae files, all materials are white. 1. I select the file > Import > Collada 2. Select the dae file 3. All materials color are white When I import the same dae file in unity it works fine. Regards Daniel
Author

Added subscriber: @dandal71

Added subscriber: @dandal71

Added subscriber: @ChristopherAnderssarian

Added subscriber: @ChristopherAnderssarian

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

Do you have a small file you can upload for testing?

Do you have a small file you can upload for testing?
Author

Hi Christopher

Thanks for you time. Yes, I have several files. I have upladed the files. I am newbie in Blender, maybe I am doing something wrong.

Regards
Daniel

guadana.dae

materialTest.dae

materialTest2.dae

ladrillos.dae

Hi Christopher Thanks for you time. Yes, I have several files. I have upladed the files. I am newbie in Blender, maybe I am doing something wrong. Regards Daniel [guadana.dae](https://archive.blender.org/developer/F8567789/guadana.dae) [materialTest.dae](https://archive.blender.org/developer/F8567787/materialTest.dae) [materialTest2.dae](https://archive.blender.org/developer/F8567786/materialTest2.dae) [ladrillos.dae](https://archive.blender.org/developer/F8567785/ladrillos.dae)

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'

Hmm, importing in to Blender there are materials from the export there, they're just not used.

Hmm, importing in to Blender there are materials from the export there, they're just not used.

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Contributor

Added subscriber: @scurest

Added subscriber: @scurest
Contributor

This happens when s share an . Eg from materialTest2.dae

<library_effects>
	<effect id ="effect_id_156-fx"/>
</library_effects>

<library_materials>
	<material id="material_id_156" name="SOLID-MEDIUM_AZURE">
		<instance_effect url="#effect_id_156-fx" />
	</material>
	<material id="material_id_156-logo" name="SOLID-MEDIUM_AZURE">
		<instance_effect url="#effect_id_156-fx" />
	</material>
</library_materials>

When the importer visits a it associates the instantiated effect with a new Blender material like this

  this->uid_effect_map[cmat->getInstantiatedEffect()] = ma;

Then later on when it visits an , it looks up the material to stuff data into from the uid_effect_map.

I'm not sure why the control is "inverted" like this, but since the uid_effect_map only stores one material per effect, only the last material to use an effect "wins" and gets handled when the is visited.

This happens when <material>s share an <effect>. Eg from materialTest2.dae ``` <library_effects> <effect id ="effect_id_156-fx"/> </library_effects> <library_materials> <material id="material_id_156" name="SOLID-MEDIUM_AZURE"> <instance_effect url="#effect_id_156-fx" /> </material> <material id="material_id_156-logo" name="SOLID-MEDIUM_AZURE"> <instance_effect url="#effect_id_156-fx" /> </material> </library_materials> ``` --- When the importer visits a <material> it associates the instantiated effect with a new Blender material like this ``` this->uid_effect_map[cmat->getInstantiatedEffect()] = ma; ``` Then later on when it visits an <effect>, it looks up the material to stuff data into from the uid_effect_map. I'm not sure why the control is "inverted" like this, but since the uid_effect_map only stores one material per effect, only the last material to use an effect "wins" and gets handled when the <effect> is visited.
Philipp Oeser removed the
Interest
Pipeline, Assets & IO
label 2023-02-10 08:54:19 +01:00
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
4 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#77212
No description provided.