Keeping Skyboxes at Infinity

Hi Everyone,

I am curious about sky boxes. Specifically, I have a tessellated sky dome static mesh. My player is able to walk in any direction essentially forever. How do you recommend keeping the sky box at infinity? Is there a good blueprint example for this?


If your game is single player, one method is to simply set the sky dome’s XY position to the player’s XY position every so often.

Thanks SF. In my case, the game is multiplayer. I had considered repositioning the skybox locally, but the implication of other actors moving outside of the the sky dome and disappearing is not ideal.

Is there any way to use 2 cameras, one that sits inside the skybox (copying player’s orientation) painting the backdrop at infinity, and another that provides the eyes of the player within the world? I have heard of using a shader to paint the backdrop, but have not seen any examples of how to make this work efficiently.

Thanks again!

I think you can do this by directly manipulating the Canvas, but it might be easier (and possibly more performant) to give each player a non-replicated skybox that is only visible to its owner.

Must be non replicated solution.
UE4 has made rendering priority code irrelevant because of the deferred PBR pipeline.

How does one execute that exactly? The one where everyone has their own skybox?

Wait a minute, does that mean that even for the default sky sphere that ships with UE4 (the one with the spinning clouds and the sun)… if you walk far enough, eventually you will reach be able to walk OUT of the sky sphere?

In the past I have solved this simply by adding CameraPosition into the worldpositionoffset of the sky and then multiplying the boundscale by a huge number. Used that for fake volumetric underwater godbeams for the sub level of gears3. That level traversed most of the available grid space at the time.

what does this look like as a bp as I’ve got the same problem where I need the skybox to rotate and stay at a fixed distance according to the player

You do it in the material editor, edit the material of the sky. Just add the cameraPosition to the world position offset.

Can you please show me what this would look like as a bp?

If you meant like this:

It doesn’t work, I’d appreciate some help

That’s how it’s supposed to work. I can center a mesh just ahead of the camera with that code (except I add a constant 3 vector to it to move it further away on x axis).

please have a look at this as I’m really stuck:…to-player.html

I’d really appreciate some help mate.

I’m thinking possibly adding the player to the “RotateAboutAxis” nodes rotation angle or pivot point connection, do you reckon this will do what I need?

I’ve got a series of mountains for each compass direction (North, East, South, West) but they shift slightly depending on how close the player is to them and their angle how do I lock these so they always face north, south, east and west regardless of player position in map?

I’ve tried this but i can’t get it to work, can you please explain, fully appreciate you must be very busy, but I really need some help as I’ve been stuck on this for an age now