Volumetric Cloud actor uses a Simple Volumetric Cloud Material.
Although the name says simple, in reality it is not.
It's difficult to reverse engineer without comments and deeper understanding of material functions and what they do.
The most important part of how the Volumetric Clouds look comes from the Material, which is then passed on to a Material Instance.
If you take a look at the Material Instance properties, none of them make sense. Sure, you can tweak and change all the settings to see what they do but you are changing values arbitrarily without knowing what's going on behind the scenes in the Material.
I decided to figure out how to create my own Volumetric Cloud material so I can understand what is happening, what the parameters do and most importantly to have more control over the cloud shape.
After two weeks of hitting my head against the wall, I was finally able to figure it out.
So, in this tutorial I show you how to create your own Volumetric Cloud material, step-by-step.
Make sure you've seen this tutorial first where I analyze and breakdown the Volumetric Clouds and what makes them work.
Here is the final material setup from the completed tutorial. This is the best starting point for the Volumetric Cloud Material. It will give you everything you need to create different cloud shapes, control the cloud's appearance and to expand on with advanced functionality.
Make sure you enable Volumetric Plugin, Show Engine and Plugin folders. I showed how to do that in this tutorial. This will give you additional Volume Textures to use if you need it.
Create a new Material.
Add/Import > Material:
Name it anything you want.
Right-Click on the Material and choose Create Material Instance:
I left the name as-is with additional extension of _INST that UE4 gives me.
Assign the Material Instance onto the Volumetric Cloud in the Details panel under Material property:
Open up the Material and select the Main Node. The only one that's there in the editor right now. In Details panel set the following:
To get things started you only need a Constant3Vector converted to a parameter and connected into Albedo input. Then also use a Constant1Vector set to 0 and connect it into Emissive Color:
This is the basic setup for Albedo you need. There are some fancy and advanced techniques you can do with combining Cloud Color but at this point you don't need that. Simple Constant3Vector will work well.
You are now ready to begin setting up Volumetric Cloud functionality.
First you need Cloud Texture Mask, which is a simple 2D image.
Texture Mask will determine the cloud's shape and where in the sky it will appear. With this Texture Mask alone you will be able to generate Volumetric Clouds.
The texture I will use for this tutorial example is Greyscale found in Engine Content > Functions > Engine_MaterialFunctions02 > ExampleContent:
Ryan Brucks, principal Technical Artist at Epic Games used a similar texture in one of his streams. I really liked how easily it communicated what the 2d texture mask does, so I will use a similar approach.
There is nothing special about this texture. It's a simple, small 128x128x greyscale image:
Create the following setup:
Reason we Multiply B with 100,000:
Here is the Mask Texture setup connected into Extinction. You can see the shape of the cloud it produces based on the texture.
Now we need Cloud Density controls. This will make the clouds transparent or opaque.
If you didn't Divide by 100 before Multiplying with the Texture Mask setup then Density would NOT do anything.
To create detail in the cloud's shape, you need a Volume Texture and combine it with Mask Texture setup.
Creating your own Volume Textures is an involved process but luckily you don't have to. UE4 comes with a set of Volume Textures to use.
You will find Volume Textures to use in:
The Volume Texture I will use for this example is T_VolumeNoiseShape128 found in Engine Content > EngineSky > Volumetric Clouds.
The Setup is similar to the Mask Texture one:
Then Add Texture Mask and Volume Texture setup:
Result. Make sure to adjust Cloud Detail and Cloud Density parameters to get good looking Clouds:
Now that you have Cloud shape and detail, you can change the 2D Texture Mask to another texture.
For this example I will use LowResBlurredNoise and OffsetNoiseDistanceFields_ForNormals. Ignore the name of these textures. Both are simple texture masks used within UE4 for specific reasons but it is still a texture mask.
For both Texture Masks I had to adjust the Material Instance parameters to make the Clouds look good. You can use any Texture Mask you want that's available in UE4 or create your own.
Here is the result of changed Texture Mask:
Important things I learned about using 2d texture masks for clouds:
Advanced Tip: you can pack 3 texture masks into a single texture. Disable "sRGB" and change Compression Settings to Mask (no sRGB). Then use Component Mask, convert it to a Parameter where and choose which channel you want to use in the Material Instance for different Cloud Shapes.
In addition to changing a Texture Mask, you can change Volume Texture for different clouds detail.
Creating your own Volume textures is an involved process but you don't need to, just use the ones that are provided in UE4.
Engine Content > EngineSky > Volumetric Clouds:
Volumetrics Content > Content > VolumeTextures > Textures:
Let's introduce Falloff that will allow you change upper and lower shape of the cloud.
Here is the setup:
The Custom node properties are:
Connect this Falloff Function setuip into Subtract B in the 2D Texture Mask setup, replacing the previous Cloud Bias:
Volumetric Advanced Material Output: provides control over a set of cloud parameters that affect the volume material applied to the Volumetric Cloud when added to a material graph.
Basically, it will control how light will scatter through the clouds.
By simply inserting the Volumetric Advanced Output and without changing anything, you will notice a difference how your Volumetric Clouds look.
First thing you want to change or at least know about is Multi Scattering Approximation Octave Count. Select Volumetric Advanced Output node and in Details panel change it to 1 or keep it at 0.
I found changing this to 1 does produce better results but 0 looks good too.
Here is a technical explanation of Multi-Scattering from Epic Games:
"Light rays that travel through a volume have the potential to scatter on particles within the volume before reaching your eye, or a camera sensor. This effect of light is called multiple scattering, and it is what defines the distinct appearance of clouds. In a cloud, the droplets that make up the cloud usually lead to an Albedo that is close to a value of 1, meaning that light is almost never absorbed within the volume. Light that is not absorbed passes through the volume making the scattering effect very complex in the process. The multiple scattering effect of the participating media affects light travel through the cloud volume; it's what makes them look bright while also appearing very thick. The complexity of multiple scattering in real-time rendering is solved by using an approximation of realistic scattering by tracing multiple octaves (or steps) of light transmittance in the volume material. The Volumetric Advanced Material Output expression enables you to set the number of octaves used along with the amount of multiple scattering contribution, occlusion, and eccentricity that happens." - Source
Volumetric Advanced Output has a settings you can change within the Details panel. You can expose them in the Material Instance by setting up Scalar parameters like so. All values below are default:
For explanation of each input and what they do see this technical doc page.
There are 2 ways to move clouds across the sky.
The manual way is great for static scenes.
This Offset introduces manual way to move the 2D Texture Mask on X and Y (RG).
Now in material Instance, change X and Y values to see the clouds move.
You can also use the same setup for Cloud Volume Texture. Just rename the Offset parameter if you are going to use one for Texture Mask and one for Cloud Volume Texture.
Second way is to make Volumetric Clouds always move on their own. Great for gameplay or environment scenes where you want to show movement.
Here is the setup for 2D Texture Mask:
You can also use the same setup for Cloud Volume Texture. Just rename the WindVector parameter if you are going to use one for Texture Mask and one for Cloud Volume Texture setup.
By itself, this should be enough to get you started for most clouds.
But of course, there is a lot more that you could do and it all depends on your experience with Material Editor and UE4.
Take a look at the examples from:
Then the examples to build on top of your existing setup.
These Quick Tips are just a small part of a very complex Unreal Engine. Get started with UE4 as an absolute beginner by downloading "UE4 Fundamentals Vol.1 - The Essential Beginner's Guide" tutorial course.
All content on this website is copyrighted ©2008-2023 World of Level Design LLC by Alex Galuzin. All rights reserved.
Duplication and distribution is illegal and strictly prohibited.
World of Level Design LLC is an independent company. World of Level Design website, its tutorials and products are not endorsed, sponsored or approved by any mentioned companies on this website in any way. All content is based on my own personal experimentation, experience and opinion. World of Level Design™ and 11 Day Level Design™ are trademarks of Alex Galuzin.
Template powered by w3.css