Download

Looking for infinitely far skyboxes (UT1, UT2004 style)

We’re working on a space sim and are using some creative level streaming trickery in order to make massive scale environments, but one thing we can’t seem to get working is a “Classic” style skybox along the same vein as UT1/2004.

Even dissecting the engine’s base “BP_Sky_Shere” shows that it is merely a large sphere and not actually using a “render last” strategy like we’re used to in classic level design.

I had a theory to attach a camera to the player pawn’s camera component and have it render last, but there will still be objects that are outside of this sphere’s influence that will be culled by the sphere itself.

We’ve been banging our heads against a wall on this one.
TL;DR: We can’t have maximum distance on our skysphere, we need a class skysphere implementation of an infinite distanced skybox rendered behind all objects, the way skyboxes used to be, is this possible?

I have an idea but I haven’t tried it yet but I’ll say it anyway.

What about attaching the Skybox to the players camera and having it move around with the player but have it just move and not rotate. You could have the skybox texture change depending on where you are in space. This would mean that you have a skybox which you as the player will never reach and it would theoretically look the same?

If this game was multiplayer then what about having it so that only the player can see their own skybox, that way other players don’t see players flying around with a huge moving skybox.

Just an idea. Dunno if it would work for you. :confused:

This was one of our theories, however we’re currently running into the problem of how to set the render depth of this sphere to be beyond any and all other objects in our worldspace. This would be one of the simplest integrations of the system, and we would appreciate it being this applicable.

https://dl.dropboxusercontent.com/u/2300830/cubemapsky.jpg

That is my approach.

This may need further tweaking. You will have issues with animation also if you do this (it is cubemap, hard to animate things in that).

The attaching a sphere thing can work fine also. Players would not hit each others spheres as the sphere movement would be client side only. The depth rendering you work around by just making the sphere so huge that it always is behind everything else.