fig 1. Sampler Emitters connected to NURBS patch model, with Blinn shading network and lighting connected to each emitter's Color Map attribute. fig 2. Resulting Hardware rendered particles are nearly identical to Software rendered geometry. Each particle is essentially a pixel.

The Sampler Emitter allows you to take advantage of the full range of shading nodes in Maya. Any shading node can be used to control a variety of attributes of the emitter and of the particles being emitted.

 

Sampler Emitter Creation

You can create a Sampler Emitter through the GUI. Select at least one NURBS or Polygonal surface and then select the menu item Particles -> Create Sampler Emitter.The following behaviors for Sampler Emitter also apply :

If you have one or more surface selected, a Sampler Emitter will be created for each surface and a single particle object will be connected to all of the new emitters.

Sampler Emitter Attributes

Rate

The emission Rate of the Sampler Emitter is based on particles/second evaluation. A Rate of 1000 with a frame rate of Film (24fps) would mean that every 24 frames you would have 1000 particles (give or take a few).

Rate Map

Using the same mapping techniques described in Sampler Emitter Mapping, the Rate will be multiplied by the Rate Map greyscale values.

Scale Rate By Size

Scale Rate By Size works slightly differently than the technique used by normal surface emission. The attribute only has an effect when used with NURBS surfaces. The size of the object is determined by the actual surface area of the geometry as opposed the way that that surface emission works, where the size of the object is based on the bounding box of the surface.

For this attribute to work correctly, you should freeze transforms on your surface.

Need Parent UV

When set, this passes the UV information from a NURBS surface to the particle's parentU and parentV attrubtes.

Min / Max Distance

The distance by which the emitting particles are offset, normal to the surface.

*Unlike the Maya's min/max distance setting, you can use a negative range for these values so you can offset your particles on both sides of the surface.

Speed

The speed at which the particles are emitted from the surface. The overall speed assigned to the particle on emission is caluclated as :

Speed +/- SpeedRandon /2 x Normal Speed x Speed Map (if mapped).

Speed Random

The Speed Random attribute lets you add randomness to your emission speeds without using expressions. If you set Speed Random to a positive value, the emitter generates random speeds for each particle. The Speed value is the mean speed; Speed Random defines the range of the speed variation.

Each particle's speed is a random value between:

Speed - Speed Random/2 & Speed + Speed Random/2

Speed Map

Using the same mapping techniques described in Sampler Emitter Mapping, the Speed + Speed Random value will be multiplied by the Speed Map greyscale values. Normal SpeedThe speed moving the particles along the normal of the surface. Inherit Map

Using the same mapping techniques described in Sampler Emitter Mapping, the amount of motion the particles inherit from the surface can be mapped. The resulting inherit speed added to the particles is calculated as :

particleShape.inherit x Inherit MapColor Map

Using the same mapping techniques described in Sampler Emitter Mapping, the rgbPP value of the emitted particles will be set with the resulting color of the Shading Node mapped to this attribute.

Opacity Map

Using the same mapping techniques described in Sampler Emitter Mapping, the opacityPP value of the emitted particles will be set with the resulting intensity of the Shading Node mapped to this attribute.

*Intensity is used and not Transparency because OpacityPP values are the inverse of Transparency values. A larger value for OpacityPP means more opaque, less transparent. The oposite is true for Transparency.

Sampler Emitter Attribute Mapping

Depending on the type of shading node you want to sample, the Sampler Emitter needs different information from the surface.  For 2D textures, it simply requires a UV value.  For 3D textures, it requires a position in space.  For materials and shading groups, it may require normal and tangent information. 

Since particles and emitters do not inherintly have any of these attributes, the Sampler Emitter derives their values from the point on surface from where they were emitted.

Shading switch nodes such as TripleSwitch, DoubleSwitch and SingleSwitch are supported by the Sampler Emitter. What this enables you to do is use a complex shading network that has switch nodes piping into its various channels, to drive attributes of the emitter and particles.

The following attributes can be mapped ; rateMap, speedMap, inheritSpeedMap, colorMap and opacityMap

To map these attributes, connect the outColor attribute or its equivelant from your shading node to the attribute on the Sampler Emitter.

To calculate lighting information, use a Shading Group node and connect the "usedBy[]" attribute to the desired attribute.

 


Sampler Emitter Notes

Polygonal objects do not send UV information to the particles.Scale Rate By Size does not work with polygons.To have lighting calculations work with the Sampler Emitter, you must connect to the Shading Group node's "usedBy[]" attribute.

 

Sampler Emitter Uses

Use Plate Photography to Color Particles

Using a camera projection with the plate photography as the image source, you can easily have your particles take on the color of the image.

This is a great technique for "particlizing" objects in your scene.

Use 2D Masks to Control Emission

Using a camera projection of a rendered scene or blue screen alpha channel, you can emit particles only from the areas in your scene that are masked off. This saves time when trying to rotomate a live action character so that you can emit particles from them.

Particlize 3D Objects and Characters

Since you can connect complex shading networks to a Sampler Emitter, your particles will look exactly the same as your 3D rendered objects. Even multi-patch models with shading switch nodes evaluate correctly!

Control Emission Behavior

Using 2D and 3D textures as speed maps, your particles can emit with infinetly more complexity. Use a texture network that looks like lava to emit particles from the hotest points of the surface and have them shoot out with varying speeds, based on the heat of the lava.