Closed
Description
Tested versions
- Reproducible in 4.5-beta1 as well as earlier versions
System information
Windows 11
Issue description
JoltSoftBody3D::update_rendering_server()
computes vertex normals incorrectly: it iterates through all faces, and sets the normal for each vertex to the face normal. This results in each vertex getting the normal value from one of its attached faces (the last one in the face list). This results in weird and broken shading.
The code should instead be computing the vertex normal by averaging the normal from all associated faces, similar to how GodotSoftBody3D::update_normals_and_centroids()
behaves.
Steps to reproduce
Run the default scene in the attached MRP.
Example of output with Jolt's current normal calculation:
Output with fixed normal calculation, similar to the Godot physics engine behavior: