Preventing rotation gizmo back (mesh ocluded) section to be shown

Hi there:

I trying to customize the standard Gizmo as far as possible, only with the available standard options of BJS Engine, without needing to implement a custom solution; so I need the back part (hidden by mesh) of an YAxis only rotation gizmo not to be shown, in order to achieve a more pulished look and feel for my specific needs.

This way, I hoped some API similar to BoundingBoxRendering.showBackLines (= false) could be available. Sadly, I’ve just checked de docs but I can’t see anything for getting this effect working.

Best regards.

cc @Cedric

1 Like

Rendering needs 2 passes: 1 that is same as now with depth test. And a second with a different depth function that will render geometry when culled by the depth buffer. Check this example:

To achieve this, you can set custom geometry with sub meshes. Or even better, update gizmo to support that feature. It’s a per gizmo change. For planeRotationGizmo, you can try to duplicate mesh creation and set a different material here : Babylon.js/packages/dev/core/src/Gizmos/planeRotationGizmo.ts at 30e90013527ceda5735d2d7a39143c5d327e0a4e · BabylonJS/Babylon.js · GitHub

2 Likes