Lightwave’s Hypervoxel system can, and has been, used for some pretty cool effects. Unfortunately, it’s not easy. Even if you get something that looks ok, render times can be prohibitively long, and often suffer from severe quality issues and noise.
An easier, simpler, and much older technique for simulating volumetric bodies (in this case, clouds) is to use multiple transparent layers of geometry. The nodal texture editor makes this effect all the more convenient, and can give surprisingly good results, so long as a few qualifiers are met.
— The effect works best with back lighting or other setups that cater to translucency.
— Because it uses layered geometry, flying through the effect requires a little extra texturing to fade out the areas immediately surrounding the camera, so as to avoid suddenly moving through a non-transparent layer. Such a fix is not as easy for placing solid objects inside the object area.
— The layered setup also means it should only be viewed from one side, and never perpendicularly to the planes of geometry.
Despite the limitations, this technique can excel in many situations. By using procedural shaders (which are naturally volumetric), gradients, and even images to control density, we can create believable clouds fairly easily, and often with far more control over shape and feel. Depending on the number of geometry layers and the complexity of the setup, they can also render faster and cleaner than hypervoxels. And to top it all off, the alpha channels make it a great solution for matte paintings, 2.5D environments, and compositing.
Be it a horizontal bank of clouds looming above, or puffy clouds along the horizon, you’ll need to start with an array of flat planes.
The object can be pretty simple. Create a flat polygon (use
shift-x to create a cube, then press
n to bring up the numerical dialogue), then an array with 20 or so layers. These settings are a good place to start, but it all depends on the quality, detail, and scene setup needed.
For better results, split the object into two layers – alternating the panels of geometry. Once in layout, this allows us to modify self shadow or shadow casting settings, causing light to penetrate further into the cloud and speeding up rendering.
In this example, we’ll be texturing a vertical cloud, as viewed along the horizon, or flying through the sky. Other setups are similar, just the starting gradients need tweaking for the right orientation.
The first gradient is the most important – it controls the basis for the cloud density. In this case the input should be set to Y distance, and with four keys spread from -50 to 50 (from the bottom of the model to the top). Set the background colour to white, and the keys to black. The two extreme keys should be set to 0% opacity, and the others to values that make sense for the desired effect. Because I want to make some clouds that are slightly bottom heavy, I’ve set keys 2 and 3 (positions -25 and 25, respectively) at 100% and 75% opacity.
The second gradient, or even more, is/are entirely optional. I added this to subtly fade out the clouds at the front and back of the geometry array. This can help with the boxed-in feeling you’ll get where the geometry suddenly ends, and the textures are chopped off midway.
If desired, you can easily use images instead of gradients. Creating specific cloud shapes this way can be especially powerful; you just have to keep in mind how the textures are added to your density. Controlling where and how strong procedural textures are applied can often require a second image map, so as to prevent erosion of the desired shape, but still shape and texture the surrounding falloff.
Here comes the fun part, volumetric textures! I usually work with Turbulence and Crumple nodes, as I find them immensely easy to use, and the results are fairly predictable. The possibilities are obviously endless, but keep in mind what needs to happen here – the textures should be shifting the values towards white, without leaving patches void of detail. To this end, we’ll set textures to Additive or Screen (Lightwave’s floating point calculations are perfect here). It can be very helpful to use previous textures to drive the opacity of the latest one (so that, for example, a crumple texture only affects the wispy portions of a cloud – not the bulk of its body).
Once the string of textures is limited using Smooth Step or a similar limiter, we will have effectively carved out a cloud shape using the procedural textures. Capping the bottom range will usually result in flat textureless areas in the cloud, and should be avoided. The top range determines how much cloud is in the sky! If there are too many textures added together, and the values are blowing out to uber-white, just cap at a value over 1.0 to bring it back in range.
Connect the limited output to the transparency channel. It’s ok if barely anything shows up in the preview – because of the multiple geometry layers, the texture should be pretty light.
Create Mixer and Translucency nodes to control the lighting and colouring of the clouds. Set the mixer to a simple gray-white, or some other colour combination, and attach the same limited output you hooked up to transparency, to the mixer’s opacity channel. This controls the unlit portions of the clouds, and adds much needed detail, simulating the scattering found in clouds.
(note: if you don’t want to use the flat ambient light in Layout to illuminate the shadowed areas, merely switch the order of Translucency node and Mixer node; using the texture input and a blue colour set to additive, this will simulate the cloud internal shading without the use of lighting)
The translucency should be set to 180 for the best results, as angled lighting should still illuminate the clouds fairly strongly (keep in mind we’re trying to simulate a volumetric body with flat planes! The less these planes pay attention to the angle the light hits the normal, the better).
Once your object is ready, send it to layout for final setup and rendering.
In the object properties render tab, deselect “self shadow” or “cast shadow” for both object layers. This lets the lighting penetrate much further into the transparent layers, and can even speed up the render. If you turn shadow casting off (leaving self shadowing on, of course) you could even split the object into more layers, for even brighter lighting and more apparent “cloudiness”.
Lighting should always be behind the object, to light and shadow the translucency of the layers. While slower, two lights are significantly better than one. Set at 20-40 degree angles to one another, the lighting will “wrap” the cloud and look more natural. Depending on your texture setup, the two lights should be set to 50% and a slight yellow or amber colour, with the global ambient intensity also at 50%, but blue.
In the Render Globals’ Render tab, raytraced shadows and transparency should be turned on, with enough recursions to make it through all the layers in the model. And that should be it, go ahead and press F9!
If you want to fly through a bank of clouds, I recommend rendering out layers that you can use in a 3D compositing program like After Effects. Carefully organize your layer sections, along with judicial invisible to camera and shadow casting settings, and you can relayer in 2.5D in your compositing app of choice. This cuts rendering time down dramatically, and provides for much more flexibility in the animation (don’t like the camera path? redo the layers in AE and preview instantly, instead of a lengthy 3D re-render). It’s a simple expression to fade out the layers as the camera flies through, but if you’re still dead-set on doing it all in Lightwave, it’s a similar solution; add a gradient based on camera distance, and put it someplace along the nodal tree to prevent popping through the semi-transparent layers.
Render times are not a rigourous benchmark, but a good idea of relative speed. Textures are, for the most part, left at nearly-default settings – sizes were changed to give a slightly more consistent look to the collection. And yes, I know these aren’t even half the procedurals you could use in Lightwave, they’re just a few of the more useful ones!
I’ve used this effect for projects ranging from illustrations for Microsoft or animations for a museum, to a series of waterfalls for a Chrysler Financial video game! This very website uses these clouds… I hope it proves useful for you as well.
Download the files in 1 (8kb, contains object, scene, and nodes).
Let me know what you think, and follow the discussion over on the Newtek Forums.