AI-powered architectural context massing generator. Upload facade photos, extract perspective, and export a fully textured 3D model ready for Rhino, SketchUp, or any render engine in one click.
- Upload photos of up to four building facades (Front, Back, Left, Right)
- Click four corners to correct perspective distortion
- Paint a mask over any artifacts (windows, vehicles, scaffolding)
- Set building dimensions and hit Build
The app runs Depth-Anything-V2 to generate displacement and normal maps, then packages everything into a ZIP ready for your target software.
Best for Enscape photorealistic rendering in Rhino.
- Flat ZIP structure — OBJ, MTL, and all textures sit in the root directory so Rhino resolves paths automatically
- MTL includes
map_Kd(albedo) andmap_bump(normal) — textures appear in the Rhino viewport with no extra steps - Enscape
.matpkgsidecars contain the full PBR schema (BumpMapType: 3,ImageFade,UseColorChannel) for physical displacement rendering MassingPro_{id}_ApplyMaterials.py— Rhino Python script that auto-sets all material texture slots on run
Best for rapid viewport iteration in Rhino or SketchUp. Self-contained with embedded textures. Note: Rhino imports GLB as a Block Instance, which restricts Enscape material replacement.
Best for SketchUp users who need textures visible in the viewport and accessible to render engines.
- Collada 1.4.1 format — SketchUp's native import path for textured geometry
- Albedo texture bound to
<diffuse>— appears immediately in the SketchUp viewport on import - Normal map included via
FCOLLADAbump technique — picked up by V-Ray for SketchUp and Enscape for SketchUp - Textures sit flat alongside the
.daefile; relative paths resolve automatically on import - Enscape
.matpkgsidecars and displacement maps included in the ZIP for Enscape for SketchUp
- Extract the ZIP to a folder
- Import the
.objinto Rhino — textures appear in the viewport automatically - Open Enscape — albedo and normal maps render without any additional setup
- Optional: Run
MassingPro_{id}_ApplyMaterials.pyviaTools > Python Script > Runto force-refresh material slots - Optional: Batch import the
.matpkgfiles in the Enscape Material Editor for physical displacement
- Extract the ZIP to a folder
- Go to File > Import, select the
.daefile — textures load automatically from the same folder - The facade textures appear on the building surfaces in the SketchUp viewport immediately
- For Enscape for SketchUp: open the Enscape Material Editor and import the
.matpkgsidecars for displacement and PBR properties - For V-Ray for SketchUp: the normal map is already referenced in the DAE and will be read on scene open
After uploading a photo, click 🎯 Auto-Detect to auto-fill the four corner points using edge and contour analysis — this is an optional shortcut. You can always ignore it and click the four corners manually on the canvas. If auto-detection lands incorrectly, drag the points to correct them or clear and re-click from scratch.
| Layer | Library |
|---|---|
| Frontend | Streamlit + custom HTML/JS components |
| Depth AI | ONNX Runtime · Depth-Anything-V2 ViT-S |
| Geometry | trimesh · OpenCV |
| Export | zipfile · PIL |
pip install streamlit onnxruntime trimesh opencv-python pillow requests numpy
streamlit run app.pyPlace depth_anything_v2_vits.onnx in the project root. Download from the Depth-Anything-V2 releases.
All materials follow the pattern MassingPro_{project_id}_{face} (e.g. MassingPro_482910_Front). The project ID is randomised per build. The Enscape matpkg "Name" field matches this exactly to enable auto-linking by name.
- UI overhaul for design professionals — dark Streamlit chrome now matches the red accent used throughout (via
.streamlit/config.toml); Jost / Neutra font stack applied globally. - Sidebar redesign — large bold MassingPro title, tightened vertical spacing so all controls fit without scrolling, faint grey borders on dimension input fields and +/− buttons, step size set to 0.25 m for precise nudging, "Surface Relief" slider replaces "Normal Intensity" with an in-place tooltip explanation.
- How to use guide — moved from main content area to bottom of sidebar as a collapsible expander; written in plain design-professional language.
- Perspective-corrected image — display constrained to 60 % of main area width to reduce scrolling between steps.
- Canvas improvements — numbered corner labels (1 TL / 2 TR / 3 BR / 4 BL) on the perspective picker; plain-English instruction text on both the picker and mask painter canvases.
- 3D preview auto-expands after each build so the model is visible immediately without a manual click.
- Faster builds — ONNX inference session cached with
@st.cache_resource; model loads from disk once per server process, eliminating repeated initialisation overhead on subsequent builds. - Export labels — shortened and made format-centric (e.g. "OBJ + MTL (.obj)", "GLTF Binary (.glb)", "Collada (.dae)").
- SketchUp / DAE export — new export option generating a Collada 1.4.1 file with albedo textures bound to
<diffuse>(viewport) and normal maps via FCOLLADA bump technique (V-Ray / Enscape for SketchUp). Displacement maps and.matpkgsidecars included in the ZIP. - Interactive 3D preview — inline model-viewer panel renders a double-sided GLB preview directly in the app after each build, with expand/collapse toggle.
- Render Model export — OBJ + MTL with
map_Kdandmap_bumpfor zero-step Rhino viewport textures and Enscape rendering. - Rhino auto-material script —
MassingPro_{id}_ApplyMaterials.pygenerated in every ZIP to force-apply texture slots via Rhino Python. - Auto perspective detection — one-click corner detection using edge + contour analysis; points are draggable for refinement.
- Hybrid export pipeline — GLB for viewport visibility paired with Enscape
.matpkgsidecars for PBR rendering.
- Initial release — core pipeline: perspective unwarp, Depth-Anything-V2 depth estimation, normal map generation, 16-bit displacement maps, and ZIP packaging.
- Enscape
.matpkggeneration — full PBR JSON schema with albedo, normal, and displacement texture slots. - Unique project IDs — randomised per build to prevent material name collisions in Rhino/Enscape.
- Custom HTML/JS canvas components — zero-lag perspective point picker and mask painter.
Apache License 2.0