Let's Master 3d Volumetrics!

The use of fog and other volumetric effects is exceptionally cool and useful; we already know from part 1 of the series. Today, we’ll share 5 more examples and introduce clouds, rolling fog, and smoke to the picture. Hopefully, you’re hungry for more!

By COMMONPOINT / Nov 22, 2021 / 18min READ



Summary and Introduction

Welcome back! It is the second and last part of 3d Volumetrics Effects in Corona Renderer. We strongly encourage you to check the first part if you’ve missed it (LINK HERE). In it, we slowly introduced you to the world of Volumetric Effects, covered what it is all about, explained the essential parameters, and shared many practical examples. We will follow up with additional ones that showcase advanced use of VolumetricMtl and OpenVDB later on. We’ll start with a unique application with the help of three images below:

The first two might appear not to include Volumetric Effects, but that couldn’t be further from the truth. Believe us, something handy and easy-to-use is coming up, and who doesn’t like that? Moving on, we’re introducing OpenVDB objects - laying down the theory and sharing more practical examples. You’ll get a solid starting point for future exploration and ready-to-go setups for the images below too:

There will be rolling fog, smoke, and clouds. It is a new, fascinating world for any artist to investigate, really. Keep in mind that it is a “mastering” part of the series. It will get more challenging, but we’ll do our best to do it as painlessly as possible. We prepared free 3d assets, so stick with us till the end of the article for the download link. Hopefully, you’ll have a pleasant read along the way; let’s continue from where we left.


Example #1


3dsmax Base Mesh
3dsmax Push/Pull


VolumetricMtl can be used for various purposes. Usually, we think of adding fog or mist to your image. It is something different in this case, though. You can use VolumetricMtl to create the natural shadow gradient in the foreground. It is a useful trick to bring some depth to the image anytime you need it. You can place an object outside the frame, apply VolumetricMtl, and use it to cast a shadow. We prepared a simple diagram that represents our scene:



To pull this trick off, find a good spot for the object containing VolumetricMtl. Focus on the end of the shadow that it casts. Then, add the VolumetricMtl and start to modify the object’s shape. Push a few vertices to match that triangular base and top from the “prism” object. That “weird” shape is the essence of having a natural shadow transition. With some trial and error, you’ll find a sweet spot that works for your scene. One thing to add here is that sometimes, you might actually want to have a harsh shadow line. In that case, don’t use a VolumetricMtl. Just keep a solid Material, like so:



Example #2


3dsmax Base Mesh
3dsmax Push/Pull


Fully lit landscapes might not be the best artistic choice in many cases. Having the mountains in full sunshine might cause them to blend with trees closer to the camera. That’s an issue that pops up pretty often, and we can solve it using a handy trick. In this example, we used volumetric effects to influence the background (instead of the foreground.) You can prepare a “fake cloud” model that is nothing more than a couple of 3d spheres with noise modifiers, similar to this:



You can place them strategically in the space so that they cast shadows where you want. Just put a basic VolumetricMtl and use it to adjust the strength of the shadow; done! The nice thing about this setup is that it provides that naturalistic shade gradient that you won’t obtain with a solid material. It is also a simpler solution than using an actual cloud model (which we will cover later). Remember: If it looks good - it works! Overall, it’s a perfect way to add that extra flavor to your renderings. Fix composition issues, bring more depth and dimension to your image

Example #3

3dsmax Base Mesh
3dsmax Push/Pull


This example is all about adding that extra detail to our fog by applying additional maps. If you work with volumetric objects (a fog applied to a box), you are likely to end up with a uniform look and harsh edges. In that case, we need to influence the volume behavior somehow. That’s when using additional maps kicks in. You can plug Textures or Parametric Maps to control the appearance of the volume. The Absorption map slot will do the job in this case, but you can experiment with different slots too. To make our example work, we used Corona Distance and Noise Map. Look how they change the absorption across the whole volume.


  • Corona Distance Map

    the perfect solution to add a natural gradient to a fog. Just pick an object and crank up the “Distance Far” value. No more rough edges that can be real eyesores!


  • Noise Map

    the simplest and most organic way to introduce some nuance into the volumetric object. Play around with the scale and other settings to find out what fits you. (Keep in mind that it lacks the Corona Distance map)



Our final image contains both maps, but rather than copying values, play around with different maps because the options are limitless. Don’t be too shy to share any cool images you produced with this technique too! (hello@thecommonpoint.com) Last thing, though. Note that you should change „Volume mapping” to „Inside volume” whenever you apply any maps.

Introduction to OpenVDB

If you got to this point, you’re likely starving for more, and we’re happy to deliver! We’ll take you one step closer to rendering clouds, smoke, and all of that good stuff. We will purely focus on the rendering aspect, so don’t worry about simulating anything - we got you covered. We will also share ready-to-go setups in case you want to look for settings that simply work. You can find some clays from the assets we will be playing with:


There are many free assets available online. Generally, look for *vdb objects if you’re not familiar with them yet. Files can be extremely light (<10Mb) or heavy (>5Gb,) depending on the information they consist. We will walk you through a good start, and there’s a list of “do’s and don’ts” so you’re as efficient as possible (at least at the early stage of exploration.) All in all, we hope this will convince you to jump to rendering and have some fun with free assets, to the least. Let’s start then!

OpenVDB - the master way

CVolumeGrid is the container for any volumetric data in Corona Renderer. It works very similarly to VolumetricMtl discussed in part 1. The settings are based on three parameters we have already learned about: absorption, scattering, and emission. The difference here is that we can control it with custom data. It can be the density of smoke, its temperature, the presence of fire, velocity, etc. Some of them are crucial to set up the OpenVDB object correctly, and we will list them later. Let’s breeze through general settings before doing stuff.

  • 01.

    Absorption

    how thick/thin the assets appears

  • 02.

    Scattering

    how light behaves in the volume

  • 03.

    Emission

    how much of the light is generated inside the volume

  • 04.

    Motion Blur

    how the speed of particles affects the appearance

The CVolumeGrid can be found under Command Panel > Create > Corona. Create it in your 3d space and load a *vdb file. Go to the “Viewport Display” tab, change its appearance from “Box” to “Point Cloud.” and you’re ready to start exploring. Keep in mind the order we described the parameters. Those are the steps we would recommend taking while working with any OpenVDB objects. Let’s tackle them one by one:

Part 1/4 - Absorption

It dictates the density of our volumetric object. It is the first and by far the most important setting. It will force the object’s shape. If the “Channel” is set to constant, you will get a box filled with fog (just like a regular VolumetriMtl.) Other options like “Smoke” or “Density” allow you to shape the object to a cloud, smoke, or anything. The last crucial parameter is the “Scale.” It multiplies the effect of absorption across the whole object. Just by sliding through it, you can notice how the Point Cloud is getting denser in the viewport. Check the slider below and see how it affects both smoke and rolling fog on the ground.


You can make your Volumetric objects thicker or thinner just by using this single parameter. Unfortunately, it will be a different value each time because it’s not connected to the world scale. “Scale” is dimensionless (without cm), so any imported objects will behave differently (due to its local scale). It is less intuitive, but at least you know the way it works. That explains why the smoke gets thicker sooner than rolling fog. You can notice that values smaller than 1.0 are fine for the smoke pillar, but we need to go above 1.0 to make the rolling fog appear.


Part 2/4 - Scattering

The Scattering affects the color of our volumetric object (albedo, to be exact.) We recommend starting with the „constant” option under the channel rollout. It will force the uniform color for the entire volumetric object, which is easy to control. You can experiment with different Channels (like “Smoke”) if you need extra control. “Scale” value determines the color of fog. It is, again, a dimensionless value, but we can slide through values to see the change in the viewport:


Directionality affects how light behaves in space (same as VolumetricMtl). Values between 0.2 and 0.8 often improve the behavior of VDB objects. We get a more attractive light distribution which creates a nice silver lining on the edges (a glowing edge effect). The last thing is to keep “Single bounce only” turned on, in most cases. We will get deeper into it in Example #5.

Pro tip: You can choose „Density” or „Tex” from the Channel rollout and plug the noise map into the “Tint.” It brings a bunch of nuance into the coloring, just like in the comparison below. Remember, though, it can be tricky to balance it with absorption and sometimes produce artificial results.



Part 3/4 - Emission

This section allows you to make flames appear. OpenVDB files sometimes contain information about the heat source, which is the source of the smoke. We can take that information and use it with the emission. It usually goes by the names of „fire” or „fuel” under the channel rollout. Its strength is controlled by three values: „Scale,” “Mode,” and “Tint.” “Scale” affects the intensity of color, “Mode” is sort of a base color, and “tint” works as an additional filter. You can further play with the “Mode” and achieve some cool effects. We will go more in-depth in example #4.




Part 4/4 - Motion Blur

What motion blur is pretty self-explanatory, but it is vital with vdb objects. Crispy and sharp-looking volumetric objects are usually not something you look for. They can appear artificial, especially in low light conditions. Motion blur helps to soften potentially ugly-looking and low-res fragments of the objects and is pretty inevitable in animation. You can choose the “Mode” to “Velocity Based,” change “Tex” to “Velocity” in the rollout below, and that’s it. OpenVDB contains information that computes the correct motion blur from a single frame (no need for extra frames or calculations). Now you can control the strength using the Multiplier value.


Take a look at our examples. You may notice that only small multiplier values (0.1 and lower) produce somewhat credible results. The higher ones create some weird-looking smears. Fast-moving particles get blurred so much that we can only see the core of the smoke. Remember that these values might be different for other OpenVDB objects and depend on the speed and scale of the simulation. It is much safer to start with really small numbers and go up if necessary.


OpenVDB - “Dos and Don'ts”

At this point, we’re familiar with the most important settings. More or less, we know what to expect, which is always a good thing before approaching something new. Even though it might look easy on paper, we need to put it to practice. The time spent on experimenting and discussing it with colleagues will immensely pay off. Focus on an efficient interation process mostly. Rendering times can skyrocket, which means we get discouraged fast. For that reason, we listed the problems or just shared a couple of optimization tricks that will help you. A quick and dirty list below:

  • 01.

    “Disney” Start

    a great resource of OpenVDBs, clouds come from lightweight to production-ready, a must-have for beginners and pros

  • 02.

    Start from scratch

    values will differ between the OpenVDB objects, so focus on the iteration process instead of copying values that worked before

  • 03.

    Use references

    focus on the density, color, and motion blur; bonfire smoke looks differently than volcano smoke, right?

  • 04.

    Viewport Display > Type > Point cloud

    the easiest way to assess how the clouds appear in the viewport

  • 05.

    Check „flip frame”

    use it whenever your assets have the wrong world axis alignment

  • 06.

    High Resolution

    the higher the resolution, the longer the rendering time, watch out for your assets (ours are pretty beefy at the moment)

  • 07.

    Directionality Range

    shoot for positive values that often range between 0.5 - 0.8

  • 08.

    Density vs. Scattering

    most critical values to set up, find an accurate thickness and brighten it up using Scattering “Scale”

  • 09.

    Turn Off “Single Bounce”

    allows you to increase the light bounce inside the volume, but at a great rendering time cost; most useful if the objects are too thick and cannot brighten them up with Scattering “Scale” value

  • 10.

    Increase Max Ray Depth

    lets you control the extra bounces inside the volume, which makes it brighter and brings detail back

  • 11.

    Rendering > Interpolation > Linear > step size

    primary optimization tool, increase until experiencing artifacts; it can speed up rendering times substantially

  • 12.

    Apply “Motion Blur”

    even small values help to remove the harsh edges which don’t look natural


Remember: sometimes, the iteration process might take forever, and it is just the way it is. Adding VDB objects will greatly increase the rendering time if a scene is heavy in the first place. It will take a long time if vdb objects are high resolution too. If you’re testing advanced volumetric effects for the first time, we recommend using something fairly simple and light. Example #5 is a perfect solution as it walks you through every step, so don’t miss that out.


Artur: “What can I say? Go to the link and download the free assets! Start with Disney clouds and follow the breakdown from the last example. You’d be surprised how fun it is, even if it’s your first time rendering clouds!“


Example #4


This example showcases three volumetric effects at the same time. Two of which we already covered in detail, so let’s make a small summary and expand on the new one:



  • 01.

    Horizon fog

    mountains that fade away, adding the sense of depth (VolumetricMtl on a box, explained in part 1)

  • 02.

    Rolling fog

    organic-looking fog over the water, evoking the hot spring impression (Corona Distance/ Noise map, presented in this article, Example #3)

  • 03.

    Fire smoke

    bonfire that introduces extra storytelling to the image, explained in detail below



We used our premade asset for that example. You can create a CVolumeGrid (Command Panel > Create > Corona.) Load the file, set the Rendering to Point Cloud, and start testing (the same order from parts 1-4.) Find a sweet scale for absorption to match the smoke density. Then you can increase the Scattering “Scale” to brighten it up. Lastly, slowly add the emission effect. In our case, we used the “fuel” channel embedded in the OpenVDB. Final setup in the image below:



Note that you have different options for preparing a flame using Emission. There are three methods (raw data, blackbody, and channel mapping), and each likely will give you pretty credible results. We used channel mapping, which allows us to introduce the gradient into coloring. We prepared additional closeup tests to show the different approaches:



Example #5

3dsmax Base Mesh
3dsmax Push/Pull


In this example, we really want to showcase clouds and focus on some performance-related settings. But before that, let’s briefly go through an additional volumetric effect that we can notice in the image. Can you spot where it is and how to make it? There’s a slight mist above the water, evoking the feeling of high humidity. We can immediately think of a box containing the fog and Corona Distance map to remove the volume’s edge (Example #3). Nothing more to it. The diagram and fog settings are in the image below:



Now, let’s get to the real business here. We share the entire iteration process behind making a cloud. All the technical stuff with an additional comment below:



We start by setting the absorption to 0,4 to achieve the proper density. Then we increase directionality to 0,6 for that silver lining at the edges of the cloud. Unfortunately. Increasing the scattering “Scale” value doesn’t help to remove the dark colors because the object is too thick; we need to resolve it in a different way


There are two ways we can solve the darkness issue. Let’s use a quick cheat first. We can apply the low emission value that mimics the light being scattered inside. This solution might be sometimes acceptable and is definitely quicker to render than the next option.


The realistic approach is to disable the „Single bounce only” option. It can easily make it ten times longer to render, so we need to optimize the asset already. We increased the step size from 1 cm to 30 cm without noticeable quality deterioration. This value depends on many factors (object’s scale and placement in the scene), but we could drop the rendering a few times quicker.


You can see what happens when we go too high with the “step size.” Even though we sped up the rendering time, we lost details, and artifacts started to pop up. 1000cm is definitely too high, so we’re eventually getting back to a 30cm value


Turning off the “Single Bounce” means we can control the amount of bounciness using “Max Ray Depth” in the performance tab. We can expand it from default 25 to 100, making a huge difference. We are finally able to grasp that realistic fluffy feeling instead of harsh CG gradients. Certainly, it all happens at the expense of render times.


In our final test, we increased „Light Samples Multiplier” in the performance tab as it is suggested in the Corona Helpdesk. We didn't notice any significant differences though.

That’s pretty much it! Hopefully, you enjoyed the breakdown and the whole series about volumetric effects. We’d love to hear your experiences with this subject or any experiments you end up with. Also, let us know if you have any ideas or optimization tricks that you see missing. We constantly update the articles so that other artists can benefit from them, and it’s truly a common point between us (hello@thecommonpoint.com)

Conclusion

Volumetric effects are pure joy. A cheap and effective way to set up the mood, evoke emotions, or simply add that production value to your image. Try it out if you haven’t already. Start with small additions that we covered in part 1 before you’re ready to master it. It’s less scary than it looks, and we hope we have made a good case for it. Over time, it’ll grow naturally into your workflow. It is one of those things that will make you a better 3d artist in the long run!

Bartosz: "From the aerial perspective to the fluffy clouds. That was quite a journey and, let's be honest, a pretty big chunk to digest. I hope that you don't feel overwhelmed now but rather excited to incorporate some of that volumetric magic in your works."

List of useful links:

Disney Clouds

CommonPoint VDBs



SIGN UP

Stay Tuned!

Enjoy the upcoming free content, all of the updates on our work and other cool stuff we’re preparing for you.
Leave us your email and always be the first to get noticed.