Outstanding artifacts from my model with unzoom

Hi,

From the beginning I found visual artifacts on my model loaded. After verification, there is no superposition of the same model, but I can see some textures overlapping between the teeth and the gum.
Much I unzoom, much It’s visible.

I tried to use logarithmicDepthBuffer on my renderer but it makes no effects.

Did somebody has an idea ?
artefacts.gif

Original Post on Discord

by user 224464722878005248

Hey, this does look like a depth precision issue. Is the model very small or very large?

Very large

by user 224464722878005248

Also what’s your near/far clipping planes? If you’re loading models dynamically and calculating the bounds automatically, then I’d advise to also set the clipping planes so that they encompass the model

If you have an object that’s like 10000 units big but have near=0.001 and far=100000 then you’ll have depth precision issues beyond what logarithmicDepthBuffer can solve

near = 0.03
far = 500

by user 224464722878005248

And how big is the model?

On unity, it’s like a Cube of 60, 50, 50

by user 224464722878005248

(of scale)

by user 224464722878005248

by user 224464722878005248

Does it look the same if your near clip plane is, say, 1?

Oh my god, no artifacts at all
Thank you very much, I didn’t know that the near clipping plane could change the render like it

by user 224464722878005248

OK cool :slightly_smiling_face:
Basically what happens is that depth resolution is distributed from near to far, depending on the algorithm either logarithmically or exponentially
So either way depth quality is much higher closer to the near clip plane and worst at the far clip plane, and the smaller you make near the lower the depth resolution “in the back” is

So for loading models dynamically it’s usually put so that the bounding box of the model determines near and far so that you never run into these issues