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.
The Color modifier interface has undergone extensive revision to make it clearer and simpler to use.
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.
Uncheck this switch to disable the modifier.
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.
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.
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.
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.
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:
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.
Choosing this option will reveal these additional parameters:
Sets how often the color is changed if 'Operation' is set to 'Fade Between'. The default is 1 frame, so the particle color may change every frame.
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.
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. You can change the red, green, and blue components at different rates if desired.
Selecting this option reveals these additional parameters:
Red/Green/Blue Rate of Change
These parameters are used in conjunction with the 'Increment/Decrement Color' mode. 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.
The modifier assigns a random color to each particle.
Use Texture Tag
With this mode you can drag a texture tag into the 'Texture Tag' link field and the particle colour will be sampled from the shader in that tag. The sampling will be done in one of two ways;
- If the particle was emitted from an object, and you have turned on 'UV Emission Data' in the emitter's Extended Data tab, the particle will have stored its emission point UV coordinates. The texture will then always be sampled at that point, so if the texture is animated, the particle colour will change as the texture at that point changes,
- If the particle was not emitted from an object, or if it was but you did not turn on 'UV Emission Data', the texture will be sampled at a randomly assigned point for that particle (and it will always be the same point for any specific particle).
The sampled colour will be blended with the colour from the 'Color' setting, depending on the 'Mix Mode' and 'Mix Strength' settings.
Note: this will only work with channel shaders, not materials such as Hair, Nukei, etc.
The following settings are available:
Only available in 'Use Texture Tag' mode. Drag the tag to be sampled into this field. Note that the material must be a channel shader, not the Hair material, Nukei, etc.
Only available in 'Use Texture Tag' mode. This is the channel to sample from (Color, Luminance, etc.). The channel does not have to be used in the material. You can set up an unused channel and sample from that if desired.
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.
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.
Change on Birth Only
If this switch is checked, the colour is only changed for newly-created particles. After that, the modifier will not affect the particle at all (and no other colour modifier will do so either, if that switch is also checked in them). This has been added specifically to help this modifier work in conjunction with the Infectio modifier. See that modifier page for more details.
Store Color Brightness
If this switch is checked, when the colour is changed the overall brightness will be stored as a particle data item. This can then be used later elsewhere in X-Particles. Note that the stored brightness will continue to be updated as long as the modifier affects the particle, unless the 'Change on Birth Only' switch is also checked.
This has been added specifically to help this modifier work in conjunction with the Infectio modifier. See that modifier page for more details. You can also use data mapping with this value. It is in the list of maps as 'Color Modifier Brightness (Color Mod.)'.
Only available in 'Set Color', 'Set Color (Immediate)', 'Fade Between' and 'Set By Falloff' modes. It sets the particle color, in combination with color from a shader (if present).
If 'Operation' is set to 'Set Color (Immediate)', 'Set Color', 'Fade Between' or 'Set By Falloff' there is the option to use a shader to generate the colour. In these modes, the following parameters become available:
A link field for a channel shader.
To the left of the word 'Shader' is a small black arrow. Cick this to reveal the other parameters.
The shader sampling is a true 3D sampling for those shaders which support it. For example, here is a Box emitter with the particles coloured by a Noise shader:
Although you cannot see from this image, the sampling is carried through the volume of the emitter.
Note that not all shaders will give a 3D sample of this kind. 'Noise', 'Rust' and 'Earth' will do so for example, but 'Brick', 'Simple Turbulence' and a number of others will not.
This menu determines how the shader is sampled.
The options are:
- Shader Space: this will sample the colour at the particle position in the 3D world (this is the default setting)
- Random (Variable): this will sample the shader at a different random point in each frame.
- Random (Fixed): the shader will be sampled at a point which will always be the same point for each particle but will be a different point for different particles.
Scale U, Scale V, Scale Z
These three parameters control the size of the shader across the sample space. To put it another way, if the 'Tile' parameter is checked a bitmap will be tiled across the sample space and the number of tiles is controlled by these parameters. If 'Tile' is unchecked the bitmap is simply scaled.
Procedural shaders are scaled using these parameters but the 'Tile' switch has no effect.
Offset U, Offset V, Offset Z
The shader will be offset by these amounts in the respective direction.
Mirror U, Mirror V, Mirror Z
Checking these switches will mirror the shader across the respective axis.
If a bitmap is used, checking this switch will cause it to be tiled across the sample space. The number of tiles is controlled by the 'Scale U' and 'Scale V' settings. The switch has no effect on procedural shaders.
These settings become available if 'Operation' is set to 'Gradient By Parameter', 'Time Dependent', 'Distance From Object' or 'Distance From Camera'.
The colour gradient used in the the gradient modes.
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:
- 3D Linear
- Distance Travelled
- Fluid Density**
- P-P Distance***
* 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.
If the option '3D Linear' is chosen, the following settings are revealed:
In this mode the gradient is used to colour the particles depending on their position along a specified axis. For example, with the default settings seend above, if the particle Y position is at zero or less, the colour will be taken from the left-hand end of the gradient. If it is +500 or more, the colour comes from the right-hand end of the gradient.
The axis to use - X, Y or Z.
The lowest position along the axis.
The highest position along the axis.
This menu has two options:
- World: the position along the axis is the actual position in the 3D world.
- Local: the position is relative to the position of the object given in the 'Object' setting. This can be the emitter itself or any scene object.
The object used if 'Space' is set to 'Local'. If it is left empty, the world position is used instead.
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.
The axis to use when 'Gradient Parameter' is set to '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.
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:
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.
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.
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.
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.
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.