Search form

'Maya Plugin Power': The Wakes of Loch Ness

In the latest excerpt from Maya Plugin Power, author Mark Jennings Smith explains liquid simulations using Next Limit's RealFlow plug-in.

All images from Maya Plugin Power © Course Technology PTR.

This month, VFXWorld continues a series of six excerpts of the Course Technology PTR book Maya Plugin Power, which will give VFXWorld readers to learn how to take advantage of the myriad of plugins available to Maya users.

Dealing with liquids simulations in Maya is best served through a stand-alone program from Next Limit, called RealFlow. Using RealFlow it is fairly easy to generate complex simulations for export to Maya. This includes water systems such as object wakes. Here is a quick look.

Now let’s take a look at generating wakes in a Scottish loch.

The Wakes of Loch Ness

Next Limit used to have a wave-generating program called RW. This has since been incorporated into RF. RW permits the user to create some particularly fascinating waves. Let’s work a simple tutorial on generating wakes in a lake. Figure 2 shows various states of the Loch Ness monster. The highest-resolution model of Nessie, to the far right, may be used as the final model, once the waves have been generated in RF. The middle model is a lower-resolution proxy of the higher-resolution model. The far-left model is the proxy for use in RF and was built to avoid complications associated with Nessie’s pointy back spikes.

[FIGURE 1] Multiple Nessie models serve different purposes for this scene.

Start RF and create a project called nessie. Import the model super_low_ness.obj (visit Course PTR website for more information). Click on the Add a RealWave to the Scene icon. An RW plane is placed in the scene. Under the Nodes window, the RW plane is listed as Realwave01. Right-click on the node and rename it Loch_Ness. In the Node Params window under the Node tab, change the Z scale of the RW plane to 20. The image should look like Figure 2.

[FIGURE 2] The RW plane is scaled in the Z direction.

With the Timeslider set to 0, translate Nessie to the far left of the RW plane. Right-click on the model and keyframe its position, as shown in Figure 3. At frame 200 move Nessie to the far right side of the RW plane.

[FIGURE 3] (left) Nessie keyframed at frame 0 on the far left of RW plane. [FIGURE 4] Nessie keyframed at frame 200 on the far right of RW plane.

Right-click on the model again and keyframe this position, as shown in Figure 4.

[FIGURE 5] Adding a fractal disturbance makes the wave movement more realistic.

Running the simulation now should yield a result, although it may be slight. This can be tweaked to give us the look we need. We can add a small amount of fractal disturbance to the water. Right-click on the Loch_Ness listing in the Nodes panel. Select Loch_Ness > Add Wave > Fractal as shown in Figure 5. The fractal wave will displace the wave with a complex fractal pattern. This fractal has several parameters for adjusting its weight, height, speed, slope and octaves. Another type of wave is the spectrum wave that generates sinusoidal waves with varying frequencies, scale, and number of samples. Think of this as ripples in a sine pattern. Another type of wave is a control points wave. This wave allows the users to select vertices in the wave mesh that move up and down. Waves emanate in an ever expanding set of circles from the control point vertices like a stone thrown in a still pond. These waves propagate.

Select the newly created Fractal01 node from the Nodes panel and adjust its parameters as shown in Figure 6 of the Node Params window.

[FIGURE 6] Adjustment of the Fractal01 node parameters.

Select the Nessie model and open the RealWave tab in the Node Params window. Tweak the parameters as shown in Figure 7 and run the simulation again. This should give a more sophisticated-looking wake as shown in Figure 8.

[FIGURE 7] Further adjustments to the RW node for yielding a better-looking wake.

[FIGURE 8] The results of the RW node adjustments.

At this point, we should be reasonably happy with the results of the simulation. The data we need for use in Maya are minimal, and we really only need the surface deformation of the RW. Pressing F12 brings up the Export Central window, where we will focus on the REALWAVE listing. Clicking the tiny + sign before it opens up a list of formats that RW data may be saved as. Select the .bin format and change the Name/Prefix in the File Name options box to the right in the Export Central window to Loch_Ness. This is the format we will use to import back into Maya. Figure 9 shows the Export Central window with the proper data selected for this exercise.

[FIGURE 9] The RW surface deformation selected for export in the Export Central window.

Save your work and load Maya. We need to import our new data into Maya. Select Next Limit > RealFlow > Mesh Loader and direct the plugin to your project’s meshes folder. This may be something like (user)/scenes/nessie/meshes. You can also load the particles from the companion DVD in the Chapter 5 folder, scenes/nessie/meshes. The files are named and numbered as Loch_Ness#####.bin. As reference, you can also load the nessie proxy into the scene. This can be done by importing the .sd file, which is in your (user)/scenes/nessie/objects directory. Remember that this time you are using File > Import from the Maya menu. After the meshes are loaded, run the simulation. Make sure that the Timeslider is set to the number of meshes generated, which is 200. If all is successful, your scene should look something like Figure 10.

[FIGURE 10] The successful import of RF-generated data into Maya.

The headless proxy Nessie is replaced by a low-poly Nessie model for the final render, which can be seen in Figure 11.

[FIGURE 11] A slightly higher-resolution Nessie model replaces its proxy for the final scene.

This is a great example to show off the power and potential of RF. Two bonus RF and Maya scenes are on the companion DVD in the Chapter 5 folder. Both scenes, soccer_roll and Aquafuel, which are shown in Figures 12 and 13, are there to study.

[FIGURE 12] Bonus scene: a ball rolling through puddle generates foam textures and wakes.

[FIGURE 13] Bonus scene: bitmap texture can be used as emitters for interesting results.

An entire book could be written on RF, but it’s time to move on. The next chapter addresses a plugin for the 3D character.

Mark Jennings Smith is a seasoned artist, animator and writer residing in Beverly Hills, CA. Smith has been fascinated by CG since 1972, when at age 10 a chance encounter with the first coin-op Pong changed his life. His interest in the entertainment field led Smith and a partner to establish Digital Drama in 1994, which focused on computer-generated imagery, animation, digital painting and special digital visual effects. Digital Drama designed the digital film effects and animation for companies such as Universal Pictures, Trimark Pictures, Fox Home Ent., HBO and Showtime. Smith has contributed to several books and magazines, including a chapter in Maya: Secrets of the Pros. He also created cover art for the book and a variety of other titles in the 3D arena. He served as the technical editor for Mastering Maya Complete 2 as well as consulted and beta-tested dozens of software packages. Smith has also taught visual effects and computer animation using Maya at New York University.