In this, the second part of the series, I'll explain how to start working with nParticles in Maya. nParticles is an advanced particle system that uses Maya Nucleus framework.
This is better than the traditional particle system as nParticles can collide and interact with each other, as well as other dynamic and passive collision systems, and hence you have better chances to explore and delve into this dynamic particle system.
1. Setting Up nParticles Emission
Jump in the nDynamics mode so that you get the n-dynamics menu items.
Go to nParticles > Create nParticles > Create Emitter with Balls option turned on. It creates an emitter in the viewport.
The default timeline length is up to 24 frames only. You need to increase the frames number on the timeline because in order to view the particles act, you need more numbers of frames.
Go to Window > Settings/Preferences > Preferences.
In the Preferences box, go to Categories > Settings > Time slider and set the Playback start/end and Animation start/end from 1 to 500.
Click the Save button.
If you scrub the timeline, you will see the ball particles coming out of the emitter icon and falling down.
The ball particles are multicoloured. However you can change it into one specific colour.
With the nParticles selected, go to Attribute Editor > nParticleShape1 > Shading > Color. You can see there are two main colours here- Red and Blue. These colours derive the particles colour. Just delete the blue colour so that the particles could have only one shade.
With the particles selected, go to nucleus1 > Ground Plane and turn on Use Plane option. This enables the grid as the deflector plane and hence the falling particle balls interact with the grid.
You can play with the Plane Bounce and Plane Friction properties to have different results.
2. Accumulation of nParticles
To accumulate the nParticle balls, you need something to hold them. Go to Curves > EP Curve Tool and draw the curve in the side view as shown in the following image.
With the curve selected, go to Surfaces > Revolve to create the bowl shape in the viewport.
If you scrub the timeline, you will see the balls are passing through the bowl.
With the bowl selected, go to nMesh > Create Passive Collider.
To increase the ball size, go to nParticleShape1 > Particle Size and increase the Radius value a bit.
Hit the play button and you will now see the particle balls getting accumulated in the bowl.
While the bowl is getting filled with the balls, just decrease the Rate (Particles/Sec) to 0 around 222nd frames on the timeline, so that there is no more particle emission in the scene except the bowl particle balls.
With the particle balls selected, go to nMesh > Initial State > Set From Current.
3. Creating interactive Animation
Create a plane under the bowl of particle balls.
With the plane selected, go to nMesh > Create Passive Collider.
With the bowl selected, go to the 50th frame on the timeline. Go to Attribute Editor > revolveSurface1 and with the right click on the Translate, click on Set Key. This sets the first key frame on the 50th frame on the timeline.
Go to 120th frame on the timeline and move the bowl a bit in the X-axis as shown in the following image. Due to Auto Key button turned on, a key frame on the 140th frame gets applied automatically.
Go to 200th frame on the timeline. With the right click on the Translate, click on Set Key. This sets a blank key frame on the 200th frame on the timeline.
On the very 200th frame on the timeline, with the right click on the Rotate, click on Set Key. This sets the first key frame for the rotation property on the 200th frame on the timeline.
Go to 240th frame on the timeline and rotate the bowl a bit in the X-axis as shown in the following image. Don’t worry if you see some absurd behaviour of particles in the viewport as that would get normal automatically.
Hit the play button to simulate the animation. You will see the particle balls are interacting with the bowl and the ground plane according to the motion.
In the next part of the tutorial, I will show how to delve into more deeper in nParticles in Maya.