• 3D
  • Mesh normals imported from Blender look wrong with every export type except obj

@ReimGrab It's good to know I'm not alone! In fact, now that you mention it, I've also experienced issues with normal maps not looking quite right in my other models.

I haven't reported that anywhere yet, but perhaps it's all related to the same importer issue. I will try exporting my other meshes as obj and see if normal mapping works differently on them.

Oh, and here's the github issue link: https://github.com/godotengine/godot/issues/38854

In my case it's either a problem with my model or blenders gltf exporter. I went through the hassle of building Unreal Engine and the model shows the same messed up lighting. The good news is that Godot is working fine. The bad news that I don't have the slightest clue how to fix the issue.

@ReimGrab - Have you tried exporting with a different file type? I'd suggest trying an OBJ file, since it is fairly stable and well-supported, and see if it has the same messed up lighting issue. If it does not, then it is likely something with the encoding to a GLTF/other file process rather than the mesh itself, or at least that is what I would guess.

@ReimGrab it looks like it's either your mesh normals or the normalmap. When importing to godot did you also make sure to invert the normalmap color channel? I think it's y/green channel that might need to be inverted if it's up to the normalmap.

@TwistedTwigleg Tried OBJ and it's the same.

@Megalomaniak I, too, think it's a normal/normalmap problem. And no, I did not try to invert any color channels of the map but will try it. Strange is that the wheels and the trailer look ok (not as good as in blender but ok). Is there any documentation/tutorial to learn more about the caveats of importing models from blender?

I have some decent knowledge of 3D math and coding. I have written small custom engines, scientific visualizations and the likes but I am a total noob when it comes to modelling.

Thanks for any help, really appreciate it, since I am totally lost here.

@ReimGrab It looks like the truck in Blender is one smoothing group. In Godot it seems like you have separate smoothing groups. ( The cab of the truck looks separated from the back end ). My best guess is smoothing groups are not exported correctly. Second guess is you baked different smoothing groups in your normal map. If it was normal map, the issue should disappear when you remove the normal map. I would import the same model into different 3D programs to determine if it was my normal map, or smoothing group. I would almost guarantee the problem lies in Blender 2.8's exporter.

@Ghost Thanks, for your input. AFAIK I did not use any smoothing groups. This isn't even my first vehicle. I already modelled a car and a bus which imported fine. I cannot think of anything I did different on the truck. The left side of the truck looks alot better.

The normalmap is already messed up it blender. Normalmap applied as albedo texture

But it renders just fine in blender as shown above (wtf???). Looks like I have to ask the blender guys what's going on here. Thanks to anyone for helping and sorry for hijacking the thread.