Input: Particle Info

Important: when using this node please see the section 'Output value returned' below, and the page 'Rendering: Scene Units' for information about the values which are output by nodes when they return a parameter which is a size of something (e.g. particle radius).

Node Interface

Example Output

In this scene the particles are coloured according to their size obtained from the Particle Info node:

The node tree to do this looks like this:

(The Math node is necessary here because Cycles 4D works entirely in metres and the scene units in the scene are centimetres.)

Overview

Function Outputs information about particles generated by X-Particles
Nearest C4D equivalent X-Particles Xpresso node

This node is intended to return information about particles in the scene. Currently it works only with the X-Particles particle engine by Insydium.

Settings

None.

Output

Output value returned

You should be aware that Cycles 4D converts all size measurements into metres for internal use, and the result output by these ports, where they return a size value, will be in metres. For example, if you have a particle radius of 10 cm the actual value output will be 0.1 (10 cm = 0.1 m). This is important if you use the value to input into some other node.

Note: for all these outputs, note that that raw data is returned. For example, the particle radius is returned as the actual radius, not as somewhere along a scale from 0 to 1. This is important if you use any of this data - as you certainly will - as input to a value on another node which requires a value in the range 0 to 1. An example of that would be the Fac input value on a Color Ramp node. If the particle radius is returned as, say, 3 units, this won't automatically be adjusted to somewhere in the range from 0 to 1. You will need to do this yourself using a Math node and based on the likely or known range of radius values you are likely to see.

We have produced a range mapping node group which will do this for you if you input the expected maximum and minimum values. This is part of our node group pack and you can download it here.

Index

The particle's index. This is a unique ID value for each particle.

Age

The particle's age in seconds.

Life Span

The lifespan in seconds.

Position

A vector which is the particle's position in 3D space.

Radius

The particle's radius.

Velocity

The particle's velocity (a vector comprising both speed and direction).

Note that this is not the same as the particle's speed. Speed is a simple numeric value but Velocity is a vector. To get the speed you need to manipulate the vector to get its size. How to do this is explained in the How To: Get the Size of a Vector page.

Rotation

This is a measure of the rotation of a particle. It is a vector, so you have access to the axes on which the particle is rotating (the X, Y and Z components of the vector) and how fast it is rotating, which you can get from the length of the vector. In this scene, an X-Particles Spin modifier is used to increment the particle spin by 1 degree each frame, so they spin faster and faster. The spin speed is then piped into a Color Ramp node and as the speed increases the particles receive a different colour from the Color Ramp:

The node tree looks like this:

The Vector Length node group gives the size of the angular velocity vector and can be downloaded from this site. Please see the How To: Get the Size of a Vector page.

Color

The particle's colour.

Mass

The particle's mass.

Group ID

The number of the group the particle belongs to.

Density

The particle density, set when using the xpFluidSPH object.

Distance Travelled

The distance the particle has travelled.

Temperature

The particle's temperature.

Fuel

The particle's fuel value.

Fire

The particle's fire value.

Smoke

The particle's smoke value.

Pressure

This value is derived from the Fuel Pressure and Fire Pressure settings in the X-Particles Gaseous Modifier.

UVW

These are UV coordinates for fire and smoke texturing and which are only available when using an xpDomain object.