SnowFlake Special Effects Tutorial

How to make snow with Particle System in Maya

by Victor Luo @ 26, Aug, 2009

In this lesson, we will learn how to make snow with the Particle System in Maya.

First of all, We need to get into the Dynamics Module,  so the Particle and Fields menu will be displayed on the main Menu Bar.

snow01

We go to the Surfaces Tab of the Shelf Editor, click the button to create a NURBS plane on the grid. We will use it to emit particle.

snow02

We scale the plane bigger and move it higher, to get ready for emit snow flake.

snow03snow04

We go to particle->Emit from Object , open the options window, and Edit->Reset Settings, then change the Emitter Type into Surface, keep other options unchanged, then click Create button to create and close the option window. Now we can see a little circle dot in the center of NURBS plane, which means that it has been a surface emitter of particle.

snow05

We need some more setting before we play the animation, in Particle Animation, the starting frame of playback range should be 0. And also please make the end frame bigger, typically 500 is enough.

snow06

snow07

Go back the frame 0 and play the animation, we found that all the particles go up, snow should go down to the ground, that is because our plane is built by default settings, its normal is positive Y direction.

We select the particle and press Ctrl + A to open the Attribute Editor, we see several tabs , they are all related to the particles. In Basic Emission Speed Attributes, we can see that the speed is 1.0, Tangent Speed is 0, Normal Speed is 1, which means particle will go along the normal direction, no speed along the tangent direction of the surface emitter.

snow08

We can change the value of speed into negative, or select the surface and rotate 180 of X to make the up side down, either way we can make the particle go down. We don’t use Gravity Fields to drag the snow flake to go down, because that will cause acceleration, in snow case, because of the light mass of each snow flake and flat shape,  the gravity is not as important as air resistance.

Besides the negative speed value, we change the setting as below. Randomize the speed with the range of 1, also we give a little bit tangent speed.

snow09

Now back to frame 0 and play, particle is going down and looks more natural.

snow10

We still need to add some more turbulence to the snow. Keep the particle selected, we go to Fields->Turbulence, we want it has low strength in the center of field by set the magnitude 5, and affect a bigger space by reduce the attenuation to 0.2, now back to frame 0 and play.

snow11

Now the particle system flow in the air, we want it move in a elegant way, to help make a romantic atmosphere for the environment. Now the motion of snow is almost there.

The next step we need to build a model of snow flake. Because all the snow flake has a basic shape of hexagon, so let’s begin with it.

Go to Polygons shelf and click the torus button to build a torus,snow12

the default setting will be 20 segments in both axis and height divisions. We simplify them into 6 and 3, keeping a hexagon shape and rounded planes outside to be able to extrude later.

snow13snow14

snow15snow16

We scale in Y direction to make it slim and select all the six vertical edge outside, use Bevel tools to make 6 new planes. We adjust the offset to make the new planes square, in my case is 0.24.

snow17snow18

Now we select these 6 new planes and extrude 3 times, the distance is like below, make the 2nd extrude square, too.

snow19

Then select the side face of the 2nd extruded face, extrude again.

snow20

Now we switch the extrude handle into global by click on the double circled handle, and press Ctrl , left mouse click and drag on the green cube to scale in X and Z direction. Then we scale the object in Y and scale in all direction to make it slim and smaller.

snow21snow22

We select the snow flake and particle, then select particles-> Instancer (replacement).

snow23snow24

Now all the particles have been replaced by the snow flake we just built, but they have no rotation, which make them look mechanical and unreal. We need to do something to control the rotation of each particle.

Select particle and press Ctrl + A, to open Attribute Editor, in the Per Particle (Array) Attributes, we need to create 2 custom attribute to do the control.

snow25

We add Genaral Dynamic Attribute, set Date Type as Vector as we need 3 items to control rotation XYZ, and Attribute Type as Per Particle so that we can control each particle.

snow26

We name one attribute as “rotPP”, which means rotation for per particle, the other attribute named as “addRotPP”, which defines the increment for each frame.

We right click on the rotPP attribute, enter the Creation Expression. Now we will define some variables to make random value for the rotation.

snow27

We define a float type variable named “rotX”, in maya expression and MEL script, each custom variable need a dollar sign in front of the name. Then we make a value provided by noise() function and assign to $rotX. Maya assign a unique id to each particle, so it’s a good way to control each particle through its id number.

Tips: The standard usage of an attribute should follow the format of: (object name) + “.” + (attribute name). We just type in “id” here, Maya will know that id means the id attribute of current selected particle, if we don’t keep the particle selected when editing the expression, Maya will not recognize what “id” means, then we will have to type its full name as “particleShape1.particleId”. The supporting of short name without the object name give us convenience, saving some time when we type.

We definitely need more definition to control all the direction of rotation. So we also define “rotY” and “rotZ” in the same way. Please note that noise() function will return a random value between -1 and 1 according to the value in the parenthesis, which is called “seed”. Same seed will have same noise result, so we just make each of the seed different.

snow28

Now we’ll  assign the 3 random value to rotPP of particleShape1, which stores all the parameters of the particle. Because it is supposed to be the rotation, -1~1 degree is far away from enough, so we times 90 to make the rotation more obvious. Remember that we are building the creation expression, so we are setting the initial status of rotation for each particle at the frame it was born.

snow29

Also, we need to define the increment for each particle, to make it easier, we assume that each particle will continue the same direction and the amount of rotation after  it was born and before it died. We still use these random value, but give it a different scale.

snow30

Then we click create button on the left bottom of the Expression Editor.

We almost finish the settting of rotation. Now keep the Exp Editor open,  please select the “Runtime before Dynamics” checker, we need to calculate each particle one time for each frame, we don’t choose the “Runtime after  Dynamics” because we want the particle be calculated first and then be influenced by the fields or other dynamics setting in the scene. In the “Runtime before Dynamics” we type like this, and click create button.

snow31

We are adding a value defined by addRotPP on to rotPP attribute for each particle of each frame, because expression of this part will be runned  for each particle, if you have 1 million particle, it will run 1 million times in one frame, so we touch the rotation of each particle. Now back to frame 0 and play… … it doesn’t work. Why?

Because we still do not make a connection between the rotation of particle and the rotPP. Now we go to the Instancer (Geometry Replacement) part of the particleShape1 attribute Tab,

snow32

We set the Rotation as rotPP in the Rotation Options. Only those variables with compatible data type will be displayed in this list, so now we have a connection. Go back to frame 0 and play again.

snow33

It works! And each snow flake has the different rotation value and speed, it looks random and natural. The snow flake is still a little bigger, so we select the original snow model, scale it into a proper size.

snow34

Much better! Now please give this original snow flake a material of Phong and give a color of white with a little bit blue, press 5 button and see.

snow35

Now we go to Window->Rendering Editor-> Hardware Render Buffer to make a render.

In the Render menu of Hardware Render Buffer,  we set the attribute as follow:

snow36

If you want to have a render test, go to Render->Test Render, if you would like to render all animation, select Render->Render Sequence,

All the setting above is for better quality and output. This is only a simple use of Hardware render buffer tool. We can touch more details in other example.

Tips: The hardware rendering is actually a capture of screen, so please close all your screen saver and economic power solution during the hardware rendering.

After the render finished, go to Flipbooks to see the final render with FCheck tools.

About the use of FCheck, we can write another tutorial. Here we just need to know some simple use: spacebar is for the stop and play, so is the button group on the left top. Left mouse button press and drag left and right to go forward and backward. Also use the left arrow on your keyboard to go backward one frame and right arrow button to go forward one frame.

snow37

The background is dark by default, actually it is transparent, if we open the image with other picture viewing tool, background color could be different.

snow38

Because we choose the hardware alpha, so the alpha channel can output the info to tell us which part is transparent and which is not. So we can output this image sequence to the compositing software, merge the snow with other visual elements as the background layer. In 3D game, we cannot use snow as a layer because of the free-angle camera. But we can output the point info of the particle into the game engine and draw the snow in the scene in a real-time way. Some special effects can be converted into mathematical formula or point information, then drawn by graphical card of computer, some will be output as dynamic texture, we use special effects in various way depending on our need.

Now we have learned how to make snow with Maya particle system, from this example, we can produce more similar effects. If we replace the snow flake with small rectangle and with fast rotation, we can make a scene of ceremony such as wedding. Be flexible and inspirational, you will find more possibilities. All the complex scene is made up of many simple application of tools. If we destruct and analyze the complex one in the right way , nothing is impossible.

Now get up and make your own scene with special effects!

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>