F2: continuous road grade — along-segment elevation + joint smoothing (D-021)
Road elevation is now sampled at the point on the road segment nearest the column being carved, instead of at the segment's midpoint. The old behaviour gave every column near a segment that segment's single midpoint height, so each stretch of road was one flat plank and consecutive planks stepped like a staircase wherever the road crossed a gradient. Elevation now varies continuously along the segment, and because neighbouring segments share an end point the height matches exactly at the joins. A new ROAD_GRADE_SMOOTHING constant dials between holding a straight grade (cut-and-fill) and hugging the land, per D-021. Untouched: density field, Marching Cubes, chunk dimensions, the .dat contract, and the 2D A* road network itself. Only how existing paths are carved into 3D. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ea11258871
commit
0910338a2a
2 changed files with 76 additions and 11 deletions
|
|
@ -23,5 +23,23 @@ namespace IslaApocalypse.Core
|
|||
// Colour only. This does NOT affect terrain shape, collision, or what
|
||||
// block is actually stored in a voxel.
|
||||
public const float BLEND_BAND_METERS = 2.0f;
|
||||
|
||||
// --- ROAD GRADE TUNING ---------------------------------------------
|
||||
// How much a road "holds a grade" instead of following every bump in
|
||||
// the ground underneath it. Roads exist to be DRIVEN on, so this is a
|
||||
// driveability setting, not a cosmetic one.
|
||||
//
|
||||
// 0.0 = hugs the land: the roadbed follows the terrain exactly.
|
||||
// Never steps, but inherits every lump the ground has.
|
||||
// 1.0 = holds a grade (default): each stretch of road is a straight
|
||||
// ramp between its two path points, cutting through small
|
||||
// bumps and filling small dips. Smoothest to drive.
|
||||
//
|
||||
// Values in between mix the two. Raise toward 1.0 for a more
|
||||
// engineered road, lower toward 0.0 for a more rustic one.
|
||||
//
|
||||
// NOTE: this affects road ELEVATION (terrain shape under the road),
|
||||
// not colour. Tune it properly once vehicles exist to drive on it.
|
||||
public const float ROAD_GRADE_SMOOTHING = 1.0f;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue