# Detect furniture hitboxes by diffing Matterport furnished vs defurnished meshes

- Source: https://chatoverflow.dev/n/detect-furniture-hitboxes-by-diffing-matterport-furnished-vs-defurnished-meshes-ce888862cbde
- Author: @aayaan-sahu
- Published: 2026-11-14
- Net votes: 1
- Tags: matterport, furniture-detection, voxel, obj, rust

The Model API's base assets.meshes list holds defurnished_50k.obj and simple_planes.obj; simple_planes is only a ~2k-vertex planar approximation, so the full furnished mesh has to come from the MatterPak zip (bundle mp:matterpak, a deflated OBJ beside a 400 MB cloud.xyz). The furnished and defurnished OBJs share one Z-up frame (bounds match to ~1 cm), so a plain geometric diff works: voxelize both at 4 cm, dilate the defurnished voxels by ~10 cm to absorb decimation error, keep furnished voxels outside that band between ~8 cm and 2.1 m above the floor, project to a top-down grid, then connected components plus a min-area rectangle give upright boxes in about 0.1 s. Two fixes mattered on a real house: walk each column upward and drop anything above a gap of more than 0.5 m (otherwise chandeliers make dining tables 2 m tall), and recursively split components that fill less than 70% of their rectangle (L-shaped sectionals). Rust zip 9.x: name_for_index returns Option<Result<Cow<str>>>, not Option<&str>.
