View
235
Download
0
Category
Preview:
Citation preview
8/8/2019 Tornado Effects
1/14
Tornado EffectsDynamics
One thing that has been asked fairly often was how to make a tornado effect. To tell the truth, I
didn't really know, so I've been experimenting with things off and on through the last few months.
All of a sudden, it hit me! I was creating a spiral shape using a well-known method, when I noticed
that the effect made a very tornado-like shape. The rest developed from that. So, let's go through itstep-by-step!
First, create a curve going straight up from the origin,
with a CV placed about every 2 grid lines or so (using
a default grid arrangement) as in Fig 1.
Create a Nurbs Circle. Make the following changes:
Translate X : -.5
Rotate X : 90
Radius : .04
Sweep : 90Sections : 3
You should see something similar to Fig 2.
While the Circle is selected, press Insert (above the
Delete key on the keyboard) and Grid Snap (X) thepivot of the circle to the origin. (Fig 3)
Now, select the Nurbs Circle and then the Curve inthat order. Go to the Modeling Menu Set and Surfaces
> Extrude. In the Channel Box, under Inputs, make
these changes:
Fixed Path : ON
Use Component Pivot : ONUse Profile Normal : OFF
Rotation : 5000
Scale : 6
You will hopefully see something similar to Fig 4.
You can adjust your Rotation and Scale numbers and
the orientation of the circle to get the kind of overall
http://www.mtmckinley.net/tutorial/tornadofig4.jpghttp://www.mtmckinley.net/tutorial/tornadofig3.jpghttp://www.mtmckinley.net/tutorial/tornadofig2.jpghttp://www.mtmckinley.net/tutorial/tornadofig1.jpg8/8/2019 Tornado Effects
2/14
shape you'd like to model your tornado after.
You can delete the history of the new "tornado" shape
(Edit > Delete by Type > History) and delete the
curves. Rename the object Tornado.
Now, select the new tornado shape. In the channelbox, select Rotate Y. Right click and select
Expressions from the menu. The Expression Editor
will open. In the Expression area, type the following:
Tornado.rotateY = frame * #
Put a number in the "#" spot. The higher the number,
the faster the tornado will spin. You can always edit
this later. Now, if you play your animation, the
tornado should spin like a top. (Fig 5)
Ok, now we're gonna add Dynamics. Select the
Tornado and go to the Dynamics Menu Set and
Particles > Emit from Object > Options. In the
options, choose Surface for emitter type and create it.When you press play, particles should be emitting
from the surface of the object. It's possible that the
particles may be emitting from the interior surface,rather than the exterior. If so, Reverse your tornado
surface direction (Modeling Menu Set - Edit NURBS
> Reverse Surface Direction). (Fig 6)
Open the emitter's Attributes and make the followingchanges:
Rate : 1000
Speed : 0
Now, we have more particles and instead of them
emitting away from the tornado, they'll stay on thesurface. Select the particles and make the following
changes in their attributes:
Lifespan Mode : Random RangeLifespan : 2
Lifespan Random : .25
Particle Render Type : Cloud (s/w) (click Current
Render Type button)Radius: .661
http://www.mtmckinley.net/tutorial/tornadofig7.jpghttp://www.mtmckinley.net/tutorial/tornadofig6.jpghttp://www.mtmckinley.net/tutorial/tornadofig5.jpg8/8/2019 Tornado Effects
3/14
Threshold: .661
Now, if you hide the tornado surface object, you'll just
have a spinning cone of cloud particles. You may
need to adjust the emitter rate, particle radius, etc. toget the look you want. (Fig 7)
Now that we have it spinning though, you also want itto move around, not just stay rigid. To do this, you
could probably use a number of methods, like bones
and soft-body simulations or whatnot, but a lattice
seems to work fine. Unhide the tornado object, select
it, and create a Lattice (Animation Menu Set - Deform> Create Lattice). (Fig 8 and 9)
Before adjusting the Lattice, open the Outliner and
select both the lattice and the base that was created
with it. Scale them up a bit to ensure that the tornadowill always remain inside it and never pop out
accidently. Now, it's just a matter of animating the
lattice to get the tornado to move and deform as you'dlike! The expression will keep the torado objectspinning while the Lattice changes its shape. It's up to
you to get the Cloud particles to look like you want
them, but I hope this tutorial has helped you get thetornado started and looking like you'd want. Don't
forget about using different Fields on the particles like
turbulence and so forth to get different effects.
Realistic LiquidDynamics
For this tutorial, I'm going to go over creating a certain type of water effect. No two effects are thesame, so you may need to modify your own scenes to show how you want the water to look. For my
scene, I'm going to simulate a large gush of water emitting from some sort of tube like you'd see in a
sewer or something. The water will then hit the ground and accumulate in a corner.
http://www.mtmckinley.net/tutorial/tornadofig9.jpghttp://www.mtmckinley.net/tutorial/tornadofig8.jpg8/8/2019 Tornado Effects
4/14
Now, before we get started, I should point out how taxing on a compuer particle effects can be. I'm
running a 2 Ghz processor with half a gig of RAM, and my system still renders this stuff out really
slowly, so bear with me.
First, I'll make my scene which you can download
HERE. It is simply a "L" shaped wall along with acylindrical pipe object. I've also put in simple 3-point
lighting. A camera object is placed were I'll berendering my example pics if you want the same
view.
PART 1: SETUP
First, we'll head to the Dynamics menu displays (F4)and choose Particles > Create Emitter. (Fig 1)
In the emitter's attributes (CTRL + A), make these
changes:
Emitter Type: Volume
Volume Shape: Cylinder
Away From Axis: 0
Along Axis: 1
What this does is change the point of emission to an
area of emission. The particles will emit from an area,rather than just a single point in space. Since the
"water" will be exiting a pipe, I've made the area of
emission into the shape of a cylinder. I've changedhow the particles are emitted from the default of
emitting from the axis of the area to emitting along
the axis of the area. If you press play, you should seesomething similar to what is found in Figure 2, with
the particles emitting along the axis of the cylindrical
shape. Rotate and resize the emitter to fit into the
pipe.
If your water effect is different, such as a shower head
or something, your particular settings may vary to
achieve what you are looking for.
Now, we'll mess with the particles themselves. Pressplay and allow the particles to emitt for a second or
two. Press stop. The particles should be frozen in their
current place. Select them. Go into the attributes and
make these changes (Fig 3):
http://www.mtmckinley.net/water_start.mbhttp://www.mtmckinley.net/tutorial/waterfig3.jpghttp://www.mtmckinley.net/tutorial/waterfig2.jpghttp://www.mtmckinley.net/tutorial/waterfig1.jpghttp://www.mtmckinley.net/water_start.mb8/8/2019 Tornado Effects
5/14
Particle Render Type: Blobby Surface (s/w)
Click the Current Render Type button and make these
changes:
Radius: .130
This makes the particles react to each other as BlobbySurfaces, which is more liquid-like. We're not done
by a long shot, but before we continue, let's put a
water shader on the particles. I like using a certainUtility combination that makes transparancy of the
particles fade toward the center of each. I'll show you
how to do this next.
PART TWO: THE WATER SHADER
Alrighty, this is really quite simple.
1. Open the Hypershade. Create a blinn material node.Create a Sampler Info and Color Blend utility node.
(Fig 4)
2. Middle click and drag the Sampler Info utility onto
the Color Blend. The Connection Editor will pop up.ChooseFacing Ratio on the Sampler Info side and
Blenderon the Blend Color side. Close the
Connection Editor.
3. Middle click and drag the Color Blend utility ontothe Blinn material and choose Transparancy as the
attribute to map. You should get an effect like in Fig.
5.
4. Next, Dbl click the Color Blend node to open itsattributes. Change color one to white and color 2 to
black. You'll notice that the outer edge of the blinn
material is opaque, while the inner area fades totransparant. I'm going to adjust mine a little to be light
grey in color 1, and dark grey in color 2. That way,
the outer edge won't be totally opaque, and the innerarea won't fade to totally transparant. (Fig 6)
5. Open the Blinn material's attributes and give it your
desired color. You can also mess with it a bit more.
For example, I'm going to give my ambient color a
bluish charge as well as map the specular color with a
http://www.mtmckinley.net/tutorial/waterfig7.jpghttp://www.mtmckinley.net/tutorial/waterfig6.jpghttp://www.mtmckinley.net/tutorial/waterfig5.jpghttp://www.mtmckinley.net/tutorial/waterfig4.jpg8/8/2019 Tornado Effects
6/14
Brownian texture to give it a little more interesting
look as well as choose the material preference of your
choice, such as anisotropic. (Fig 7)
Name and apply the shader to the particles.
PART THREE: TWEAKING LIKE MAD!
Now, we're going to finish up the tweaking on the
particles and the emitter to get the look of a huge
torrent of water gushing out of a sewer pipe. First ofall, let's see a render of what we've got so far: Fig 8.
Obviously, not quite there. I'm going to increase the
rate of emission waaay up.... like 10,000! Now when
you hit play, you'll see this big, blue... thing startpushing its way out of the pipe... not exactly fluid, eh?
Let's also increase the speed of these things. Nowbecause we're using a Volume Emitter, the normal
Speed attribute no longer controls the speed. Instead,we're going to increase the Along Axis to... say, 10.
Now let's see what we've got: Fig 9.
It's shooting out of there pretty quick now, but when it
gets across the hallway, there, it just goes straightthrough the wall! Let's setup collisions. First, select
the particles, then shift select the floor/wall object. Go
to Particles > Make Collide. Now, when the particlesreach the wall, they'll collide with it rather than pass
through it. But, this water shouldn't be reaching all the
way over there, though, right?
Right! We need gravity! Select the particles and go toFields > Gravity. With the particles selected, the
gravity is applied to them. Now, we can see our
"bubble-beam" is arcing downward and actuallybounces off the ground! (Fig 10)
First, let's get rid of all these bubbles, and actually get
some water in there. The Threshold attribute of the
Blobbies is what controls the way the particles"merge" with each other. The higher the threshold, the
further a particle can be from another to merge. Let's
start off with a small number. A Threshold of .3 gives
us Fig 11, while a larger number of .8 gives us theeffect in Fig 12. You may also need to adjust the
radius of the particles to get the effect you want. If
you're doing a scene with water coming from a
http://www.mtmckinley.net/tutorial/waterfig13.jpghttp://www.mtmckinley.net/tutorial/waterfig12.jpghttp://www.mtmckinley.net/tutorial/waterfig11.jpghttp://www.mtmckinley.net/tutorial/waterfig10.jpghttp://www.mtmckinley.net/tutorial/waterfig9.jpghttp://www.mtmckinley.net/tutorial/waterfig8.jpg8/8/2019 Tornado Effects
7/14
kitchen sink, your particle radius would probably be
higher than on a large scene such as this because of
the volume of water involved. For example, in Fig 13,I've increased the radius while keeping a high
threshold. In this image, we have a larger radius of .63
with a threshold of .8. This makes the water lookmuch thicker, almost gooey like sludge. So you'll find
yourself experimenting with the balance of Threshold
and Particle Radius to get the water effect you want.
Now, let's see about fixing the "bouncing" water.Water will bounce slightly when it hits a surface, but
it shouldn't bounce like a rubber ball. If you select
your floor object, you'll find a new attribute in the
Channel Box called the GeoConnector. In this section,you'll find Tessellation Factor, Resilience, and
Friction. Resilience is how "bouncy" the surface is,
while Friction is how "slippery' the surface is. A lowresilience and low friction will have a rigid, but slick
surface, like a non-stick frying pan. I'm going to set
resilience and friction to .25. Also, I'm going to add aTurbulence Field by selecting the particles, and
choosing Fields > Turbulence. Adjust the magnitude
of the gravity and turbulence to your liking. I'm using
Gravity magnitude of 9, with a turbulence of 30. I getthis result: Fig 14.
Obviously, we're getting closer, yet if I'm wanting a
huge gush of water to be coming out of that pipe, I'mgoing to need larger particles, yet have them becomesmaller when they hit the ground. There is a way to
do this, however you'll need to know exactly how
long the animation is going to last. For mine, let's sayit'll be a 5 second animation: 150 frames. Open the
particle's attributes and change the Lifespan to
Constant of 5 seconds.
Then, scroll down to the Per Particle (Array)Attributes. We're going to add an effect to the radius
controls of each particle. Click the General buttonbelow the PP (Array) section. In the box that opens,click the Particle tab. This opens up a HUGE list of
different attributes of particles that you can change.
Look in there until you find radiusPP. Select it andclick OK. (Fig 15)
http://www.mtmckinley.net/tutorial/waterfig15.jpghttp://www.mtmckinley.net/tutorial/waterfig14.jpg8/8/2019 Tornado Effects
8/14
In the array section, you'll see that radiusPP has been
added to the list. Right click and select Create Ramp.
You'll see the particles grow HUGE. That's ok. Now,right click on it again and choose Edit Ramp from the
new menu. You'll see a black to white gradient. The
gradient colors determine the radius of the particlesfrom their "birth" to their "death". The default of
black to white makes the particles start off huge and
dwindle until they die 5 seconds into the animation.We're going to change it so they start off small, but
then dwindle to even smaller when they die. Black is
small, white is large, while the top of the gradient is
death, bottom is birth. With this in mind, make thefollowing change: Fig 16.
As a result, we get the following: Fig 17.
I hope this tutorial gets you on your way to creating
realistic liquid effects! Email me any comments,
questions, or concerns you may have with this lesson.
There's still a ton of different things you can do to addto the realism of the liquid, such as using multiple
water emmitters to show a varied water flow, particle
emission upon particle collision to show little "splash"when the water hits the floor, lots of stuff! Here's
what I came up with after a few different effects.
What I did in this scene was have the liquid particles
emit more liquid upon hitting the surface (the purpleparticles) and also emit steam as if it were corrosive
acid or something. The reason I emitted additional
liquid, was because the huge torrent of liquid comingout of the pipe didn't seem to create a large enough
amount of liquid on the floor, so emitting MORE
liquid upon contact makes it seem that much more
large. It'll take a bit of experiementing to get it allworking like you want. Good luck, and thanks!
http://www.mtmckinley.net/tutorial/water2.jpghttp://www.mtmckinley.net/tutorial/water1.jpghttp://www.mtmckinley.net/tutorial/waterfig17.jpghttp://www.mtmckinley.net/tutorial/waterfig16.jpg8/8/2019 Tornado Effects
9/14
R i d e T h e F l o w !This tutorial shows how to create a Camera Ride on a Particle Flow system.A Script Operator assigns the transformation of a particle to a scene camera which then
travels with the particles in the middle of the stream.
Final Result
Download the Sample Scene
Watch the Ride Preview AVI (2.9MB, DivX 5.2)
Particle View Setup
http://www.scriptspot.com/bobo/mxs5/pflow/PFlow_RideTheFlow.ziphttp://www.scriptspot.com/bobo/mxs5/pflow/PFlow_RideTheFlow_DivX52.avihttp://www.scriptspot.com/bobo/mxs5/pflow/PFlow_RideTheFlow_DivX52.avihttp://www.scriptspot.com/bobo/mxs5/pflow/PFlow_RideTheFlow.ziphttp://www.scriptspot.com/bobo/mxs5/pflow/PFlow_RideTheFlow_DivX52.avi8/8/2019 Tornado Effects
10/14
8/8/2019 Tornado Effects
11/14
The Particle View contains 3 Events All events feature Find Target Test which redirect the particles to different scene
objects. When the particles come close to the object, they change to the next Event. All Events feature an instanced Rotation Operator which is set to orient the particles
along the motion direction using Speed Space Follow and X:90, Z:-90 rotationsabout the axes. All Events feature an instanced Script Operator which is described below. It moves a
scene camera to one of the particles.
Natural Language - Script Enable the Transformation Matrix channel In the Init handler, get the Camera from the scene by its unique name If the Camera does not exist, create a new one, assign a unique name In the Proceed handler, define a local variable to store the particle index. Define a second variable to define the ID of the particle to ride on.
If the particle already exists, get its index in the current Event Set the current particle to the index of the particle in the current Event Copy the transformation of the current particle to the transformation of the Camera
Complete Script
on ChannelsUsed pCont do(
pCont.useTM = true)
on Init pCont do( global pflow_travel_camera_170268 = $pflow_travel_camera_170268 ifpflow_travel_camera_170268 == undefuned then
pflow_travel_camera_170268 = FreeCamera name:"pflow_travel_camera_170268")
on Proceed pCont do(
index = 0rideParticleId = 400
ifpCont.hasParticleId rideParticleId &index then(pCont.particleIndex = indexpflow_travel_camera_170268.transform = pCont.particleTM
))
8/8/2019 Tornado Effects
12/14
on Release pCont do(
)
Step-By-Step Comments
on ChannelsUsed pCont do(
The ChannelsUsedhandler defines the channels to be used by the Script Operator - youcannot get or set particle related values from the particle container without specifying whichproperties you need access to. This way, Particle Flow does not have to provide the ScriptOperator with all possible channels (and there can be an arbitrary number of channels inParticle Flow) but only with those that are actually needed. This conserves memory!The parameterpContcontains the Particle Container.
pCont.useTM = true
Since we want to read the Transformation Matrix of the particles in order to orient theCamera, we will need access to the TM channel.
)
on Init pCont do(
The Init handler is executed when the Operator is being initialized.We will use it to get an existing scene Camera, check its validity and create a new one if noCamera existed.
global pflow_travel_camera_170268 = $pflow_travel_camera_170268
Create a global variable with a unique name and get the scene camera by its unique name.The Camera must have a unique name to make sure the correct object is referenced by thescript.
if pflow_travel_camera_170268 == undefuned thenpflow_travel_camera_170268 = FreeCamera name:"pflow_travel_camera_170268"
In the variable is undefined, there was no Camera with this name in the scene.In this case, we create a new Free Camera with the unique name and assign it to thevariable.
)
8/8/2019 Tornado Effects
13/14
on Proceed pCont do(
The Proceed handler contains the main code of the script.It will be evaluated every time the Operator is proceeded.
The pCont parameter references the Particle Container of the Event the Operator is locatedin.
index = 0
We will need a user-defined local variable to store the index of the particle to ride on.We initialize to 0.
rideParticleId = 400
This variable contains the Particle ID we want to ride on.
if pCont.hasParticleId rideParticleId &index then(
Now we call the .hasParticleId method in the Particle Container.We pass the Particle ID as parameter, and the indexvariable by reference.The method returns true when a particle with the specified ID exists in the container.
What is the difference between ParticleID and ParticleIndex?
The ParticleID is a sequential number given to every new born particle in a ParticleSystem.This ID identifies the particle throughout its whole life and stays the same when a particlechanges from Event to Event.
Every Particle Container of every Event contains a pool of particles.These particles are always numbered from 1 to the number of particles in the pool withoutgaps.When particles change between Events, the ParticleIndex will change, and the pools will berenumbered to avoid gaps.
Since we want to stick to the same particle no matter which Event it is in, we want toaccess it by the Particle ID.But we also want to access the corresponding ParticleIndex in every Event the script isevaluated in.Using the .hasParticleId method, we get true orfalse depending on whether the particle isin the current Event or not.
8/8/2019 Tornado Effects
14/14
If it is in the Event, we also get the actual ParticleIndex of this particle inside the variableindex.
pCont.particleIndex = index
Now we can set the current particle in the current Event to access its TransformationMatrix.
pflow_travel_camera_170268.transform = pCont.particleTM
Finally, we get the Transformation Matrix of the current particle and assign it to thetransformation of the Camera.
)
The If context ends here. If the particle ID does not exist in the current Event, the script will
do nothing.Since the particle with ID 400 can be only in one Event at a time, but the script is instancedin 3 different Events, the Camera will be affected by just one Script Operator a time.
)
on Release pCont do(
)
Recommended