Why does the sun just vanish when ClockTime or TimeOfDay is set to 18 or 6?
When there’s an atmosphere object, the sun just disappears and reappears and it looks terrible with my game’s Day/Night Cycle.
I decided to test it out to see if the issue was caused by other settings, but I discovered only atmosphere has this issue.
This is the expected behavior (I had removed atmosphere to get it working):
Here’s a video of what it looks like in real time:
I’m aware that the global light source switches from sun to moon at clock time 18, but the moon is fine and works like normal, only the sun vanishes and reappears when reaching clock time 18 and 6.
I’ve looked around bug reports and I haven’t seen this issue when searching broad keywords like sun, 18, clocktime, and timeofday. I’d have posted a bug report myself but I’m not ranked up to a devforum regular yet.
The steps to reproduce it are simple, you just load up literally any place with an atmosphere object in lighting and set ClockTime to 18. My graphics card is an AMD Radeon RX6700M and my studio rendering graphics mode is Direct3D11. Not sure if that would help but it’s worth a shot.
Any help would be greatly appreciated, thanks in advance.
the real sun could be the default sun that’s being used. making it invisible would probably help.
the fake sun, on the other hand, could be a spherical part or a flat image. it could be client-sided and you could constantly adjust its position to match that of the real sun.
then, once it’s over the horizon, (check with spatial queries and hitboxes) tween the transparency of the image to 1, and tween it back to 0 once it hits the horizon again.
if you delete the Sky object, the sun reappears. I’m assuming you still want a custom skybox so this isn’t really a solution.
Also, I noticed this effect doesn’t happen if you mess with certain Geographic latitudes. I am unsure of the exact relation between the geographic latitude and the time of day, but I believe there is a certain time frame for every Geographic Latitude at which the sun is gone. (given you have both a Sky and Atmosphere instance within your Lighting)
I tested it out and it has very interesting behavior, however it still doesn’t solve the issue unfortunately. At certain geographic latitudes, the sun is only visible at night instead of day. The only way to get this fixed is to submit a bug report, which I’m unable to do for whatever reason
if you can find somebody on the forum who can make bug reports, please have them do so. otherwise no solutions other than “make a fake sun” have been found