# Far space background in a huge universe

I don’t know if I write this thread in a correct topic, if no - sorry then.

My problem is, I don’t really know the good way to do that. I want to create something like the solar system but with a big distances between each planets. Of course in 3D and to be able to flight in our solar system.

I want to create a background of the space. I know that background can be a parent of the main camera, so the background will move with the camera also. But I want to have a huge distance between each platens, so the background have to be really faaaar away on the Z axix to be rendered as the last texture, right? How to achieve this? What is the best way to do that? If Z-axix would be for example on 100000 unit then I need to scale it like a monster and the texture resulution would be really low. Any tips to make it wisely and clearly and nice?

Thanks!

You could do the opposite. Make 1 million miles = 100 co-ords. Scale all your planets down. Multiply your spacehip’s movespeed by 0.0001f Then your texture can sit at like z =1000 and be 10 million miles away

Edit: Now that I’ve thought about that for a minute probably not workable. I’m not sure how to modify the camera to make the teeeny tiny ship visible

1 Like

I think you’re talking about a “skybox”? (if you google “unity custom space skybox” you’ll find lots of tutorial vids on this)

2 Likes

Scaling down won’t work. Also, making your scene very large will make you run into floating point inaccurasy soon.

One trick would be to make a scaled world inside your scene, where you move everything around (including the player). Now, when the player moves a certain treshold from it’s origin, reset it and move everthing relative with it.

Now, to project it to a large world, multiply your distances.

CSharp Accents has a fairly good implementation of this method:

1 Like