Inverted lighting in the some part of the model

Godot Version

4.4

Question

Hiiiii :smiling_face:. Ummm, I’m facing an issue that makes my enemy :open_mouth:(Yeah, I know is pretty ugly :rofl:)have the lighting is the opposite site where it should be, but just in the main body :open_mouth:, the rest is fine :confounded:.

If I look inside the model the lighting is where it should be outside, so I thought it must be the normals :open_mouth:, but looking at the model in Blender it seems to be right :confounded:.


I could just flip the main boyd’s normals but then I can’t use backface culling :unamused:.

I tried recalculate the normals and what this topic says but they didn’t work.

These are my import setting if it helps. :sweat_smile:



Uploading: 2a100cb73d86f7966718d38ec05fc2fe7893e626.png…

Help pls :sweat_smile:?

EDIT

I put a normal visualizer to the guy, and its look complently wrong.


This is the shader I used:

shader_type spatial;
render_mode unshaded;

uniform bool WorldSpace = false; // toggle between world and local space
uniform bool RemapRange = false; // remap from -1..1 to 0..1



void fragment()
{
    // World space normal
    vec4 Wn = INV_VIEW_MATRIX * vec4( NORMAL, 0.0 );
    if ( WorldSpace == false ) // Local space normal
    {
        Wn = inverse( MODEL_MATRIX ) * Wn;
    }
    if ( RemapRange == true )
    {
        ALBEDO = ( Wn.rgb + 1.0 )/2.0;
    }
    else
    {
        ALBEDO = Wn.rgb;
    }
}