Expressions
Last updated
Last updated
Expressions are modifiers applied to either a property, such as a slider, or to the variable bound to the property. It allows you to make modifications to the incoming value.
Unlike Variables, Expressions are not centralized and reused. They exist on a single property.
Click the Property Binding menu next to a property and select Expression.
This will bring up the Edit Expression dialog. In the expression, the slider's value is represented by x
so any modifications you make to x
will be applied to the property.
For example, let's say you want much finer control over your slider, then you can apply a multiplier of 0.01
to the value thereby reducing the value to 1% of its original.
If your Slider is bound to a Variable, then x
represents the variable. This is a powerful way of modifying a variable without having to create a second one.
For example, you have Mountain node with the Height
property bound to a variable and then a FractalTerrace whose Spacing
property is also bound to the same variable.
You want the Height of the FractalTerrace to be proportionally linked to the Height of the Mountain. So, you would enter the expression: x * 0.3
so the FractalTerrace spacing is always 30% of the Mountain's height. This means no matter what the height, the FractalTerrace spacing remains consistently placed at the same location.
You can also use other variables in your expressions by simply using their name as a variable.
For example, if you have two variables called Height and Strength, you can create the expression:
Here are some additional ideas.
For a full list of available options, see