You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my game I process meshes to generate some data needed for some features. After porting it to Godot 4, some weird issues appeared and I realized Godot 4 is not sharing vertices of triangles in flat faces. Instead, they are ALL duplicated. At least, that's what I see when I inspect vertex data with surface_get_arrays. I do expect some vertices to be duplicated if they are on different faces (with different normals for example), but I don't expect it to be the case on every single triangle when the mesh is a quad for example.
This not only changes the behavior of my game since vertices supposed to be shared no longer are, but it also makes indexed vertices completely useless, because flat-shaded meshes end up with all triangles being individual. In Godot 3, triangles within a flat face were shared.
Steps to reproduce
Make a plane in Blender, export it as OBJ, import it in Godot, compare vertex arrays using a script to print the results of surface_get_arrays.
Run each one's main scene, compare what is printed.
The text was updated successfully, but these errors were encountered:
Zylann
changed the title
Flat mesh reporting 4 vertices in Godot 3 is reporting 6 vertices in Godot 4
Flat-shaded mesh is imported with more vertices in Godot 4
Jan 8, 2023
Calinou
changed the title
Flat-shaded mesh is imported with more vertices in Godot 4
Flat-shaded OBJ mesh is imported with more vertices in Godot 4
Jan 8, 2023
Godot version
Godot 4 beta10
System information
Windows 10 64 bits NVIDIA GeForce GTX 1060
Issue description
In my game I process meshes to generate some data needed for some features. After porting it to Godot 4, some weird issues appeared and I realized Godot 4 is not sharing vertices of triangles in flat faces. Instead, they are ALL duplicated. At least, that's what I see when I inspect vertex data with
surface_get_arrays
. I do expect some vertices to be duplicated if they are on different faces (with different normals for example), but I don't expect it to be the case on every single triangle when the mesh is a quad for example.This not only changes the behavior of my game since vertices supposed to be shared no longer are, but it also makes indexed vertices completely useless, because flat-shaded meshes end up with all triangles being individual. In Godot 3, triangles within a flat face were shared.
Steps to reproduce
Make a plane in Blender, export it as OBJ, import it in Godot, compare vertex arrays using a script to print the results of
surface_get_arrays
.Result I get in Godot 3:
In Godot 4:
Minimal reproduction project
Godot 3: PlaneImport_Godot3.zip
Godot 4: PlaneImport_Godot4.zip
Run each one's main scene, compare what is printed.
The text was updated successfully, but these errors were encountered: