godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.46k stars 21.07k forks source link

GridMap lighting appears as if a sphere instead of per surface. (soft edges) #77908

Closed tavurth closed 1 year ago

tavurth commented 1 year ago

Godot version

v4.0.3.stable.official [5222a99f5]

System information

Mac (Compat mode)

Issue description

When drawing imported meshes in a gridmap the shading is very strange.

Screenshot 2023-06-06 at 19 07 49 Screenshot 2023-06-06 at 19 08 19

This works correctly for godots built in BoxMesh however

Steps to reproduce

  1. Download minimum repo
  2. Run the project

Minimal reproduction project

test-gridmap-lighting.zip

Calinou commented 1 year ago

This is not an issue with the engine – this is an issue with the mesh as authored in your 3D DCC. Your box meshes both have smooth faces when they should have flat faces, as shown when imported in Blender:

image

You need to choose the option to make faces flat in your 3D DCC, then export an OBJ again.

tavurth commented 1 year ago

@Calinou Thank you! 🙏

I'd been wondering if it was a bug for a while

Screenshot 2023-06-06 at 19 41 36

In Wings3D

Screenshot 2023-06-06 at 19 42 19 Screenshot 2023-06-06 at 19 42 31