New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MeshDataTool does not calculate all Normals correctly #9234
Comments
It depends on what you are doing to generate the normals.
Neither ArrayMesh nor MeshDataTool will generate normals for you, so its not an engine issue. The MeshDataTool doc does include a cheap example to generate normals in some cases, but it explicitly says that the normals will be incorrect, so I wouldn't count on it in your actual project. In particular the problem with the code example in the doc is that it doesn't clear the vertex normals to 0 before calculating the new normals. So instead of averaging all the neighbouring face normals (the correct thing), you average the neighbouring face normals with the old vertex normal. |
Your Godot version:
4.2 Mono
Issue description:
I followed the tutorials on generating an ArrayMesh and using MeshDataTool to update the normals of a displaced mesh. My understanding is that MeshDataTool should help in calculating normals of a modified mesh. However, it seems that even in this tutorial demo there is a visible seam that extends from the positive y-axis to the negative y-axis, see picture attached. Display Wireframe and Display Unshaded do not show any issues so I figured the normals along that seem are off.
Any ideas on how to fix this issue?
Is this even a documentation issue or more of a godot engine issue?
URL to the documentation page:
ArrayMesh
MeshDataTool
The text was updated successfully, but these errors were encountered: