Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
UI Expand
title UI Path: ||Create panel|| > Helpers > PhoenixFD category > VoxelTuner button

Image RemovedImage Added


Parameters

Image Removed

...

...

Section
Column
width60%

Enabled tun_enabled – Animatable checkbox that turns on and off the effect of the Voxel Tuner.

...

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 cell of the Phoenix Simulator, at each simulation Step. If the cell satisfies the condition, the selected 

...

Then actions are performed - Change Voxel

...

Channel or

...

 Affect By Forces. Otherwise, the cell is ignored. By default, the condition is set to "Temperature > 800", therefore only those cells where the Temperature channel is greater than 800 will be affected by the specified action. See the Grid Channel Ranges

...

 page for more information on the channel ranges.

Then:

...

Change Voxel Channel checkbox tun_act_op_

...

chan – When the condition of the Tuner passes for a voxel, you can choose which grid channel of this voxel will be changed and how:

...

Channel tun_act_chan – Selects the Grid Channel to affect.

...

If Speed is selected,

...

the Velocity vector of the simulation will be scaled based on the

...

specified Action Value.

...

 The Channel can be one of: [ Temperature ], [ Smoke ], [ Fuel ], [ Speed ], [ Velocity X ], [ Velocity Y ], [ Velocity Z ], [ RGB Red ], [ RGB Green ], [ RGB Blue ].

...

Action tun_act_chan_change – Specifies the type of action to perform on the

...

selected Channel. You can choose to increase or decrease the value at each simulation step, or set it directly to a certain value.

Action Value | tun_act_value – Specifies the value for the selected Action.

Buildup Time (sec) | tun_buildup_time – The time it takes (in seconds) for

...

the Channel to gradually reach the

...

specified Action Value. If Buildup Time

...

 is 0, the effect is instant.

UI Text Box
typenote

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.

Time Scale different than 1 will affect the Buildup Time of the Voxel Tuners. In order to get predictable results you will have to adjust the buildup time using this formula:
Time Scale * Time in frames / Frames per second

Affect By Forces | tun_act_op_force, tun_force_list – When the condition of the Tuner passes for a voxel, you can choose which forces will affect it. You can pick 3ds Max forces, Phoenix forces, Mappers, or even other Voxel or Particle Tuners. Using this, you can for example tell a force to only affect the fluid inside a volume, or only affect fluid with certain speed, or even based on a texture mask.

With Multiplier | tun_force_mult

...

 –  Multiplier for the strength of the forces. This is particularly useful for easily scaling the effect of 3ds Max forces over a Phoenix simulation.

Column
width5%

 

Column
width35%

Image Added

 

 

Anchor
editConditionWindow
editConditionWindow

Edit Condition Window

...

Section
Column
width50%
UI Text Box
typeinfo

The Edit Condition window is at the core of the Phoenix Voxel Tuner. It consists of a Conditions Tree on the left and a Parameters panel for the individual elements in the tree on the right. The Change Voxel Channel action or the Affect By Forces action will only be executed for the cells of the Simulator which satisfy the conditions tree.

The Conditions Tree is made up of the following expression types: Logic, Compare, Math, Value.

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 "Temperature > 800.000", meaning the Voxel Tuner will affect only voxels where the Temperature grid channel is higher than 800. You can also read a simplified view of the entire condition expression in the text box below the Edit Condition... button.

Column
width5%

 

Column
width45%

Image Modified

 

 

Section

Value Expression Item


Anchor
valueExpression
valueExpression

Section
Column
width50%
UI Text Box
typeinfo

The Value Expression Item is the lowest level operator. It expects no sub-expressions but can be converted to a Math Expression Item by selecting it with the right mouse button in the Conditions Tree.

The Value Expression Item returns a raw number which can be either the value of a Grid Channel or a Texture for a given cell of the Phoenix Simulator, a manually-specified number in a certain range or the distance between a given cell and an object in the scene.

Image Removed

Number val_typeval_number – returns the specified value.

Random Betweenval_type, val_rand_min, val_rand_max – returns a random number in the selected range. Note: a different value is generated for each cell of the Simulator. The value also changes for every frame.

Channel val_typeval_chan_grid – returns the value of the specified Simulator Grid Channel for the current cell. You must have this grid channel enabled in the Output rollout of your Simulator. The Channel can be one of: [ Temperature ], [ Smoke ], [ Fuel ], [ Speed ], [ Velocity X ], [ Velocity Y ], [ Velocity Z ], [ RGB Red ], [ RGB Green ], [ RGB Blue ]. You can find out more about the usual grid channel ranges in Phoenix here.

Distance To val_typeval_dist_node

 – returns

 – returns the distance from the current voxel to the surface of the specified object. Will be positive if the voxel is outside the object volume, and will be negative if the voxel is inside the object volume. The distance is in simulation grid voxels. Note: currently you can only pick polygon meshes - measuring distance from the current voxel to a nearest particle from a particle system is currently not supported.

Texture val_typeval_tex

 – returns

 – returns the specified texture's color intensity in the position of the current voxel. The Phoenix Simulator has no Explicit UV coordinates therefore the texture's 

Mapping should

Mapping should be set to Planar from Object or World XYZ for this to work.

Column
width5%

 

Column
width45%

Image Added 

 

 

Section

Compare Expression Item


Anchor
compareExpression
compareExpression

Section
Column
width50%
UI Text Box
typeinfo

The Compare Expression Item evaluates to true if the specified condition is valid based on the provided sub-expressions. Otherwise, it evaluates to false.

To create a Compare Expression Item in the Conditions Tree, right-mouse-button click either on a Logic or a Compare expression and select "Replace with: New Comparison".

Image Removed

 

Compare Type  | comp_type – Sets the comparison type to perform:

  • When set to "Is Greater Than", the Compare expression for a given voxel will be true when the 
first Math
  • first Math/Value expression item should return a value 
larger than
  • larger than the second.
  • When set to "Is Less Than", the Compare expression for a given voxel will be true when the 
first Math
  • first Math/Value expression item should return a value smaller than the second.
  • When set to "Is Equal To",
 the  Math
  •  the Compare expression for a given voxel will be true when
both
  • both Math/Value expression items evaluate to the same number.
Column
width5%

 

Column
width45%

Image Added

 

 

Section

Math Expression Item


Anchor
mathExpression
mathExpression

 

Section
Column
width50%
UI Text Box
typeinfo

The Math Expression Item returns a number calculated according to the specified Math Type and the provided sub-expressions.

To create a Math Expression Item in the Conditions Tree, right-mouse-button click either on a Math or a Value expression and select one of the "Replace with: (this) ..." options which contains a "+" , "-", "*" or "/" symbol.

Image Removed

Math Typemath_type – Sets the mathematical operation type to perform:

  • When set to "Plus", the Math expression returns the 
sum of
  • sum of the two Math/Value expressions below it.
  • When set to "Minus", the Math expression returns the 
difference of
  • difference of the two Math/Value expressions below it.
  • When set to "Multiplied by", the Math expression returns the 
product of
  • product of the two Math/Value expressions below it.
  • When set to "Divided by", the Math expression returns the 
quotient of
  • quotient of the two Math/Value expressions below it.
Column
width5%

 

Column
width45%

Image Added

 

 

Section

Logic Expression Item


Anchor
logicExpression
logicExpression

Section
Column
width50%
UI Text Box
typeinfo

The Logic Expression Item is a top level operator which returns a value of either True or False, depending on the specified Logic Type and the provided sub-expressions.

To create a Logic Expression Item in the Conditions Tree, right-mouse-button click either on a Logic or a Compare expression and select one of: "Replace with: (this) AND ... " or "Replace with: (this) OR ...".

Image Removed

 

Logic Type | logic_type – Sets the type of logic to use: 

  • When set to "And", 
both Compare
  • both Compare expressions below should evaluate to 
true for
  • true for a given cell for the Logic Expression to be true. 
  • When set to "Or", at least one
of the
  • of the two Compare expressions below should evaluate to 
true for
  • true for a given cell for the Logic Expression to be true.
Column
width5%

 

Column
width45%

Image Added