How to solve a model exists transparent and opaque two Mesh is how to rendering, such as the video I now encounter a problem: my model is gcode data rendering model, using LineMaterial and LineGeometry, when the rotating model is in the elevation state, the transparent part of the model will map the color of the background, how do I deal with, hope to get your help, thank you.
It’s hard to help without seeing code but have you disabled depthWrite
on the transparent parts of the model?
The depthWrite is not disabled
The problem of setting depthTest to false can be solved, but there is a problem where the non-transparent model penetrates
The depthWrite is not disabled
You should try disabling depthWrite on just the transparent parts of the model.
The problem of setting depthTest to false can be solved
I don’t recommend disabling depthTest because of the artifacts you mentioned.
This approach is just a unilateral problem, problematic once there is both a partial transparency and opacity in a model; I have tried it and I now want to have a solution that is compatible with both cases for more help
There is no universal solution to transparency in all cases, but keeping opaque parts and partially transparent parts in separate meshes will avoid a lot of problems.
The transparent and opaque part of my video is in the same mesh