r/godot•
Xe_OS

Weird shading and import from Blender to Godot

Help

Hi,

I am currently creating a few low-poly assets in Blender to import in my Godot game, but I encountered some unexpected behaviors in the process.

Here are the images for reference: https://imgur.com/a/rJRuTlg

​

In the first image, we can see that the initial import to Godot works fine overall (not too much difference in colors, acceptable)... at least with the default world environment settings. As soon as I transfer the model to my main scene, that uses a custom world environment (just to have a black background), there is a weird pink-ish/red_ish shadeing that appears. My directional light is purely white so it should not give it this shade, and if I replace my custom world env with the default one, it seems to be fine. I've added the settings of the directional light and world environment as 3rd and 4th image.

Do you guys have any idea about the root cause of this shading result?

​

The second issue is more direct. In the first part we can see that the textures on the hat are clean and solid colors. Obviously, I've set the UVs to map directly on a color palette, so that's to be expected. However, when imported inside Godot, suddenly the colors have become a gradient from green to red. This is especially weird considering all my assets use the exact same texturing process, and the others seem to be imported just fine.

I'm using the default DAE exporter of Blender (wanted to use the Better Collada Exporter, but Blender does not recognize it on my machine, so I gave up). Could it be linked to that? I also tried OBJ, but for whatever reason, Godot just gets errors everywhere when importing the OBJ, and the model ends up not having any texture.

Is my method of texturing not good for Godot? If so, what would be the correct way to go about it?

​

Thanks in advance, and have a nice day :)

Posted Jan 31, 2021, 1:01 PM UTC · edited

21
uhmzzz•

I'm not an expert in Blender to Godot, and I could be wrong about this, but I suspect the problem with the skull might be a result of the skull having what's called non-planar quads. if all the points in the quad that makes up the face aren't aligned to a single plane, it causes this sort of issue when the game engine converts the quads into triangles during import.

The second issue is a total guess, but maybe it has to do with indirect lighting? This might be causing the color of the branches to influence the color of the parts of the hat near to it.

1