π Spline Data Generator - Physics-Accurate Breaking Wave Authoring
Advanced spline-based authoring system for creating physically-accurate breaking wave animations with real-time controls and LUA export for Wave Forge Studio integration.
Overviewβ
The Spline Data Generator provides a complete workflow for authoring breaking wave animations using 21 spline curves that represent the full lifecycle of a surf waveβfrom initial swell through barrel formation to collapse and wash.
Breaking Wave Spline Systemβ
21-Spline Architectureβ
Each spline represents a phase in the wave lifecycle:
| Splines | Phase | Description |
|---|---|---|
| 01-04 | Swell | Deep water wave approaching shore |
| 05-07 | Rise | Wave steepening as depth decreases |
| 08-16 | Barrel | Wave curling and tube formation |
| 17-21 | Collapse & Wash | Breaking and foam rush |
Spline Point Structureβ
FBreakingWaveSplinePointβ
Each control point contains complete transformation data:
USTRUCT(BlueprintType)
struct FBreakingWaveSplinePoint
{
UPROPERTY(EditAnywhere)
float InputKey = 0.f;
UPROPERTY(EditAnywhere)
FVector Location = FVector::ZeroVector;
UPROPERTY(EditAnywhere)
FRotator Rotation = FRotator::ZeroRotator;
UPROPERTY(EditAnywhere)
FVector ArriveTangent = FVector::ZeroVector;
UPROPERTY(EditAnywhere)
FVector LeaveTangent = FVector::ZeroVector;
};
Real-Time Controlsβ
Splash Impactβ
Controls the intensity of the wave breaking curl:
UPROPERTY(EditAnywhere, meta = (ClampMin = "0.0", ClampMax = "1.0"))
float SplashImpact = 1.0f;
| Value | Result |
|---|---|
| 0.0 | Minimal curl, gentle wave |
| 0.5 | Moderate tube formation |
| 1.0 | Full barrel, surf wave impact |
Surf Wave Height Transitionβ
Controls overall wave crest height:
UPROPERTY(EditAnywhere, meta = (ClampMin = "0.0", ClampMax = "2.0"))
float SurfWaveHeightTransition = 1.0f;
| Value | Result |
|---|---|
| 0.0 | Minimum wave height |
| 1.0 | Default physics-based height |
| 2.0 | Double height (exaggerated) |
Ripple Wave Height Transitionβ
Controls post-impact ripple amplitude:
UPROPERTY(EditAnywhere, meta = (ClampMin = "0.0", ClampMax = "2.0"))
float RippleWaveHeightTransition = 1.0f;
Physics ratios:
- Pre-breaking (05-07): 20% of crest height
- Post-impact (08-21): 27% of crest height (energy transfer)
Editor Actionsβ
Spline Generationβ
// Generate/synchronize splines to match SplineCount
UFUNCTION(CallInEditor)
void GenerateSplines();
// Generate points for all managed splines
UFUNCTION(CallInEditor)
void GeneratePointsForAllSplines();
// Generate points for selected spline only
UFUNCTION(CallInEditor)
void GeneratePointsForSelectedSpline();
Breaking Wave Actionsβ
// Apply physics data with current control values
UFUNCTION(CallInEditor)
void ApplyBreakingWavesData();
// Reset all controls to defaults
UFUNCTION(CallInEditor)
void ResetBreakingWavesDefaults();
// Export modified data to LUA
UFUNCTION(CallInEditor)
void ExportBreakingWavesLUA();
LUA Import/Exportβ
Wave Forge Studio Integrationβ
Export spline data for use in Wave Forge Studio:
UFUNCTION(CallInEditor)
void ExportLUA();
UFUNCTION(CallInEditor)
void ImportLUA();
Export Formatβ
-- Generated by Oceanology Spline Data Generator
SplineData = {
Spline_01 = {
{ Key = 0, Location = {0, 0, 0}, Rotation = {0, 0, 0},
ArriveTangent = {100, 0, 0}, LeaveTangent = {100, 0, 0} },
-- ... more points
},
-- ... splines 02-21
}
Spline Configurationβ
General Settingsβ
UPROPERTY(EditAnywhere)
FName ActorTag = "OceanologySplineData";
UPROPERTY(EditAnywhere, meta = (ClampMin = "0", ClampMax = "21"))
int32 SplineCount = 0;
UPROPERTY(EditAnywhere, meta = (ClampMin = "2", ClampMax = "20"))
int32 SplinePointCount = 2;
Automatic Managementβ
The system automatically:
- Creates/destroys spline actors based on
SplineCount - Assigns stable names (
OceanologySplineData_01through_21) - Tags actors for identification
- Positions splines in sequence
Interpolation Systemβ
Smooth Transitionsβ
Splines 08-16 use interpolation between wave states:
void InterpolateSplinePoints(
const TArray<FBreakingWaveSplinePoint>& PointsA,
const TArray<FBreakingWaveSplinePoint>& PointsB,
float Alpha,
TArray<FBreakingWaveSplinePoint>& OutInterpolatedPoints
) const;
This enables:
- Smooth barrel formation progression
- Continuous wave shape evolution
- Physically plausible transitions
Breakpoint Keyβ
Each spline has a defined breakpoint where the wave impact occurs:
int32 GetBreakpointKeyForSpline(int32 SplineIndex) const;
The breakpoint is Key 4 for most barrel splines (08-16).
Physics Dataβ
Crest Height Calculationβ
float GetCrestHeightForSpline(int32 SplineIndex) const;
Key 2 defines the wave crest in all splines.
Ripple Ratioβ
float GetRippleRatioForSpline(int32 SplineIndex) const;
Returns 0.20 (pre-breaking) or 0.27 (post-impact) based on energy conservation.
Editor Selection Integrationβ
Interactive Workflowβ
The generator responds to editor selection:
- Select a managed spline actor
- Click "Generate Points for Selected Spline"
- Points regenerate with current settings
Selection-aware updates via USelection::SelectionChangedEvent.
Visualizationβ
Spline Colorsβ
Editor visualization uses distinct colors per spline phase:
- Swell: Blue gradient
- Rise: Cyan gradient
- Barrel: Green to yellow
- Collapse: Orange to red
Point Distributionβ
Points are distributed along local X from 0 to 1000:
void RegenerateSplinePoints(
USplineComponent* SplineComp,
int32 NumPoints
) const;
Workflow Exampleβ
Creating Breaking Wavesβ
- Place Generator in level
- Set SplineCount = 21 for full wave lifecycle
- Generate Splines - Creates all 21 actors
- Apply Breaking Waves Data - Loads physics-based shapes
- Adjust Controls - Fine-tune SplashImpact, heights
- Export LUA - Save for Wave Forge or runtime use
Iterative Refinementβ
- Modify control values
- Apply Breaking Waves Data
- Preview in editor
- Repeat until satisfied
- Export final configuration
Integration Pointsβ
Wave Forge Studioβ
Exported LUA data can be:
- Imported into Wave Forge Studio
- Modified with Hermite curve tools
- Baked to textures
- Re-imported to Unreal
Runtime Material Systemβ
Spline data drives:
- Shore wave displacement
- Foam generation masks
- Normal map generation
- UV animation curves
Resourcesβ
- Discord: #wave-authoring channel
- Wave Forge Studio: Companion web tool
- Documentation: Breaking waves technical guide