modeling a fountain lightwave
TRANSCRIPT
ON THE WEB● Bonus scene fi le for
this tutorialwww.3dworldmag.com
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!
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 fi rst thing
artists tend to do is jump straight into the ParticleFX settings. This
is fi ne 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
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 fi rst 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 fi nd 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
A
066 | 3D WORLD3D WORLD September 2006
FACTFILE
FORLightWave 3D
DIFFICULTYIntermediate
TIME TAKEN30 minutes
ON THE CD• Full-size screenshots• Project fi les• Renders and
animations
ALSO REQUIREDN/A
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
A quicker splash LIGHTWAVE 3DLIGHTWAVE 3D
TUTORIALS | Simulating fl uids with animated textures
TDW81.t_fountain 066TDW81.t_fountain 066 3/7/06 13:51:263/7/06 13:51:26
September 2006 3D WORLD 3D WORLD | 067
Let’s take a look at this surface by opening the Surface Editor and clicking the T next to the Arrows’ Color texture channel. There’s a single image map
layer in the Color channel. If you take a look at the Position tab for this layer you’ll see that it’s controlled by an Envelope (E). Bring up the Graph Editor for this envelope by clicking the E next to the Y channel setting.
You’ll notice that the arrows on this surface move at a continuous speed down the Y axis. However, to create the effect of something falling, we need to
make the surface speed up as it descends. We’re going to do this with an endomorph, so open up Arrows_Working.lwo in Modeler. You’ll see that the object consists of a single plane divided into 24 equal segments.
04
STAGE ONE | Basic concepts
Run Layout and open the scene fi le Arrows.lws (this may be downloaded from www.3dworldmag.com/stoppress). This consists of a single plane object:
Arrows_Working.lwo (also included on the CD). If you drag the time slider you will see that the surface of this object already animates, with arrows moving downwards.
01 02
Press Play in Layout and you’ll see the arrows stretching and accelerating as they move. By creating continuously expanding segments with an
endomorph, our animation will accelerate. This is because the surface needs to cover each segment in the same amount of time, so short segments move more slowly than wide ones. The more segments you add, the smoother the acceleration.
08We now need to apply this endomorph to the rendered object. So save and switch back across to Layout. Endomorphs are applied by bringing up the
Object Properties window > Deform tab > Add Displacement > Morph Mixer. Double-click the Morph Mixer plug-in entry and create a 100% key at frame 0.
07
▲Simulating fl uids with animated textures | TUTORIALS
We’re going to stretch the object’s segments as part of an endomorph. So, fi rst, create a new endomorph called Arrows_Stretch (in the bottom right of the
Modeler interface). Make it a Relative map. With this new morph active, select all the points on the plane except those at the top and bottom. When you’ve done this, select the Stretch tool ([h]).
05Using the Numeric window, set the Stretch falloff to Linear (the other falloff settings can remain at their defaults). Create a falloff range for the Stretch
tool by right-clicking and holding at the top of the object and dragging downwards. Let go at 0 on the Y axis. Finally, Stretch the points by left-clicking and holding at the bottom of the plane, then pushing upwards until it’s 200%.
06
The animating arrows have been achieved by using just two keyframes – one at frame 0 and one at frame 25. By using the Pre Behavior and Post
Behavior Offset Repeat settings we can quickly create a continuous animation – something needed when producing a fountain.
03
EXPERT TIPIn summaryStage one of this tutorial has taught us that surface textures take their dimensions and envelope keyframes from base geometry. We can now stretch and speed up surface textures by fi rst creating endomorphs before stretching or squeezing geometry. And fi nally, through creating continuously expanding endomorph geometry from equally segmented base geometry, we have caused animated surfaces to accelerate, and are able to do this in a smooth and natural way by adding more continuous geometry.
i
TDW81.t_fountain 067TDW81.t_fountain 067 3/7/06 13:51:313/7/06 13:51:31
068 | 3D WORLD3D WORLD September 2006
In Layout, open the scene Fountain_Start.lws. This scene contains a single box divided into 10 equal segments. Each segment is 1m high. 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 Sub-Patches. This simple shape will be the basis for our fountain object. Select Fountain_Step1.lwo and open it in Modeler.
09The 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.
Select the Taper Evenly tool to do this, using the settings in the example as a guide.
11
Now select the endomorph Fountain_Deform. Because we moved the base geometry, our morph has moved as well. So move the morphed shape
back towards the origin. However, make sure you don’t return it to X = 0. Leave the centre of the plume base at around X = -40mm. This will help widen the plume base when we have created our array.
16
Create an endomorph called Fountain_Deform. With this morph active, move the points as shown in the example here, squeezing them towards the centre
5m line. The top of the fountain plume is eventually going to be at 5m. By squeezing towards this point, the water will now slow down approaching it and speed up again away from it (as the water falls).
10
TUTORIALS | Simulating fl uids with animated textures
Now our single plume is looking good, switch back to Modeler. We’re going to create a radial array of plumes to achieve our fi nal fountain shape.
However, we don’t want each plume to catch the same part of our animating surface, as this will look artifi cial. We avoid this by offsetting the base geometry of each clone. First, deselect any morphs and move the base box to -2m on the X axis.
15
STAGE TWO | Creating the fountain shape
Convert all the polys to Sub-Patches by hitting the [Tab] key. Save and switch to Layout. Apply the two endomorphs by opening up their Object Properties
windows, and selecting Deform > Add Displacement > Morph Mixer. Apply a 100% key for Fountain_Deform and 60% for Fountain_Bend. We’ve given the bend morph some leeway, in case we need to widen the fi nal shape.
14The fi nal fountain will consist of a radial array of plumes. Each clone will bend outwards to create a wider spray area. In order to enable this, create
another endomorph called Fountain_Bend (make it Relative). Bend the base shape 22 degrees out towards the -X axis. Now to test the morphs.
13To complete the basic plume shape, pull down the points on the top half of the box until they’re turned inside out and fi nish just below the origin. Our
animated surface will move straight up the base geometry, but because we created this shape with an endomorph, it will appear to fall after reaching the top of the plume. The morph Fountain_Deform is now complete.
12
Finally, create a radial array of 12 clones of this single plume. This will produce all the geometry that we need for a thick, high-quality plume of realistic
water emerging and splashing down from our fountain. Save the object and return to Layout.
17
TDW81.t_fountain 068TDW81.t_fountain 068 3/7/06 13:51:353/7/06 13:51:35
September 2006 3D WORLD 3D WORLD | 069
Simulating fl uids with animated textures | TUTORIALS
We’ll now make the geometry drift a little by adding displacement maps. Use Load Items From Scene to load Water_Displace.lws. Water_Displace
has displacement maps already applied. Copy these to your fountain by opening Object Properties > Deform and selecting the T by Displacement Map. Choose Copy > All Layers from the Texture Editor. Select your fountain object and paste the stored layers into its Displacement texture.
21
This fountain rig can now be included in any project by importing Fountain_RIG.lws via Load Items From Scene. To see a similar fountain in a completed
environment, open Cover_Image.lws. Bear in mind that there are a few things you can do to speed up rendering times here. Firstly, turn off Self Shadows for the plumes: Object Properties > Render tab > Self Shadow. Secondly, reduce the
number of radial clones for the plumes (nine works well). And lastly, reduce the Render SubPatch Level: Object Properties > Geometry > Render SubPatch Level. Because these rigs use full geometry, they work from any angle. If you want more control over the shape, you can create extra endomorphs for wind effects and so on. With practice, you’ll fi nd this technique a valuable addition to your LightWave toolset. ●
23
STAGE THREE | Surfacing and fi nishing
The plumes of the fountain will have spread outwards because of the Fountain_Bend morph. We are now ready to apply an animating surface to
this shape. Open the Surface Editor. Load the external fi le Fountain_Spray.srf on to the fountain surface.
18The fountain surface uses the Edge Transparency shader and the Transparency channel to create a natural-looking soft spray of water. In the Surface
Editor, open the Transparency texture channel for this surface by pressing the T next to the Transparency heading.
19Surface motion is created using three layers in theTransparency channel, each controlled by an envelope. Select the Position tab for each one and open the
Graph Editor (press the E next to the Y Channel). Continuous vertical movement is achieved using the Offset Repeat Post Behavior. The speed of each layer’s envelope should be slightly different for a more realistic, randomised motion.
20
The plume is now fi nished. Delete Water_Displace and save the scene as Fountain_LOADER.lws. Open Fountain_RIG.lws, a pre-built fountain base. Use the
Load Items From Scene option to add Fountain_ LOADER.lws. The plumes will appear in the centre. Press [F9] to render. Parent your plume to the Fountain_Handle null and save the scene. The fountain rig is now complete.
22
TDW81.t_fountain 069TDW81.t_fountain 069 3/7/06 13:51:403/7/06 13:51:40