Particle Texture Emission in Maya

This tutorial is about how to utilize the texture emission available with particles in Maya and make an object dissolve. In order to keep this as short as possible I left out all the little tweaks to make this pretty but to keep the focus on the essentials.

Building the basic setup

  • create a plane (NURBS or poly) and scale it to xyz 160, 1, 90
  • select the plane, go to Particles/Emit from Object (options), reset the settings and set the emitter type to surface and the rate to 100.000 particles/sec

pDissolve_01_emitter

  • set the time range to 100 frames
  • select the emitter and in the attribute editor scroll down to the Texture Emission Attributes folder
  • tick the checkBox for Enable Texture Rate
  • click the checkerboard button to the right of Texture Rate
  • in the Create Render Node window select the Ramp in 2D Textures (make sure that With new texture placement is enabled at the top of the window)
  • rename the ramp to emissionRamp1
  • set the ramp Type a U Ramp
  • make the three colors in the ramp black, white, black respectively
  • set the Interpolation to None

To create a softer effect some interpolation can be used but this makes the ramp animation a little bit more messy. For simplicity I set the interpolation to none which might not be the choice for real production.

  • set the position of all three color selectors to 1
  • set a keyframe at frame 1 for all color selectors
  • go to frame 5 and set the white selector to a position of 0.95 and the bottom black one to a position of 0.9
  • set a keyframe at frame 5 for all color selectors
  • go to frame 95 and set the bottom black position to 0, the white position to 0.05 and the top black position to 0.1
  • set a keyframe at frame 95 for all color selectors
  • go to frame 100 and set all color selectors to a position of 0
  • set a keyframe at frame 100 for all color selectors

pDissolve_02_emissionRamp

  • below the ramp set Noise Freq to 0.4
  • set a keyframe for Noise with a value of 0 at frame 1
  • set a keyframe for Noise with a value of 0.1 at frame 20
  • set a keyframe for Noise with a value of 0.1 at frame 80
  • set a keyframe for Noise with a value of 0 at frame 100
  • in the connected place2D node of the ramp set Repeat UV to 0.8 and 1
  • set the offset in the place2D node to 0.1 and 1

pDissolve_03_place2D

The UV repeat and offset values are for creating a clean start and end for the ramp animation. It is used to extend the ramp a little to prior the start and past the end because the regular texture repeat would cause the distorted ramp to “bleed” into the opposite end of the ramp. You can see this if you don’t set the parameters in the place2D node and go through the animation.

pDissolve_04_emission

Now if you play through the animation the particles are emitted from the plane only where the white texture streak travels across the surface

Creating the fields

  • select the particle object and create an air field
  • set the following parameters for the air field
  • Magnitude 20
  • Attenuation 0
  • Use Max Distance off
  • Direction XYZ 1,0.5,0
  • select the particle object and create a turbulence field
  • set the following parameters for the turbulence field
  • Magnitude 100
  • Attenuation 0
  • Frequency 0.1

Material for the plane

We need a material for the plane that has an animated transparency to mimic the effect of the dissolve. For that we take a copy of the ramp that controls the emission rate and modify it.

  • open the Hypershade, go to the Textures tab
  • select the emissionRamp1 and in the Hypershade menu bar go to Edit/Duplicate/Shading Network – this duplicates the ramp, the connected place2D node and the animation curves
  • rename the duplicate to alphaRamp1
  • delete the top black color selector

pDissolve_05_transparencyRamp

  • in the hypershade create a new Lambert material
  • middle-mouse drag the alphaRamp1 onto the lambert material and in the popup menu select transparency
  • in the lambert material add a File Texture node to the color channel and apply an image of your choice
  • in the attribute editor particleShape node tab navigate to the Add Dynamic Attributes folder
  • click on Color and then check the Add Per Particle Attribute checkbox
  • in the attribute editor emitter node tab go to the Texture Emission Attributes folder
  • check the Inherit Color checkbox
  • with the attribute editor and the emitter tab still open middle drag and drop the file texture node from the lambert material with the middle mouse button onto the Particle Color swatch

pDissolve_06_attributes

Note: When controlling the particle color or texture rate with a texture node it is important to directly control these features of the emitter with the 2D texture and not through a modifying color node. In that case the texture and emission features won’t work correctly.

pDissolve_07_final

Due to the fact that we use no interpolation in the ramps that control the texture rate and the transparency the edge of the dissolving plane is quite harsh. Some interpolation, maybe even in conjunction with a noise texture can be quite useful and make the result looking much more interesting.

It is also possible to combine several different particle objects with slightly different settings to archieve a nice and complex look.

Happy rendering!

Leave a Reply

You must be logged in to post a comment.

Categories
Search