Closed OhadBarda closed 2 years ago
transparent meshes (also "alpha blend mode") are sorted based on the center of the mesh, and the depth buffer is not written. To fix this example I would suggest making both materials opaque in the model.
So why when I load it in khronos I don't get 'flipped surfaced' like I get in Donmccurdy viewer?
There are different ways to sort transparent objects, none of which are perfect. If the Khronos Group viewer sorts in the same way as three.js (it may not) then it may still get a different result because sorting two objects occupying the same space may yield inconsistent results.
Because these materials are not actually transparent, they should not be using alpha blending as they are. This issue will not occur with opaque materials.
Thank you. So how I can decide which method to use, when I want to display a semi transparent mesh?
If the material is semi-transparent, use alpha blending. If not, it should be opaque. The rest is mostly up to the engine to decide. If two meshes occupy the same space, or are embedded in one another, transparency is likely to have problems.
So what cause the problem in the file I've sent. Is it a case where two meshes occupy the same space ? Or embedded in one another?
I can't tell which it is in this case sorry.
What info is missing in order for you to tell which case is this? I mean you have the file.
You would need to compare individual triangle data from each mesh to tell the difference, to see if they are the same mesh. Perhaps this could be done in Blender or another tool as well. It doesn't really matter anyway - the mesh doesn't use semi-transparency, so it shouldn't have alpha blending enabled. I do not plan to study this model further myself, as I have limited time to spend responding to questions.
Hi,
For some reason the attached GLB file display wrong z-index in the viewer.
Example with the same camera angle view:![image](https://user-images.githubusercontent.com/73034911/151385921-c34e465a-c7ca-4bbf-a30d-327894f8e179.png)
Curve_gRIS.zip