Dynamic Skybox transitions from day to night

Hello,

I am creating a game and I would like a dynamic skybox that has blue skies and dynamic clouds in the day and stars and moon moving at night. I have followed some tutorials for Unreal Engine 5 but they do not create the desired result. I would like a moving skybox that displays a starry field at night and transitions at sunrise and sunset to a blue sky.

I have set up a SkyAtmosphere component and I can see a place to put a material into the SkyMaterial box but I can’t seem to figure out what type of material the BP_Sky_Sphere requires to display stars at night or if this is even the correct way to achieve this result.

image

This box is what I think may be what I need

image
image

I have made sure I set the variables as per this article:

in section " Rendering the Sky using a Skydome Mesh"

My Skydome Mesh was created with a program called SpaceScape, there are a few tutorials out there for this program but they are mostly for UE4 or are not applicable.

Please let me know if there is a plugin that may save me some time with this function or if there is a specific setting I’m missing. I really want to get this right as it’s crucial to the atmosphere of my game.

Parameters:
Unreal Engine 5.2.0
Basic empty game project
no other modifications

The Is Sky and Unlit are correct for a skybox material.

If you don’t need clouds painted onto the skybox (when using volume clouds for instance), the most basic sky material would look something like this:

Sky disc luminance 0 being the sun, and light direction 1 at the left side being the moon. Swap the 0 and 1 in the index boxes if your directional lights are the other way around.

Then, to make stars only show at night, make sure you’re using a dynamic material instance of this on the sky sphere, and have whatever blueprint is controlling the light rotation set the value on the Star Brightness parameter.

1 Like