So I’m itching to make a space game, kinda like (Long list of space games…)
So I first wanted to make sure unreal could handle long distances.
This seems to be ok with origin shifting and or keeping the camera / player at 0.0. So this passed.
I then tried multiple lighting solutions and found the best method was a directional light that does a lookat rotation transform to the player/camera. Put the directional light in the middle of the sun with a sun shader. So this passed.
So far so good, we have long distance (talking all 9999999 cm in the coordinates) scaling is working (talking 10000 or more).
Lighting is all 100% dynamic. I plan on having the planets move and rotate and have multiple moons, gas giants, etc ,etc.
Got a little solar system setup with a ship that I can fly around. everything looks awesome and majestic with a space skybox… etc .etc…
Everything seems good, but then I run into a snag. I used JBaldwin saturn planet, which is awesome btw (FX Gas Planet Starter Kit vA - Marketplace - Epic Developer Community Forums)
So i had a full working solar system… until… I added in moons and tried to get a few of them to cast shadows on their planets, and I also tried to get a shadow casted on the rings of the gas giant.
I’ve tried light mass volumes, i’ve tried changing shadow cascading options, I’ve tried changing lightmas options, I’ve tried turning on Distance Field Soft Shadows and adjust those settings that come with it.
So I feel like I’m stuck. My only option is to make a static solar system, problem with this approach is I would have to create a directional light from the center of the solar system for each planetary body (or major grouping of planets).
But this would also look weird since i now have random directional lights in random directions, which would affect ships nearby the planets or flying to and from.
Has anyone tackled this problem? Not sure what my options here are. Only two i can think of… try this in unity, or start digging into the unreal engine source code and overide the shadow restrictions. (max out shadow cascades)