The “Red T” (one of the meshes) and the “Black T-like” mesh will flicker when moving the camera, Both of them intersect the third “Plate” mesh, but the coordinates of the red and black meshes are clearly, but very few, on top of the top edge of the Plate-mesh. The fourth mesh amplifies the problem, Without it, the problem will not occur (sometimes) or will occur at greater distances (sometimes) or does not have any effect at all (sometimes).
These mesh’s data came from a foreign tool: original the model was an fbx file which was converted to json-data using the autodesk fbx sdk. So I do not have any influence to the coordinates in “.positions”
If I move the camera close to the model, everything looks fine - no flicker. When moving away, at some point flickering starts. I think, it’s a kind of z-order fighting due to numerical inaccuracy. But i do not have any idea, how i can fix the issue.
I’m sorry, if this question was answered before, but I did not find anything that solved my problem.
I tried
use logarithmic depth buffer
played around with camera.min?/max?
So I kindly want to ask you for some help…
Thank you in advance.
Can you please explain in very short, what zOffset on a material is actually doing? Is it adding the material deping zOffset to the Mesh’s or face calculated depth Information? Or is it just used for a kind of logical sorting of faces with same depth?
What value must zOffset have for my position values ? Makes a zOffset of 0.001 any sense or is it an integer value?
I’m sorry, at the Moment your modified example is empty for me, therefore I’m asking this question.
Unforunately, in my mind, materials zOffset is not a solution for me. The scenes we want to show are triangulated CAD models. I do not have any idea, wich material is applied to what surfaces. If I use zOffset, models wich look perfect without the use of z-Offset, will look very broken. That ist, because the materials zOffset of a surface that should be in the back moves that respective surface accidently on top.
@Deltakosh - I deleted my post that you replied-to… because it was no help. But thx for info about zOffset, just the same.
I made a few playgrounds… pg #7 being my latest… and not helpful. Good flickering, though. I did some engine anti-alias tests in line 29. Nothing learned. Also added some normals in lines 12 & 17… no affect (I’ll try anything).
@qqqzhch just change camera minz and maxz and it would not happen, this is why I create the default camera after scaling in your other post. would be great to keep the conversation there.
After I import gltf, I create environment and sky boxes and lights, but there are still sawtooth and flicker. Should Minz and maxz be changed as small as possible?