The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

I've recently made a quick scene with some light tests, using GIProbes / directional light and some environment config.

And I've tried importing different mesh types into that scene, a voxel based one, which works perfectly fine, and another one with a more complex shape, and the shadows/lights looks wrong.. It looks like the direction is wrong, maybe this is caused by my mesh itself, I don't really know..

image showing the issue

Godot version 3.3.2 stable
in Engine by (19 points)

the shadow is just right.
The shading looks wrong. I would guess the normals of the mesh are inverted.
This often happens if you mirror meshes in a 3D editors.

Yeah, you just need to flip the Normals of certain faces in your 3d modelling software. You can visualise them as red and blue in blender in the view settings.

Thank you for your quick answer.
Here's how my mesh looks like in blender, normals doesn't seems to be wrong to me, or am I missing something?enter image description here

can you check the scaling? Some editors just invert the scale (-100%) to mirror.
Wich is technical correct but often results in odd behaviour in realtime rendering.

Blender scale export is 1:1
On my scene it's also looking good, I don't think the scaling is wrong

How about checking it with a "normal shader"

make a new shader material:

shader_type spatial;
render_mode vertex_lighting, unshaded;

varying vec3 c;

void vertex() {
    c.rgb = ((WORLD_MATRIX * vec4(NORMAL.rgb,0.0)).xyz /2.0 + 0.5);

void fragment(){
    ALBEDO.rgb = abs(c);

This shows the "true" normals when rendering.
Compare it with a "normal" mesh thats looks alright with the same shader.

Thank for the advice, this helped me realize that it's a problem with my scene and not the mesh itself, I've tried multiple obj files and they all have this shading problem at the same agnle..

I'm looking forward to find a solution, or maybe you guys can help me about this?
Thanks for the help!

Here how the two object normals renders with the shader

enter image description here

and here without the shader enter image description here

1 Answer

0 votes
Best answer

I find out the issue, it was really stupid, and cause by the Bias in the Shadow option of my directional light, the value was at -2 (???) And cause the shadow render to be totally messed up.

Thanks to everyone who helped!
enter image description here

by (19 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.