"Cracks" on a big skybox


Here’s the video of the issue I’m experiencing Recordit: Record screencasts fast & free! with GIF Support! . Basically, with big skyboxes I see some kind of - I don’t even know how to call it - cracks. Here is the code:

const pathToEnvTexture = "https://www.babylonjs.com/Assets/environment.dds"
const envTexture = new CubeTexture(pathToEnvTexture, this.scene);
this.skybox = this.scene.createDefaultSkybox(
this.skybox.infiniteDistance = false;

This seems to happen when I have a really big size of skybox around 10k.

I know it’s hard to help when you can’t get to see the full code but somehow I couldn’t reproduce it on sandbox. However, I’m hoping that someone will have an idea what might be the issue.

1 Like

That looks like the maximum draw distance of the camera is too low. You can extend that by setting maxZ for your camera to a larger value:



Yeah that was it!

I wonder what are the costs of having maxZ distance set to a high number, maybe performance? (not sure what depth fighting issue is).

No perf issue. Mostly no impact unless you use very large numbers that will reduce your depth precision