Page MenuHome

Exporting to Collada sets material roughness to 0
Closed, ResolvedPublic

Description

System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 430.86

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-11 13:50, hash: rB06312c6d2db8
Worked: (optional)

Short description of error
Exporting an object with a material to Collada seems to set the material's roughness to 0, as evident by re-import.

Exact steps for others to reproduce the error

  • Apply a material to a mesh object
  • Preferrably set roughness to 1.0 in principal BSDF
  • Export to Collada, selected objects only
  • Reimport Collada file, preferrably in a new workspace.

Attachments

Event Timeline

Gaia Clary (gaiaclary) triaged this task as Confirmed, Medium priority.EditedJul 15 2019, 6:56 PM

this are actually 2 bugs and one missing feature.

1.) while Blender has decided to make Principled BSDF Shaders the new normal, Collada is a bit old fashioned here. The Blender exporter has always only supported Lambert Shaders for export. But Lambert Shaders have no Shininess. we need to support Shaders in more depth. This is the missing feature.

2.) Despite the fact that Lambert Shaders have no shininess, the Collada exporter actually does export shininess. The exporter should not export shininess because Lambert Shaders do not have shininess. this is a bug.

3.) The Collada Importer tries to get a shininess value from the Collada file. But since Lambert Shaders do not have shininess the value in the Collada file is not found. The value is set to -1 instead which means no data found. But the importer happily assigns a value of -1 to the roughness. which is just plain wrong. This is another bug.

I have created a fix that does:

1.) not export shininess at all because its plain wrong to do so for Lambert Shaders
2.) test for valid values for shininess and reflectivity upon import.

The fix is here: https://developer.blender.org/D5262

The fix will hopefully be added to the Blender 2.80 release (it needs approval but i am certain i will get it)

It turned out that fully supporting shininess in combination with BSDF Shaders is more complicated on the Importer side. Therefore i have removed import of shininess for Blender 2.80 and i will take care of this for Blender 2.81 the today's quickfix still needs approval though.