I uploaded the glb file and imported it into the sandbox to check it. The Transparency effect appeared small squares with precise arrangement, which confused me very much. When I checked the model material, the Transparency mode option was Alpha blend. Please ask the official staff to help me solve this effect problem, which affects my work progress. Thank you very much!
Add:
When the two translucent surfaces overlap the area will appear square, if the transparent surface behind the empty, the transparent area will not appear square.
Thank you for your answers
Welcome aboard!
Can you provide the .glb you use? Also, can you test it with https://gltf-viewer.donmccurdy.com/ and see if it renders differently there?
Thank you for your reply. According to your requirements, I imported the model into gltf-viewer. The same transparent square effect still exists in the overlapping area.
I think it’s the texture which has these patterns. If you can share the .glb file, we could verify it.
As I am a new user, I cannot upload the zip file. Please provide me with your email address so that I can send the glb file to you.
The easiest way would be to change the url in this playground to link to your model (line 16):
This way, we can directly inspect the model and the textures.
If you need help to host your file so that it can be used in the playground:
https://doc.babylonjs.com/toolsAndResources/thePlayground/externalPGAssets
Thanks for your guidance, I have now uploaded the model to github.com,The website is as follows:
GitHub - Lemon-quick/Model_Mat
The problem comes from the fact that your material is transparent. In this case, writing to the depth buffer is disabled and the faces are rendered in the order they appear in your mesh, which makes a patterned effect in your case.
What you can try:
- set
material.needDepthPrePass = true
- use Facet depth sort
- use OIT:
scene.useOrderIndependentTransparency = true
Thank you for your answer, I will try this way to deal with it