Adverti horiz upsell
Realistic sparks through Maya dynamics
Realistic sparks through Maya dynamics
saldutti0892, added 2012-11-10 20:31:08 UTC 57,181 views  Rating:
(1 rating)
Page 1 of 1

This tutrorial uses both Maya and After Effects so to achieve our final prioduct, it requires you to have a basic understanding of both programs.  

Today we will be learning how to make sparks, the intent is for them to look like they are coming off of a grindstone.  But this is not to say that you can not use this tutorial as a base to alter the sparks, so it can fits your need. 



The end result: 


Screen_Shot_2012-11-09_at_2
Step 1: Open Maya, create and set the project



Screen_Shot_2012-11-09_at_2 
Step 2: Right click timeline >  Playback speed > Play Every Frame, Max Real-Time

This makes sure Maya is playing every frame and is not skipping any.




Screen_Shot_2012-11-09_at_2 
Step 3: Set the amount of frames to somewhere in the hundreds.  We do this because we want to be able to see our sparks for an extended period of time without Maya looping. 



Screen_Shot_2012-11-09_at_2
 Step 4: Create > Cameras > Camera



Screen_Shot_2012-11-09_at_2
Step 5: Panels > Perspetive > Camera 1

This will allow us to look through the camera, and it will also allow us to render from whatever the camera sees.



Screen_Shot_2012-11-09_at_2
Step 6:  Set the resolution Gate



Screen_Shot_2012-11-09_at_2
Step 7: Upper Lefthand Dropdown > Dynamics



Screen_Shot_2012-11-09_at_2
Step 8:  Particles > Create Emitter

This emitter will be the most important tool within this tutuorial becuase this is where the particles will spawn



Screen_Shot_2012-11-09_at_2
Step 9:

Change the name of emitter and partilce to what ever you feel you need. I chose mainEmitter and mainParticle, because this will be the most prominet within the final render. 



Screen_Shot_2012-11-09_at_2
Step 10:  Basic Emitter Attributes  >  Emitter Type > Directional

Within the attributes editor, notice the Emitter type drop down. This allows us to change the default setting of Omni, which makes the sparks fly in every direction, to Directional, which makes the sparks fly in a specified direction.




Screen_Shot_2012-11-09_at_2
Step 11:  Basic Emitter Attributes

Set to 1000 a sec.

This controls how many particles are produced every second from the emiiter.




Screen_Shot_2012-11-09_at_2
Step 12:  Distance/Direction Attributes

X: 0 
Y: .750 
Z: 1 

These control where your particles go within their respective direction.



Screen_Shot_2012-11-09_at_2
Step 13: Distance/Direction Attributes

Spread: .055

Spread controls the spread, or cone like shape, your particles will emit. The larger the spread the more your particles will be separated.



Screen_Shot_2012-11-09_at_2
Step 14:  Basic Emission Speed Attributes

Speed: 10 
Speed Random: 7

Speed controls the speed at which your particles emit.  While Speed random controls the randomization at which they emit.

IMPORTANT: Maya randomises the speed at which the particles emit by plus of minus 2 counts.  If you set your speed on 5 and a randomise speed of 2, for example, Maya will emit the particles at a 3, 5 or 7 speed and everything in between.




Screen_Shot_2012-11-09_at_2 
Step 15: (name of your partlice)Shape tab > General Control Attributes

Conserve: .700 

As you decrease the Conserve it slowes down the object as it gets  closer to the death of the object.




Screen_Shot_2012-11-09_at_2
Step 16:  Lifespan Attributes > Lifespan Mode

Lifespan Mode: Random
Lifespan: .400
Lifespan Random: .200

We want randomize the sparks because it gives a more not uniformed, realistic look.




Screen_Shot_2012-11-09_at_2
Step 17:  Render Attributes > Partilce Render Type

Particle Render type: Streaks 

This controls what shapes you want to come out of the emitter.




Screen_Shot_2012-11-09_at_2 
Step 18:  Add Dynamic Attributes > Color 

Check Add Per Particle attributes

This will allow us to add color on a per particle level




Screen_Shot_2012-11-09_at_2
Step 19:  Per Particle (Array ) Attributes 

Rightclick RGB PP > Creation Expression 

Notice that the RGB PP option became available.




Screen_Shot_2012-11-09_at_2
Step 20: Expression Editor 

seed(mainparticleShape.particleId);
mainparticleShape.rgbPP=<<rand(0,0),rand(0,0),rand(0,0)>>;



To make sense of this code lets take it line by line.

Note that "mainparticleShape" is the name of the partilceshape so yours will change based on what you named it. 

seed(mainparticleShape.particleId);
 - Controls the random factor, without this line every time your animation looped it would randomise new colors

mainparticleShape.rgbPP=<<rand(0,0),rand(0,0),rand(0,0)>>;  
- Controls the RGB or Red, Green and Blue.

AdditiveColor
For your Refrence in chosing colors





Screen_Shot_2012-11-09_at_2
Step 21:  Expression Editor

(.5,35),rand(.5,.75),rand(0,0)

This is the color you get when you enter those numbers to your emiter. Hit edit and the colors are set.




Screen_Shot_2012-11-09_at_2
Step 22:  Fields > Gravity 

With the particle selected add gravity.




Screen_Shot_2012-11-09_at_2
Step 23:  Attribute editor > Gravity Field

Magnitude: 1.800

This will give us the look of our sparks being wieghed down.




Screen_Shot_2012-11-09_at_2
Step 24:  Grouping and Render Layers

Group together the emitter, particle and gravivty with CTRL+G or CMD+G

The render tab in the bottom right is where we make render layers.  With everything seleted click create new layer.




Screen_Shot_2012-11-09_at_2 
Step 25:  Repeat for secound emitter

Create second emiiter
Create second gravity
Group all together
Add to own render layer

Emitter Type: Directional
Rate: 150 
Direction X: 0
Direction Y: .750
Direction Z: 1
Spread: 150

Speed: 7
Speed Random: 3

We did nothing new.  The only thing we changed were the numbers imputed.



Screen_Shot_2012-11-09_at_2
Step 26:  middleParticleShape Tab > Genera Control attributes 

Conserve: .800 
Lifespan Mode: Random
Lifespan: .400
Lifespan Random: .300

Particle Render Type: Streaks




Screen_Shot_2012-11-09_at_2
Step 27: adding color

seed(mainparticleShape.particleId);
mainparticleShape.rgbPP=<<rand(.5,.55),rand(.5,.55),rand(.1,.10)>>;



Screen_Shot_2012-11-09_at_2
Step 28: Adjusting the gravity

Magnitude: 3.400




Screen_Shot_2012-11-09_at_3
Step 29: Create third emitter

Create third emiiter
Create third gravity
Group all together
Add to own render layer

Rate: 25
Direction X: 0 
Direction Y: .750
Direction Z: 1
Spread: .300 

Speed: 3
Speed Random: 1


Screen_Shot_2012-11-09_at_3
Step 30: Conserve

Conserve: .900 
Lifespan Mode: Random
Lifepsan: .400
Lifespan Random: .300



Screen_Shot_2012-11-09_at_3
Step 31: Adding color

seed(mainparticleShape.particleId);
mainparticleShape.rgbPP=<<rand(0,.45),rand(0,.45),rand(0,0)>>;



Screen_Shot_2012-11-09_at_3
Step 32: Gravity

Magnited: 2.800




Screen_Shot_2012-11-09_at_4
Step 33: Batch Render

Render Layer: Master
Render Using: Maya Hardware

Image Fromat: PNG
Frame/Animation: name.#.ext
Start Frame: 1 
End Frame: How ever long you need it to go

Renderable Camera: Camra 1

MayaHardware tab > Quality >Presets: Production quailty

Now we render!!!


Screen_Shot_2012-11-09_at_4
Step 34: After Effects

Import all of the files onto seperate layers in the same composition.

Open After Effects and apply a Gaussian Blur, Glow and Glow onto the main spark

Gaussian Blur
Blurriness: .5

Glow1
Glow Threshold: 0
Glow Radius: 30 
Glow Intensity: 1

Glow2
Glow Threshold: 66
Glow Radius: 81
Glow Intensity: 1



Screen_Shot_2012-11-09_at_4
Step 35: After Effects


Apply a Gaussian Blur, Glow and Glow onto the middle spark.

Gaussian Blur
Blurriness: 2

Glow1
Glow Threshold: 100
Glow Radius: 100
Glow Intensity: 10

Glow2
Glow Threshold: 66
Glow Radius: 81
Glow Intensity: 1



Screen_Shot_2012-11-09_at_4
Step 36: After Effects

Apply a Gaussian Blur, Glow and Glow onto the scatterspark

Gaussian Blur
Blurriness: 1

Glow1
Glow Threshold: 100
Glow Radius: 100
Glow Intensity: 10

Glow2
Glow Threshold: 66
Glow Radius: 81
Glow Intensity: 1



Screen_Shot_2012-11-09_at_5
Step 37: After Effects

Apply a mask to all three layers to get ride of the tail.

Render and we're done!