來自台灣的 JC LIN 林振宇 的部落格
Picture 1. Animated 3D tornado
In this tutorial I cover the creation of a simple tornado in 3D Studio MAX. The tornado is created by forcing particles to follow a path and adding motion blur to them. You need some experience with 3DS MAX to be able to follow this tutorial.
Picture 2. The helix is the path that particles will follow.
First create a path for the particles to follow. Create a Helix Shape in the Top view (Create > Shapes > Helix). Use the following settings in the Helix:
Rotate the Helix 180 degrees so that the first vertex of the helix is on top (picture 2).
Picture 3. Create a Snow particle system.
Next you need some particles. Create a Snow particle system (Create > Particles > Snow) with the following settings (picture 3):
The speed of the particles won't have any effect in the final system and orientation of the Snow emitter has only a very little effect.
Picture 4. Create a Path Follow space warp and bind the Snow particle system to it.
A Path Follow space warp is used to force the particles to follow the path. Create a Path Follow space warp (Create > Space Warps > Forces > Path Follow) with the following settings:
(The Particle Motion parameters add some chaos to the flow of the particles.)
Bind the Snow particle system to the Path Follow space warp (picture 4).
Picture 5. Particles are following the path.
Test the animation. The particles should now roughly follow the helix shape (picture 5). It takes 100 frames (Travel time) for the particles to go through the path.
Picture 6. A wave modifier makes the tornado more alive.
At the moment the tornado is boring. Add a Wave modifier to the helix to make the tornado more interesting. Use the following settings in the Wave modifier (you probably have to also rotate the Gizmo of the Wave modifier 90 degrees):
The tornado should now look like in picture 6. At the moment the tornado does wave motion only along one axis which means that it looks good only when looked at from certain angles. If you are going to render an animation I suggest you to animate two Wave modifiers with 90 degree separation to make the wave motion appear from any view angle.
Picture 7. Basic parameters of the tornado material.
Picture 8. Gradient Ramp parameters.
Create a material for the tornado with the following settings:
Picture 9. First rendering of the tornado.
Render an image to test the material of the tornado. The rendered image should look like in picture 9. (For my rendering I added a plane object with Matte/Shadow material under the tornado and an Omni light with shadows on top of the tornado.) It doesn't look much of a tornado yet. Next you'll add motion blur to enhance the realism of the rendering.
Picture 10. The final rendering of the tornado in 3DS MAX.
Add motion blur to the tornado. Right click on the Snow Particle System and select Object Properties... from the pop-up menu. Enable Object Motion Blur.
Go to the render settings and Apply Object Motion Blur with the following settings:
Render the tornado again. Now the rendering takes a few minutes longer because of the motion blur. The rendered image should look like in picture 10.
At the moment the tornado uses a Snow particle system. There are many other particle systems in 3DS MAX and you could also try this with any of them.
Step 2: Particle System
When you start the script, the script asks you, if you want to create a new tornado system if the script can't find one with default name. If you say yes, a new system will be created. If you already have one or you want to access another system with different name, just press no. Then the script asks which name it should use. Enter one. If there's already a system with this name the script autmatically will use it, otherwise a new tornadosystem will be created.
Then the following window appears:
When you first run the script a new group will be created. The group has the name “group_Tornado”. Everything will be parented into this group. The group also holds some attributes.
The “Create Cylinder”-Button creates a NURBS cylinder which is the base geometry to drive the particle system. The next step is the “Create Lattice”-Button. This button creates a lattice box wich you can control with sliders found under the “Control Lattice”-Button.
The “Scale UP/Down“-control handles the Y-scale of the lattice. The “Scale Row x”-control handles the XZ-scale of all points the are on the same XZ plane. With the “Row x up/down”-control you can move each row up and down. When you think you have the right shape, you can delete the lattice box with the “Delete Lattice”-Button but you can also animated the shape. Just use "Set Key"-button. If you want to animate the shape of your tornado you should first create the latttice and than create particle system. There's no problem if you want to animate the lattice afterwards, but there could be troubles if you first create the particle system and than use the lattice box...
Some needful things
The next step is to create an emitter and a particle system. You can make this with the “Create Emitter”- and the “Create Particle”-Button. When you create an emitter, every particle system after that will be linked to that emitter. When you create another emitter, the next particle system that you create will be linked to this emitter. With this function you can create different emitter and particle systems.
You can control the emitter with the “Control Emitter”-Button. With the “Emitter x Rate”-slider, you can control the creation rate. The “Max for x”-slider controls in which area the particle are born. The “x” stands for the emitter. If you have more than one, you’ll have sliders for each emitter.
You can control the particlesystem with the “Control Particle”-Button. The window has sliders for each particle system. The “Speed Px/y” sliders control the speed of the particle around the surface. The “Up Speed Px/y”-Slider controls how fast the particle go up. The Letters x/y mean the number of the particlesystem (x) and the which controlpoint is used. By default there alway three controlpoints (top, center, base). A particle can fly slow at the base, get more speed in the middle part and almost stand still in the upper part. If you set all of the “Speed x/y”-sliders on a value of 0, the particle will fly straight up. If you don’t want that the particle to fly up until the end, you can set the “UP Speed x/y” (y=3=top)on a value of 0. Then the particle will go around the surface for ever…
The “Position x/y”-sliders control where on the surface the controlpoints are. That’s useful if you use more than one particle system.
The "Display"-button opens a window with various buttons. The first part consists of 4 buttons. The first one is to hide/unhide the user interface. With the second button you can activate the Attribute Editor/Tool Settings and the Channelbox.
The second part has some nice features. You can toggle heads-up-displays. One for the the numbes of emitters and their emitter rate. The second for the number of particles. The third toggles the frameratedisplay.
The last rollout has some object display controls. The shading of the surface is by default deactivated. You can activate it with "Toggle Shading". When shading is activated, you can also activate wireframe on shaded. This helps to control the surface. The other two buttons are for the smoothness of the cylinder.
The last check boxes hidse/unhides particlesystems. Every particle node of your tornado group should be listed. If you have problems with your frame rate, disable one or more.
A second window is for advanced use. The preferences section controls everything from default speed up to the name of the particle system. If you want more than one cylinder, you can enter a new name and then choose new. A new group will be created. Than there's no problem to setup a second (or more if you like!) cylinder with as much emitter/particles as you like. It's up to you!
One thing you should keep in mind! If you change something, like the name and you restart Maya or source the script, the script can't find the group with the changed name! That's because every name will be reseted. If you want to access your custom-named group, you should go to the preferences section, choose set name and change into your name. For example the root-group of your system is named "group_twister", than you have to enter twister. Then you choose "Update" and "Cancel/Close". Now the script should detect your group and all of the emitter/particles. That's also a fast way to switch between different systems!
There're also other buttons like "Lattice Divs" and so on. You shouldn't change them if you don't really understand the system!!!
With "Lattice Divs" you can control the number of rows of your lattice box. Try for example an higher value, than choose "Update" and create a new lattice box. Now you have more control... "Max Latt. Y" and "Max Latt. XZ" controls the max value of the up and the row scale feature. "Cyl. Spans" and "Cyl. Sections" controls the number of isoparms of your cylinder. If your want more control take a higher number.
By the way, the active value will always be displayed if you click on one of the buttons!
The next two buttons control the number of controlpoints. Use more if you want to refine your speed. For example, if you have scaled a part and now your particle fly fsater at this area, just use a lower for example up speed value and move the controlpoint with the postion slider in your particle control into this area.
The "max Slider UP" and "Round" set the maximum value that you can control with a speed slider. If you need more control in the lower speed area, you should take a small value.
The "Default UP" and "Round" sets the default speed. The "max Emitter Rate" has the same function for the emitter rate.
If you wanna see your changes and the old value, choose "show All". With "Update" you can accept the new setting. This button is usefull if you already created a custom system and now want to chage something. The "New" button creates a new group with you settings. You can close the window with "Cancle/Close". The button doesn't make anything else...
Some words about the tornado-group. You should use the “Delete Tornado”-button, if you want to delete everything. This button deletes the group and all of the ramps/attributes and expressions. When you want to create a new tornado use the “New Tornado”-button.
The whole system has a structure. Every surface/emitter/particle can be found under the "group_Tornado"-node. With this structure it's quit easy to handle. If you want to delete the whole system use the delete tornado button. If you only delete the group, other parts like ramps will not be deleted. Sometimes there could occur a problem if you setup a new one. If problems occur, you should try the "File/Optimze Scene Size"-function. If this doesn't help, save your scene and restart Maya. When you reload your scene, you can continue to adjust the tornado at every step. If you have changed the names in your preferences, the best way to continue your work is set the values again and use update. The script should then recognize the tornado group.
There're a lot of windows, but I think you have much more control with less if you setup more than one system. A second script is in work that will be integrated into the Effects-menu...