SkyAtmosphere and World Rebasing

@Stiian, I’m confused why you need precision on the planet and in space at the same time? You should really only need it where the player is.

If rebasing works for you, but it isn’t big enough, simply change the world origin code to use int64 instead of int32. This should solve your problem as you go from a max of 42,000 cubic KM to like 19 cubic LY of rebaseable space (iirc). I say this because if you are doing your planets to real world dimensions as you say you are, then the max rebasing distance the engine can handle by default is 21,000 KM. The distance from the earth to the moon is around 380,000 KM. So you’ll hit the rebasing max. This is an issue our team had early on in a project of ours. Changing to int64 easy solved it.

Side note: You can also “modulate” the world origin code to get even more space, if you really needed it.

If you truly need to be precise in two distant and separate locations simultaneously then you may need to rethink your game design. You can change the engine code to use doubles instead of floats (I know a team that successfully did it) but the amount of modification it takes to the engine almost isn’t worth it. But it does give you a “precise” volume of 72 cubic AU (following the precision standard of 0.25 CM max that the engine has by default for floats).

To put that into comparison with floats, that’s going from a volume of 200 city blocks of “precise space” to a volume the size of the orbit of Neptune. All without rebasing, which makes it much easier to use with multiplayer as using origin rebasing in multiplayer games is very difficult and complex imo.

I don’t think any of this relates to the sky atmosphere, unless it’s not rebasing correctly.

Cheers,
Blake