TUTORIALS | Simulating fluids with animated textures

● Bonus scene file for this tutorial www.3dworldmag.com


A quicker splash
Moving water need not mean a complex particle simulation. In this tutorial, we explore how to create a realistic fountain effect for architectural work, using only endomorphs and animated surface textures BY DAVID TODMAN

FOR LightWave 3D DIFFICULTY Intermediate TIME TAKEN 30 minutes ON THE CD • Full-size screenshots • Project files • Renders and animations ALSO REQUIRED N/A


rchitectural animations are at their best when they contain interesting movement and camera work. However, adding dynamism isn’t always straightforward because buildings don’t move!

fountain that will animate, complete with gravitational effects. The major advantages of this technique are that it’s faster to render and produces a softer, more pleasing result than using HyperVoxels. In essence, the technique uses two elements in combination – animated surface textures and endomorphs. In the first part of the tutorial, we’ll explore these underlying concepts by producing a simple accelerating surface on a subdivided plane. In the latter parts, we’ll implement these elements by building an animating fountain rig, which can be quickly dropped into any LightWave project you’re working on. You’ll find all the accompanying materials for this tutorial on the CD. David Todman is a freelance LightWave artist and Creative Director of The Worms of Art: producers of professional surface collections and other productivity tools for LightWave 3D www.the-worms-of-art.com

As a result, we sometimes have to look to other elements for motion in our environment; animated fountains and water being one of the most effective. When asked to produce animated fountains, the first thing artists tend to do is jump straight into the ParticleFX settings. This is fine if you happen to own a particle plug-in such as RealFlow, but for many types of water, such as spray, it’s a real struggle to achieve realistic results using LightWave’s standard HyperVoxels. What’s worse, all particle effects come at a heavy render cost. In this tutorial we’re going to explore a technique we developed for our Pshelf Water collection of presets that creates spray water using surface textures. We’re going to produce a wide plume

066 | 3D WORLD September 2006

TDW81.t_fountain 066

3/7/06 13:51:26

and are able to do this in a smooth and natural way by adding more continuous geometry. So. 06 EXPERT TIP In summary i We now need to apply this endomorph to the rendered object. 03 You’ll notice that the arrows on this surface move at a continuous speed down the Y axis. so open up Arrows_Working. So save and switch back across to Layout. Let go at 0 on the Y axis. 07 Press Play in Layout and you’ll see the arrows stretching and accelerating as they move. If you take a look at the Position tab for this layer you’ll see that it’s controlled by an Envelope (E). our animation will accelerate. This is because the surface needs to cover each segment in the same amount of time. The more segments you add. Endomorphs are applied by bringing up the Object Properties window > Deform tab > Add Displacement > Morph Mixer. through creating continuously expanding endomorph geometry from equally segmented base geometry. By creating continuously expanding segments with an endomorph.t_fountain 067 3/7/06 13:51:31 . With this new morph active. We’re going to do this with an endomorph. 04 We’re going to stretch the object’s segments as part of an endomorph. Make it a Relative map. 01 Let’s take a look at this surface by opening the Surface Editor and clicking the T next to the Arrows’ Color texture channel.Simulating fluids with animated textures | TUTORIALS STAGE ONE | Basic concepts Run Layout and open the scene file Arrows. to create the effect of something falling. By using the Pre Behavior and Post Behavior Offset Repeat settings we can quickly create a continuous animation – something needed when producing a fountain. first. 08 Stage one of this tutorial has taught us that surface textures take their dimensions and envelope keyframes from base geometry. so short segments move more slowly than wide ones. ▲ September 2006 3D WORLD | 067 TDW81. We can now stretch and speed up surface textures by first creating endomorphs before stretching or squeezing geometry.lws (this may be downloaded from www. When you’ve done this. This consists of a single plane object: Arrows_Working.lwo in Modeler.lwo (also included on the CD). 05 Using the Numeric window. select the Stretch tool ([h]). create a new endomorph called Arrows_Stretch (in the bottom right of the Modeler interface). Create a falloff range for the Stretch tool by right-clicking and holding at the top of the object and dragging downwards. select all the points on the plane except those at the top and bottom. the smoother the acceleration. we need to make the surface speed up as it descends. However. set the Stretch falloff to Linear (the other falloff settings can remain at their defaults). 02 The animating arrows have been achieved by using just two keyframes – one at frame 0 and one at frame 25. There’s a single image map layer in the Color channel.3dworldmag. with arrows moving downwards. we have caused animated surfaces to accelerate. Double-click the Morph Mixer plug-in entry and create a 100% key at frame 0. Finally. You’ll see that the object consists of a single plane divided into 24 equal segments. Stretch the points by left-clicking and holding at the bottom of the plane. Bring up the Graph Editor for this envelope by clicking the E next to the Y channel setting. then pushing upwards until it’s 200%. If you drag the time slider you will see that the surface of this object already animates. And finally.com/ stoppress).

We’re going to create a radial array of plumes to achieve our final fountain shape. Apply a 100% key for Fountain_Deform and 60% for Fountain_Bend. The top of the fountain plume is eventually going to be at 5m. it will appear to fall after reaching the top of the plume. Now to test the morphs. Leave the centre of the plume base at around X = -40mm. 14 Now our single plume is looking good. This scene contains a single box divided into 10 equal segments. move the points as shown in the example here. but because we created this shape with an endomorph. high-quality plume of realistic water emerging and splashing down from our fountain. in case we need to widen the final shape. 16 Finally. Our animated surface will move straight up the base geometry.lws. 10 The next step is to taper the box outwards to recreate the effect of the water stalling and spreading out as it reaches the top of its plume. create another endomorph called Fountain_Bend (make it Relative). So move the morphed shape back towards the origin. 11 To complete the basic plume shape. This will help widen the plume base when we have created our array. as this will look artificial. By squeezing towards this point. the water will now slow down approaching it and speed up again away from it (as the water falls). switch back to Modeler. However. open the scene Fountain_Start. The morph Fountain_Deform is now complete.t_fountain 068 3/7/06 13:51:35 . deselect any morphs and move the base box to -2m on the X axis. Bend the base shape 22 degrees out towards the -X axis. We avoid this by offsetting the base geometry of each clone. Apply the two endomorphs by opening up their Object Properties windows. First. Each clone will bend outwards to create a wider spray area. Select the Taper Evenly tool to do this.lwo and open it in Modeler. using the settings in the example as a guide. create a radial array of 12 clones of this single plume. make sure you don’t return it to X = 0. 13 Convert all the polys to Sub-Patches by hitting the [Tab] key. This will produce all the geometry that we need for a thick. 17 068 | 3D WORLD September 2006 TDW81. pull down the points on the top half of the box until they’re turned inside out and finish just below the origin. we don’t want each plume to catch the same part of our animating surface. our morph has moved as well. The end caps of the box have been removed and extra geometry sliced at either end to create a hard edge when we convert it to SubPatches. However. 15 Now select the endomorph Fountain_Deform. With this morph active. Save and switch to Layout. squeezing them towards the centre 5m line. and selecting Deform > Add Displacement > Morph Mixer. Save the object and return to Layout. 12 The final fountain will consist of a radial array of plumes. 09 Create an endomorph called Fountain_Deform. Select Fountain_Step1. We’ve given the bend morph some leeway. This simple shape will be the basis for our fountain object.TUTORIALS | Simulating fluids with animated textures STAGE TWO | Creating the fountain shape In Layout. In order to enable this. Because we moved the base geometry. Each segment is 1m high.

21 The plume is now finished. reduce the 23 number of radial clones for the plumes (nine works well). they work from any angle. open Cover_Image. ● September 2006 3D WORLD | 069 TDW81. In the Surface Editor. turn off Self Shadows for the plumes: Object Properties > Render tab > Self Shadow.srf on to the fountain surface. Use Load Items From Scene to load Water_Displace.lws. The plumes will appear in the centre. Copy these to your fountain by opening Object Properties > Deform and selecting the T by Displacement Map. Firstly. Choose Copy > All Layers from the Texture Editor. With practice. open the Transparency texture channel for this surface by pressing the T next to the Transparency heading. To see a similar fountain in a completed environment. Delete Water_Displace and save the scene as Fountain_LOADER. Bear in mind that there are a few things you can do to speed up rendering times here. 19 Surface motion is created using three layers in the Transparency channel. Press [F9] to render. If you want more control over the shape. The speed of each layer’s envelope should be slightly different for a more realistic. And lastly. each controlled by an envelope. 18 The fountain surface uses the Edge Transparency shader and the Transparency channel to create a natural-looking soft spray of water. Open Fountain_RIG. Select the Position tab for each one and open the Graph Editor (press the E next to the Y Channel). 20 We’ll now make the geometry drift a little by adding displacement maps. Open the Surface Editor. Parent your plume to the Fountain_Handle null and save the scene. a pre-built fountain base.lws. Use the Load Items From Scene option to add Fountain_ LOADER. The fountain rig is now complete. Continuous vertical movement is achieved using the Offset Repeat Post Behavior.Simulating fluids with animated textures | TUTORIALS STAGE THREE | Surfacing and finishing The plumes of the fountain will have spread outwards because of the Fountain_Bend morph.lws via Load Items From Scene. you’ll find this technique a valuable addition to your LightWave toolset. randomised motion. Secondly.lws. reduce the Render SubPatch Level: Object Properties > Geometry > Render SubPatch Level. you can create extra endomorphs for wind effects and so on. We are now ready to apply an animating surface to this shape. Water_Displace has displacement maps already applied. Because these rigs use full geometry.lws. Load the external file Fountain_Spray.t_fountain 069 3/7/06 13:51:40 . Select your fountain object and paste the stored layers into its Displacement texture. 22 This fountain rig can now be included in any project by importing Fountain_RIG.lws.

Sign up to vote on this title
UsefulNot useful