FORMULA

Custom Effects

 

Equations

Equations in the SOFTIMAGE custom effects Formula software are composed of six elements: variables, numbers, operators, functions, parentheses, and the equal sign (=). The overall equation structure should be var = expression, where var is a variable and expression is a mathematical expression such as 2+2, A*SIN(5*X), or (X-1)*Y^2.

 

Variables

All variables used in the equations must be listed on the Reserved Variables or User Variables lists at the top of the dialogue box. If you try to use a variable that is not listed, the program will produce an "unrecognized variable" error message and fail to work. Notice that the variables A, B, C, and D in the animated Formula effects can be keyframed using Effects->Custom->Edit Parameters in the Motion module.

The syntax for the User Variables list is the same as for the Reserved Variable list, namely strings separated by commas and spaces.

 

Special Variables

There are two special variables which are generally not listed in the Reserved Variables lists, but which are still available in every equation system: PI and E. These represent the mathematical constants Pi and e, 3.14159265... and 2.718281828....

 

Operators

The program recognizes the operators +, -, *, /, and ^. They work just like they would on a calculator. Examples:

Equation Value of X
X = 2+6 8
X = 7-2.4 4.5
X = 4*5 20
X = 3/4 .75
X = 4^2 16

 

Parentheses

Parentheses are used in the normal manner. Examples:

Equation Value of X
X = 2+3*4 14
X = (2+3)*4 20
X = (2*(2+1))^2 36

 

Functions

SOFTIMAGE custom effects offers three function types: functions with no arguments, functions with one argument, and functions with two arguments. They are all listed here:

 

No Arguments

 

One Argument

 

Two Arguments

 

Putting It All Together

Here are some sample equations for the various formula programs, with a brief explanation of what each group does.

 

CVFormula

 

X = X + Y/5

This slants your model slightly, making high points move to the right in the Front window and low points move to the left.

 

AnimatedCVFormula

 

theta = Z ANGLE X

r = SQRT (Z*Z+X*X)

X = r*COS(theta+TIME*PI*Y/10)

Z = r*SIN(theta+TIME*PI*Y/10)

This equation system slowly twists your model around the y-axis. Notice that since theta and r are not Reserved Variables, you should list them as User Variables. Also notice the use of the special variable PI.

 

SRTFormula

 

TX = TX + TIME

TY = TY - TIME*TIME

This will translate an object on a parabolic path to the right and down in the Front view. The resulting path should be like that of the object getting knocked off a table and falling.

TX = TX + GAUSS/4

TY = TY + GAUSS/4

TZ = TZ + GAUSS/4

This "shakes" a model. Note that you get different "shakings" for different seed values, but a particular seed value always produces the same shaking.

 

PatchFormula

 

u = U-5
v = V-5
X = u
Y = (u*u+v*v)/10
Z = v

This system makes a nice parabolic dish shape. Notice that lower-case variables u and v are distinct from the upper-case U and V (u and v should be declared in User Variables).

 


Last updated 02-apr-1998