Volumetric clouds for sky coming in 4.26

We kept talking about this stuff (since it an be tried via dev-rendering branch on github already) on the wrong thread (about sky/atmosphere in 4.24) so I am starting this one instead.

@SebHillaire Thanks to you for all the work on this so far.

I am not very knowledgeable about UE4 materials yet so I havent gotten great results so far but I managed to get enough of a result to at least know the system is working. If anyone has any tips for the cloud material setup, I’m all ears! Cheers.

I note with much enthusiasm that some days ago an example cloud material was added to the dev-rendering branch and that it is now trivial to get this dev version of the volumetric clouds up and running :slight_smile: Nice work, thanks for sharing such things at this stage, looks promising, I intend to spend a long weekend with it.

Is there any word yet on how performant/scalable this system is expected to be?

Answering my own question, according to the answer Seb gave today: Should be scalable down to PS4/Xbox One

I have to say, after spending a few hours working with this… it is absolutely incredible… to put it mildly. It’s very easy to work with and the performance is very good. And I haven’t even tried the advanced outputs yet…

I do find it very annoying that if I forget to set mips to absolute, the editor hangs for several minutes when I go to apply. I assume this will be fixed though.

Any chance to see what the cloud material you made looks like?

I have made this little tutorial about 4.26 Volumetric Clouds, where I reproduce the same material presented on a livestream by Epic. Ofc it will require you build UE4.26 from source, specifically the DevRendering branch, which might take some hours. I use textures found within the packages at that version. While there is quite a potential for realistic and stylized skies when the sky must be well seen from the ground, there are still quite an amount of things to do for other scenarios, like how to generate procedural textures representing the cloud coverage or weather evolution and why not using virtual texturing for large representations of sky that could be seen in aerial flight or even from outer space.

the tutorial:

Firstly, I just wanted to thank Unreal Development and @SebHillaire for their work on Volumetric Clouds (I’ve been attending Siggraph as well and the UE talks on atmospherics there were great).

I’d been using my own Raymarcher for a personal project, but I’m hoping I’d be able to swap it out for the new 4.26 volumetrics. One thing does confuse me a bit though, and I’m not sure what’s causing the effect I’m seeing.

I understand that increasing the distance would have a negative effect on the integrity, unless you also increase the ‘slice’ count as well. But I don’t understand this artifact I’m seeing that is centered on the XY plane of the viewer’s Z world position? (even a camera rotated about the local X axis still shows this artiface through the world XY-plane.

A video probably demonstrates the issue a little better than words here:

@Arkiruthis The issue which you recorded is a common issue with raymarching when you set the max distance for the raymarch it will lose or distort details. To not record a whole video, I searched a video from a guy which explains exactly what you are facing at this point forward at the video below:

There are ways to prevent this, but will come with a cost.

Unfortunately I can’t :frowning: A month ago I went to fetch the latest dev-rendering changes and the compile failed. Thinking it was because I updated VS2019 I’ve been trying to compile the engine ever since with the new changes, but haven’t been successful. Not sure what the issue is honestly…

The material isn’t as complicated as you might expect, it’s just two 2D textures (one noise for the “blanket” of clouds on the ground, and one random circle gradient texture for the big lightshafts) projected in worldspace and then on top of that I have two panning volume noise textures cutting parts of the clouds out so it looks like they’re moving. I just used the volume noise textures that come with unreal (enable the volumetrics plugin if you want a couple more)

The light shafts are just a regular cloud volume, all I did was plug it into emissive. I used it to very surreal effect there but Ryan Brucks combined it with (I think) a sphere mask that changes location to get some pretty neat cloud lightning effects.

Overall working with it is almost exactly the same as working with a volume material for volumetric fog that is currently in 4.25. So if you want to start experimenting without 4.26, just turn on volumetric fog and throw a volume material on a cube. The main difference is that there are some super nice convenience data inputs for clouds, namely the normalized cloud height.

That’s a cool video, thanks for sharing. I’ll hopefully get some time to take a look. Seems strange I didn’t get this in my own raymarching solution, but then it’s doing stuff pretty brute-force per-fragment.

I’d been getting the same thing on the latest dev-rendering branch, always slightly different on each failure (almost random). Occasionally it was the old “compiler heap limit exceeded” error, other times undefined references to pretty basic class types (caused by PCH corruption I imagine).

I’ve discovered since then that if I build with half my processors (8 instead of 16) it usually builds fine. I couldn’t give a reason for it. My buildconfiguration.xml in case it gives any ideas for solving your own situation. (I’ve tried disabling SharedPCH as well, but limiting the processors worked for me). I’ve also boosted my minimum Pagefile on the drive with Unreal soruces to 1.5 * my ram.

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="">

@Arkiruthis compiling from source is ok using VS2017 and will be a better option since vendor console/mobile toolkits are not yet compiling error proof with VS2019, nothing much Epic can do on that, besides wait that they adjust their code.

Thanks for your tutorial, it’s very interesting.