I have a zooblast fbx. This fbx contains objects with organelles in it. I want the organelles other than the ones I clicked to be semi-transparent.
But I encountered a problem. The semi-transparent object masked other objects. Do you have a solution for this problem?
It’s important to understand how PlayCanvas handles the render order of a scene.
Each mesh instance of a 3D model is considered either opaque or transparent. But default, the engine places all of your 3D model that you import in the World layer. The World layer has two sub-layers: one for opaque mesh instances and the other for transparent mesh instances.
The opaque sub-layer is rendered first, with mesh instances rendered in material order. And then the transparent sub-layer, with mesh instances rendered in back to front camera depth order. Back to front order is desired because you want transparent objects to gradually composite. If, instead, they were rendered in front to back order, the nearest transparent object would write to the depth buffer and further away transparent objects would fail the depth test. This is exactly what you’re seeing in your screenshot. Parts of the scene appear to be masked.
What can often happen is that you have multiple overlapping transparent mesh instances and the engine can’t sort them in an order where everything will render correctly. You can view the order in which your scene renders using the profiler:
COOL TIP: You can toggle the profiler in the launch page with ‘ALT + T’.
You could force the draw order of parts of that scene by splitting them into separate FBX files and then place those parts in new scene layers that render after the World layer.
Thank you for your informations.