This page provides information on the Particle Tuner component.
The Particle Tuner uses custom logic constructed with Expression operators to directly affect the particles of the Phoenix FD Simulator. The primary purpose of the Particle Tuner is to allow for very specific tweaks of the simulation which would otherwise be hard to achieve. It goes through all particles in the simulation and changes the values of those particles that pass a custom condition. Example Condition / Action pairs would be:
You can construct simple conditions such as comparing a value from a particle channel to a number or measuring the distance from a particle to a mesh, and you can also combine many conditions in a complex expression using 'AND' and 'OR' logic. At each simulation step, the Particle Tuner will check each particle against this condition and it will modify the particle channel only if the condition passes. For example:
This will essentially force the fluid to start solidifying if it is emitted from a Source whose RGB is set to Red, and 5 seconds have passed since the fluid was emitted . Fluid which is colored differently will not be affected by the Action, even if it's age is greater than 5.
Unlike the Phoenix FD Mapper, the Particle Tuner can delete particles from the simulation.
The Particle Tuner is a powerful tool and it will not stop you from creating expressions such as "If the Age is higher than 0, delete the particle". This will kill all particles immediately after they are born which may cause confusion.
Note that the Particle Tuner affects all Phoenix FD Simulators in the scene unless they explicitly exclude it.
Enabled [ true ] | enabled – Animatable checkbox that turns on and off the effect of the Particle Tuner.
Affect [ Liquid ] | affectpartsys – Allows the Particle Tuner to separately affect the Liquid, Foam, Splash or Mist particles.
When [ Edit Condition... ] – Opens the Edit Condition window. The Edit Condition window is used to construct a sequence of tests which are evaluated for every particle of the Phoenix FD Simulator. If the particle satisfies the condition, the Then [ Particle Channel ] action is performed. Otherwise, the particle is ignored. By default, the condition is set to "Age > 1.000", therefore only those particles whose age is greater than one will be affected by the specified Action.
Then [ Viscosity ] | act_chan – Selects the Particle Channel to affect. Note that if set to Viscosity, the channel value can be no lower than 0 and no higher than 1 - Viscosity is clamped strictly in this range.
Action [ Increase By ] | act_chan_change – Specifies the type of action to perform on the selected Then [ Particle Channel ].
Action Value [ 1 ] | act_value – Sets the value for the specified Action to perform.
Buildup Time (sec) [ 0 ] | buildup_time – Specifies the time it takes (in seconds) for the Then [ Particle Channel ] to gradually reach the specified Action Value. If Buildup Time is 0, the effect is instant.
If the Buildup Time is set to 0, the specified Action will be executed for every step of the simulation. If the Steps per Frame parameter of the Simulator is set to a value higher than 1, the specified Action will be executed multiple times for a single frame.
The Edit Condition window is at the core of the Phoenix FD Particle Tuner. It consists of a Conditions Tree on the left and a Parameters panel for the individual elements in the tree on the right. Any action specified for the selected Then [ Particle Channel ] will only be executed for the particles of the Simulator which satisfy the conditions tree.
Folding (collapsing) of a tree item in the view to the left will show you a simplified view of the expression. For example, collapsing the tree in the image below will change its text to "Age > 1.000", meaning the Particle Tuner will affect only particles whose Age channel is higher than 1 second. You can also read a simplified view of the entire condition expression in the text box below the Edit Condition... button.
Value Expression Item
Number [ 1 ] | val_type, val_number – returns the specified value.
Random Between [ 0 - 1 ] | val_type, val_rand_min, val_rand_max – returns a random number in the selected range. Note: a different value is generated for each particle of the Simulator. The value also changes for every frame.
Channel [ Age ] | val_type, val_chan_part – returns the value of the specified Simulator Particle Channel for the current particle. You must have this particle channel enabled in the Output rollout of your Simulator. The Channel can be one of: [ Size ], [ Age ], [ Viscosity ], [ RGB Red ], [ RGB Green ], [ RGB Blue ].
Distance To [ None ] | val_type, val_dist_node – returns the distance from the specified object's surface to the current particle. Note: this only works for polygon meshes. Particle systems are currently not supported.
Texture [ No Map ] | val_type, val_tex – returns the specified texture's color intensity in the position of the current particle. The Phoenix FD Simulator has no Explicit UV coordinates therefore the texture's Mapping should be set to Planar from Object XYZ for this to work.
Compare Expression Item
Compare Type [ Is Greater Than ] | comp_type – Sets the comparison type to perform:
Math Expression Item
Math Type [ Plus ] | math_type – Sets the mathematical operation type to perform:
Logic Expression Item
Logic Type [ And ] | logic_type – Sets the type of logic to use: