Solarsystem-like Lighting || Omni-directional light

This post may give you some ideas.

Hello everyone,

I am currently creating a space scene and so far everything is going fine.
My star is sitting right in the middle of the map and has a radius of 100.000 uu.
Each Planet has it’s own world, loaded using World Composition.

Everything is going fine so far, but I have one big problem:
How can I archieve a good lighting?

The problem is that Point Lights do not really work here, one reason being that I will just generate visual artifacts and nothing else after a certain distance. I solved this problem by using a Directional Light, which gets rotated every tick to face the position where the player is.

I think that looks quite good, but there is one major drawback: Objects which are not between the player and the star do not receive the right lighting. For example, a spaceship flying beyond the star, but visible to the player, is lit from the back. Same thing occurs with things like space stations etc.

Is there any way to solve this problem?
Maybe limit the directional light to a certain area? (not possible out of the box as far as I can tell)
Or maybe create a new type of light, which is like the Directional Light, but comes from a point?
And maybe there could be a way to manipulate the point light so that it would do the job?



Current setup

Player view:

Other view:

Thanks for your answer,
but I am already rotating the dir light depending on where the player is.
I actually got that idea from your post there! (:

However, this does not solve my current issue I guess,
because it doesn’t matter how I rotate my directional light - there will be always multiple objects which receive the light from the wrong direction.

Oh, now i see the problem. My suggestion works for larger-multiple systems but it isnt sufficient for the situation you describe. For non-player objects that are visible to the player you could try adding custom lighting to the materials(by using a material parameter collection to set the location of the star as light vector.)

Let me know if this doesnt make sense and i’ll try to find some examples for you.

Ah, thank you.
I think I know what you mean,
but I don’t really know how to do it.

It would be really cool if you could provide me with an example. (:
(And be sure to post that as an answer, so that I can mark it as accepted)

James has a nice video here which also includes an example of how to set up a material parameter collection as light vector: Unreal Engine - [Live Stream] Demystifying The Dot - YouTube

In the video he sets the directional light’s position for the vector parameter via the planet’s BP, but in your case you can set that value in level blueprint and all the materials that use that parameter will use that vector value as the light vector so you dont need to set it for every actor separately.

Hope it helps!