Setting the nParticle sparks shading attributes

 
 
 

To shade the sparks, you set Color and Incandescence ramps to color the particles according to their speed and age, and create an Opacity Scale ramp that sets the nParticles opacity based on its speed. The opacity values help generate more particle streaking.

  1. In the Attribute Editor, click the nParticle_sparksShape tab.
  2. Under Shading, in the Color section, do the following:
    • Click the Selected Color swatch and in the Color Chooser, set the color to black.
    • Set the Color Input to Speed.
    • Set the Input Max to 9.7.
  3. In the Incandescence section, set a ramp using the following values:
    Marker Selected Position RGB color values Interpolation
    1 0 R:0.146, G:0, B: 0 Linear
    2 0.14 R:2.25, G: 0.053, B: 0.053 Smooth
    3 0.25 R: 39.22, G: 7.77, B: 0.71 Smooth
    4 0.4 R: 0.552, G: 0.079, B:0.026 Linear
    5 1.0 R: 0.128, G: 0, B:0 Spline
  4. Set Incandescence Input to Normalized Age.
  5. Set Incandescence Randomize to 0.28.
  6. Rewind and play the simulation to about frame 65.
  7. Render the current frame.

    The Color and Incandescence Scale ramps color the nParticles so they look red-hot. However, there is not enough streaking to give the sparks the appearance of cooling off as they age.

    You can use an Opacity Scale ramp and an opacity value for each spark based on its speed. For example, as the sparks begin to slow down, their Opacity values decrease, until they eventually fade out.

  8. In the Opacity Scale section, set a ramp using the following values:
    Marker Selected Position Selected Value
    1 0.1 1.0
    2 0.2 0.44
    3 0.47 0.14
    4 0.75 0.08
    5 1.0 0.10

    Leave the Interpolation set to Linear for each marker.

  9. Set the Opacity Scale Input to Speed.
  10. Set the Input Max to 30.0.
  11. Rewind and play the simulation to about frame 65.
  12. Render the current frame.

    Each spark now fades out as it loses momentum, creating noticeable streaks.

    Notice that the per-particle Opacity values also make the sparks less dense. To increase the density of the spark, you can increase the emitter's Rate (Particles/Sec) attribute to 4800.

    In the next section, you make the sparks behave more realistically by increasing bounce and applying an external gravity field to make them travel in an arcing motion.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License