Skip to main content

Value Solver

Pro Feature

Pro features are only available with a Professional licence. To upgrade, visit cavalry.scenegroup.co.

Intro

Store the values from previous frames in order to accumulate and/or fade them over time.

Using a Solver to set the number of sides on a polygon.

UI

Mode - Set the Solver's mode:

  • Accumulate - Add the Value on each frame.
  • Highest - If the value on the current frame is higher than the Value then it is kept.
  • Lowest - If the value on the current frame is lower than the Value then it is kept.
  • Velocity - Multiply the velocity of a Shape by the Value. See example below.

Value - Set the value to be added to the solver on each frame.

Fade Mode - Determine whether values should remain persistent or fade back to the initial value.

  • Off - Don't fade values.
  • Multiply by Value - On each frame, multiply values based on the Fade Value.

Fade Value - The speed at which the value will return to its initial values once the Solver is 'off' (e.g. outside a Falloff). The lower the value, the quicker the fade.

Offset - Add/subtract a value to the output.

Start Frame - Set the first frame to start the solver on. By default, this is connected to the Composition's Frame Range (Start) attribute — remove this connection to set a custom value.

Time - A default connection to the Composition's Time attribute.

Example
  1. Create a Value Solver.
  2. Set its Offset to 2 and set Fade Mode to Multiply by Value.
  3. Right click on the Value Solver's Value attribute in the Attribute Editor and add a Value Behaviour.
  4. Set the Value on the Value Behaviour to 0.5.
  5. Add a Falloff to the Value Behaviour.
  6. Make a Polygon.
  7. Connect valueSolver.idpolygon.sides.
  8. Select the Polygon and click the Duplicator icon in the Shelf.
  9. Move the playhead forward so it's not on frame 0.
  10. Move the Falloff around in the Viewport.

As the Falloff is moved over the Polygons, their number of sides increase and then return back to 2. As there's no such thing as a 2 sided polygon the shapes disappear. By setting the Offset on the Value Solver to 3 then the shapes become triangles (3 sided polygons) when outside of the Falloff.

In the example above, the colour is also being affected. To do this simply:

  1. Create another Value Behaviour.
  2. Connect valueSolver.idvalue.value.
  3. Connect value.idpolygon.materialColor.r.
  4. Ramp up the Strength attribute on the Value.

In this example the Value is simply being used as a multiplier to set values that have a visible effect on a range of 0-255 (the red channel).

Example - Velocity
  1. Create an Ellipse.
  2. In the Attribute Editor, right click on the Position attribute and choose Add Behaviour > Noise.
  3. Set the Noise's Minimum and Maximum to -100, 100.
  4. Create a Value Solver.
  5. Set the Value Solver's Mode to Velocity.
  6. Set the Value Solver's Value to 0.1.
  7. Set the Value Solver's Offset to 1.
  8. Connect valueSolver.idellipse.scale.x.
  9. Connect ellipse.scale.xellipse.scale.y.
  10. Play.

As the Ellipse increases in velocity, its Scale also increases.