Advanced Usage
Terraforming
The Master Spline Tool includes terraforming capabilities which automatically adjust the surrounding terrain to match the user’s spline design. This is useful for creating realistic road networks which properly integrate with the landscape.
How Terraforming Works
- Create and Edit the Spline: Design the spline with the desired elevation, banking, and width variations
- Access Terraforming Options: Go to the Terrain tab to find all terraforming controls
- Configure Parameters: Set the terraforming parameters to control how the terrain is modified
- Execute Terraforming: Click the “Terraform” button to perform the operation
Terraforming Parameters
Domain of Influence (DOI)
- Range: 0 to 500 meters
- Purpose: Defines how far away from the spline the terraforming operation will affect the terrain
- Usage: Larger values create wider terraforming areas, smaller values keep changes more localized
Terraform Margin
- Range: 1 to 20 meters
- Purpose: Creates a flat, smooth area around the spline edges before the terrain begins to fall off
- Behavior: The margin follows the plane of the road, including banking and slope variations
- Effect: Ensures the immediate area around the spline has a clean, flat surface
Terraform Falloff
- Range: 1 to 5
- Purpose: Controls how quickly the modified terrain blends into the surrounding landscape
- Values:
- 1: Very gradual, gentle blending
- 3: Balanced falloff (recommended for most situations)
- 5: Steep, abrupt blending for sharp terrain transitions
Noise Parameters
Noise Roughness
- Range: 0 to 1
- Purpose: Controls the amplitude of terrain variations (bump size)
- Usage:
- 0: Smooth, clean terrain
- 0.5: Moderate surface variation
- 1: Maximum roughness with large bumps
Noise Scale
- Range: 0 to 1
- Purpose: Controls the frequency of terrain variations (bump density)
- Usage:
- 0: Very fine, detailed surface texture
- 0.5: Balanced surface detail
- 1: Large, sparse surface variations
Note: The noise system automatically generates multiple layers of detail for natural-looking terrain variation.
Terraforming Process
- Terrain Analysis: The system analyzes the spline’s elevation, banking, and width
- Margin Creation: Creates a flat margin around the spline following the road’s plane
- Falloff Application: Applies gradual terrain blending from the margin to the DOI boundary
- Noise Integration: Adds surface variations for realistic terrain appearance
- Final Blending: Smoothly integrates the modified terrain with the existing landscape
Performance Considerations
- Execution Time: Typically takes 2-7 seconds depending on spline length and DOI size
- Operation Type: Blocking operation - the interface will be unresponsive during execution
- Memory Usage: Larger DOI values require more memory for terrain calculations
Best Practices
- Iterative Workflow: Terraforming supports undo/redo, allowing the user to experiment and refine results
- Start with DOI: Begin by adjusting the Domain of Influence to get the overall terraforming area right
- Refine Margin: Once DOI is set, adjust the margin to ensure it doesn’t undercut the spline surface (this can happen with high falloff values)
- Margin Guidance: A margin value of 1m does not guarantee exactly 1m around the road everywhere - it’s just a guide
- Add Detail: Finally, use noise parameters to add surface detail and variation
- Falloff Balance: Avoid values of 1 (too shallow) - 3-4 usually provides good results
- Noise Integration: Use noise for dirt roads, trails, and natural terrain features
Road Design Standards
The Master Spline Tool includes six preset road design standards which enforce realistic design rules:
- Freeway: High-speed highway with gentle curves and minimal banking
- Major Rural Road: Country roads with moderate curves and banking
- Secondary Road: Local roads with tighter curves and more banking
- Mountain Pass: Winding mountain roads with aggressive banking
- Unpaved Trail: Off-road paths with natural terrain following
- Off-Road: Extreme terrain navigation with minimal design constraints
Each preset applies specific limits for slope, corner radius, and banking angles. The tool can validate existing splines against these standards or guide spline creation to meet them.
Road Design Optimization
The Master Spline Tool includes an experimental road design optimization system which uses iterative constraint solving to ensure splines meet realistic road design standards. This system provides both visual feedback and automatic optimization to help create roads which comply with engineering principles.
How the Optimization System Works
The system uses the design presets as constraints and provides three main usage modes:
- Visual Feedback Mode: Switch to the Optimization tab to see a heatmap overlay on the master spline surfaces
- Post-Creation Optimization: Create a spline first, then enable live optimization to automatically adjust it to meet constraints
- Live Design Mode: Keep optimization running while creating and editing the spline for real-time constraint compliance
Optimization Tab Interface
The Optimization tab contains three main sections:
Design Profile Section
- Preset Selection: Choose from six road design standards using dedicated buttons
- Preset Values: Each preset defines specific limits for slope, corner radius, banking, and width variation
Constraints Section
- Single Constraint Selection: Choose one constraint to monitor and optimize using radio buttons:
- Slope Gradient Compliance: Maximum allowed longitudinal slope (rise/run ratio)
- Corner Radius Compliance: Minimum allowed horizontal curve radius
- Banking Angle Compliance: Maximum allowed banking from global up
- Width Rate of Change Compliance: Maximum allowed width variation from average
Live Optimize Section
- Start/Stop Button: Toggle live optimization on and off
- Real-time Processing: Optimization runs continuously over many frames when active
Visual Feedback System
When the Optimization tab is active, the master spline surfaces display a heatmap overlay:
- Blue Areas: Well within the limits of the selected constraint
- Red Areas: Violate the selected constraint
- Smooth Gradient: Colors transition smoothly from blue to red based on violation severity
This heatmap appears immediately when switching to the tab, even without optimization running, providing instant visual feedback on constraint compliance.
Road Design Presets
The system includes six preset road design standards with specific constraint values:
Freeway / Autobahn
- Max Slope: 0.04 (4% grade)
- Min Radius: 500.0 meters
- Max Banking: 5.0 degrees
- Max Width Gradient: 0.02
Major Rural Road
- Max Slope: 0.06 (6% grade)
- Min Radius: 200.0 meters
- Max Banking: 7.0 degrees
- Max Width Gradient: 0.03
Secondary Road
- Max Slope: 0.08 (8% grade)
- Min Radius: 100.0 meters
- Max Banking: 9.0 degrees
- Max Width Gradient: 0.05
Mountain Pass
- Max Slope: 0.12 (12% grade)
- Min Radius: 40.0 meters
- Max Banking: 12.0 degrees
- Max Width Gradient: 0.07
Unpaved Trail
- Max Slope: 0.18 (18% grade)
- Min Radius: 20.0 meters
- Max Banking: 14.0 degrees
- Max Width Gradient: 0.10
Off-Road / F-Road
- Max Slope: 0.24 (24% grade)
- Min Radius: 12.0 meters
- Max Banking: 18.0 degrees
- Max Width Gradient: 0.12
Live Optimization Behavior
When live optimization is active:
- Spline Movement: The spline will “wriggle around like a snake” as it attempts to meet constraints
- No New Nodes: The system adjusts existing nodes but does not add new ones
- Real-time Adjustment: As the user moves nodes, the spline immediately attempts to maintain constraint compliance
- Continuous Processing: Optimization runs over many frames for smooth, gradual adjustments
Troubleshooting and Performance
Getting Unstuck
- Perturbation Method: If optimization gets stuck, try moving nodes slightly in different directions
- Not Always Effective: This method doesn’t always work, but can help “unlock” the optimization
- Restart Option: Sometimes stopping and restarting optimization can resolve issues
Performance Considerations
- Long Splines: Can cause significant slowdown during optimization
- User Awareness: Users should be aware of potential performance impact on complex splines
- Experimental Feature: This is an experimental feature and may have limitations
Best Practices
- Start with Visual Feedback: Use the heatmap to identify problem areas before enabling optimization
- Single Constraint Focus: Work with one constraint at a time for clearer feedback
- Gradual Approach: Make small adjustments and let the system respond before making larger changes
- Performance Monitoring: Be aware of performance impact on long or complex splines
Path Generation
The Master Spline Tool includes an experimental path generation system which automatically creates roads between nodes using a modified A-Star/Dijkstra pathfinding algorithm. This feature can generate realistic road networks which follow terrain while attempting to satisfy road design constraints.
How Path Generation Works
The system creates roads by connecting consecutive nodes along a master spline, generating a path which follows the terrain while respecting the selected road design preset. The generated road attempts to meet slope, banking, and corner radius constraints, though perfect compliance may not always be possible.
Generation Tab Interface
The Generation tab contains two main sections:
Design Profile Section
- Preset Selection: Choose from the same road design standards used in optimization (Highway, Mountain Pass, etc.)
- Constraint Application: The generated road will attempt to satisfy the selected preset’s constraints
Generator Settings Section
Four sliders control the characteristics of the generated road:
- Base Width [1, 100]m: Sets the fundamental width of the generated road
- Slope Avoidance [0, 1]: Controls how aggressively the path avoids steep terrain
- 0: Path accepts large slopes
- 1: Strong slope avoidance
- Added Width [0, 1]: Extra width added at tight corners (e.g., hairpins) for better navigation
- Banking Strength [0, 1]: Automatic banking applied to the generated road
- 0: No banking
- 1: Maximum banking
Generation Workflow
Step 1: Create Preview
- Select a master spline with multiple nodes
- Choose a road design preset
- Adjust the generator settings sliders
- Click “Create an Auto Generated Preview”
- Wait for generation (may take 1-2 minutes for long splines)
Step 2: Review Preview
- The preview appears as a visual overlay ribbon made of flat rectangular sections
- This is not a real spline - it’s a rough polyline ribbon showing the proposed road
- The preview may appear to “float” above the terrain, especially with strict constraints like Highway preset
Step 3: Convert or Refine
- Clear Preview: Use the middle button to remove the preview if needed
- Convert to Master Spline: Click “Convert the Auto-Generated Preview into a Master Spline” to replace the selected master spline with the generated road
Preview Characteristics
The preview is a simplified visual representation which:
- Shows the proposed road path without creating actual spline nodes
- Uses flat rectangular sections to create a ribbon-like appearance
- Provides immediate visual feedback on the generated route
- May appear elevated above terrain due to constraint compliance requirements
Constraint Satisfaction
The generated road attempts to satisfy the selected road design preset:
- Slope Compliance: Tries to meet maximum slope gradient requirements
- Corner Radius: Attempts to maintain minimum curve radius
- Banking: Applies appropriate banking angles
- Width Variation: Controls width changes according to preset limits
Note: Perfect constraint satisfaction is not always possible. For example, if the start and end nodes have extreme elevation differences, the system may not be able to meet minimum slope requirements and will minimize violations instead.
Common Workflow Patterns
Mountain-to-Mountain Routes
- Create a master spline connecting mountain peaks
- Generate preview (likely to appear floating due to slope constraints)
- Convert to master spline
- Apply terraforming to bring the terrain to the spline, if required
- The road will follow realistic paths through valleys and around obstacles
Terrain-Following Roads
- Loose Constraints (e.g., Off-Road preset): Roads follow terrain more closely
- Strict Constraints (e.g., Highway preset): Roads may appear elevated to maintain design standards
Performance Considerations
- Generation Time: Can be quite slow for long master splines with multiple nodes
- Complex Routes: May take 1-2 minutes for very long splines
- Experimental Feature: This is an experimental feature with potential performance limitations
- User Awareness: Users should be aware that generation is not instantaneous
Best Practices
- Start Small: Test generation on shorter splines before attempting long routes
- Preview First: Always use the preview to verify the generated path before converting
- Constraint Awareness: Choose appropriate road presets for the intended terrain
- Terraforming Integration: Plan to use terraforming after generation for realistic ground integration
- Patience: Allow sufficient time for generation, especially on complex routes