Color
particle node
Changes a particle’s diffuse color and/or alpha.
This operator lets you set the color and/or alpha of its input particles by specifying the value directly, via a ramp file, or from a compositing operator.
This operator will add the color (Cd) or alpha (Alpha) attributes to particles if they do not exist already.
Using Color
-
Select the
particle system you want to apply color to. -
Click the
Color tool on the Drive Particles tab. -
Specify the node settings in the operation controls toolbar or parameter editor.
Parameters
|
Activation |
Turns this node on and off. The operator is only active if this value is greater than 0. This is useful to control the effect of this node with an expression. |
|
Source Group |
Only affect a group of points (created with, for example, a Group POP or Collision POP) out of all the points in the input. |
Color
This tab controls whether and how to set the color of the input particles.
|
Pass |
Do not modify the color. |
|
Param |
Set the color to an RGB value. |
|
Ramp |
Get the color from a ramp. |
|
COP |
Get the color from a compositing operator (an image). |
Color: Param
|
Color |
Color to set on the input particles. |
Color: Ramp
|
Lookup |
Use the ramp editor to create a color ramp, then use this parameter to control which point along the ramp the particle gets its color from. You can keyframe this parameter or enter an expression. To remove a color ramp,
|
Color: COP
|
COP Path |
Path of a COP to get color from. |
|
U |
U Parameter to evaluate COP at. |
|
V |
V Parameter to evaluate COP at. |
Alpha
This tab controls whether and how to set the alpha (opacity) of the input particles.
|
Pass |
Do not modify the alpha. |
|
Param |
Set the alpha to a value. |
|
Ramp |
Get the alpha from a ramp. |
|
COP |
Get the alpha from a compositing operator (an image). |
|
Speed |
Set the alpha according to the particle’s speed. |
Alpha: Param
|
Alpha |
Alpha value to set on the input particles. |
Alpha: Ramp
|
Lookup |
Use the ramp editor to create an alpha ramp, then use this parameter to control which point along the ramp the particle gets its alpha from. You can keyframe this parameter or enter an expression. |
Alpha: COP
|
COP Path |
Path of a COP to get alpha from. |
|
U |
U Parameter to evaluate COP at. |
|
V |
V Parameter to evaluate COP at. |
Alpha: Speed
To set alpha by speed, enter the low speed (corresponding to alpha = 0) and high speed (corresponding to alpha = 1).
|
Alpha 0 Speed |
Speed at which alpha is 0. |
|
Alpha 1 Speed |
Speed at which alpha is 1. |
Local variables
Standard POP local variables
|
AGE |
The seconds a particle in the template has been alive. |
|
AX AY AZ |
Acceleration of the particle. |
|
BBX BBY BBZ |
The point’s relative position in the bounding box. |
|
DEAD |
Point is dead. |
|
ITER |
Processing iteration number. |
|
JUSTHIT |
A collision for this particle was detected (for example, by the Collision POP) during the processing of this timestep (that is, this iteration of the particle simulation). This variable is cleared at the beginning of each timestep. Note that the collision POP actually detects any collisions which would have occurred the during the previous frame. |
|
LIFE |
Percent of total life used (from 0 to 1). |
|
LIFESPAN |
Expected lifetime of particle. |
|
MAPU MAPV MAPW |
Point or vertex texture coordinates. |
|
NPT |
Total number of points. |
|
NGRP |
Total number of points in source group. |
|
NX NY NZ |
Normal vector. |
|
PT |
The point number of the currently processed point. The |
|
RESTX RESTY RESTZ |
The rest position. |
|
SLIDING |
The sliding state of the particle. |
|
SPRINGK |
Elasticity of a point. |
|
STOPPED |
Point is stopped. |
|
STUCK |
1 if particle is stuck to a collision object. |
|
TENSION |
Spring tension. |
|
TIMEINC |
Time increment. |
|
TX TY TZ |
Point position. |
|
U V |
Surface UV values. |
|
VX VY VZ |
Velocity direction. |
|
WEIGHT |
Point spline weight. |
Added by Collision POP/Limit POP
|
DIST |
Distance from particle to last collision. |
|
HCR HCG HCB |
Diffuse color at the collision point on the surface the particle collided with. |
|
HITID |
ID for last collision. You can control how this attribute is set in the Collision or Limit POP to help distinguish types of collisions. |
|
HITTIME |
The time at which the last collision occurred. |
|
HMAPU HMAPV |
The texture map UV coordinates for the surface location where the last collision occurred. |
|
HNX HNY HNZ |
The normal at the surface location where the last collision occurred. |
|
HTX HTY HTZ |
World space position of the last collision. |
|
HU HV |
The UV coordinates for the surface location where the last collision occurred. |
|
NUMHIT |
Number of times the particle has collided. |
Added by Color POP
|
CA |
Point or vertex alpha value. |
|
CR CG CB |
Diffuse point or vertex color. |
Added by Property POP
|
ATTRACT |
Attractor point. |
|
CHARGE |
Charge of the particle. |
|
CLING |
Point is clinging to geometry. |
|
DRAG |
Point drag. |
|
FOLLOW |
Leader to follow. |
|
MASS |
Point mass. |
|
PSCALE |
Particle Scale. |
|
SCALEX SCALEY SCALEZ |
Non-uniform scale. |
Added by Proximity POP
|
NEAREST |
Either the point number or id of the particle nearest to this one. |
|
NEARESTDIST |
The distance to the nearest particle. |
|
NUMPROXIMITY |
The number of particles within a specified proximity to this particle. |
Added by Rotation POP
|
ROTA |
Rotation angle. |
|
ROTX ROTY ROTZ |
Rotation axis. |
Added by Source POP
|
GEN |
Generation. |
|
ID |
ID number, which always remains constant. |
|
ORIGIN |
Original Source point was birthed from. |
|
PARENT |
Parent’s ID Number. |
Added by Speed Limit POP
|
SPEEDMAX |
Maximum speed. |
|
SPEEDMIN |
Minimum speed. |
Added by Sprite POP
|
SROT |
Sprite rotation around view axis (in degrees). |
|
STEXU STEXV |
Texture coordinate of sprite’s lower-left corner. |
|
STEXW STEXH |
Size of sprite in texture space. |
|
SX SY |
Sprite scale. |
Controlled by Suppress Rule POP
|
SUPPPOS |
Suppress default position rule. |
|
SUPPVEL |
Suppress default velocity rule. |
|
SUPPUP |
Suppress default up-vector rule. |
|
SUPPAGE |
Suppress default aging rule. |
|
SUPPROT |
1 if particle is suppressing its default rotation rule. |
|
SUPPANGVEL |
1 if particle is suppressing its default angular velocity rule. |
Added by Up Vector POP
|
PVX PVY PVZ |
Previous velocity. |
|
UPX UPY UPZ |
Up vector. |
Added by Location, Source, Softbody, Split POPs
|
SPEED |
Absolute speed of particle. |
Example files
FromCops
$HFS/houdini/help/examples/nodes/pop/color/FromCops.cmd
This example shows how COPs can be used to color particles. The particles take on the colors of the butterfly image that is loaded in COPs.
A Color POP is used to color the particles from a COP. It uses the particle’s bounding box X and Y positions as the U and V lookup values in the COP.
HitId
$HFS/houdini/help/examples/nodes/pop/color/HitId.cmd
This example shows how the Hit ID attribute can be used to determine which collision object a particle hit last. After a particle bounces off a grid, its color is changed according to the ID of the collision object.
Essentially, there are four collision objects. When a particle hits the collision object, it bounces and its “hitid” attribute is set to a value dependent on which object it hit. The value is specified by the “Hit Index” parameter in the Behvior tab of the Collision POP.
The Color POP is then applied to set the color based on which object the particle hit last. The lookup value is based on the $HITID variable.
Usages in other examples
| Example name | Example for | |
|---|---|---|
| HitColor |
Collision particle node |
|
| BounceSplit |
Collision particle node |
|
| OrbitAlternate |
Orbit particle node |
|
| Fetch |
Fetch particle node |
|
| SplitSelf |
Split particle node |
|
| SparksStream |
Stream particle node |
|
| SoftBodySheet |
Soft Body particle node |
|
| Swarm |
Property particle node |