Guides for PopcornFX Super Tools > Mesh Emitter > Particle Settings with Texture Image > Using Color_Map_Lifetime Texture

Using Color_Map_Lifetime Texture

Basically, each emitted particles can have only three status by default, and these three settings can be done in the Lifetime sub-section under the Particle Settings section. Therefore, the most changes a particle can have is three. However, if you want more freedom to change colors at desired intervals in its lifetime duration, then you can use the Color_Map_Lifetime texture.

Changing Colors During Particles Lifetime

  1. Apply the Mesh Emitter template from the Content Manager >> Set Template >> Particle >> PopcornFX Super Tools library.
  2. Simulate (Shift + S) for previewing and adjust the Emitter Settings and Particle Settings.
  3. In order to have the particle to have different custom colors in the lifetime, go to the Particle Settings section >> Lifetime subsection and initialize the color (white) and size (0.50, 0.50, 0.50) for the three phases.
  4. Stop simulating and select the Color_Map_Lifetime item from list under the Emitter section.

    The Texture Resource channel is applied with a default image of rainbow spectrum.
  5. Make sure you activate the Use Color Map Lifetime check box in the Use Custom Resource subsection under the Emitter Settings section.
  6. Simulate or playback to view the result. The particles change to rainbow colors during the lifetime.

How Does It Work?

The default image is as shown below. The Lifetime line is vertical and the particles change their colors accordingly.

Determine Sampling Line from Texture

By default, iClone picks the leftmost vertical line of the image to have the particles changing colors according to the colors from top to bottom of that line.

However, you are allowed to actually pick any vertical line from the image to use it as the colors for the living particles.

  1. Prepare an image of 101 pixels in width (the height has no limitation). The reason will be explained later.
  2. Edit the image and save as an image file. In this example, the left half is filled up with rainbow spectrum, while the other half is blue-yellow-blue pattern.
  3. Use the same example above but replace the Texture Resource channel of the Color_Map_Lifetime. Remember to activate the Use Color Map Lifetime check box.
  4. Simulate again. You will not see a instant difference; because the color spectrum of the left most vertical line has been changed.
  5. Drag the Color Map Lifetime Ratio slider to the value over 0.50. In this example, 0.75.
  6. The color changing result will be different as shown below.

How Does It Work?

iClone divides the source image into 101 columns. Therefore, the image is cut into 101 tall stripes with the width of only one pixel. These stripes can be numbered from 0 to 100.

Afterward, the Color Map Lifetime Ratio will determine which stripe is going to be sampled. In this example, the stripe, number 75 (Color Map Lifetime Ratio = 0.75).

This stripe is used to as the color map for the particles to change during the lifetime.