PxParticlesFluid
- Last UpdatedDec 16, 2023
- 5 minute read
The PxParticlesFluid node is derived from PxParticles and inherits all its parameters.
A fluid particle system is a particle system made up of 1-n emitters. The particles of a fluid particle system can interact with the physical scene and also between them, as a fluid is supposed to do.

Platform support
This node is supported on XR-Windows platform only.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
No support |
No support |
No support |
No support |
|
|
|
|
|
|
Code example
This is a code example for the PxParticlesFluid node.
<PxParticlesFluid name="slagcrusher_leak" pxScene="section02PxScene" position="222.1833 25.34909 -0.6346957" visible="false" maxParticles="1200000" maxMotionDistance="0.15" gridSize="0.15" restOffset="0.001" contactOffset="0.1" durationTime="3" enabled="false" restitution="0.1" dynamicFriction="0.03" staticFriction="0.3" damping="0.1" particleMass="0.1" disableWind="true" rate="500" fluidViscosity="1" fluidStiffness="4" particleSize="0.05" shaderZsmoothIterations="14" shaderZsmoothBlurScale="1" shaderZsmoothBlurDepthFalloff="0.3" shaderFluidColor="0.09019608 0.09019608 0.09019608 0.8" shaderSpecularColor="1 1 1" shaderCubemap="Cube_des.dds">
PxParticlesFluid fields
Only the node-specific fields are indicated, not those inherited from the PxParticles node. Only the node-specific fields are indicated, not fields obtained by inheritance.
Field inheritance: NodeBase > NodeBaseMovable > PxParticles > PxParticlesFluid
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
emissiveMul |
sfloat |
Optional |
1 |
Emissive mul value for HDR. |
|
fluidRestParticleDistance |
sfloat |
Optional |
0.01 |
The typical distance of particles in the relaxed state of the fluid. In other words, the inter-particle distance at which the fluid is in its relaxed state. Defines the resolution of the particle fluid. |
|
fluidStiffness |
sfloat |
Optional |
10 |
The stiffness (or gas constant) influences the calculation of the pressure force field. Low values of stiffness make the fluid more compressible (springy). High values make it less compressible. The stiffness value has a significant impact on the numerical stability of the simulation. Setting very high values creates instability. Reasonable values are usually between 1 and 200. |
|
fluidViscosity |
sfloat |
Optional |
40 |
Viscosity controls a fluid's thickness. For example, a fluid with a high viscosity behaves like treacle, while a fluid with low viscosity is more like water. The viscosity value scales the force to reduce the relative velocity of particles within the fluid. Reasonable values are usually between 5 and 300. |
|
particleSize |
sfloat |
Optional |
0.045 |
The size or diameter of the rendered particles, in world units. |
|
referenceHeight |
sint |
Optional |
1080 |
Reference height. |
|
referenceWidth |
sint |
Optional |
1920 |
Reference width. |
|
shaderColorFalloff |
svec4 |
Optional |
2 1 0.5 1 |
How the fluidColor changes when the thickness is used. |
|
shaderColorFalloffScale |
sfloat |
Optional |
1.2 |
Used to tune the colorFalloff. It multiplies the value of colorFalloff. |
|
shaderCubemap |
sstring |
Optional |
TextureCube.DDS |
The EnvironmentMap file name. |
|
shaderFluidColor |
svec4 |
Optional |
0.95 0.96 0.97 1 |
Fluid color. The alpha value modulates the blend between the pixel of the Scene and the fluid. The alpha value is also affected by the pixel thickness. |
|
shaderFresnelBias |
sfloat |
Optional |
0.1 |
Fresnel offset (bias + intensity*fresnel()) [0 1]. |
|
shaderFresnelIntensity |
sfloat |
Optional |
0.4 |
Fresnel intensity (bias + intensity*fresnel()) [0 1]. |
|
shaderFresnelPower |
sfloat |
Optional |
2 |
Fresnel pow value [0 32]. |
|
shaderRefractivity |
sfloat |
Optional |
0.01 |
Amount of distortion of the Scene pixel along the pixel normal. |
|
shaderSpecularColor |
svec3 |
Optional |
1 0.7 0.8 |
Fluid specular color. |
|
shaderSpecularGloss |
sfloat |
Optional |
40 |
The shininess value (pow) for the specular effect [0 128]. |
|
shaderSpecularIntensity |
sfloat |
Optional |
1 |
Scales the specular effect. |
|
shaderZsmoothMethod |
senum |
Optional |
XY |
Smooth method. |
|
shaderZsmoothIterations |
sint |
Optional |
20 |
Number of iterations on X/Y axes. The value is always rounded to an even number by the code. [2 32]. |
|
shaderZsmoothBlurScale |
sfloat |
Optional |
1.23 |
Calculates a weight based on the distance of p(x,y) from the center of the sampled pixel (x and y are the iterated values). |
|
shaderZsmoothBlurDepthFalloff |
sfloat |
Optional |
0.41 |
Scales the difference between the depth of the iterated pixel and the depth of the sampled pixel. When the method is X, this value is used as a threshold. |
|
shaderLight |
sstring |
Optional |
Omni01 |
The Light name. |
|
thicknessAmountPerParticle |
sfloat |
Optional |
1 |
The thickness value that written by each particle. |
|
thicknessGaussianDeviation |
sfloat |
Optional |
1 |
Used only if smoothMethod is Gaussian25. |
|
thicknessSmoothMethod |
senum |
Optional |
Gaussian25 |
Blurs the thickness pixels. Valid values are: None, Gaussian25. |
Emitter attributes
Access the fields of the emitter of a PxParticle with the syntax:
pxparticle.EmitterN\attribute
For example: fuoco.Emitter0\life
MVEC3 fields represents list of parameters with the convention: timekey, minvalue, maxvalue.
|
Attribute |
Type |
Use |
Default value |
Description |
|
enabled |
sbool |
Optional |
true |
Enables/disables emission of particles. |
|
halfEmissionCone |
mvec3 |
Optional |
0 10 10 |
Half of the angle of emission, relative to the untransformed Y axis. |
|
life |
mvec3 |
Optional |
0 0.8 1.2 |
Perturbation of nominal particle duration time. |
|
linkToActorMesh |
sstring |
Optional |
Not set |
Links the emitter to a physx dynamic mesh. |
|
localPos |
svec3 |
Read only |
Internally calculated |
This fields reflects the position of the emitter in World coordinate system. |
|
localRot |
svec4 |
Read only |
Internally calculated |
This fields reflects the Quaternion rotation of the emitter in World coordinate system. |
|
orientation |
svec3 |
Optional |
0 0 0 |
Returns scene emitter orientation. The three elements of the vector are yaw, pitch, and roll. The values are in radians. Please consider that the emitter is a child of the Node transformation, thus the final space transformation is calculated in the following order: Emitter/orientation * Emitter/position * TransformOffset * Transform * matrix * Parent. In cases where no parent is expressed, the World coordinate system is its parent. |
|
position |
svec3 |
Optional |
0 0 0 |
Local emitter position. Please consider that the emitter is a child of the Node transformation, thus the final space transformation is calculated in the following order: Emitter/orientation * Emitter/position * TransformOffset * Transform * matrix * Parent. In cases where no parent is expressed, the World coordinate system is its parent. |
|
rateMultiplier |
mvec3 |
Optional |
0 1 1.2 |
Perturbation of the nominal particles emission rate. |
|
shapeHalfX |
sfloat |
Optional |
0 |
Emitter half width. |
|
shapeHalfY |
sfloat |
Optional |
0 |
Emitter half height. |
|
shapeHalfZ |
sfloat |
Optional |
0 |
Emitter half length. |
|
shapeType |
senum |
Optional |
Rectangle |
Shape of the emitter among Point, Rectangle (box) and Cylinder. |
|
velocity |
mvec3 |
Optional |
0 0.5 1.5 |
Particle velocity on emission. |