# To Infinity and beyond or Vanishing point and the infinty plane, how can you render this in Unity?

Let’s say I’m making a game and want to have the scene look like it has a infinity plane or just really large world view in Unity.

One option is a Skybox, the other would be an ‘artificial’ horizon, drawn onto the screen and rendered so it looks like it goes off into infinity.

I understand that this is the art of illusion in video games but other than a Skybox does not appear to be covered by Unity.

For a quick calculation for distance to horizon…

The square root of the height in m / 0.06752 = km to horizon or viewing distance.

E.g.
2 m = 5.44 km to horizon
10,000 m (10km) = 384.8 km to horizon

So how do you do this in computer graphics?

God damn it, I spend so much time using trig to calculate that for my planet prototype on blitz3D, I just had to google distance to horizon and there is a whole wikipedia with a handed formula for it. FML!!!

You could build an infinite plane into your skybox, or as a full screen effect of sorts.

The code to raytrace an infinite plane in a shader is fairly trivial. Several ShaderToy examples have it thrown in to the scene to ground it.

Something like this is how the recent Hitman game did their horizon.

They had a more in-depth write up on their site that’s gone, but luckily it can still be seen here:

1 Like