RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Flowgraph Base ModuleFlowgraph Base NodeFlowgraph Base State NodeFlowgraph Node BuilderFlowgraph GraphFlowgraph Group HelperFlowgraph LinkFlowgraph ManagerNew Node TemplateFlowgraph PinFlowgraph States ManagerFlowgraph UtilsFlowgraph Variable Storage
Accumulator (Flowgraph Node)Ease (Flowgraph Node)Increaser (Flowgraph Node)Expression (Flowgraph Node)
Linear Smoother (Flowgraph Node)Nonlinear Smoother (Flowgraph Node)Sigmoid Smoother (Flowgraph Node)Spring Smoother (Flowgraph Node)

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionsflowgraphnodesmathsmoothers

Nonlinear Smoother (Flowgraph Node)

- **Node Name:** `Nonlinear Smoother`

Overview

  • Node Name: Nonlinear Smoother
  • Category: simple
  • File: extensions/flowgraph/nodes/math/smoothers/nonLinear.lua

Provides nonlinear (exponential-style) temporal smoothing for a numeric signal with configurable up/down rates.

Pin Schema

Input Pins

PinTypeDescription
valuenumberThe target signal value
dtnumberDelta time for smoothing
upRatenumberSmoothing rate when value is increasing
downRatenumberSmoothing rate when value is decreasing
setnumberDirectly set the smoother's internal state

Output Pins

PinTypeDescription
valuenumberThe smoothed output value

Internals

FieldPurpose
self.smootherTemporalSmoothingNonLinear object created on init
self.oldSetTracks previous set value to detect changes

How It Works

  1. On init, a newTemporalSmoothingNonLinear() object is created.
  2. If the set pin changes, the smoother's internal state is directly set.
  3. If no value input is provided, the current smoother state is output.
  4. Otherwise, the rate is chosen by direction (increasing → upRate, decreasing → downRate, default 1).
  5. The smoother uses getWithRate(sample, dt, rate) - nonlinear (exponential decay) smoothing.

Unlike the linear smoother, this produces an asymptotic approach to the target value.

Lua Example

-- Smooth camera follow distance:
-- value = target distance
-- dt = frame delta time
-- upRate = 3 (pull back quickly)
-- downRate = 1 (zoom in slowly)
-- Output: smooth camera distance

Key Dependencies

  • newTemporalSmoothingNonLinear() - BeamNG nonlinear temporal smoothing primitive
  • ui_imgui - displays smoother state in the node editor
  • _flowgraph_createNode() - standard flowgraph node registration

Additional Methods

C:checkSetValue()

Node method.

C:drawMiddle(builder, style)

Custom ImGui drawing in the middle section of the node in the editor.

Parameters:

  • builder
  • style

C:work()

Main work function called each frame/tick when the node is active.


See Also

  • Linear Smoother (Flowgraph Node) - Related reference
  • Sigmoid Smoother (Flowgraph Node) - Related reference
  • Spring Smoother (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Linear Smoother (Flowgraph Node)

- **Node Name:** `Linear Smoother`

Sigmoid Smoother (Flowgraph Node)

- **Node Name:** `Sigmoid Smoother`

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsHow It WorksLua ExampleKey DependenciesAdditional MethodsC:checkSetValue()C:drawMiddle(builder, style)C:work()See Also