Clouds via Humidity

Houdini 18.5 Project

I'm building an animated composition entirely within Houdini in order to learn its key systems. This composition includes a mountain-scape, which is a great opportunity to learn Houdini's Pyro system to simulate rolling clouds over the peaks.

Houdini's volumetric simulation capabilities are fantastic, but its default 'smoke' setup tends to produce results looking more like, well ... smoke, than water vapour.

In reality, clouds are not directly a 'density field', like smoke is. Clouds appear where humidity and heat meet. Humidity is the 'substance' being advected, and density is simply derived by combining the temperature and humidity fields.

Velocity Field / Wind

Before tackling the humidity and temperature fields, I needed to build a convincing velocity field, with a strong directional element. Houdini's 'Gas Wind' micro-solver applies a uniform wind at every point in your volume. This looked OK, but in reality, the slopes of the terrain facing away from the wind should be shielded from the wind.

So I ran some VEX over a grid of points created within the mountain's bounding volume, (plus a bit of extra headroom to the bounds so we can simulate the atmosphere above the mountains too.).

Houdini screenshot showing the node layout and attribute wrangle VEX code for the wind field.

For each point we raycast against the mountain mesh in the opposite direction to the wind. If we hit anything, then we know we're occluded and no wind is generated there. We rasterise these point attributes into a volume and plug them into the DOP.

Generating the velocity field in this way ensures we generate low-pressure vortices below the fast moving wind above, leading to the clouds swirling down off the peak.

Temperature Field

The temperature field was important to get right for this effect as it's motion is the primary driver of the cloud density.

In reality, the heat in our atmosphere comes almost entirely from the sun each day. Some of it enters the atmosphere directly via scattering, but most of it arrives from the surface, which slowly radiates the captured heat over the course of a day.

Heat eventually rises, until the atmosphere becomes too thin. But what's important for our effect is that we want to constrain the effect to hot areas of the surface.

This was relatively straightforward to simulate. Houdini's 'Mask by Feature' node gave me information about how much light is reaching a surface. For this effect, I tied the direction to my scene's direction light's transform. I also blended a little AO mask into the result so that areas of the mountain exposed to the sky would still receive a tiny bit of heat, but still leaving the nooks and crannies cold.

Houdini screenshot showing the node layout for the temperature field.

When combined with the velocity field, a touch of turbulence and a little buoyancy, we are getting pretty close to the desired motion. Notice how the temperature cascades down the slope of the mountain into the cold, low-pressure valley, despite its natural tendency to rise.

Humidity Field

The final piece of the puzzle was to inject some actual substance into the simulation. This was the easiest piece to assemble, as we just need something vaguely noisy and the turbulence in the velocity field will do the rest.

Houdini screenshot showing the node layout for the humidity field.

We also inject a random amount of humidity from the left edge each frame too, otherwise the sim would eventually 'dry out' as the wind moves all the humidity outside the bounds.

Combining Humidity and Temperature

The final step occurs inside the DOP network. Just a tiny bit of VEX to calculate density as a product of humidity and temperature.