Home » » Particle dynamics in Maya tutorial- Dancing LEDs

Particle dynamics in Maya tutorial- Dancing LEDs

Written By Sameer T on 5/5/13 | 12:54 PM

Particle dynamics in Maya is awesome for creating wide varieties of effects. If you know expressions and scripting, you can create wonderful effects in Maya using the particle system. While studying the Soup Development node I accidently watched some discussions in Web about transferring animation data from polygons to Particles. I.e. without using Soup node or any external plug ins user can transfer animation to particle system. You can control the look and feel of particles, their behavior over time can be procedurally change by using animated mesh.
In this tutorial you will learn to create some procedural animation and simply transferring that animation to the particle system using fields and simple expressions. It is procedural animation i.e. by simply changing the animation you can interactively change the behavior of particles. The idea behind this technique is very simple. Create some deformable mesh which animates over time and that vertex animation is captured using fields and transferred to the particles. By applying appropriate variables and simple expressions the field property can control any attribute in particles.
leds.047
I got this expression from website which helped a lot for creating this tutorial.

Rgbpp= (mag (force) > 0)? 1: 0;
Watch the video tutorials for better understanding. If you don’t want to watch the video tutorials you can get a step by step instruction below.


 
1. Create a new project. Set the play back range to 100
2. Create a poly torus and change its properties as follows
· Section radius = 0.01
· Twist =45
· Subdivision axis = 400
· Subdivision height = 4
3. At frame set a key frame for section radius and go to frame 25, change the radius to 18 and set a key.
4. Duplicate the torus by 6 times by selecting the torus and go to edit> duplicate special with duplicate input graph turned on.
5. Select all the torus and change their keys sequentially by moving the keys forward so the animation is like a ripple effect.
6. Select all the torus and combine them. Polygon>mesh>combine
7. Rename the resulting mesh as ripple.
8. Create a new text by choosing the curves as output.
9. Make a planar of these curves by Surface> Planar with following option
· Output geometry =Polygons
· Type = quad
· Tessellation method =Count
· Count = 5000
10. Select the resulting mesh and give extrude. Add some depth.
11. Delete the history and change the name to text.
12. Give some transform animation to the text.
13. Save the scene
14. Now we need our particles ie the LEDs
15. We will create a particle grid by going to ndynamics menu ( you may use normal particles instead of nparticles).
16. Ndynamics>create particles> (balls)>nparticle tool> option
17. Change as follows
· Turn on create particle grid
· Particle spacing = 0.25
18. Click anywhere on the perspective grid and once again click diagonally opposite to the firs click. Press enter. This will create a particle grid.
19. Change the particle attributes as follows
· Nparticle shape 1,
· Radius = 0.1
· Conserve = 0
· Collision = 0
· Self-collide = 0
· In nucleus
· Turn off the enable
20. Select the nparticleshape1 and add a turbulence field.
21. Select ripple and turbulence field 1 and go to fields> selected as source of fields
22. Change the turbulence 1 attributes as
· Magnitude = 1
· Use max distance = on
· Max distance = 0.30
· Apply per vertex = 1
23. Select the nparticle 1 and add another turbulence field.
24. Select the text shape and turbulence field 2 and do selected as source of field.
25. Change the turbulence 2 attributes as
· Magnitude = 1
· Use max distance = on
· Max distance = 0.30
· Apply per vertex = 1
26. Now we need to transfer the field attribute to the nparticle shading attributes. In order to do we need to create some e custom expressions.
27. First break the connections of nparticleshape 1‘s rgbpp and opacitypp.
28. Now add a creation expression on the rgbpp.
29. Add the following expressions,
Nparticleshape1.rgbpp=<<1, 1, 1>>;
Nparticleshape1.opacitypp=0.25
30. This will create pure white particles with 75% transparency. If you want other colours play with the expressions or watch our previous tutorial about particles.
31. Now we need to add two custom attributes. Click on general tab adjacent to the colour tab and add userscalar1pp and userscalar1pp from particles tab.
32. Add the following as creation expression
Nparticleshape1.userscalar 1 pp=rand (0,1);
33. Click edit
34. Now right click on the uservector1pp and create a ramp. Select the userscalar 1 pp as input v of the new ramp.
35. Select the ramp and change the colour if needed. Change the noise to 1.
36. Now add the following as creation expression.
Nparticleshape1.rgbpp= (mag (force)>0) ? nparticleshape1. uservector 1pp:1;
Nparticleshape1.incandescencepp=(mag(force)>0) ? gauss (0,1):0;
Nparticleshape1.opacitypp=(mag(force)>0) ? 1:0.25;
37. Save the expression and click play. You can see now the particles interactively change its colour and opacity according to the mesh animation.
38. You can now hide the mesh and take a render out.
39. Play with expressions and different mesh deformations. Add more animated mesh and field.
Share this article :

0 comments:

Post a Comment


Tips Tricks And Tutorials

You can also receive Free Email Updates:

Email Subscription box byAshok Lothia