Skip to content

salvage: fix inverse scale when writing binvox meshes (credit @sotpapathe #4710)#9792

Open
Bartok9 wants to merge 1 commit into
microsoft:mainfrom
Bartok9:aerial/salvage-binvox-scale-4710-20260719
Open

salvage: fix inverse scale when writing binvox meshes (credit @sotpapathe #4710)#9792
Bartok9 wants to merge 1 commit into
microsoft:mainfrom
Bartok9:aerial/salvage-binvox-scale-4710-20260719

Conversation

@Bartok9

@Bartok9 Bartok9 commented Jul 19, 2026

Copy link
Copy Markdown

Salvage line

salvage of #4710 by @sotpapathe — full credit to the original author.

Problem

WorldSimApi::createVoxelGrid wrote the binvox scale field as 1.0f / x_size. In the binvox header, scale is the unit length of the grid’s edge along the first dimension, not its reciprocal. Downstream tools then reconstructed inverted/wrong physical extents.

Change

  • Write scale << x_size (same as original PR intent)
  • Brief comment pointing at format semantics
  • Rebased cleanly on current main (single-line + comment)

Why not just bump the old PR

Original remains open/MERGEABLE but sat idle since 2022-09; this re-lands the fix with active attribution so maintainers have a fresh head.

Verification

  • Diff limited to Unreal/Plugins/AirSim/Source/WorldSimApi.cpp
  • No other WorldSim paths touched
  • Host build of full UE plugin not run in this lane (dormant-sim culture: surgical code salvage)

AI-assisted; human-reviewed. Please keep credit with @sotpapathe.

The binvox writer emitted scale as 1/x_size; the binvox format expects the
unit edge length, so export inverted extents. Salvage of @sotpapathe microsoft#4710
onto current main.

Credit: @sotpapathe (microsoft#4710)

AI-assisted; human-reviewed.
@Bartok9
Bartok9 force-pushed the aerial/salvage-binvox-scale-4710-20260719 branch from dd905cd to dc6c1d2 Compare July 19, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant