logo80lv
Articlesclick_arrow
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_loginLogIn

Real-Time Clouds in Unreal Engine 4: Tips & Tricks

Tyler Smith continues his series of UE4 articles. This time he’s discussing the production of high-quality clouds for his scenes.

Tyler Smith continues his series of UE4 articles. This time he’s discussing the production of high-quality clouds for his scenes.

Cloud Generation

Cloud generation in games is at an exciting crossroads stage now where tech is being made to generate cloud shapes from a math procedural noise generation perspective. For this project, I was looking at the old background paintings in animated Disney movies to understand how to push artistic composition and complete control by design. This was also to show that even though you can’t get your hands on cutting edge tech you can still achieve a great looking result with clouds.

Production

For generating clouds like this there are only two main factors being used. One is a simple square plane with a very carefully crafted texture applied to a material that is designed to modify almost any factor for the cloud’s shape, lighting, color etc. The texture for the cloud has to be carefully painted in photoshop with a combo of hand painting and photo bashing to make sure the alpha is not too soft but not too hard to get a good balance of opaque and soft falloff in the transparent alpha. It is also important to get a balance of some but not to much value change in the clouds diffuse values, keep in mind the values of the cloud are going to be used for the POM heightmap so very dark values and stark value changes are to be avoided.

1 of 2
1 of 2

Once the texture is good and ready it’s time to make it a texture object and plug it into the new POM nodes that epic made for unreal. With these nodes the grey values in the texture can give the illusion of 3d form and light change. Also the light and dark values of the texture can be plugged into color tints in a lerp with the alpha is the grayscale values in the cloud texture to have control of the color and value of the clouds. One tint can also be plugged in for the emissive value to have even more control over the cloud’s values in the scene. One last factor is getting the rim light on the clouds. This can either be painted in along the edge as a mask texture or generate an outline with power nodes by taking the alpha increasing the value on the power node to shrink the alpha size and then add the original alpha back in with an add node to get the rim of the cloud alpha isolated and use it to plug it into the emissive. To get movement in the clouds just use a flow map to pan warping texture coords around the cloud texture to get the sense of movement. To get the flowmap simply use the same flow map lerp technique used for the water material listed above.

Light

The hardest thing to achieve with getting form light with transparent materials is having a normal map with enough detail to give the fine soft effect of form change. The best way to solve this I found is to use POM nodes to create the effect of form and have the values of the diffuse texture hooked up in a way to influence the form and color of the clouds. The POM nodes have many variables for constant one vectors that can be tweaked until the best result is achieved. For the normal map I just have a simple soft dot shape used to get an overall simple form change take place with the environments directional light. One other factor is making sure the alpha texture for the clouds has a good fall off of soft values around the edges and a good pure white value center. In order to keep form transparent sorting being a problem it’s important to have as much epic landscape cloud detail on a single large texture on a single large plane instead of a bunch of small textures on small planes.

1 of 2

Applying the Technique to Games

For game art, this technique of clouds has been achieved before with games like Destiny and Red Dead Redemption. For other techniques like planets, tornadoes etc there are some factors that need to be looked at carefully since 3d curved surfaces tend to not work well with POM techniques. However all other factors such as flow map and edge emissive techniques as well as more ways to apply panners to the overall cloud texture is more than able to work on any shape or surface as long as the shape does overlap itself. Luckily for large cloudscapes in the horizon and overhead this is a great technique with POM. Because the planes are so large and used so sparingly performance is not hit to bad in my experience and many material factors can be taken out easily for optimization.

Tyler Smith, Environment Artist at Sucker Punch

Interview conducted by Kirill Tokarev

Follow 80.lv on Facebook, Twitter and Instagram

Join discussion

Comments 2

  • joel azzopardi

    POM is actually good for VR. Unreal Engines Showdown demo uses POM extensively.

    0

    joel azzopardi

    ·7 years ago·
  • Eric Nevala

    I have found that POM is terrible for VR because the performance is a major drain on framerate.

    0

    Eric Nevala

    ·7 years ago·

You might also like

We need your consent

We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more