Excavation: intervals are absolute Z, the elevation section is BaseZ-relative - settle the conversion before digging #289
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo#289
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by digging a real tunnel into the authored world, and caught by
LegacyProjectionGoldenTests.Every_authored_cell_projects_to_its_pre_F1_answer:The mismatch
Two reference frames meet in the chunk and nothing states which is which:
terrain.BaseZ + stored—mountain_rockdeclaresBaseZ 5, so a stored 192 means a surface at 197;(
TerrainZ.Floor,SurfaceResolver,Excavation).ChunkedEditModel.Excavatesynthesises a column for an undug cell fromZAt, which returns the STOREDelevation, so the column it writes is 5 too low for that terrain.
WorldChunk.GroundZAtthen answers thetop of the topmost span directly and the BaseZ is silently lost.
Nothing was corrupted on disk — the authored world has been restored from backup and the suite is green —
but no cell may be dug until this is settled, or every dug cell's surface drops by its terrain's BaseZ.
What has to be decided
model, so the conversion belongs at the authoring boundary:
[Floor, BaseZ + stored)going in, andTopZ - BaseZgoing back to the elevation section.ChunkedEditModelworks in catalog indices and does not know tiledatatoday. It needs the per-terrain BaseZ, or the conversion has to move to a layer that has it.
it was excavated; if the surface height is derived from the terrain's BaseZ, repainting would move a
cave's roof. That suggests an extended column should carry absolute Z and the elevation section should
be a projection of it, not a second source of truth.
Already in place
Excavation.Dig,TerrainInteriors, the renderer pass and the harnessdigverb are merged andunit-tested; the gap is only this conversion. A gallery dug through the authored chain read back
correctly in the interval data (34 cells, void 14 high, roof thickening 38 -> 188) — the surface
projection is the one thing that was wrong.
Blocks the mountain-road galleries; related to #268 and the volume model spec.