1

I imported a mesh from Blender 2.90.1 (glTF 2.0 exporter, all transforms applied, normals calced outside) into Godot v4.0.2.stable.official [7a0977ce2] and when setting no_depth_test = true, it seems like Godot enables the manual depth sorting between the mesh's planes themselves rather than sorting the mesh as a whole.

Is it possible to avoid this totally unnecessary internal depth sorting?

Depth sorting works fine with built-in primitive shapes (CubeMesh, PrismMesh...etc.) in the MeshInstance node. However, for more complex meshes and models (ones imported from Blender) it gives the results seen in the pics. built-in CubeMesh - normal (no_depth_test = false) built-in CubeMesh - normal (no_depth_test = true)

I was expecting that imported meshes would behave the same way as the built-in meshes, that manual depth sorting would work for the mesh as a whole and not between the mesh tris themselves.

I thought the problem could be from **separate ** geometry i.e. exporting several separate meshes as one file, even if these separate meshes are parts of a whole (like shelves).

I tried making a single shelf mesh made up of several joined meshes (Ctrl + J), but that didn't work. Normal looking mesh, no_depth_test = false Abormal looking mesh, no_depth_test = true

I tried making a single shelf mesh made up of a single cube with boolean operations to create the shelves, which also didn't work. single cube undergone boolean operation - normal (no_depth_test = false) single cube undergone boolean operation - abnormal (no_depth_test = true)

B3D4ev_guy
  • 11
  • 1
  • I'm unaware of a solution for this. Now, given that you want to disable depth test, I assume you want the mesh to always show on top... Is overlaying a secondary viewport viable for you? – Theraot Aug 22 '23 at 00:22
  • Thanks for replying. I think the main reason I headed for manual sorting is that working with viewports is very cumbersome in Godot (at least for me) + I assume sorting would be less taxing than additional viewports. Nevertheless, your comment encouraged me to rethink the viability of me using viewports. – B3D4ev_guy Aug 22 '23 at 04:11

0 Answers0