Value operator

The Value operator can be used to override spinner values.

Value operators (introduced in tyFlow v1.124), offer a brand new way of interfacing with operator parameters. By clicking the diamond [â—‡] button next to a spinner in an operator, you can expose its value to the tyFlow editor. From there, you can connect the exposed spinner value to a Value operator in order to override its value with whatever value is piped in from the Value operator it’s connected to.

Value operators themselves can be connected together, or stacked in Value events. Each spinner connected to a Value operator will recursively process its Value-operator “stack” in order to compute the final spinner value as a combination of all Value operators which pass their values downstream to it. The ability to combine Value operators together, or connect them to multiple exposed spinners, etc, vastly improves the overall capabilties of all supported operators.

Value operator spinners can also be keyframed and relay particle properties, meaning that the values they produce can be animated, or be made relative to the particles they will be affecting.


Input

  • Default value: the starting value of any Value-operator stack. This is the value that will be used to initialize the final value computation.

A Value-operator stack is the list of Value operators that any given spinner is dependent on. For example, if a spinner is connected to a Value event with three Value operators in it, and that Value operator event itself is connected to the output of another Value operator, the Value-operator stack for the spinner will be the list of those four operators, starting with the top-most Value operator sorted down to the Value operator directly connected to the spinner. In other words, the Value-operrator stack for a spinner is the connected graph of Value operators that must be evaluated in order to compute the final spinner value. Each of these Value-operator graphs must be initialized with a default starting value - and the “default value” is where you can specify what that value should be.

0.0: the default value will be set to 0.

Pblock default: the default value will be set to the default value of the operator’s parameter block, overriding whatever existing value was assigned to the spinner.

From source spinner: the default value will be set to whatever the exposed spinner’s value is. Enabling this option will unlock the exposed spinner and allow its value to be changed by the user.

By setting the default value to “from source spinner”, you can generate Value operator results which are dependent on the exposed spinner value. For example, if you set a spinner’s value to “100”, and expose/connect it to a Value operator whose “default value” is set to “from source spinner”, its operation set to “multiply” and its value spinner set to “2.5”, the final result which the Value operator will send to the exposed spinner’s operator will be “250”. So in that sense, you could set up Value operators in your flow which only modify existing spinner values, rather than override them completely.

For any given Value-operator stack, the specified “default value” will only be derived from the top-most Value operator in the stack. For example, if a spinner is dependent on two Value operators in a Value event, the default value for that spinner will be derived from the first Value operator in the stack. The specified “default value” in the second will be ignored.


  • Operation: the mathematical operation the value operator will use, to combine its value with whatever upstream value is passed down to it from prior Value operators in its Value-operator stack, and/or the default value if it’s the first operator in the stack.

You can combine Value operators together (into a Value-operator stack for a given spinner), by specifying appropriate operations for upstream values. For example, at the top of a stack you could have a Value operator which specifies a static value of “10”. Then under it in its Value event you could add another Value operator with its operation set to “add” and its value spinner set to “5”, to construct a combined value of “15” for any exposed spinner the second Value operator is connected to.


Value

  • Type: controls the type (and/or source) of the value generated by the Value operator.

Current frame: the value will be the current frame.

Expression: the value will be derived from the specified expression.

Property: the value will be derived from a specified particle property.

Surface: the value will be derived from the relationship between particles in the source spinner’s event and specified scene surfaces/objects.

Texmap: the value will be derived from a specified texmap, sampled using mapping coordinates assigned to particles in the source spinner’s event.

Value: the value will be specified using a spinner.

Value (percent): the value will be a specified percent using a spinner.

Percent values are just regular values divided by 100. So a value of “50%” will be sent downstream from the Value operator as “0.5”. Many operators in tyFlow take percentage values in the range of 0-100, so “value (percent)” mode can be used to override those kinds of spinner values.

Value (world-space): the value will be specified using a spinner which displays proper units.

Internally, there is no difference between a generic unit and a decorated unit in Max. The “value (world-space)” mode just allows you to see decorated units in Value operators, in case you are overriding a spinner that shows a decorated value (ie, it’s available as a mode for visual consistency).


  • Mode: when “type” is set to a generic value type, “mode” allows you to choose whether an absolute value will be specified, or a range of values.

  • Property: when “type” is set to “property”, this dropdown allows you to specify which particle property will provide the value.


Relative to property

Allows you to multiply values by particle properties normalized by the specified threshold and min/max multipliers.

  • Threshold: the specified property will be divided by this value, resulting in a multiplier that will be less than or greater than 1, relative to the threshold.

  • Min/Max multiplier: the multiplier will be clamped to this range.

  • Exponent: the multiplier will be raised to this exponent.

  • Invert: when enabled, the multiplier will be inverted, so that property values smaller than the threshold will result in a larger multiplier, and property values larger than the threshold will result in a smaller multiplier.


Result

  • Absolute value: when enabled, negative values will be multiplied by -1 (so all output values are positive).

  • Normalize value: when enabled, values will be normalized to a range of 0-1 based on the specified min/max thresholds.

Normalization will not clamp values outside of the specified min/max range. To clamp values to 0-1, enable clamping below.

  • Invert: when enabled, normalized values will range from 1-0 instead of 0-1.

  • Clamp value: when enabled, values will be clamped to the specified min/max range.

  • Invert: when enabled, clamped values will be inverted relative to the specified range.

  • Multiplier %: resulting values will be multiplied by the specified amount.


Uniqueness

  • Seed: the seed value for all varied parameters.

  • Seed by time: the seed value will be incremented with the current time in ticks.