Eyeon:Manual/Tool Reference/Particles/pCustom

From VFXPedia

Jump to: navigation, search

pCustom [pCu]

Image:Icon_pCustom.png

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.


Image:F5_MANUAL_BOOK-780.jpg

The following particle properties are exposed to the pCustom control :

px, py, pzparticle position on the x, y, and z axis
vx, vy, vzparticle velocity on the x, y and z axis
rx, ry, rzparticle rotation on the x, y, and z axis
sx, sy, szparticle spin on the x, y, and z axis
pxi1, pyi1the 2D position of a particle, corrected for image 1's aspect
pxi2, pyi2the 2D position of a particle, corrected for image 2's aspect
massnot currently used by anything
sizeThe current size of a particle
id(5.2) The particle's identifier
r, g, b, aThe particles Red, Green, Blue and Alpha color values
rgnhitThis value is 1 if the particle hit the pCustom tools defined region
rgndistThis variable contains the particles distance from the region
condscaleThe "strength" of the region at the particle's position
rgnix, rgniy, rgnizValues representing where on the region the particle hit
rgnnx, rgnny, rgnnzregion surface normal of the particle when it hit the region
w1, h1Image 1 width and height
w2 h2Image 2 width and height
i1, i2, i3, i4The result of the intermediate calculations 1 through 4
s1, s2, s3, s4The result of the setup calculations 1 through 4
n1..n8The values of numeric inputs 1 through 8
p1x, p1y, p1z .. p4x, p4y, p4zThe values of position inputs 1 through 4
timeThe current time or frame of the compositions
ageThe current age of the particle
lifespanThe 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.