logo80lv
Articlesclick_arrow
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_loginLogIn

Simulating Smoke & Populating Forests in Houdini

Giorgy Macharashvili talked about the production of pyro simulations, mushroom-shaped smoke, and tree population in Houdini.

Houdini FX REEL. G Macharashvili on Vimeo.

Introduction

My name is Giorgy Macharashvili, I am 28 and I work at CGF Visual Effects Studio as an FX artist. I came into CG nearly accidentally. I am a stage director by training and more than that, I grew up in a village without the Internet and got my first computer only when I was 18.

The inspiration struck me when I was a second-year student, and I got an idea to create a cartoon while observing fish in an aquarium. So, I began to research. The first software I mastered was Anime Studio. After finishing my first animation film, I started to learn Cinema 4D and After Effects.

One day, when all YouTube tutorials have been already watched, any self-taught CG artist discovers that he/she wants something more. In 2015, when I realized that I reached the limit of self-education, I moved to Moscow and enrolled in Scream School.

It was there where I learned Maya, Nuke, and Houdini. The classes gave me a solid experience and a necessary base for working at CG studious. Soon after finishing the first year (one course lasts 2 years), I started working at CGF studio in a Tracking and MatchMove Department and got promoted to the FX Department within half a year.

Thinking of that aquarium today, I want to warn you: be careful, friends, CG is very addictive! Try it once and you’ll get hooked!

Pyro Simulations: Start

Regardless of the difficulty of the effect, first of all, think over the final version. You need to have a clear vision of what you want to achieve, otherwise, you will have to do a lot of useless work which might be rejected in the end. In the case of a pyro simulation, you definitely need a reference as this type of simulation is the most unpredictable one.

Next stage is the creation of a source object. The references dictate how much temperature, smoke, fuel, divergence, and velocity you need. The better source you prepare, the cooler the effect will be.

When we know our destination point, we are ready to start setting up the simulation. Sometimes the result requires not more than 5 nodes but commonly, complicated effects need a lot of procedural fields and masks. We’ll talk about it in more detail a bit later.

Based on the settings, all pyro simulations can be divided into 4 groups:

  • Cold smoke. The only field you need is Density. The smoke spreads without temperature fields.
  • Hot smoke. The smoke is moved up by a temperature field.
  • Fire. It consists of Fuel and Temperature fields. If necessary, the smoke can appear later during the simulation.

Usually, these three simulation types also use a velocity field.

  • Explosion. There are Temperature, Fuel, and Divergence fields. Divergence extends the explosion based on the fuel and temperature (but also works without them). The smoke appears during the simulation.

In complex simulations, we usually have to combine all these fields plus create custom ones.

Mushroom-Shaped Smoke

Let’s move on to the workflow itself. Probably, one of the main problems that artists face is mushroom-shaped clouds.

In the real world, smooth mushroom-shaped clouds appear very rarely, and that is why a human eye easily distinguishes the simulation from reality. Probably, many professional artists won’t find anything new in my next words, but those who are new to FX might find something useful.

Mushrooms form when a substance moves from voxel to voxel at a high speed. There are a few methods to avoid the smoothness:

  • The easiest one is by adding shapes like Turbulence, Disturbance, and Shredding. They work well when the explosion moves quickly. But when the process slows down, they ruin it, so you have to animate the influence of these shapes. Needless to say that it is against procedural workflow.

Here, I used two pairs of disturbance shapes. First one influences the vector field Vel, another influences the Temperature. I also added Turbulence. That’s all.

  • Another method is to add displacement at the shading stage. The key to success is a proper adjustment of the Rest field. The explosion must have two Rest fields changing within the specified number of frames. The more quickly the explosion grows, the fewer frames the Rest lasts. The speed of moving between Rests is also important. It is measured in seconds and controlled by rest ratio.

When both Rests are ready, we can add Displacement.

The disadvantage of this approach is that Rest is a vector field. It takes a lot of disk space and increases the rendering duration.

  • Creation of masks
  • A mask that shapes the explosion’s contours in the direction of the simulation progress.

To create the mask along the contour of the density, we should calculate the Dot between two vector fields. The first field is Vel, the second we will get from the Volume Gradient. Write the Dot into the field and visualize to see how it works. After that, we will use the result to influence the density.

  • An epicenter distance mask

This one is even easier. Define the position and the distance beyond which the mask takes an effect. In my example, the constant is {0, 0, 0} but actually, the position can be defined in many ways, for instance from Sop level through Point Cloud Open.

And so on. Vop helps to create anything you want.

There are other methods to improve the mushrooms, like substep escalation or simulation at low speed, but I won’t describe them because they are less effective.

However, if you are going to create a heavy explosion, the density, temperature, fuel, and velocity are not enough. As I mentioned above, the explosion must contain Divergention field which extends it.

There are a few examples of how Divergence works:

  • Clear Divergence. It influences the whole explosion equally.

Pyro Solver has a node Gas Combustion which extends our volume but as far as we use Density field only, we must create a similar node again and use density instead of temperature and fuel.

I also added Solver Shapes and that’s all.

  • Partial Divergence Elimination

In that case, Density is multiplied by Noise, the result is kept in the Divergence.

It is activated in Gas Match field.

  • Divergence according to the points’ radius

Obviously, we must create points, and we can do it right on the source. We also need an attribute from -1 to 1. In my case, the only attribute I used was Cd.

Now we can send these points into Dop and advect via Vel field.

The final step is to adjust the node Gas Particle To Field. You need to set the values and operation method there.

All of these methods can be used in different combinations. The detalization of the final simulation can be improved in this way:

The color of the explosion depends on two fields: Temperature and Heat. Actually, their names are not very important but the type must be Float. The thing is, we already get the Temperature field as a result of the explosion simulation which cools down after a while. These parameters are responsible for the cooldown intensity.

Usually, I adjust the explosion color on the Sop level via Volume Visualisation node, then transfer all these settings to the shader.

There are no secret technologies, everything was done inside Houdini. I also added Volume Light to illuminate the explosion from within.

Smoke Monsters

Each my smoke monster consists of 9 render layers: 5 particle simulations, 3 smoke simulations and Volume for a body. I was responsible for smoke simulations, while my friend Dmitry – for particles. Knowing that some shots will show more than 20 monsters in one area simultaneously, we did our best to make everything procedural and not resource-demanding.

We also procedurally assigned names to the animated alembic polygon meshes which we got from the Animation Department. It was needed in order not to get messed up while using Wedge (more about that a bit later).

The first layer is smoke on the face. It was done without Smoke Solver.

I took one monster from the animation.

Then, I placed the monster in the center of coordinates via matrix transformation and also made a UV mask for points source. Then I made a simulation to make points move along the body. The points were converted into lines, the lines into geometry, the geometry into the volume. I also added small noises to the volume. Then the matrix was inverted to get the volume back to the animation place. The result was kept in Rop node.

The second layer is smoke covering the back of the monster. This layer is similar to the first one, with pyro simulation instead of particles simulation. The simulation is as easy: it is just a wind blowing towards the source in one direction.

The third layer is the most important one. Let’s look at it in more detail.

From Dmitry, I received cash with lines. The lines were converted to the source.

Since the monsters were flying over the long distances, the source was divided into the clusters. We calculated the whole distance, then divided it into the clusters by the last frame of the shot.

Then, we created a separate volume container according to the cluster’s size. These clusters are also needed to create points for container instancing in Dop Network. But before these points got into the simulation, there was a node Cluster Switcher (more on that later).

The same setup can be obtained by choosing Smoke Trial. As a result, we kind of have two levels of clusterization:

  1. By monster’s name;
  2. By clusters of each monster.

To avoid too much smoke from a monster, I increased the Dissipate parameter and created a few Gas Disturbances. We also simulated a vector field Color which was needed for render passes only to be able to add color variety at the composing stage. Since the project was made in Houdini 16.5, we weren’t able to work with Volume Color directly. We had to create a special setup to pick the colors from the source points and transfer them to the field Color. Then, this field was advected according to Velocity. Nowadays, in the 17th version of Houdini, this approach has become way easier.

All these fields were taken from the simulation and optimized via VDB Shrink node. This node cuts the vector fields by density with a slight offset.

It is vital to save the disk space, and there is a simpler way to do it. Convert the Density into VDB SDF, create VDB Reshape SDF, set offset value, convert it back into the density and multiply Vel and Density via Vop. We could also write a line v@vel*=@density in Volume Wrangler.

Then, we should merge all these fields together, or (as I did) send the fields separately to the Rop Network to save on a hard disk.

That’s it. By using the clusters we drastically reduced the duration of the simulation calculations, because each cluster simulation was that small:

When the character is done, we are ready to delete Blast and add a Cluster Switcher node. It’s a complicated node with plenty of functions. The main function we need is switching geometry pieces according to the attributes. Here we can use this alternative method:

Then, after Dop Network, everything goes to Rop, where we create a Wedge node. We give it a path to the parameter which will trigger the switch, the range of values it looks through and their sum.

There is a special expression in Geometry Node that places each simulation into a separate folder.

In the case of the third layer of smoke, the Wedge has two levels. The first level switches monsters’ numbers, the second is for clusters.

20 monsters with 10 clusters each give us 200 simulations. It sounds less scary if you use a render farm. One simulation required from 20 minutes to 2 hours of calculations. Having about 100 available computers, we did that within 3 hours.

Both Wedge and Render farms speed up the simulations. However, if we, for example, have to choose between Wedge and one-container calculations on a computer, we might see the end of the process only in the first of these two cases, while the latter would take too much time.

Populating Trees in Houdini

Those fragments from the reel where you see lots of trees were our diploma project at Scream School. There were 3 people working on 3D and a compositing artist. Our task was to recreate a few scenes from Avatar.

I wasn’t responsible for the landscape, and, as far as I know, it wasn’t done in Houdini. However, I was responsible for populating the trees, and I did it in Houdini using very simple methods.

Firstly, I took the landscape geometry and created points.

Each point has a normal randomly rotated to 0-360 degrees along the vertical axis. Attribute Pscale also had a random value made with Houdini noise.

Then, these nodes were sent to Copy Stamp node where they got two random stamp attributes. The first attribute was responsible for assigning values from 0 to 2. The purpose was to use a Switch node to assign one of the three types of trees geometry to the points. The second attribute was responsible for the random upload of one version of the tree (each tree had at least three variations) inside the File node. That’s it, no more secrets. Each piece of the landscape has its own branch of nodes with Copy Stamp, then all are merged and turned to the cubes for viewport with Packet Edit node.

We did have some difficulties with tree geometry though, I’ll cover it below. Before being placed on the point, each tree was packed together with paths to the shaders and saved on the hard disk. In total, we had 8 types of trees, each with a few variations.

We were given six months but as typical students we procrastinated. All in all, the project took about 2-3 weeks.

The trees were made in SpeedTree with later adjustment in Houdini. Trees from Houdini have one big disadvantage: they are too hard to render. The geometry of each leaf is wider than the space the leaf takes on the texture. As a solution, Houdini offers to turn all unused space into alpha.

But it’s fatal for Mantra. It’s ok when we render one tree but if there are millions of them, rendering will last for ages. We had to use foreach to replace all the leaves with proper geometry.

Unfortunately, I don’t have this setup but the method is similar to the knitting:



Knitting in 3d – Building a UV Deformer from Entagma on Vimeo.

After replacing the leaves, we used shaders with PBR Diffuse and Translucent instead of SSS.

Then the trees were packed and saved on the hard disk. A pack consists of a point and one primitive, it saves the disk space and handy to work with inside Houdini.

Then, all the trees were populated in the way I mentioned before and were sent to rendering. We had an idea to make trees interact with wind from the helicopters, without simulation. We even thought up a setup to start the animation when a trigger is close enough, but, unfortunately, we did not have enough time to implement it.

There also was the main tree – a big one. It was created in ZBrush and textured in Mary. I put some moss and mushrooms around it, wrapped it with vines and did some damage.

Recommendations for Learners

Without a doubt, my favorite tutorials are from Entagma. I highly recommend you to watch them.

There are also a few lessons in Russian from Alexey Smolenchuk. He is a Houdini expert who taught me at Scream School and now we work together.

One more great channel is Junichiro Horikawa. He creates gorgeous things, and not only in Houdini.

Generally, I recommend watching all the tutorials you can. Even basic lessons can teach something you haven’t known before. There is a big number of tutorials on the Houdini official site, they all are a must-watch.

For better or worse I don’t read professional literature, I am more into fiction. But old and experienced Houdini-experts recommend reading Navier-Stokes.

Giorgy Macharashvili, FX artist

Interview conducted by Kirill Tokarev

Join discussion

Comments 1

  • laura

    very well explained and awesome job!
    Love to see content like this

    0

    laura

    ·5 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