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.
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
3 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#66899
No description provided.