Calculations are used to create indirect connections between value controls. A calculation can perform a mathematical expression based on two operands, where each operand can be connected to another control or set manually by the user.
Additionally, the calculation control can access the values of a connected control at times other than the current time, using time offsets and time scale controls built into the Calculation Modifier.
The most common use for a calculation is when two controls need to be connected to each other but the range or scope of the value's output by one control are inappropriate for the other control.
Note that the Expression modifier is essentially a more flexible version of the Calculation modifier, with a single exception. It is far easier to manipulate the timing of the operands provided to a Calculation than it is to do so with a Expression.
These sliders are either connected to published or animated controls from other tools in the composition, or manually set to the desired values for the calculation.
Select from the mathematical operations listed in this menu to determine how the two operands are combined. Clicking on the down arrow opens the menu with the following options:
These sliders cause the frame used to read the values of the Operands specified in the Calc tab to be scaled. A value of 1 returns the value of the operand at frame x when the composition is set to frame x. For example, if the first operand is animated with a value of 1 to 10 from frame 0 to 10, then a scale of 0.5 would cause the calculation to return a value of 5 at frame 10 (effectively slowing the animation by half for the purposes of the calculation)
These sliders return the value of the Operand at the Time Offset specified. A value of 10 would return the value of the operand 10 frames forward in time and -10 would return the value of the operand 10 frames back in time. See the example below for a practical example.
The following example uses a calculation to apply blur to a text in inverse proportion to the size of the text.
- Create a new composition, and set the global start and render start to 1. Set the Global End and Render End to 100.
- Add a Text Plus tool to the composition
- Enter a small amount of text in the StyledText input.
- Make sure the current frame is 0
- Set the Size parameter of the text tool to a value of 0.06 at frame 0
- Right click on the Size slider and animate the slider by setting a key.
- Advance to frame 100 and set the value of the Size control to 0.50.
- Add a Blur tool immediately after the Text tool. Connect the Blur input to the text tools output.
- View the Blur tool in one of the display views.
- We want the blur to decrease in strength as the text gets bigger. The controls cannot be directly connected together because the values of the Text Size control are getting bigger instead of smaller.
- Right-click on the Blur size and select Modify With>Calculation from the context menu. A new set of controls will appear in the Modifiers tab while the Blur tool is selected.
- Switch to the Modifier tab (F11)
- Right-click on the First Operand slider. Select Connect To > Text 1 > Size from the context menu. This connection isn't very useful though - the maximum value of the blur size control is 0.5, which is hardly noticable as a blur.
- Set the Operator drop down menu to Multiply.
- Set the Second Operand slider to 100
- Switch to the Time tab of the modifier and set the First Operand Time Scale to -1.0. Normally the First Operand will get the value of the control it is connected to from the same frame as the current time. So at frame 10, the firt operand will be set to the same value as the Text size at frame 10. By setting this value to -1, the value is read from one frame back in time whenever the current time of the composition advances by 1 frame.
- However, this means that the Calculation would be reading the value of the Text size at frame -10 when we are at frame 10 in the composition. To correct for this, set the First Operand Time Offset slider to 100.
- Return to the Tools tab of the Tool Control Area (F9). Press play (spacebar) and watch how the value of the Blur Size relates to the value of the Text Size.
|The contents of this page are copyright by eyeon Software.|