About the Project
Inspiration
I wanted to solve a very practical maker problem: there are tons of cool 3D models online, but turning them into something physically buildable with LEGO is still painful. Most workflows are fragmented, command-line heavy, or require manual cleanup.
The core idea was simple: make a clean web interface that converts an OBJ model into LDR output, with previews on both sides.
How I Built It
I built an end-to-end OBJ-to-LDR pipeline with a lightweight web UI:
- Input a 3D mesh (.obj)
- Normalize geometry and voxelize the mesh
- Convert occupied voxels into LEGO-style brick placements
- Optionally merge neighboring bricks to reduce part count
- Export an .ldr file and preview both source and output
Tech stack:
- Python for the conversion pipeline
- trimesh + numpy/scipy for mesh and voxel processing
- Streamlit for the interface
- Plotly for interactive browser previews
- GitHub + Streamlit Community Cloud for deployment
What I Learned
This project taught me how to balance geometry fidelity with practical buildability:
- Lower pitch gives more detail but increases part count and compute cost
- Higher pitch runs faster but loses shape detail
- Good UX is as important as the algorithm itself
A useful rule of thumb from voxelization is:
$$ N_{voxels} \propto \frac{1}{p^3} $$
where $p$ is voxel pitch. Reducing pitch even slightly can dramatically increase model complexity.
Challenges I Faced
- Cloud dependency compatibility
- Streamlit Cloud used Python 3.14, while open3d did not have compatible wheels there.
I removed open3d as a hard dependency and made viewer behavior degrade gracefully.
Keeping the interface simple under hackathon pressure
Early versions had too many controls.
I redesigned the app to keep one clear Generate flow with dual previews.
Large model handling
Some OBJ files were large, affecting both rendering and repository size.
I had to keep previews responsive and watch file-size constraints.
Deployment reliability
Local and cloud behavior differed.
I added safer defaults and better guardrails so the app remains stable online.
Why This Project Matters
This project bridges digital creativity and physical making.
Instead of stopping at a 3D mesh, creators can quickly move toward a buildable LEGO representation through a workflow that is visual, simple, and practical for rapid iteration.
Log in or sign up for Devpost to join the conversation.