When creating procedural planets in Unreal Engine 5, three common lighting issues can be resolved: (1) Clouds appearing white on the dark side by enabling per-sample atmospheric light transmitters in volumetric cloud settings; (2) Terrain and foliage showing light on the night side by implementing a day/night terminator shader that uses dot product calculations between surface normals and sun direction, multiplied into base color and specular properties; (3) Exposure washing out the dark hemisphere by setting fixed exposure values for space views. The fundamental principle is that when engine occlusion cannot reach planetary scale, lighting calculations must be handled analytically in materials rather than relying on shadow systems.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Why Your Procedural Planet's Night Side Is Still Lit — UE5 Terrain, Foliage & Clouds
Added:Hello everyone. So, today I'm going to show you how to solve two two things related to the lighting of a planet in uh in here in the planet generator. So, the first problem that we are going to solve is this. You see, even in the dark side, the clouds appear white, which is not uh not ideal because we don't we don't want to see clouds on the dark side. And that's the most simplest thing to fix.
All you have to do is select the used sun and sky or whatever if you are using a separate volumetric cloud, just select that.
And make sure that you have enabled under cloud tracing use per sample atmospheric atmospheric light transmitters. So, once you enable that, the dark clouds the clouds on the dark side of the planet or night side of the planet uh becomes darker, as you can see here.
And also, you might need to check into your exposure settings as well. Here, if you have a post processing because even if it is darker, if you look into that side, they might become visible, maybe more than you need. So, that is also something you need to know.
And the other thing is if I quickly go land on the planet here, now you see in the dark side, it's properly dark.
But let me go closer and land.
And now we are on the ground, and you are on the fully uh dark side of the planet. But still, you can see sometimes say the light appears on these trees and also here on the planet in the terrain as well.
And this grass slightly does appear. So, the reason is here, if I detach from the character for a little bit and go to the preview of the full planet scale, this is across 100 km, which is not practical to cast shadows.
So, here is a slide to explain that. So, if the planet radius is 50 km and this is the shadow range, if it is like 200 m, then of course you're not getting shadows from a from a faraway mesh on the planet. And also, so that means the light is essentially not covered by the opposite side of the planet mesh.
And runtime procedural meshes have no distance fields to trace, so self-shadowing is also not on the table. So, because of that, let me reattach to my character. So, yeah. So, that's the problem. Basically, we don't get accurate shadows in this scale of the of a planet. So, the solution that I came up with is I have created this material parameter collection that has this planet center material parameter and the sun direction parameter. So, using these two, these two is updated uh depending on the planet that player is currently uh standing on or the active planet and the actual sun >> [clears throat] >> direction.
And from them, I have created this material function that calculates returns a day factor.
This This is written one to only to preview that. So, here what it does is it calculates this day factor. So, this would be minus point one on the night side.
Or it it would be like closer to zero on the night side and positive on the day side.
So, if I apply this now because I have used this uh day factor function for my base color and also my specular I just This is the planet material.
I get the output of this whole section that blends all the layers and everything. And then at the end, I just multiply with this day factor.
And if I apply it, now you see I don't see any lighting on the trees or on the terrain.
So, I still do see a little bit of light on the grass, but that's I guess fine.
I actually have used the same trick on the grass clump material as well. So, it should be fine. Maybe it's coming from something else. Oh, maybe yeah.
This subsurface color. Okay. Let's do the same thing here.
Mhm.
I Okay. Let's check now. Yeah, that was it.
Okay, so now you see now my full terrain is properly dark. I don't see grass or anything.
So, that's exactly what I need fully dark on the uh dark side of the planet.
But, of course, this is not uh may not be ideal for the game play. So, you can actually add a skylight and make sure that you have some light on the dark side, but um this is a better place to get started.
So, yeah. Now, if I go to the outer space, now I have a properly dark night side of the planet.
Yeah. And also, as you can see, there is another planet as well in the distance.
So, now the planet gender support uh multiple planets on the same level. We I am working on a lot system as well to uh make it work properly, but that is not that is coming um soon.
I will release a make a release soon on that. Uh but, it's not for today. So, yeah. Thanks for watching.
See you in the next video. Goodbye.
Related Videos

Audi RS5 4.2 Tuning JDEngineering
JDEngineering
1K views•2013-11-14

DALI + KNX: 500 Lights Offline! BCU Code Lock & Short Address Fix!
EngineerIsmailTech
560 views•2026-04-13

Explaining Quality Control of Concrete
maherbader
4K views•2019-05-25

World Mining Production Peaks - Lead Antimony Arsenic Titanium & more
LucarioandDialga
1K views•2019-04-19

Tech Titans: LFP vs Sodium-Ion Battery | Which is the most effective energy storage solution?
Enfsolar
522 views•2025-11-06

Doing the Math: Analysis of Forces in a Truss Bridge
TeachEngineering
1K views•2025-06-06

Inside Midnight Fighter Jet Refuelling Secrets of Stealth Missions | WION Podcast
WION
3K views•2025-09-20

Flash Point, Fire Point & Auto Ignition Temperature
HSELessons
38K views•2019-08-28
Trending

One Must Imagine Sisyphus Happy
vlogbrothers
61K views•2026-07-21

The Downfall of OnePlus!
techwiser
65K views•2026-07-21

Tariq Nasheed Destroys Pan African's False History Claims
IzmRadio
24K views•2026-07-21

My Friend Locked Up The Engine On His K-Swapped Bug...
boostedboiz
128K views•2026-07-21