pCustom Node

pCustom Node

The pCustom node is used to create custom expressions that affect the properties of particles. This node is similar to the Custom node, except the calculations affect particles rather than pixels.

pCustom Node Inputs

The pCustom node has three inputs. Like most particle nodes, this orange input accepts only other particle nodes. The green and magenta inputs are 2D image inputs for custom image calculations. Optionally, there are teal or white bitmap or mesh inputs, which appear on the node when you set the Region menu in the Region tab to either Bitmap or Mesh.

  • Input: The orange input takes the output of other particle nodes.
  • Image 1 and 2: The green and magenta image inputs accept 2D images that are used for per pixel calculations and compositing functions.
  • Region: The teal or white region input takes a 2D image or a 3D mesh depending on whether you set the Region menu to Bitmap or Mesh. The color of the input is determined by whichever is selected first in the menu. The 3D mesh or a selectable channel from the bitmap defines the area where the custom particle node takes effect.

pCustom Node Setup

The pCustom node is placed in between the pEmitter and pRender. A Shape 3D node is used to create the region where the Custom particle event occurs.

All the same operators, functions, and conditional statements described for the Custom node apply to the pCustom node as well, including Pixel-read functions for the two image inputs (e.g., getr1w(x,y), getz2b(x,y), and so on).

pCustom Node Numbers

Number 1-8
Numbers are variables with a dial control that can be animated or connected to modifiers exactly as any other control might. The numbers can be used in equations on particles at current time: n1, n2, n3, n4, … or at any time: n1_at(float t), n2_at(float t), n3_at(float t), n4_at(float t), where t is the time you want. The values of these controls are available to expressions in the Setup and Intermediate tabs.

pCustom Node Position

Position 1-8
These eight point controls include 3D X,Y,Z position controls. They are normal positional controls and can be animated or connected to modifiers as any other node might. They are available to expressions entered in the Setup, Intermediate, and Channels tabs.

pCustom Node Setup

Setup 1-8
Up to eight separate expressions can be calculated in the Setup tab of the pCustom node. The Setup expressions are evaluated once per frame, before any other calculations are performed. The results are then made available to the other expressions in the node as variables s1, s2, s3, and s4. Think of them as global setup scripts that can be referenced by the intermediate and channel scripts.

pCustom Node Inter

Inter 1-8
An additional eight expressions can be calculated in the Intermediate tab. The Intermediate expressions are evaluated once per frame, after the Setup expressions are evaluated. Results are available as variables i1, i2, i3, i4, i5, i6, i7, i8, which can be referenced by channel scripts.

pCustom Node Particle

Particle
Particle position, velocity, rotation, and other controls are available in the Particle tab.

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
idthe 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 node’s 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, p4z
the 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

pCustom Node Conditions, Style, Region, and Settings Tabs

The Conditions, Style, Region, and Settings tabs are common to all Particle nodes, so their descriptions can be found HERE.

In:

Author:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *