Scale nParticle emission rate using a texture

When you create a surface emitter, you can use a 2D texture to scale the emission rate on parts of the surface. For instance, you can scale the emitter Rate to 90% at the most luminous parts of a texture, and to 0% at the least luminous parts. Luminance is the measurable brightness of a surface.

Note: You cannot use a 3D texture to control surface emission, but you can convert it to a 2D texture and then use it to control surface emission For information on converting a 3d texture to a 2D file texture, see Convert a texture or shading network to a File Texture.

To use a texture to scale the emission rate

  1. Add a surface emitter to the surface.
  2. Select the emitted particles and add a per particle color attribute (rgbPP) from the Add Dynamic Attributes section of the Attribute Editor.
  3. Select Windows > Rendering Editor > Hypershade.

    If you need to create the texture, do so now. See Rendering for details. You don’t need to make the texture a part of a shading group. After you create the texture, make sure it’s visible in the Hypershade. Leave the Hypershade displayed on your screen.

  4. In the Outliner, select the emitter; it’s indented under the emitting surface object.
  5. Display the Texture Emission Attributes section of the Attribute Editor.
  6. Middle-drag the texture’s icon from the Hypershade onto the Texture Rate attribute in the Attribute Editor.
  7. Turn on Enable Texture Rate.
  8. Set the Emit From Dark attribute as desired:

    When Emit From Dark is off, fully luminous parts of the texture emit at 100% of the specified emitter rate. Parts of the texture that lack luminance don’t emit at all. Other parts emit between 0 and 100% in proportion to the luminance. In simple terms, bright colors emit more than dark colors.

    When Emit From Dark is turned on, the opposite luminance scheme applies. Parts of the texture that lack luminance emit at 100% of the specified rate, while fully luminous parts don’t emit at all.

    Tip: To emit at distinctly different rates from parts of the surface, use a texture with sharp contrast in luminance. For instance, use a striped black and white texture.

    If you see a few particles emitted from a seemingly wrong position of the texture, check that the coloring in that area has consistent luminance.

    You can figure the exact luminance value of a color by adding its RGB components and dividing by 3. For instance, the luminance of RGB value 1, 0, 0 equals 1/3, or 0.33. The luminance of RGB value 0, 0, 1 also equals 1/3, or 0.33. In other words, a saturated red has the same luminance as a saturated blue.

  9. Rewind and play the scene to see the texture-scaled emission rate.

    Note that you must turn on Shading > Smooth Shade All to see particle colors in your scene.