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
  1. Developers
  2. Scripting and Expressions

Math Node

PreviousExpressionsNextTOR Platform SDK

Last updated 1 month ago

The Math node is a deceptively powerful node with a very simple interface. It is essentially a blank canvas for you to create any kind of mathematical functions or even complex algorithms.

The Math node can work standalone as a Generator, but can also accept up to 3 inputs. These inputs can be accessed as a,b,c respectively. Note, those are pre-defined variables and can't be used for any other purposes except to access data from the port.

You can also access coordinates per-pixel using x and y .

Syntax and Functions

The Math node can accept the following.

// Mathematical operators
+, -, *, /, %, ^

// Equalities & Inequalities 
=, ==, <>, !=, <, <=, >, >=

// Assignment 
:=, +=, -=, *=, /=, %=

// Logical operators 
and, nand, nor, not, or, xor, xnor, mand, mor

// Functions
abs, avg, ceil, clamp, erf, erfc, exp, expm1, floor, frac,
hypot, iclamp, inrange, log, log10, log1p, log2, logn, max,
min, mod, mul, ncdf, pow, root, round, roundn, sgn, sqrt,
sum, swap, trunc, equal, not_equal

// Trigonometry
acos, acosh, asin, asinh, atan, atan2, atanh, cos, cosh,
cot, csc, sec, sin, sinc, sinh, tan, tanh, deg2rad,
rad2deg, deg2grad, grad2deg

// Control structures
if-then-else, ternary conditional, switch case, return-statement

// Loop structures
while loop, for loop, repeat until loop, break, continue

// Expression local variables, vectors and strings

// User defined variables, vectors, strings, constants and function support