Faces of mesh are lit differently

Godot Version

4.2

Question

I am trying to import a building from blender into godot. Certain faces of my mesh appear darker than others. Everything I’ve researched just says to check the normals, but that doesn’t seem to be the issue as far as I can tell. The light seems to affect each face individually instead of treating it as one solid object. Here are the steps I have taken:

  • Checked face orientation in blender
  • recalculated outside normals, then set from faces (this is what a youtube video told me to do)
  • Used smart UV project and increased island margin slightly
  • deleted all materials
  • tried different shading methods (flat, smooth, auto-smooth)

None of these have helped even slightly. I would greatly appreciate some advice on what I can try to fix this.

Do the faces look good in blender? Could you show the blender version too?

You’ll definitely want to double check all of your geometry, and make sure what is showing in Blender is coming through into Godot, I know with fbx exports from different applications, you can toggle on/off smoothing groups, etc.

If experimenting on any of these things to check them, I’d recommend simplifying the mesh to only include a few rooms that show weird results, not the whole building, it’ll make it easier to diagnose.

To help also I’d check out a few of these viewmodes:

Unshaded to see if the color on the geometry is the culprit, like any baked in vertex colors being visible, or if it’s truly something to do with lighting and normals.

Lighting would be the reverse of that.

Overdraw would show you if you have any layered or overlapping geometry on your model, in this viewmode the ‘brighter’ the color of the surface means the more layers it has, this can cause issues.

Normal Buffer is good to see any vert normal issues, I recommend you place a primitive cube nearby to compare, if any sides of the walls that do not match the color you see on the same facing side of that primitive cube, it will mean you have some vert normal issues. (this will not work in compatibility mode).

additionally to the others: Check normals in Blender (viewport options — Face Orientation)

So, the normal buffer seemed to give me weird results. There is some minor overlapping of faces because as you can tell, the floors are just cubes and are not connected to the walls. This scene will not be viewed from the outside, but I am having the same issues inside. That being said, I don’t really think that is the issue.

Those green faces are where windows are, which were modeled separately, then conjoined to the building by merging vertices. I couldn’t get a good picture in blender, but even in solid view, these faces where the windows are are slightly brighter than the surrounding geometry. I have a feeling this has something to do with me either creating faces, merging vertices, or combining the objects. I forgot to apply the scale of the windows before conjoining the meshes, so maybe that is causing some weird issues?

There are a lot of vert normal issues it seems, most likely from the merging of meshes in blender, and if not maybe some export issues from blender.

You’ll want to use a mode like this video shows:

in Blender to ensure your vert or face normals are oriented the right way (like @realityvsdreams mentioned).

If you are merging everything into a single mesh in blender, is there a reason why you are doing it that way? You should be able to import a collection of wall and floor meshes as separate objects in blender, into godot, then you will keep any merging artifacts from happening.

But also, if all of your buildings will be made out of simple primitive shapes like that, I’d look into just using primitive shapes in godot to build those there, either by using MeshInstance3D nodes or even CSG workflows.

I somehow got it to look decent. I played around with it for awhile and noticed that godot was adding some weird faces in some places. I converted the mesh from quads to tris in blender and that seemed to solve most of my problems. I still had some weird artifacts but I did smart UV project after that and it seemed to work. I know Godot automatically converts meshes to tris on import, but for some reason I think something went wrong with that process.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.