Page MenuHome

Collada export, does not take "diffuse" value from material's 'base color' when nodes are disabled
Closed, ResolvedPublicBUG

Description

System Information
Operating system: WIN 10
Graphics card: Quadro P1000

Blender Version
Broken: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: f6cb5f54494e, type:
build date: 2019-07-29, 09:44 AM
Worked: 2.79b

Assigning a material with color directly to faces in 2.80 and exporting it as a .DAE (Collada) works fine.

Assigning a material with color from a library (Material Library VX add-on) and exporting the file as a .DAE (Collada) doesn't work. The color doesn't get assigned to the "diffuse" property.

Exact steps for others to reproduce the error

I apologize if I'm repeating a known bug (I did try to search). I am also not a programmer and am using Blender for the first time, so pardon any mistakes in nomenclature or process...

Here is a .Blend file of a cube colored with a material created from scratch:

Here is a .Blend file of a cube colored with a material from a library (I hope the file contains the info?):

  1. Open the Direct_red.Blend. Export to .DAE. Import this DAE and notice the color is correct.
  2. Open the Library_red.Blend. Export to .DAE. Import this DAE and notice the color is default.

Event Timeline

Jacques Lucke (JacquesLucke) changed the task status from Needs Triage to Needs Information from User.Jan 21 2020, 3:31 PM

I can reproduce the issue. The issue is probably that only the node tree is evaluated to figure out the diffuse color. In the second file, the node tree has not been created yet. For me it works after I clicked on "Use Nodes".

@Gilles Gagnon (ggagnon) can you confirm that this is the issue you describe?

I am not entirely sure what you are asking, so I tried:

Assigned a material library color to the default cube and exported to .DAE. Then I re-imported the DAE, clicked on 'use nodes' and the color is still not correct.

Assigned a material library color to the default cube when 'use node' (I think this actually turns it off (bar goes grey) is selected and exported to .DAE. Then I re-imported the DAE and the color is still not correct, regardless of whether I click on 'use nodes' or not.

  1. Open library_red.blend.
  2. Click on Use Nodes in the material panel as shown in the screenshot above.
  3. Export the cube with Collada.
  4. Open a new file and import the just exported file.

In my case, the newly imported cube is red.

Maybe I understand the problem incorrectly,

OK!

-When I open Blender 2.8 with the default cube, and click on Surfaces, "Use Nodes" is ON.
-I scroll down to my material library and refresh it to pop up my color presets, "Use Nodes" is ON.
-I select my color preset, "Use Nodes" is still ON.
-I assign my color preset to the cube, "Use Nodes" turns OFF by itself.

At which point, I would export to Collada and never think to go turn what was ON and turned itself OFF, back to ON. Not that I even knew "Use Nodes" was an option before submitting this ticket. I'm completely new to Blender.

Now, our CAD software outputs .STL files, which we have to painstakingly paint in Blender and save as Collada (.DAE) because Collada files actually save color info, where .STL files do not.

So I have to ask, what is the point of EVER allowing Collada files to save without the color info, ie: with "Use Nodes" turned OFF?

That being said, I suspect that our Material Library file just needs to be saved with "Use Nodes" turned on? This material library file was created in Blender 2.79b and I had the misfortune of trying to use it in Blender 2.8. I will try it.

Jacques Lucke (JacquesLucke) changed the task status from Needs Information from User to Confirmed.Jan 21 2020, 4:31 PM

So I have to ask, what is the point of EVER allowing Collada files to save without the color info, ie: with "Use Nodes" turned OFF?

That is a bug, actually. I was just making sure that we are talking about the same thing.

If "Use Nodes" is disabled, the written color information should be taken from the object color.

Hmm..

I open my material library file with Blender 2.8, located at:

C:\Program Files\Blender Foundation\Blender\2.80\scripts\addons\materials_library_vx\

"Use Nodes" is turned OFF (as expected, from above).

I turn "Use Nodes" ON and then try to save under a different file name.

Blender crashes...

The attached file is the Material Library created under Blender 2.79b

So I have to ask, what is the point of EVER allowing Collada files to save without the color info, ie: with "Use Nodes" turned OFF?

That is a bug, actually. I was just making sure that we are talking about the same thing.

If "Use Nodes" is disabled, the written color information should be taken from the object color.

Oh, OK. Sorry for the passive aggression.

Bastien Montagne (mont29) renamed this task from Collada export, "diffuse" not being assigned color when material assigned from a library to Collada export, does not take "diffuse" value from material's 'base color' when nodes are disabled.Jan 22 2020, 9:49 AM
Bastien Montagne (mont29) changed the subtype of this task from "Report" to "Bug".