QuadSpinner Gaea
Download GaeaTalk to Support
  • User Guide
  • Node Reference
  • Changelog
  • Home
  • Getting Started
    • Install Gaea
      • Regular Installation
      • Portable Installation
      • Mass Deployment
      • Troubleshooting
      • Version Numbers
      • Uninstall or Clean Install
    • License Management
      • Activation
      • Deactivation
      • Hardware Thumbprint
      • Floating License
    • User Interface
      • Graph
      • Viewport
        • Render Modes
        • 2D Viewport
        • Measurement Tools
      • Property Editor
        • Modifier Stack
        • Presets
        • Binding Variables
      • Data Editor
        • Terrain View
        • Export View
        • Automation View
      • Menus and Toolbars
        • Main Menu
        • Undo and Autosave
        • Graph Toolbar
        • Viewport Toolbar
        • Property Editor Toolbar
        • Data Editor Toolbar
      • Lazy Menu
      • Keyboard Shortcuts
    • The Graph
      • Procedural Workflow
      • Toolbox and Search
      • Lock Preview and Underlays
      • Suspending Engine
      • Graph Conveniences
      • Portals and Chokepoints
      • Organizing with Tabs
      • Annotations
      • Groups
    • Managing Gaea
      • Command-line Interface
      • Options
        • Compute
      • Autosave and Recovery
    • For Gaea 1 Users
      • Migration Guide
      • Node Changes
  • Using Gaea
    • Terrain Basics
      • Creating a Snow Mountain
      • Creating a Simple Landscape
      • Exporting Elements
      • Importing Meshes
      • Masks
      • Non-Determinism
      • Scale and Resolution
      • Memory Requirements
    • Crafting the Surface
      • Noises, Primitives, and Landscapes
      • Erosion
      • Surface Nodes
      • Transpose Shapes
    • Understanding Erosion
      • Erosion_2
      • Erosion_1
      • Thermal Erosion
      • Additional Erosion Nodes
      • Nuance
    • Simulations
      • Snowfall
      • Debris
      • Water
      • Vegetation
    • Colorizing and Textures
      • Crafting Masks
      • Working with SatMaps
      • Synthesizing Colors
      • Layering Textures
      • ColorErosion
    • Managing Graphs
      • Using Modifiers
      • Portals and Chokepoints
      • Visualizing Scale
      • Accumulators
      • Navigating Complex Graphs
    • Baking Nodes
      • Linchpin Nodes
    • Build and Export
      • Exporting Nodes
      • Build Options
        • Managing Regions
      • Tiled Builds
      • Using Regions
      • Profiles and Batch Builds
      • Batch Builds
      • Mesh Exports
        • Tangent-Space Normals and Warped Maps
      • Application Specific Export Nodes
        • Unreal Node
        • Unity Node
    • Importing Terrains
      • Universal Instructions
      • Software-specific Instructions
        • Unreal
      • Common Issues
  • Advanced Topics
    • Build Swarm
      • Creating Mutations
      • Build Reports
    • Technical Information
      • File Formats
      • Learning and Predictive System
      • Paths and Storage
      • Dimensions and Scale
      • Calculating Memory Requirements
    • Automation
      • Command Line Automation
      • Managing Input and Output
      • Building a Bridge with the CLI
  • Plugins
    • Gaea2Houdini
      • Installing Gaea2Houdini
      • Using Gaea Nodes
    • Gaea2Unreal
      • Installing Gaea2Unreal
      • Importing Terrains
      • Importing Weight Maps
  • Developers
    • Scripting and Expressions
      • Variables
      • Expressions
      • Math Node
    • TOR Platform SDK
  • Troubleshooting
    • Terrains
      • Common Errors
      • Terrain Quality
    • Diagnostics (Watson)
      • Diagnostics Package
      • CPU Only Mode
      • Benchmark Devices
Powered by GitBook
LogoLogo

Copyright © 2020-2025 QuadSpinner. All rights reserved.

On this page
  • Create an Expression
  • Modifying Variables
  • Additional Functions and Strategies
  1. Developers
  2. Scripting and Expressions

Expressions

PreviousVariablesNextMath Node

Last updated 2 months ago

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.

At the moment, only Float (decimal) and Int (whole number) properties support Expressions.

Create an Expression

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.

Modifying Variables

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.

Additional Functions and Strategies

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:

x * (Height / Strength)

Here are some additional ideas.

// Inverting the value:
         1 - x

// Dividing by other variable:
         x / Octaves

// Reducing the power:
         x * 0.01

// Use functions:
         median(Octaves, Ridge, Scale, Seed)

// Add with a random:
         random() + x

// If statements:
         if(SomeVar, 0.3, 0.6)

For a full list of available options, see

The FractalTerrace spacing remains consistent no matter the height of the Mountain.
The expression takes the value of 2.82 and reduces it to 0.84.