Exporting to Collada sets material roughness to 0 #66899

Closed
opened 2019-07-14 07:36:57 +02:00 by Christian Meurin · 5 comments

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: 06312c6d2d
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

**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: `06312c6d2d` 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** - Test .blend file: [test.blend](https://archive.blender.org/developer/F7607095/test.blend) - test.dae: [test.dae](https://archive.blender.org/developer/F7607096/test.dae)

Added subscriber: @Laphicet

Added subscriber: @Laphicet
Gaia Clary was assigned by Sebastian Parborg 2019-07-15 16:10:29 +02:00

This issue was referenced by dd3e3474ab

This issue was referenced by dd3e3474abcb9c07ba0bd26f6b8940fc906d97a5
Member

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)

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)
Member

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.

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.
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blender/blender#66899
No description provided.