Particle System 3D

From RealMotion Wiki

Simulation/Particle System 3D

Instantiate a 3D particles system. ​

Description

The box Particles System 3D allows control of the RealMotion and Bullet 3D particles system. The parameters of the box apply to the whole system. To control the system dynamically, the Gradient Input texture reacts with the particles velocity. Other Behaviors, like Rotation and Scale, and the Model material may be modified upon the Gradient Texture.

The Particles System 3D box use the RealMotion physics processor or the Physical Library Bullet. The Bullet library had been modified in the integration to RealMotion. To learn more about, see the Bullet Physics (http://bulletphysics.org/) web site.

Collisions with the Gradient texture are detected by the Collision Shape. The particle texture inherits the Collision Shape properties like the position, the rotation angle and the size. This process allows the separation of the physical behavior from the visual look.

The box Particles System 3D does not output directly a texture, but 3D data to be processed in the 3D Pipeline. The box may output a Node to send to a Model Shader box or a Scene Renderer box. When the Model Mode is set to Instancing, the Particles System 3D box outputs an Instancing data for the Node Instancing box.

Each tab represents a function of the particle system:

- Spawn Mode: Affects the particles emission cycle. Initial Position, Spawn Mode, Particle Lifetime (Emission Spawn Mode) and Reset of the system may be set in this tab.

- Physics: Affects the World within the particles evolve. Particles Count and Size, Gravity, Looping Direction, Collision Shape and Collisions physical behavior may be set in this tab. Physics is an important tap for the particle simulation, as it may completely change the behavior of the ecosystem.

- Behavior: Affects the way particles react upon a collision. Interaction Surface, React Factor, Velocity, Rotation and Resize may be set in this tab.

- Material: Manages the way particles are drawn by the Scene Renderer after the simulation. Texture Scale and Flip Book 3D parameters may be set in this tab. The Flip Book 3D allows changing the mesh of particles dynamically or showing multiple meshes in the same particle system.

- Advanced: Sets the data outputted by the box.

General Use Case: The Particles System 3D box is a powerful and advanced tool to create visual effect. Model emission and particle cloud are classical usage. Use in conjunction with scripting box and shader to create falling wall and model destruction. Multiple Sample includes a 3D Particle System, allowing testing the effect of each parameter.

Inputs

Camera Camera Receives the Camera data. The Camera information is needed when mapping a projected Gradient. The same camera information is usually sent to the Scene Rendered box to match the point of view.
Depth 2D Texture Receives the depth buffer of an external camera.
Gradient 2D Texture Receives the detection texture in a gradient format. The Texture format must be in the RGBA 16 bits to allow negative vector calculation. The alpha determines the location of particle emission.
Initial Position Float3 Vector Receives and overrides the initial position of each particle in a Float 3 vector.
Initial Rotation Float3 Vector Receives and overrides the initial position of each particle in a Float 3 vector. The vector index matches the Initial Position index.
Material Material Receives the sprites material when the Particle Render Mode is set to Sprites.
Node Vector Node Vector Receives a vector of nodes to use as visual particles. When active, the Particles 3D outputs a Node instead of a Instancing Data. The Flip Book 3D also uses the Node Vector to receive nodes. The node rendered is controlled by the index of the Node Vector.
Reset Trigger Resets the particle system upon reception of an event.
Transform Transform Receives the transformation applied to all particles. The Transform is added after the particle physic simulation and therefore, the scale transform does not affect the particle.

Outputs

Collision Count Int Outputs the current count of Gradient and Environment Collisions.
Debug Node Outputs a node containing the world Boundary and the Interaction Surface.
Instancing Instancing Data Outputs the simulation result into an Instancing Data containing all particles.
Node Node Outputs the simulation result into a node containing all particles.

Parameters

Spawn Mode

Reset

Enable Input Pin: Reset Toggle Enables the Reset Input Pin.

Spawn Initialisation

Initial Position Enable Toggle Enables the spawn of all particles into a determined box on reset.
Uniform Distribution Toggle Enables the uniform distribution of the particles at initialization.
Initial Position Float3 Sets the center of the initial position box.
Initial Position Range Float3 Sets the size of the initial position box.

Spawn Mode

Spawn Mode String Sets the spawm mode. By default, the particles spawn on project launch. For the flow mode, the particles spawn in the active region of the detection texture alpha until the particle count is reached. For the Emission mode, the Particles spawn in the active region of the detection texture alpha until the particle count is reached. The particles have a lifetime to allow renegeration.

Flow

Spawn Rate Per Frame Int Sets the amount of created particles at each frame.
Maximum Spawn Trials Int Sets the maximal trials made by frame to successfully create particles until the Spawn Rate Per Frame reach. Setting the Maximum Spawn Trials lower than the Spawn Rate Per Frame reduces the number of particles created each frame.
Time Between Flows Float Sets the time, in seconds, between the reach of the maximal number of particles and the killing of all particles to reset the flow.

Emission

Particle Lifetime Time Sets the lifetime of each particle.
Particle Lifetime Random Percentage Float Sets the maximal random time added or subtracted to the lifetime of each particle. The value is a percentage of the Particle Lifetime.
Off Screen Death Enable Toggle Enables death when a particle goes outside screen viewport.
Off Screen Minimum Lifetime Time Sets the minimum lifetime of the particle before it can be killed by offscreen culling.
Spawn Rate Per Frame Float Sets the number of particles spawned per second.
Maximum Spawn Trials Int Sets the maximal trials made at each frame to successfully create particles till the Spawn Rate Per Frame reach.
Spawn Random Velocity Range Float Sets the initial velocity of the particles.
Fade In Duration Time Sets the alpha fade in time upon particle birth.
Fade Out Duration Time Sets the alpha fade out time before particle death.

External

Initial Position Toggle Enables the Output Pin Initial Position.
Initial Rotation Toggle Enables the Output Pin Initial Rotation.

Physics

General

Particle Count Int Sets the maximal particle count. Simulation must restart to see changes made.
Particle Size Float Sets the body size and the visual size of the particles. A value of 1.0 equals the simulation height. Simulation must restart to see changes made.
Particle Size Random Percentage Float Sets the maximal random variation added on each particle. The value is the percentage of the Particle Size. Simulation must restart to see changes made.

World

Physics Processor String Chooses the physics processor between Bullet and RealMotion. Each one has a different set of parameters.
World Size Float3 Sets the world size of the simulation.
Gravity Float3 Sets the gravity, on X, Y and Z axis.
Looping Direction String Chooses the looping options for the offscreen particles. None mode contains particles in the screen space. Vertical, Horizontal and Full mode loop particles in the same state. Spawn mode respawn particles in the opposite direction. Infinity mode has no looping border. In any looping case, it is recommended to have margins greater than the Particle Size. Active only with the RealMotion Physics Processor.
Sky Height Float Sets the margin outside the screen before the particles collide with the simulation border. This value is multiplied by the gravity internally. Active only with the RealMotion Physics Processor.

Collisions Particle-Gradient

Gradient Sampling Points Int Sets the amount of sampling points on the Gradient texture. Raise the number of sampling points for more precision, or decrease it for more performance.
Gradient Collision Threshold Float Sets the threshold before a collision between a collision point and the Gradient texture is counted. Only active when the Collision Count is enabled.
Collision Shape String Chooses the shape of the particle body. Active only with the Bullet Physics Processor.
Box Half Extent Size Float3 Sets the size of the box body. Active only with the Bullet Physics Processor.

Collisions Particle-Particle

Particle Collision Enable Toggle Enables the collision between particles.
Collision Elasticity Float Sets the elasticity of a collision. Active only with the RealMotion Physics Processor.
Collision Damping Float Sets the damping affecting the collision. The damping is the amount of energy lost in a collision. Active only with the RealMotion Physics Processor.
Environment Collision Threshold Float Sets the threshold before a collision between collision points of particles is counted. Only active when the Collision Count is enabled and with the RealMotion Physics Processor.
Friction Float Sets the friction of a body in the world. The suggested value is 1.0. Active only with the Bullet Physics Processor.
Restitution Float Sets the Restitution of the particles, a bouncing factor. Values around 1.0 create instabilities and the suggested value is 0.1. Active only with the Bullet Physics Processor.
Mass Float Sets the Mass of the particles. Active only with the Bullet Physics Processor.

Advanced

Threaded Update Toggle Uses a parallel thread to calculate the simulation for efficiency purpose.
Simulation Rate Float Sets the target simulation rate in FPS. Higher Simulation Rate helps to stabilize a simulation with strong impulsions.
Maximum Simulation Passes Int Sets the maximum simulation passes done in a frame. The Maximum Simulation Passes has priority over the Simulation Rate to avoid low FPS caused by multiple simulations in a frame. Active only with the Bullet Physics Processor.

External

Enable Output Pin: Collision Count Toggle Enables the Collision Count Input Pin. Active only with the RealMotion Physics Processor.

Behavior

Interaction Surface

Interaction On All Volume Toggle Enables the interaction of the gradient texture on the whole simulation World.
Surface Size Float2 Sets the size of the Interaction Surface.
Surface Position Float2 Sets the position of the Interaction Surface.
Use 3D Gradient Toggle Enables the output pin Depth and allows usage of a depth buffer and gradient texture.
Maximum Depth Float Sets the maximal physical depth represented in the Depth texture by a black pixel.

Velocity

React Factor Float Sets the React Factor of particles toward the gradient texture. Negative React Factor results in attraction and positive React Factor results in repulsion.
Gradient Depth Factor Float Sets the Z force derived from the gradient texture value. Positive value pushes the particles towards the camera and negative value pulls the particles.
Speed Multiplier Float Sets the speed multiplier of the React Factor. The Speed Multiplier must be between 0.0 and 1.0 to ensure valid particle reaction. Active only with the RealMotion Physics Processor.
Maximum Velocity Float Sets the maximal velocity reachable by a particle. Active only with the RealMotion Physics Processor.

Rotation

Rotation Input String Sets the rotation input mode. Physics uses gradient Red and Green components to set the angle of the particles. Gradient B. uses the Blue component to set the speed of rotation of the particles. Velocity Aligned used the particles speed and direction to set the particle angle.
Rotation Multiplier Float Multiplies with the Rotation Input. Active only with the RealMotion Physics Processor.
Rotation Damping Float Sets the value subtracted to the rotation speed at each frame. Active only with the RealMotion Physics Processor.
Rotate Speed Minimum Float Sets the minimal speed of rotation. Active only with the RealMotion Physics Processor.
Rotate Speed Maximum Float Sets the maximal speed of rotation. Active only with the RealMotion Physics Processor.

Resize

Resize Enable Toggle Enables the resizing of particles upon interaction. The resizing function multiplies with the particle size.
Resize Maximum Float Sets the maximum multiplier of the particles size.
Resize Minimum Float Sets the minimal multiplier of the particle size.
Resize Speed Float Sets the resizing speed.
Resize Exponent Float Sets an exponential resizing speed.
Resize Sensitivity Float Sets the minimal value needed to resize the particles.

Material

Texture Zoom Scale

Zoom In Texture Float Sets the centered rescaling of the particle texture. Note that the value must be set to 1.0 when using the Flip Book mode.
Particle Texture Scale Float Sets the size of the particle texture. Note that this value does not affect the particle size. The Particle Scale only affects the render of the particles.

Flip Book 3D

Flip Book 3D Enable Toggle Enables the Flip Book 3D mode. The Flip Book 3D allow animations of particles independently and to show multiple nodes in one particle system. A node vector pin receives the nodes used in the Flip Book 3D.
Flip Book Resolution Int2 Sets the number of nodes used by the Flip Book 3D with the int2.x. Setting a value greater than the node vector size will spawn particles without mesh and consequently invisible. The int2.y value is ignored.
Flip Book Uniform Distribution Toggle Enables the uniform distribution of the Flip Book 3D node.
Flip Book Initial Random Offset Int Sets the random offset for the selected Flip Book node on start.
Flip Book Frequency Float Sets the node change frequency in FPS. Setting the parameter to 0.0 deactivates the node change.
Flip Book Frequency Random Amount Float Sets the range of the random value multiplied by the Flip Book Frequency.
Flip Book Fade Exponent Float Sets the fading time for every Flip Book change. Only work with 2D Particles.

External

Camera Toggle Enables the Camera Input Pin.

Advanced

Render Mode

Model Mode String Set the node data model. In the Instancing mode, the box outputs the Instances Data of all particles. In the Node mode, the box receives multiple particle models in the Node Vector input and output all particles in a single Node.
Particle Render Mode String Sets the render mode of the particles. The 3D Models mode outputs the particles as 3D Models. The Sprites mode outputs the particles as Sprites facing the Camera. Sprites are inputted with the Material node.
Particle Sorting Mode String Sets the particles sorting mode. Active only when the Model Mode is set to Node. The Camera, in Material/External, must also be active for depth sorting.

Vertex User Parameters

Vertex User Parameter 0-X String Sets the X component of the float4 Vertex User Parameter 0. The Vertex User Parameter sends the selected particle variable of the Particle system to the shader. The Vertex User Parameter must be handled in the Model Shader and is an advanced feature.
Vertex User Parameter 0-Y String Sets the Y component of the float4 Vertex User Parameter 0. The Vertex User Parameter sends the selected particle variable of the Particle system to the shader. The Vertex User Parameter must be handled in the Model Shader and is an advanced feature.
Vertex User Parameter 0-Z String Sets the Z component of the float4 Vertex User Parameter 0. The Vertex User Parameter sends the selected particle variable of the Particle system to the shader. The Vertex User Parameter must be handled in the Model Shader and is an advanced feature.
Vertex User Parameter 0-W String Sets the W component of the float4 Vertex User Parameter 0. The Vertex User Parameter sends the selected particle variable of the Particle system to the shader. The Vertex User Parameter must be handled in the Model Shader and is an advanced feature.
Vertex User Parameter 1-X String Sets the X component of the float4 Vertex User Parameter 1. The Vertex User Parameter sends the selected particle variable of the Particle system to the shader. The Vertex User Parameter must be handled in the Model Shader and is an advanced feature.
Vertex User Parameter 1-Y String Sets the Y component of the float4 Vertex User Parameter 1. The Vertex User Parameter sends the selected particle variable of the Particle system to the shader. The Vertex User Parameter must be handled in the Model Shader and is an advanced feature.
Vertex User Parameter 1-Z String Sets the Z component of the float4 Vertex User Parameter 1. The Vertex User Parameter sends the selected particle variable of the Particle system to the shader. The Vertex User Parameter must be handled in the Model Shader and is an advanced feature.
Vertex User Parameter 1-W String Sets the W component of the float4 Vertex User Parameter 1. The Vertex User Parameter sends the selected particle variable of the Particle system to the shader. The Vertex User Parameter must be handled in the Model Shader and is an advanced feature.

External

Enable Output Pin: Debug Toggle Enables the Debug Output Pin.
Output Boundary Toggle Outputs a visual dummy of the World boundary in the Debug Output Pin.
Boundary Technique Name String Sets the render technique of the Boundary.
Output Interaction Surface Toggle Outputs a visual dummy of the Interaction Surface in the Debug Output Pin.
Interaction Surface Technique Name String Sets the render technique of the interaction Surface.

See Also

Boxes related

Model 3D, Model Shader, Scene Renderer, Gradient, Add Alpha, Massive Particles, Particle System 2D, ​​

Version Information

Current documentation version: 2.1.3. ​ ​