Mesh is Jittering - ZFighting

Hi ,

I am using a revit file which I have converted into glb and then imported in my scene.

Apparently the model was beautiful when I loaded it in sandbox but it is jittering a lot in my project.

any idea what could be the reason?

error

regards,
Nipun David

It seems your are experiencing z-fighting but we would need a repro in the Playground to be able to find why.

I tried that on playground on and it was working fine there as well

Playground URL - https://playground.babylonjs.com/#CR09RC#4
the issue is somewhere in my scene setup or post processing i guess ? :thinking:

regards,
Nipun David

Hard to say.

Maybe you can provide a live link to your scene?

Here is a live link - SomeURL

It is definitely z-fighting. you can either solve by reducing between your camera minz and maxz to increase precision and if all meshes are at the exact same position (the model should be reviewed to prevent that) you could use the babylon z offset functionnality to force a draw order.

1 Like

Thanks, can you share some working examples for z-offset API?

and one more thing. The camera rotation is really smooth in playground example but my camera rotations are not smooth - FYI i am using react-babylon

Playground example - https://playground.babylonjs.com/#CR09RC#7

Any thoughts on that?

https://playground.babylonjs.com/#CR09RC#8

adding @brianzinn for the react part :slight_smile:

There is no difference between the playground and using react-babylonjs for camera. That library is only responsible for adding a camera to a scene. You may be doing something else when props change that is causing your frame rate to drop. For example, there is no createDefaultCameraOrLight or createDefaultEnvironment available declaratively, so if you were running that equivalent in a loop would cause something like that. You would need to share code for us to be able to help there - since playground doesn’t support React - you can create a sandbox - ie: blissful-framework-br0hl - CodeSandbox.

Thanks, Okay will check with team and create a sandbox here

regards,
Nipun David