Eyeon:Manual/Tool Reference/Particles/pCustom
From VFXPedia
Particle Tools | |
pCustom | |
|
pCustom [pCu] | |
The pCustom tool is used to create custom expressions that affect the properties of particles. This tool is almost identical to the Custom tool, except that the calculations affect properties of the particles rather than the properties of a pixel. |
The following particle properties are exposed to the pCustom control :
px, py, pz | particle position on the x, y, and z axis |
vx, vy, vz | particle velocity on the x, y and z axis |
rx, ry, rz | particle rotation on the x, y, and z axis |
sx, sy, sz | particle spin on the x, y, and z axis |
pxi1, pyi1 | the 2D position of a particle, corrected for image 1's aspect |
pxi2, pyi2 | the 2D position of a particle, corrected for image 2's aspect |
mass | not currently used by anything |
size | The current size of a particle |
id | (5.2) The particle's identifier |
r, g, b, a | The particles Red, Green, Blue and Alpha color values |
rgnhit | This value is 1 if the particle hit the pCustom tools defined region |
rgndist | This variable contains the particles distance from the region |
condscale | The "strength" of the region at the particle's position |
rgnix, rgniy, rgniz | Values representing where on the region the particle hit |
rgnnx, rgnny, rgnnz | region surface normal of the particle when it hit the region |
w1, h1 | Image 1 width and height |
w2 h2 | Image 2 width and height |
i1, i2, i3, i4 | The result of the intermediate calculations 1 through 4 |
s1, s2, s3, s4 | The result of the setup calculations 1 through 4 |
n1..n8 | The values of numeric inputs 1 through 8 |
p1x, p1y, p1z .. p4x, p4y, p4z | The values of position inputs 1 through 4 |
time | The current time or frame of the compositions |
age | The current age of the particle |
lifespan | The lifespan of the current particle |
Additional information on the custom class of tools can be found in documentation for the Custom tool. All of the operators, functions and conditional statements described for that tool apply to pCustom as well, including pixel-read functions for the two image inputs (e.g. getr1w(x,y), getz2b(x,y) etc).
Tips for pCustom (edit)
Soft particle clipping with pCustom (Last Updated: Month 7th, 2006)Particles just disappear when they intersect the clipping plane of the camera. This causes a visible pop in the image which can be distracting. This tip demonstrates how the pCustom tool can be used to create a soft clip region for the camera, by fading out the particles before they reach the clipping plane.
Particle ID
When emitting one particle per frame you can use the lifespan and age to calculate a unique ID for each particle:
(age*lifespan-time)*-1
To better visualize what the particle ID does, create a pEmitter with the emission rate set to 1 per frame. In a pCustom tool enter id/50 as red expression and if(id=4,0.3,0.1) as size expression. (source: this pigsfly post by Gringo)
The contents of this page are copyright by eyeon Software. |