Tutorial 4: Cloud Modeling
One of the abilities of AfterBurn is to create convincing clouds to populate your environments. In this tutorial, you'll be taught how to convert a simple box object into a very effective cloud generator.
- In 3ds Max, select File->Open, and from your /Scenes/AfterBurn/Tutorials folder, select the file AB-Tut4.max.
When the file loads, you'll see a Box primitive, a Direct light, and AfterBurn Particles called Sticky Particles01. If you scroll the Time Slider, you'll see the Box move left to right across the Perspective viewport.
The first thing you need to do is add an AfterBurn atmospheric effect.
- Go to Rendering->Environment and from the Atmosphere rollout, click Add.
- From the resulting dialog, select AfterBurn to create an AfterBurn entry in the Effects list.
- From the Source Particles/Daemons list box pick the Sticky Particles01 particle system.
- From the Source Lights list box pick the Direct01 light.
Next, you'll define how AfterBurn is going to use the box primitive to create the clouds.
- Go to the Perspective viewport and select Sticky Particles01.
- Go to the 3ds max Modify panel.
- From the Sticky Particles01 UI, click the Pick Object button, then select the Box01 object in the viewports.
- Change the Viewport Particles display option to Ticks.
Notice that one particle is created at each vertex of the object. The AfterBurn Sticky Particles system works by literally reading the selected geometry and then places particles over the surface as defined by the user.
- We do not want Box01 to be visible in renderings, so select the Box01 object, then right-click on it and choose Properties.
- Within the Properties dialog, un-check the Renderable box and click OK.
- Go back to the AfterBurn atmospheric, and activate the Show in Viewport button from the Tools menu.
- If you scrub the 3ds max Time Slider you will see that Sticky Particles are following the motion of the Box vertices.
- In the Particle Shape rollout set the Sph. Radius to 50.0.
- As shown above, you can quickly see that the volumetric puffs are much larger now. It is also important to note that when you start scaling the size of the volumetric effects up, that you have to be aware of the rendering Step Size, since this directly impacts rendering times. You can increase Step Size to 2.0 for faster rendering times.
Now, let's go ahead and further refine the look of the AfterBurn volumetric puffs.
- Go back to the Particle Shape rollout and set the Squash Low Value to 2.0.
By doing this, you are compressing the spherical shape of the volumetric puffs so that they are flattened.
- Under Type, make sure Sphere is present in the dropdown menu, then activate the Hemisphere button directly below.
- In the Noise Animation Parameters rollout, set Noise Size to 40.0 and change Noise Type to Turbulent.
- Inside Turbulent rollout set Noise Levels to 5.0
- Select the Perspective viewport and render frame 30.
Not too bad for a first attempt. But the clouds still look too regular and not shaded correctly. Let's correct this problem.
- In the Shading parameters rollout, right-click on the Ambient Color gradient field and choose Keyless mode.
- Left-click on it to bring up the Color Selector and set the Ambient Color to a Dark Blue Green (RGB: 25, 50, 58).
By altering the Ambient Color swatch, you can effectively tell AfterBurn what color the non-lit surfaces of the volumetric effects should be.
- Select the Direct01 light and from the 3ds Max Modify panel, and select AB Shadow Map from the Shadows drop down.
- Under AB Shadow Map Parameters, set map Size to 300, Bias to 1.0.
- Turn the light's Shadows on.
- Inside AfterBurn UI enable Self Shadows checkbox.
- Activate the Perspective viewport and render frame 30 again.
The frame renders, and you see several white, puffy clouds that are self-shadowing, and also cast shadows on one another.
- To vary the look of the clouds, you can play with Noise settings and Falloff.
- Select File->Open, and from your /Scenes/AfterBurn/Tutorials folder, select the file AB-Tut4v2-done.max. Then, render another test frame and note the difference.
- Notice visible banding that is caused by regular sampling. To avoid it, go to AfterBurn UI and scroll down to Rendering rollout. Under View group of parameters, change Jittering to 20 % and render. Jittering causes AfterBurn to sample noise in irregular intervals.
In this sample file, there are several more changes. View Step Size been set to 0.5 and Regularity to 0.2. Continue to alter and refine these settings to get a good feel for how they interact with one another.
You can also tweak each individual cloud by applying an Edit Mesh modifier to a Box01 object. By editing the Box01 primitive in Vertex mode, you can even add additional vertices, producing more clouds!
Next, you'll work briefly with the AfterBurn Daemon link map to create some unique material effects for your scenes.