-
-
Notifications
You must be signed in to change notification settings - Fork 138
Description
Issue
When exporting an object from blender, the diffuse color value is set from the intensity viewport display color instead of the material base color, and the emission color is set from the viewport display color instead of the material emission color.
OS/Platform
Windows 10 Pro 1909 + Blender 2.8 + Godot 3.1.1.stable.official
Problem
as seen in: https://github.com/godotengine/collada-exporter/blob/master/io_scene_dae/export_dae.py
Emission color set to diffuse:
line 295
# TODO: More accurate coloring, if possible
self.writel(S_FX, 6, "<color>{}</color>".format(
numarr_alpha(material.diffuse_color, material.emit)))
self.writel(S_FX, 5, "</emission>")
Diffuse color set to diffuse_intensity
line 311
self.writel(S_FX, 6, "<color>{}</color>".format(numarr_alpha(
material.diffuse_color, material.diffuse_intensity)))
self.writel(S_FX, 5, "</diffuse>")
Steps to reproduce
- Open blender default scene,
- Click the default cube, and then click the material tab
- Set base color to Red, and Viewport display color to blue.
- Export the scene with the Better Collada exporter.
- Import to godot, and see the material albedo color is set to blue but with slightly lower intensity, and the emission color is set to blue .
Suggestion to fix
I think the more correct export would be to set the diffuse color to the Base color of the material, and not set emission color to diffuse color from viewport display color, but instead to the emission color from the material.