Decal Spline Editor
Spline-based decal placement tool. Creates and manages decal splines that automatically populate decal instances along a path with configurable materials, spacing, jitter, rotation, and multi-componen
Spline-based decal placement tool. Creates and manages decal splines that automatically populate decal instances along a path with configurable materials, spacing, jitter, rotation, and multi-component distribution.
Public API
| Function | Signature | Description |
|---|---|---|
M.onSerialize() | → table | Serializes all decal splines for save |
M.onDeserialized(data) | Restores decal splines from saved data | |
M.setSelectedSplineIdx(idx) | Set selected spline index (cross-tool) | |
M.setSelectedNodeIdx(idx) | Set selected node index (cross-tool) | |
M.onEditorGui() | Main per-frame UI and rendering callback | |
M.onEditorInitialized() | Registers decalSplineEditMode edit mode and window | |
M.onClientEndMission() | Removes all decal splines when leaving a map |
UI Window: "Decal Spline"
Top Toolbar
| Button | Description |
|---|---|
| Add New | Creates a new empty decal spline |
| Import From Bitmap | Traces paths from a PNG mask file |
| Remove All | Removes all enabled/unlinked splines |
| Lock Shape | Toggle rigid vs per-node movement |
| Export Mask | Exports session as PNG mask |
| Save State | Saves decal state to disk |
Spline List
- Editable name, enable/disable toggle, remove per-spline
- Linked splines shown as read-only (from Master Spline Editor)
Spline Properties
- Spacing: Longitudinal gap between decals (0–100m)
- Jitter: Random Z-axis rotation amount (0–0.2)
Components (up to 4)
- Each has: material selection, num rows/cols, frame, scale, pre-rotation (0°/90°/180°/270°)
- Material preview thumbnails
- Enable/disable per component
Distribution
- Round Robin: Cycle through components evenly
- Random: Weighted random with per-component probability sliders and seed
Per-Component Tabs
- Rows, Columns, Frame, Scale, Pre-rotation controls
- Reset-to-default buttons per slider
Toolbar Under List
| Button | Description |
|---|---|
| Go To | Moves camera to selected spline |
| Split | Splits spline at selected node |
| Flip Direction | Reverses spline direction |
| Simplify | RDP simplification (tolerance 9.0) |
| Save Template | Export spline profile to JSON |
| Load Template | Apply profile from JSON file |
Dependencies
| Module | Purpose |
|---|---|
decalSpline/splineMgr | Core spline data management |
decalSpline/populate | Decal instance creation along spline |
toolUtilities/splineInput | Shared spline input handling |
toolUtilities/materialSelectionMgr | Material browser integration |
toolUtilities/skeleton | Path tracing from bitmap masks |
toolUtilities/rdp | Ramer-Douglas-Peucker simplification |
Notes
- Default spline width: 10m; default material:
asphalt_patches - Elevation scale: 100.0 for blue→red color transitions
- All edits support undo/redo via
editor.history:commitAction - Splines can be linked to Master Spline Editor (read-only when linked)
See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide
Decal Editor
Full-featured decal placement and editing tool. Manages DecalData templates and decal instances with multi-selection, gizmo manipulation (translate/rotate/scale), spatial grid acceleration, and debug
Documentation Helper
Minimal extension that provides `editor.openHelp()` and `editor.openCodingHelp()` to open BeamNG documentation pages in the system web browser.