Advanced Atmospheric Engine (Day-Night, Clouds, Atmosphere Interactions)

Hey, KellyWiley7 here. I’ve been working on an advanced atmospheric engine for about two years now. Honestly, I found that standard TweenService implementations were fundamentally insufficient for the scale and interdependence of this project. While great for simple transitions, they lack the reactive capability needed for a full meteorological simulation. I needed to build a custom real-time rendering loop to handle the complex state dynamics while ensuring the system remained performant enough for competitive games.

I’m planning to release this as a resource or plugin soon, so I’m looking for feedback on the visual fidelity to ensure it’s production-ready.


What makes this engine different?

Instead of just animating properties on a simple timeline, this engine simulates light interactions based on physical factors like cloud density, solar elevation, and real-world geography.

1. Seamless Celestial Transitions (Solving the “Shadow Flip”):

One of the biggest issues in standard day/night cycles is the jarring “snap” when the sun sets and the moon rises. Shadows often flip instantly, or the lighting abruptly changes tone.

  • The Problem: Standard cycles rely on time-based keyframes. If a keyframe asks for brightness while the sun is technically below the horizon, the engine creates ugly artifacts.
  • The Failsafe Override: My system calculates the exact elevation angles of both the Sun and Moon every frame. It acts as a physics-based clamp.
  • How it Works: Even if my configuration module requests brightness, the Failsafe will force Brightness to 0 if the celestial body is below a specific elevation angle. It only allows the light to fade back in when the moon/sun is high enough to cast stable shadows.
  • Result: A completely seamless transition. The sun doesn’t just “turn off”, it physically fades out based on its angle, and the moon only takes over when it is geometrically valid to do so.

2. Dynamic Cloud Physics:

The system tracks cloud density and cover in real-time to drive the rest of the lighting. Clouds aren’t just a texture; they physically interact with the world.

  • Occlusion: Thick clouds actively block sunlight. The engine calculates a “Block Factor” that can turn Brightness all the way to 0 during heavy storms.
  • Interaction: High cloud density will dampen ambient light, kill reflections (EnvironmentSpecularScale), and desaturate the atmosphere fog to match the storm intensity.
  • Absolute Darkness: The system supports pitch-black weather events where no directional light renders, genuine darkness rather than just dimness.

3. Seasonal & Planetary Simulation:

The time system goes beyond just spinning the sun.

  • Real-World Geolocation: The server simulates seasons (Summer/Winter) based on real-world latitude data derived from the server’s region. (Currently configured as: 1 week in the real world = 1 in-game year)
  • Seasonal Solar Arcs: The engine actively modifies the GeographicLatitude property to simulate Earth’s axial tilt.
  • Dynamic Sun Position: This means “12:00 PM” looks different throughout the game-year. In winter, the noon sun hangs low on the horizon (casting long shadows); in summer, it rises high directly overhead.

4. Performance Architecture:

I wanted this to be viable for optimization-heavy games, so performance was a priority.

  • The “Bridge Firewall” (Delta Checking): The client script runs a delta check on every property. If a lighting change isn’t visible to the human eye (< 0.00001 change), the script prevents the property update signal entirely. This ensures the script makes no unnecessary visual calls when the scene is relatively static.
  • Memory Efficiency: The render loops are designed for a minimal memory footprint, reusing variables to strictly limit garbage collection spikes.

Showcase: Here is a time-lapse showing a full Day/Night transition. (Note: The video is sped up 35x. The shimmering on the trees is due to the speed of the time-lapse, not engine artifacting.)

Note on the Moon: The moon is not a static texture. It features Synodic Month Simulation with accurate phases (Waxing/Waning) changing over multiple game-days.


Screenshots










Link for the showcase game in the video and screenshots: Atmospheric Engine

Link for performance benchmarking (Baseplate only): Atmospheric Engine: Baseplate
Use this version for isolated performance profiling or if you experience hardware-related bottlenecks in the main showcase.

Feedback Needed: I am mostly looking for feedback on the “feel” of the transitions.

  1. Does the color temperature shift during sunrise/sunset feel natural?
  2. Does the seasonal sun movement add to the immersion?
  3. Apart from the time-lapse speed, do you notice any lighting “snaps” or breaks in continuity?

Custom Star Rendering (Better Night Sky) by @XenoDenissboss1
Moon Imagery: NASA SVS | Moon Phase and Libration, 2026

22 Likes

Hey roblox! Micheal here. This works. Or does it?

1 Like

Haha, nice one. Honestly wasn’t expecting a Vsauce reference that fast but I love it. It definitely works, though getting everything to sync up took a lot more effort than I originally planned. Did you check out the showcase game yet? I’d be curious to hear how it felt on your end.

I was testing the game on my phone and it wasn’t running well, could you optimize it?

Hmm from the video the spinning of the stars seems a bit weird, it seems to shift from a correct rotation to a horizontal rotation then to another rotation, essentially it seems that the North Celestial Pole and South Celestial pole seems to move, which is not realistic,In reality the pole would stay the same position given a constant latitude, and I assume that in the video provided depicts 1 day the latitude variation to simulate season shouldn’t be enough for the pole to go from near the horizon to near the zenith (note that in reality the poles dont move unless you change lat irrespective of the season, so perhaps I suggest to decouple the sun’s position and the star to not co rotate)

That happens when the moon is at zenith, it rotates before it sets and the stars match that because they follow the moon. Though you’re right, this is a limitation.

Sure, I’ll look into it. But could you tell me what phone you tested the game on?

Redmi note 12s
8 ram
2400 x 1080

Do you have an estimate on when this might be open sourced? if not, could I purchase this early from you?

I don’t have a fixed release date just yet since I’m still fine-tuning the optimization and some of the dynamic features. It’s been a pretty massive project so it likely won’t be free, but I’ll definitely let you know when early access or purchase options are ready.
If you want, feel free to dm me your discord. I can show you the clouds and atmosphere/lighting interactions in real-time in-game, I have some commands set up so I can show you how it looks right away.

Sure! what’s your discord? I’ll add ya

It’s kellywiley7. (the same as my roblox username)

Says you’re not taking friend requests, add mine: altez.

I sent the friend request. (character limit)

Do you have an estimate value of how expensive this can be? And also, if it isn’t much too ask, how difficult would you rate it is to create that from 0 to 100?

Yes, the plan is to launch at $10-15 and then move to a stable $20 as it gains traction. To answer your second question, I’d rate the difficulty at 85-90 out of 100. It goes beyond standard scripting by implementing real-world physics, such as orbital mechanics and dynamic light scattering.

1 Like

I’m much grateful. First question was to see if I could afford it when it releases, second question was to know if I could create an original one for my game if I just can’t afford it. Well, I really like how it is turning out, tho.

1 Like

Appreciate the support! Glad you like how it’s turning out.

1 Like

I’ve only seen either the moon or the sun out in these clips. Does the moon appear in the daytime occasionally, like in real life? Also, is there moonlight and/or weather ambience?

I’ll keep an eye on this creation, it’s very beautiful so far!

1 Like

Thanks, glad you’re liking the visuals.

The sun and moon thing is just a Roblox limitation. The Roblox engine hard-codes the moon to stay exactly 180 degrees away from the sun, so they can’t really be out at the same time without breaking something.

There is moonlight, but it’s tied to the moon phases. You’ll get a bright glow during a full moon, but it stays dark during a new moon for realism. Weather ambience (if you don’t mean auditory) is also handled through the atmosphere module script configurations to keep the environment immersive. Hope that clears things up.