FULLY Raymarched Volumetric Clouds In Roblox!

so i’ve been working on a realtime fully volumetric rendering module for roblox, mainly focused on clouds using editable images!

it uses raymarching with noise-based density, temporal smoothing and light + shadow approximation

it’s optimized with low-res rendering + buffer writes and includes simple anti-ghosting based on camera movement

features:

  • realtime volumetric clouds/fog inside a defined 3D volume
  • raymarching-based rendering
  • 3D noise (base + detail) for density shaping
  • basic light scattering + shadow approximation from sun direction
  • temporal smoothing with velocity-based blending (anti-ghosting)
  • checkerboard rendering for performance
  • dynamic resolution scaling
  • buffer-based pixel writing (editableimage)
  • camera movement detection for adaptive blending

still a wip but already pretty stable and customizable through config

26 Likes

How are you handling the checkerboard artifacts during fast camera rotations? Temporal smoothing usually struggles with that kind of edge bleeding when the velocity buffer can’t keep up.

1 Like

right now i’m handling it in a pretty simple way, i’m basically biasing the temporal blend based on camera velocity

i track both position delta and rotation delta, and when either gets high i push the blend factor closer to 1, which effectively kills the history and forces fresh samples

so during fast rotations it temporarily disables the checkerboard accumulation instead of trying to stabilize it

it’s not perfect but it avoids most of the ghosting/edge bleeding you’d normally get

i’m not using a full velocity buffer/reprojection yet, it’s more of a lightweight heuristic approach for now, glad it works tho

1 Like

That makes sense for a lightweight approach. It’s basically just a way to trade temporal stability for clarity when the motion is too high to track. Have you looked into using a proper reprojection pass yet, or is the heuristic enough for the current performance targets?

yeah pretty much lol

i haven’t done proper reprojection yet, roblox makes it kinda awkward without real motion vectors or depth

for now the heuristic is enough for my performance targets since i’m aiming to keep it lightweight

proper reprojection would help, but adds a lot of complexity so i’m holding off for now, also with the limitations roblox is throwing at us with not allowing us to render stuff on the GPU, it’s better to keep these things this way.

1 Like

Fair enough. Trying to implement full reprojection without depth or motion vectors in Roblox is a massive headache for little gain if you’re just trying to keep it lightweight. The heuristic is probably the smarter move for now.

1 Like

yup, exactly. it’s kinda one of those cases where the cost/complexity just doesn’t justify it right now,
i’d rather keep it simple and stable than overengineer it for marginal gains

Agreed. Overengineering is the fastest way to turn a working prototype into a maintenance nightmare.

1 Like

yeaa, im trying my hardest to keep it manageable haha

and if i ever open source anything it’ll probably just be the raymarcher part, not the full cloud system not really trying to drop everything out there just like that lol

Makes sense. Keeping the scope small is the only way to actually finish something without getting bogged down in the details.

ofc i wanted this to look more or less like acutal clouds and not like milk lolz

also thanks for the questions regarding this btw, always nice talking rendering stuff with someone who actually gets it :3

No problem. It’s a good topic to dive into, especially since most people just stick to the standard stuff without thinking about the math behind it.

1 Like




This is really cool and reminded me of my own attempt at making volumetric clouds

3 Likes

What was the main bottleneck with yours? Usually it’s either the step count being too high for performance or just getting the density noise to look right without it looking like a mess.

It was the performance being horrendous

That is almost always the case with raymarching. If you aren’t using a very aggressive temporal upscaling or a really tight bounding volume, it’ll eat the frame budget alive.

1 Like

does it respect depth or is it just always on top

i love it, i see its even MUCH more performant than mine! i am still trying to get the performance to be much better so it can be used in games or something, for now im just experimenting with the clouds being realistic, maybe in the future i will come up with a physical volumetric sky module or something like that.

i am really interested in how you optimized your clouds, the performance looks awesome! if you can spill the beans on how you made it performant i would love to know!

It is mostly just aggressive temporal upscaling and reducing the ray step count in areas with low density. If you can skip the heavy math for the empty space, you save a lot of cycles.

1 Like

That’s really cool. What instance did you put the editable image in? Imagelabel?