Clouds via ray marching

Hey everyone.
I am porting a shader to render clouds in UE4.
It is still in progress about detail lighting.

The method is based on ray marching, and it’s source code is shared on Shadertoy.

I also find there is another great sample about clouds rendering on YouTube.
It seems that do something special by particle system.
Maybe we could discuss how to achieve that as well.

Really nice! Your frame rate scared me though. Is it because of your system or is the shader really that heavy?

Looks like they are really laggy, when trying to make many clouds with huge density. That is no very good for optimization. But still awesome! :slight_smile:

In FX we would make a few sheets, properly normal mapped and use those to create the volume. Way more optimized and lots of performance save compared to those vids you shared.

i use my custom blueprint. Basically i baked volumetric clouds in blender i lit them from multiple directions to get useful maps defining density and how much light passes trough

Okay, this is super cool. I’ve been looking at TrueSky as a means to render fly-through-able clouds, but its fairly clunky to use IMHO. Your system looks a lot more artist driven and customisable.

Wait, what? That? It’s my vid. My clouds. Pretty simple to tell the truth. I can’t imagine no one else did that yet :stuck_out_tongue:

It’s got quite heavy impact on the FPS but that’s because it uses the NOISE 3D material shader. If you use simple textures it should be fine but won’t look that good.

And I was thinking to put that on the Marketplace for a buck or something. But one simple shader with one simple particle system? Really? I gotta figure something more to that.

Here are the clouds in game.

Dang man. That’s really good stuff. People might be complaining, but it looks like it’s got potential, I don’t suppose you’ve got a way to control shape and stuff like that? I wouldn’t mind looking into Terragen style fakery with a cloud system like this. How easy is it to implement into unreal as is?

That’s very cool, usually that quality takes a very long time in a 3D program.

Looks very good, even if it has a huge performance hit it could work well for cinematics since they record frame by frame.

The shader is too heavy because it takes too many loops to slice the volume of clouds with lighting.

It’s a better way for performance. I will try that for gaming.

The scattering looks beautiful!

I also view the TrueSky demo on YouTube but haven’t a chance to use it.

Expecting your contents on Marketplace!
I also follow your tips to use 3D noise texture in the shader with particle. It could work!

Here are screenshots.

I update the file " Random.usf " in the engine for noise volume, then make a custom node to call the function in the shader.
It might take times to familiar with hooking.

It’s my purpose to render cinematics.

Looks great Transformer. I’m also making a cinematic and was wondering if something like this could be used to create clouds on a globe(sphere)?

Hi transformer!

Im working in a Weather System, and right now im suffering with clouds in Particle System. They are Slow, and cant cast shadows over map since, real clouds have altitude greater than 10000 units.
Im realy apreciate if You can share this material shader. :wink:
My Project is on my signature.
This page shows details of volumetric clouds and cloud rendering.

Your project looks useful for scene preparation.
Here is the shader of my simple 3D noise for particle clouds. Don’t forget turn on “Cast Shadow” in detail panel of emitter.

How is your Particle Emmiter? Is a simple plane?

I think the main tip is to create lots of sprite particles for volumetric shape.

The particle template I used is from UDK WL-Shader.

You could take it and rebuild the emmiter in UE4.

Assign the material I shown and it should work.


Really nice, gonna go so far and say that this looks even better than those on arma 3