# Maximum scene limits

I’m currently fiddling with a Solar System and it’s correct proportions (at a division of 1000000). At certain limits I’m experiencing strange texture clipping issues.

Anyone know what the limits of the engine are? All I’ve done so far is the Sun at 0,0,0 and the Earth is sitting at approximately 0,0,150. Both have high resolution textures applied.

I’m building in TypeScript so it’s tough to create a playground example.

Did you know that there is a Typescript version of the playground? Open any playground, click examples button, first example will take you to a Typescript version.

The limitation comes from the float32 precision (which is used to store our data into the GPU)

So the overall recommendation is to create a scaled (down) version of the solar system and do the math to make it credible.

You can still try to make it at right scale and make sure that camera.maxZ is setup correctly to avoid clipping

https://doc.babylonjs.com/how_to/using_logarithmic_depth_buffer

@Deltakosh cool thanks will test the suggestion in the link.

As mentioned I already scaled everything down by 1 million but the problem is when the Earth radius is only 6371km the mesh becomes incredibly small. Zooming starts to present a problem as you can’t get close enough on a sphere mesh that is only 0.006371 units (I’m actually not sure what the units are referred to in Babylon).

I then tried changing the scaling to 100,000 and 10,000 but the Sun texture started having clipping issues (the mesh radius was around 65 units @ 10k scaling). Will check if the depth buffer can fix the problem.

Still going to be interesting introducing Uranus considering it’s distance…

If you can repro in the playground we can try to find creative ways

Problem is I’m also using inversify so I’d have to hack it down but let me see what I can do.

1 Like

I been working on something similar, but taking into account that our sun is 1.3927 billion meters and the fact that Babylon starts to have floating point precission issued at anything larger than 9,999,999 meters and scaling down to 1/100th size gets it up to 999,999,900 meters I can’t even make the scene handle JUST the sun let alone a solar system, it is just not possible as math system it isn’t, I even killed the precision by rounding to the hundredths position in render loop. I couldn’t get scaling down past that as the camera couldn’t get close enough no matter what settings I changed. Perhaps if I could overcome that issue, but you can only go so small before you loose detail due to the fact vertices would scruntch up.