Color Modifier

Summary

This modifier changes particle color in a controlled fashion, that is, not just a simple color change but a graduated change over time. Various modes of operation are available.

Interface

This is the modifier's interface in the default mode:

For the 'Groups Affected', 'Mapping', and 'Falloff' tabs, and for the buttons at the bottom of the interface, please see the 'Common interface elements' page.

Parameters

Enabled

Uncheck this switch to disable the modifier.

Mode

Independent [default setting]

In this mode, the modifier will work in the same way as a standard Cinema 4D particle modifier: particles will be affected if they come into the field of effect of the modifier. X-Particle Actions have no effect on the modifier in this mode.

Action-Controlled

In this mode, the modifier will only act on a particle when told to do so by an Action. Until that point, the particle will not be affected, but once activated for a particular particle, the modifier will continue to influence it as long as it is in the field of effect of the modifier. The modifier's effect on a particle can be halted by means of another Action, if desired.

Operation

The modifier has several modes of operation, selectable from this drop-down:

Set Color (Immediate)

In this mode the modifier will change the colour as soon as the particle is in the modifier's field of effect. It is not an incremental change as with 'Set Color' but it does require the particle to be within the modifier's falloff field and will still be affected by the 'Threshold' setting if that is greater than zero.

Set Color

The simplest mode, simply changes the particle colour as it passes through the modifier's falloff. The colour change is permanent. The rate at which the colour change occurs is influenced by the modifier's falloff.

Fade Between

This is similar to 'Set Color' but is simpler to use to get a smooth change in colour. With 'Set Color' the only way to get a smooth change, as opposed to an abrupt one, is to use the modifier's falloff. This doesn't give precise control and is dependent on the particle's location within the field of effect. With 'Fade Between' you simply set the colour to change to and adjust the 'Fade Value' to control the rate of change.

Note that the fade value is still dependent on the modifier falloff, and can be mapped as with other parameters.

Set By Falloff

In this mode, the colour changes while the particle is in the modifier's falloff, but reverts to the original colour as it passes out of the falloff zone.

This image shows the difference between the two modes, with Set Color on the left and Set By Falloff on the right:

Color Modifier modes 1

Increment/Decrement Color

In this mode, the modifier will change the colour by a set amount as long as the particle remains within the modifier's falloff. The rate of change is governed by the three rate of change parameters (see below). You can change the red, green, and blue components at different rates if desired.

Random

The modifier assigns a random color to each particle.

Random (From Shader)

In this mode, the modifier randomly samples a shader in the 'Shader' link field. The particle colour is only changed once unless 'Shader Random Sample' is checked, in which case the shader is repeatedly sampled.

Gradient By Parameter

In this mode the colour modifier functions in the same way as if you had selected 'Gradient (Parameter)' from the 'Color Mode' drop-down menu in the emitter's 'Display' tab. The interface will change to look like this:

Note that unlike the emitter there is no 'Auto' switch, so you must enter the required range of values into the 'Min.' and 'Max.' settings.

Time-Dependent

This mode displays a color gradient and when the particle enters the modifier's falloff it will change the colour to the colour on the left of the gradient. Then over time it will change the colour to the colour on the right of the gradient. How long it takes to make the full change is governed by the 'Time to Completion' parameter. The interface changes to look like this:

When the color change is complete, what the modifier does then is governed by the 'On Completion' parameter.

Distance From Object

This is the same as for the 'Time-Dependent' mode but the rate of change is governed by the distance of the particle to an object in the scene. With this mode, two additional settings are available: 'Nearest Distance' and 'Furthest Distance'. All particles closer to the object than the nearest distance will have the color at the left of the gradient, while all particles farther away from the object than the furthest distance will have the right-hand gradient color. Particles with a distance from the object in between the two distance values will have a color somewhere along the length of the gradient.

Distance From Camera

Exactly the same as the 'Distance From Object' mode except that the current camera is used instead of a scene object.

Gradient

The colour gradient used in the the gradient modes.

Gradient Parameter

This drop-down menu is only used in the 'Gradient By Parameter' mode. The colour change is dependent on one of several particle parameters. The parameters available are:

  • Age
  • Direction*
  • Distance Travelled
  • Fire
  • Fluid Density**
  • Fuel
  • Mass
  • P-P Distance***
  • Radius
  • Speed
  • Smoke
  • Temperature

* Direction is an absolute value and there is no min/max setting possible with this. You can select the direction axis to test; this can be either Heading, Pitch or Bank. Particle direction is a vector, with three components to indicate the amount of movement along each axis. Each component can be between 0 and 1 and this is used as an index into the gradient to choose the colour.
** Fluid Density will only work if the SPH Fluid object is active in the scene.
*** P-P Distance is the distance to the nearest particle from the one to be coloured. It will only work if the 'Nearest Particle Data' switch has been checked in the emitter's 'Extended Data' tab so that the particle holds the distance to the nearest other particle.

To determine the position along the gradient to sample the colour, the 'Min.' and 'Max.' settings are used. You should alter these values to fit the expected range of the parameter used. For example, if 'Speed' is chosen in 'Gradient Parameter', particles with a speed at or less than the 'Min'. value are given the colour at the left edge of the gradient, while those with a speed at or greater than the 'Max.' value are given the colour at the right edge.

Min., Max.

These are the values which set the range for the parameter chosen in the 'Gradient Parameter' setting. These are not available for the 'Age' or 'Direction' parameters.

Direction Axis

The axis to use when changing colour by direction. The three options are Heading, Pitch, and Bank.

Time to Completion

This parameter is only available if 'Operation' is set to 'Time-Dependent'. It is the amount of time taken to change the colour from the left of the gradient to the colour at the right of the gradient.

On Completion

This parameter is only available if 'Operation' is set to 'Time-Dependent'. It governs what happens when the colour change is completed. There are three options:

Do Nothing

No further change to the particle colour will occur.

Wrap to Start

The colour will be changed back to the colour at the left of the gradient and the process repeated.

Reverse

The colour change will be reversed: it will begin to change back to the colour at the left of the gradient, taking the time in 'Time to Completion' to reverse the change.

Object

The object to measure particle distance from if 'Operation' is set to 'Distance From Camera'.

Nearest Distance, Furthest Distance

These parameters are only available if 'Operation' is set to 'Distance From Object' or 'Distance From Camera'. All particles closer to the object or camera than the nearest distance will have the color at the left of the gradient, while all particles farther away from the object or camera than the furthest distance will have the right-hand gradient color. Particles with a distance from the object or camera in between the two distance values will have a color somewhere along the length of the gradient.

Color

Only available in 'Set Color', 'Fade Between' and 'Set By Falloff' modes. It sets the particle color, in combination with color from the shader (if present).

Shader

Only available in 'Set Color', 'Fade Between', 'Set By Falloff' and 'Random (From Shader)' modes. In the first three modes, the shader is sampled and the color combined with that from the 'Color' parameter. In 'Random (From Shader)' mode the shader alone determines the color.

Shader Random Sample

If checked, the shader (if present) will be sampled repeatedly for each particle, causing the color to change each time it is sampled. If it is unchecked the shader will be sampled only once for each particle.

Change Every

Sets how often the color is changed. The default is 1 frame, so the particle color may change every frame.

Threshold

This is a setting designed to introduce some random chance into the color change. Each time the color is due to change for a particle (see 'Change Every' above) a random number is generated; if that number exceeds the threshold, the change will take place, but if it does not there will be no change. You can see that a value of 0% will always result in a change occurring; a value of 100% will mean that a change never occurs.

Red/Green/Blue Rate of Change

These parameters are used in conjunction with the 'Increment/Decrement Color' mode - see above. The maximum value is 255, which will cause an instant color change. A value of zero will result in no change. Values less than zero will reduce the color values for each component.

Mix Mode/Mix Strength

This drop-down determines how the color from the 'Color' and 'Shader' fields are blended. The standard four blend options are available. The 'Mix Strength' parameter governs the relative contribution of each color to the final result. A value of 100% means that only the shader color is used, while 0% will only use the Color field color.

These parameters have no meaning if no shader is present in the 'Shader' field.

Fade Value

This controls the rate at which the colour changes if 'Operation' is set to 'Fade Between'. The higher the value the faster the change. A value of 100% will cause an immediate change (assuming there is no falloff) while a value of 0% will result in no colour change at all. A value of 5%, for example, will take about 20 frames to complete the colour change (100 / 5 = 20) but this is dependent on the modifier falloff, so may take a little longer if there is a falloff present.

This value can be mapped if desired to give even closer control.