• Confluence is currently running with all non-system plugins disabled, some functionality may be missing
##### Page tree
Go to start of banner

# CE - Expressions

Expressions are the most convenient way to automate courses of motions, and regular or repetitive animations without scripting knowledge. With expressions you do not have to worry about keys, because you simply enter a formula and can immediately see the results. Expressions can also be made event-based: you define a certain condition to switch on a certain feature, e.g. rigid body dynamics. Such a condition could either be a particular frame or the position of a null object, to name but a few. RealFlow offers another feature: the combination of expressions and key-based curves. Combining key-based curves and expressions can help you in many situations: for example, when you want to add some noise to an animation or create secondary motions within a higher-ranking movement. A click on the “+” button, next to an expression, will do the job for you. The result is a completely new curve, showing characteristics of the animation and the expression – a hybrid type.

In order to apply an expression, right-click on a parameter's name in the "Node Params" panel and choose "Edit Curve...". Now enter an expression to the empty field at the "Curve Editor" panel's bottom.

### Available Functions and Operators

The "Insert" button provides several submenus: Unary functions The available mathematic functions, e.g. sine, cosine, square root, etc. The available mathematic operators: +, -, >, <, etc. The "if" condition. The time-based variables t (seconds), frames, and fps. Here you can find lists with all parameters of the scene's nodes. You can couple them with an expression to trigger a certain event. Here you can find a few important constants, e.g. Pi or e.

### Examples and Useful Expressions

Here are several useful expressions for your daily work - you can substitute the factors with your own values.

Basic sine curve `sin(t)` `cos(t)` `sin(t*5) | cos(t*5)` `3*sin(t) | 3*cos(t)` `sin(1.5+t)` `if(f>49,1,0)` `if(sphere01.position.x>1.0,0.0,2.0)` `rnd(2.0)` `sin(t)+rnd(1.0)` `X position: sin(t*3) and Z|Y position: cos(t*3)` `if(t=2.5,1,0)` `if(f>9,2,1)` `2+sin(t)` `5*exp(-t)` `5*exp(-t*3)` `sin(t)*15` `70+sin(t)*10` `70+sin(t)*(5+rnd(5))` `tan(sin(t*10))` `sinh(t)`
• No labels