Hi folks. We are working on web-based platform that allows to analyse some seismic data. And we are using Babylon for 3D part of that system.
Users able to apply custom colorizing over some raw textures that we get from backend. In could be heights map or ground depth-slice. And user able to make some of pixels in texture to be partially or fully transparent. In addition, user able to apply global transparent to object.
So let say scenario is following:
- backend returns grayscale opaque image to browser
- then user applies colorizing to image from point 1 - it creates a new Blob or base64 png on the clien side, where some pixel are transparent
- that image applied to the plane
- user able to change commom opacity of plane by slider
- user able to change positions of objects in view
In view user have ground of heights map, 2 ground depth-slices and system grid with labels.
And the issue is that when all of objects have transparent pixels - blending-overlapping of objects totally incorrect. And while rotating camera - blending-overlapping changes during rotation process.
I was looking into Transparent Rendering | Babylon.js Documentation, and I didn’t found working solution.
- alphaIndex/renderingOrder - we are not able to use it, as there at lest 3 objects that may crossing each other at the same time
- useOrderIndependentTransparency - produces artefacts and makes performance really poor (on our project we have more data than in provided playground)
- varios combination of needDepthPrePass/forceDepthWrite/separateCullingPass/transparencyMode/alphaMode does not produce expected result. There are still blending-overlapping changes during rotation process
Playground: Babylon.js Playground