Particle

In RealFlow, fluids are represented as particles and these particle carry lots of information stored in so-called channels. With the nodes in this class you have direct access to these channels. It is also possible to add and remove particles, filter them and add forces. The latter opens a huge area of applications, because you can create force fields from images, objects, and even other particles. These forces can then be applied to an emitter's particles and act like a custom daemon.

Nodes

NameDescription
ArrayParticlesConcatThis node concatenates the inputs 'array0' and 'array1' into a single 'out' array.
ArrayParticlesConstantThis node returns a constant array.
ArrayParticlesFilterByMaskThis node returns the elements of the input 'array' at positions specified by the 'mask' parameter.
ArrayParticlesFindAllElementIndicesThis node returns all positions in the input 'array', which fit to the input 'element' values.
ArrayParticlesFindElementThis node returns the first position of appearance of the input 'element' within the input 'array'. If the array does not contain the element, -1 is returned.
ArrayParticlesInsertElementThis node inserts all elements from the 'element' input into the input 'array' at the position specified by 'position'. If 'position' is equal or lower than 0 then the elements are inserted at the beginning of the array. If 'position' is greater or equal than the inputs 'array' size, elements are appended at the end.
ArrayParticlesMixThis node creates an output array based on the two inputs 'array0' and 'array1' and the input mask. If the mask value equals 0 then the value of 'array0' is used, if the mask value is 1 the value of 'array1' is used.
ArrayParticlesPushElementThis node appends all the elements from the 'element' at the end of the input 'array'.
ArrayParticlesRemoveElementThis node removes all elements of the 'by_value' from the input 'array'. The returned mask has the same size as the input 'array' and is set to 0 at removed positions.
ArrayParticlesRemoveIndexThis node removes all input array positions by the 'index' input.
ArrayParticlesRemoveRepeatedElementsThis node removes all repetitions of elements from the input 'array'. The 'new_to_old' array can be used as an 'index' input for a GetArrayElement-Node to restore the original array. The returned mask has the same size as the input 'array' and is set to 0 at removed positions.
ArrayParticlesResizeThis node resizes the input 'array'. If the result is bigger than the input array, the last value is repeated accordingly.
ArrayParticlesReverseThis node reverses the order of the input 'array'.
ArrayParticlesSliceThis node returns an array containing the range of the input 'array' from the 'first' position with the given input 'size'.Thus, the output array is a subarray or slice of the input.
ForceAddThis node adds a force to the particles in the emitter.
GetArrayParticlesElementThis node returns the elements of the input 'array' at positions specified by the 'index' parameter.
GetParticlesThis node gets the particles from the input scene node.
GetParticlesInfoThis node returns information about the input particle system.
ParticleAddThis node adds particles using the position and velocity inputs.
ParticleAddChannelThis node creates a new channel for the particles. The value for the new channel for both existent particles and new particles is set using the 'default value' value. The 'default value' input is necessary. Otherwise, the channel will not be created.
ParticleCreateThis node creates an empty Particles object inside the graph.
ParticleCreateVoxelizationThis node creates a particles voxelization.
ParticleDisplaceFromImageThis node displaces the particles using an image. The particle system must have a "normal" and "uv" channels, both of type "Vector3". In the case of the "uv" channel the component "z" of the "Vector3" is ignored.
ParticleFilterByVolumeThis node splits the input 'inParticles' array into the two output arrays according to the positions of the particles relative to the input axis aligned bounding box.
ParticleFindNearestNeighborsThis node gets the particles that satisfied two conditions: they are inside the sphere defined by the radius 'outer radius' and centered at the 'point', and they are outside the sphere defined by the radius 'inner radius' and centered at the 'point'.
ParticleGetAllChannelNamesThis node returns all the input 'particles' channel names and types, which are available.
ParticleGetChannelThis node extracts and copies channel data from the particles to the output channel. Because the channel type is only known at run-time you might need to use a "NumDemux" node to specialize the type of the channel, particularly, if the following connected input can have differente types.
ParticleMesherThis node computes a mesh for the input 'particles' according to the specified parameters.
ParticleRemoveAllThis node removes all particles from the input particle system.
ParticleRemoveByIdThis node removes particles from the input particle system.
ParticleSetChannelThis node sets the channel value for the particles. The size of the value array can be shorter than the number of particles. In such a case, the last element of the array is used for the rest of particles.
SetArrayParticlesElementThis node returns the elements of the input 'array' at positions specified by the 'index' parameter.
SetParticlesThis node set the particles of the input RealFlow node. Channels of the current particle system are kept and initialized with default values. New channels from the new particle system are created and copied.

 

ArrayParticlesConcat

This node concatenates the inputs 'array0' and 'array1' into a single 'out' array.

Inputs

NameTypesPassThroughDescription
array0Particles
 Optional

out array

The array0

array1Particles
 Optional

out array

The array1

Outputs

NameTypesPassThroughDescription
out arrayParticles
 Optional

array0
array1

The out array

 

ArrayParticlesConstant

This node returns a constant array.

Inputs

NameTypesPassThroughDescription
constantParticles 

The constant

sizeInteger (1) 

The size

Outputs

NameTypesPassThroughDescription
out arrayParticles 

The out array

 

ArrayParticlesFilterByMask

This node returns the elements of the input 'array' at positions specified by the 'mask' parameter.

Inputs

NameTypesPassThroughDescription
arrayParticles
 Optional

result

The array

maskBit 

The mask

Outputs

NameTypesPassThroughDescription
resultParticles
 Optional

array

The result

 

ArrayParticlesFindAllElementIndices

This node returns all positions in the input 'array', which fit to the input 'element' values. .

Inputs

NameTypesPassThroughDescription
arrayParticles 

The array

elementParticles 

The value to find in the input array

Outputs

NameTypesPassThroughDescription
indexInteger 

The index

maskBit 

The mask

 

ArrayParticlesFindElement

This node is executed in parallel according to its input pins size.

This node returns the first position of appearance of the input 'element' within the input 'array'. If the array does not contain the element, -1 is returned.

Inputs

NameTypesPassThroughDescription
arrayParticles 

The array

elementParticles 

The value to find in the input array

start indexInteger 

The first index to search the element from

Outputs

NameTypesPassThroughDescription
indexInteger 

The index

 

ArrayParticlesInsertElement

This node inserts all elements from the 'element' input into the input 'array' at the position specified by 'position'. If 'position' is equal or lower than 0 then the elements are inserted at the beginning of the array. If 'position' is greater or equal than the inputs 'array' size, elements are appended at the end.

Inputs

NameTypesPassThroughDescription
arrayParticles
 Optional

out array

The array

elementParticles 

The value to insert

indexInteger (1) 

The position to insert the input element on

Outputs

NameTypesPassThroughDescription
out arrayParticles
 Optional

array

The out array

 

ArrayParticlesMix

This node creates an output array based on the two inputs 'array0' and 'array1' and the input mask. If the mask value equals 0 then the value of 'array0' is used, if the mask value is 1 the value of 'array1' is used.

The size of the output is the same as mask's size.

Inputs

NameTypesPassThroughDescription
array0Particles
 Optional

out array

The array0

array1Particles
 Optional

out array

The array1

maskBit 

The mask

Outputs

NameTypesPassThroughDescription
out arrayParticles
 Optional

array0
array1

The out array

 

ArrayParticlesPushElement

This node appends all the elements from the 'element' at the end of the input 'array'.

Inputs

NameTypesPassThroughDescription
arrayParticles
 Optional

out array

The array

elementParticles 

The value to append at the end

Outputs

NameTypesPassThroughDescription
out arrayParticles
 Optional

array

The out array

 

ArrayParticlesRemoveElement

This node removes all elements of the 'by_value' from the input 'array'. The returned mask has the same size as the input 'array' and is set to 0 at removed positions.

Inputs

NameTypesPassThroughDescription
arrayParticles
 Optional

out array

The array

elementParticles 

The value to remove all its instances from the input array

Outputs

NameTypesPassThroughDescription
out arrayParticles
 Optional

array

The out array

maskBit 

The mask

 

ArrayParticlesRemoveIndex

This node removes all input array positions by the 'index' input. .

Inputs

NameTypesPassThroughDescription
arrayParticles
 Optional

out array

The array

indexInteger 

The positions of the input array to remove

Outputs

NameTypesPassThroughDescription
out arrayParticles
 Optional

array

The out array

 

ArrayParticlesRemoveRepeatedElements

This node removes all repetitions of elements from the input 'array'. The 'new_to_old' array can be used as an 'index' input for a GetArrayElement-Node to restore the original array. The returned mask has the same size as the input 'array' and is set to 0 at removed positions.

Inputs

NameTypesPassThroughDescription
arrayParticles
 Optional

out array

The array

Outputs

NameTypesPassThroughDescription
new to oldInteger 

The new to old

maskBit 

The mask

out arrayParticles
 Optional

array

The out array

 

ArrayParticlesResize

This node resizes the input 'array'. If the result is bigger than the input array, the last value is repeated accordingly.

Inputs

NameTypesPassThroughDescription
arrayParticles
 Optional

out array

The array

sizeInteger (1) 

The size

Outputs

NameTypesPassThroughDescription
out arrayParticles
 Optional

array

The out array

 

ArrayParticlesReverse

This node reverses the order of the input 'array'.

Inputs

NameTypesPassThroughDescription
arrayParticles
 Optional

out array

The array

Outputs

NameTypesPassThroughDescription
out arrayParticles
 Optional

array

The out array

 

ArrayParticlesSlice

This node returns an array containing the range of the input 'array' from the 'first' position with the given input 'size'.Thus, the output array is a subarray or slice of the input.

Inputs

NameTypesPassThroughDescription
arrayParticles
 Optional

out array

The array

firstInteger (1) 

The position of the element that will be the first of the output array

sizeInteger (1) 

The total number of elements to copy from the input array. If value is negative, all the elements from 'first' are copied to the output array

Outputs

NameTypesPassThroughDescription
out arrayParticles
 Optional

array

The out array

 

ForceAdd

This node adds a force to the particles in the emitter.

Inputs

NameTypesPassThroughDescription
emitter
 StandardEmitter

StandardEmitter
RealFlowNode

 

The emitter

forceVector3 

The force

Outputs

NameTypesPassThroughDescription
evaluateEvaluate 

The evaluate

 

GetArrayParticlesElement

This node returns the elements of the input 'array' at positions specified by the 'index' parameter.

Inputs

NameTypesPassThroughDescription
arrayParticles 

The array

indexInteger 

The index

Outputs

NameTypesPassThroughDescription
elementParticles 

The element

 

GetParticles

This node gets the particles from the input scene node.

Inputs

NameTypesPassThroughDescription
nodeRealFlow Node 

The scene node

Outputs

NameTypesPassThroughDescription
out particlesParticles 

The out particles

 

GetParticlesInfo

This node returns information about the input particle system.

Inputs

NameTypesPassThroughDescription
particlesParticles (1) 

The particles

Outputs

NameTypesPassThroughDescription
numberInteger 

Number of particles

bounding boxBox 

The bounding box

velocity minReal 

Minimum Velocity

velocity maxReal 

Maximum Velocity

channel namesString 

The name of all the input 'particles' available channels

channel typesString 

The data type of all the input 'particles' available channels

 

ParticleAdd

This node adds particles using the position and velocity inputs.

The 'position' input is used to add the particles, i.e. the number of particles added is the size of the 'position' input. The 'velocity' input has not to be the same size than the 'position' input, in the case it is larger it will be truncated to the size of the 'position' input, in the case it is shorter the last velocity value in the array is used to set the velocity for the rest of the particles.

Inputs

NameTypesPassThroughDescription
particlesParticlesout particles

The particles

positionVector3 

The position of the particles

velocityVector3 

The velocity of the particles

Outputs

NameTypesPassThroughDescription
idInteger64 

The id of the newly created particles

out particlesPassThroughparticles

The out particles

 

ParticleAddChannel

This node creates a new channel for the particles. The value for the new channel for both existent particles and new particles is set using the 'default value' value. The 'default value' input is necessary. Otherwise, the channel will not be created.

Please, keep in mind that channels with different types than graph types may result in data precission loss when getting and setting its values.

Inputs

NameTypesPassThroughDescription
particlesParticles (1)out particles

The particles

nameString (1) 

The name of the channel

type
 List (1)

Vector3
Vector3D (Vector3)
Vector2F (Vector3)
UInt64 (Integer64)
UInt16 (Integer)
UInt8 (Integer)
Integer
Bool (Integer)
Real
Double (Real)
Color4
UInt32 (Integer)

 

The type of the channel. Types between parentheses represent the graph type for the selected channel type

default value
 Numeric (1)

Vector3
Real
Integer
Integer64
Color4

 

The default value for the channel

Outputs

NameTypesPassThroughDescription
out particlesPassThroughparticles

The out particles

 

ParticleCreate

This node creates an empty Particles object inside the graph.

This way it is possible to use particles inside graphs without needing to load them from file, or getting them from an existing node.

Only the'id', 'position' and 'velocity' channels are created.

Outputs

NameTypesPassThroughDescription
particlesParticles 

The particles

 

ParticleCreateVoxelization

The algorithm to perform the operation of this node is multithreaded.

This node creates a particles voxelization.

Inputs

NameTypesPassThroughDescription
particlesParticles 

The particles

voxel sizeReal 

The voxel size

Outputs

NameTypesPassThroughDescription
voxelizationParticleVoxelization 

The voxelization

 

ParticleDisplaceFromImage

The algorithm to perform the operation of this node is multithreaded.

This node displaces the particles using an image. The particle system must have a "normal" and "uv" channels, both of type "Vector3". In the case of the "uv" channel the component "z" of the "Vector3" is ignored.

Inputs

NameTypesPassThroughDescription
particlesParticles (1)out particles

The particles

imageImage (1) 

The image

repeat uReal (1) 

The number of tiles in u

repeat vReal (1) 

The number of tiles in v

scaleVector3 

The scale of the displacement. If the number of elements in this input is larger than 1 then it must have the size of the number of particles, so that a per particle scaling of the displacement is done. 

Outputs

NameTypesPassThroughDescription
out particlesPassThroughparticles

The out particles

 

ParticleFilterByVolume

This node splits the input 'inParticles' array into the two output arrays according to the positions of the particles relative to the input axis aligned bounding box.

Inputs

NameTypesPassThroughDescription
volumeBox 

The volume

particlesParticles 

The particles

Outputs

NameTypesPassThroughDescription
inside particlesParticles 

The particles inside the volume

outside particlesParticles 

The particles outside the volume

 

ParticleFindNearestNeighbors

The algorithm to perform the operation of this node is multithreaded.

This node gets the particles that satisfied two conditions: they are inside the sphere defined by the radius 'outer radius' and centered at the 'point', and they are outside the sphere defined by the radius 'inner radius' and centered at the 'point'.

Inputs

NameTypesPassThroughDescription
voxelizationParticleVoxelization (1) 

The voxelization

particlesParticles (1)out particles

The particles

pointVector3 

The point

outer radiusReal (1) 

The outer radius

inner radiusReal (1) 

The inner radius

Outputs

NameTypesPassThroughDescription
maskBit 

True if at least one particle was found, False otherwise

firstInteger 

The index of the first element in the 'index' where the indexes of the found neighbor particles start

sizeInteger 

The number of found neighbor particles

indexInteger 

The indexes of the found neighbor particles

idInteger64 

The ids of the found neighbor particles

out particlesPassThroughparticles

The out particles

 

ParticleGetAllChannelNames

This node returns all the input 'particles' channel names and types, which are available.

The channel types are the internal storage types which might not be exactly the same as graph types. For example, the UV channel might store data of type 'Vector2' while getting the UV channel in the graph will result in an array of 'Vector3' elements.

Inputs

NameTypesPassThroughDescription
particlesParticles (1) 

The particles

Outputs

NameTypesPassThroughDescription
channel namesString 

The name of all the input 'particles' available channels

channel typesString 

The data type of all the input 'particles' available channels

 

ParticleGetChannel

This node extracts and copies channel data from the particles to the output channel. Because the channel type is only known at run-time you might need to use a "NumDemux" node to specialize the type of the channel, particularly, if the following connected input can have differente types.

Inputs

NameTypesPassThroughDescription
nameString (1) 

The name of the channel, built-in valid names are "position", "velocity", and "id". 

particlesParticles (1) 

The particles

Outputs

NameTypesPassThroughDescription
channel
 Numeric

Integer
Integer64
Real
Vector3
Color4

 

The channel

 

ParticleMesher

The algorithm to perform the operation of this node is multithreaded.

This node computes a mesh for the input 'particles' according to the specified parameters.

The algorith used for it is the same as for the RealFlow RenderKit mesher.

Inputs

NameTypesPassThroughDescription
smoothReal (1) 

The smooth

polygon sizeReal (1) 

The polygon size

particle radiusReal (1) 

The particle radius

particles
 Particles (1)

Particles
StandardParticles

 

The particles

Outputs

NameTypesPassThroughDescription
meshMesh 

The mesh

 

ParticleRemoveAll

This node removes all particles from the input particle system.

Inputs

NameTypesPassThroughDescription
particlesParticles (1)out particles

The particles

Outputs

NameTypesPassThroughDescription
out particlesPassThroughparticles

The out particles

 

ParticleRemoveById

This node removes particles from the input particle system.

Inputs

NameTypesPassThroughDescription
particlesParticles (1)out particles

The particles

id
 Numeric

Integer
Integer64

 

The id of the particles to remove

Outputs

NameTypesPassThroughDescription
out particlesPassThroughparticles

The out particles

 

ParticleSetChannel

This node sets the channel value for the particles. The size of the value array can be shorter than the number of particles. In such a case, the last element of the array is used for the rest of particles.

Inputs

NameTypesPassThroughDescription
nameString 

The name of the channel

particlesParticles (1)out particles

The particles where the channel is set

value
 Numeric

Integer
Integer64
Real
Vector3
Color4

 

The value to be given to the channel. If the array is shorter than the number of particles the last element of the array is used to set the channel value for the rest of particles

Outputs

NameTypesPassThroughDescription
out particlesPassThroughparticles

The out particles

 

SetArrayParticlesElement

This node returns the elements of the input 'array' at positions specified by the 'index' parameter.

Inputs

NameTypesPassThroughDescription
arrayParticles
 Optional

result

The array

indexInteger 

The index

elementParticles 

The element

Outputs

NameTypesPassThroughDescription
resultParticles
 Optional

array

The result

 

SetParticles

This node set the particles of the input RealFlow node. Channels of the current particle system are kept and initialized with default values. New channels from the new particle system are created and copied.

Inputs

NameTypesPassThroughDescription
nodeRealFlow Nodeout node

The RealFlow node to set the particles

particlesParticles 

The particles

Outputs

NameTypesPassThroughDescription
out nodePassThroughnode

The out node