Inspiration
Everyone loves LEGO, but they're just too expensive. Most of the expense comes from LEGO's markup on instruction sets. In this economy, LEGO is not economically viable for most consumers so, we wanted to change this and also allow endless creativity.
What it does
BrickMe brings LEGO sets to the consumer. It allows anyone to create a LEGO set from any image. It generates a custom 3D LEGO model and instructions. It also gives a detailed list of all the bricks that it uses, allowing users to easily buy and then build their custom LEGO set.
How we built it
BrickMe uses a custom Next.js front end for user interface. For the backend, we used FastAPI, Supabase, Open3D, and TriMesh packages for 3D model handling. To generate 3D models, we use the Meshi API, which then feeds into our custom 3D pipeline. Our pipeline converts the generated 3D mesh into something called a point cloud, which allows as to sample points from the surface of the 3D mesh. Then the point cloud gets converted to a voxel grid, which allows us to represent each point in the point cloud as a unit. Then we use a custom heuristic greedy algorithm to convert the unit cubes into the biggest brick possible for the spot. The model is represented by a graph, which allows us to then use DFS to make sure that the LEGO set is actually built. This pipeline runs in a feedback loop, which ensures that the final result will be a fully buildable LEGO set. Finally, once we have the fully buildable Lego set, it could split layer by layer, which allows us to create the instruction manual. Finally, once the Instruction Manual and LEGO set get fully built, they get sent back to the front end for users to see through our 3D viewer.
Challenges we ran into
The main challenges we ran into revolved around the front end and our 3D pipeline. For the front end, we struggled because we're a team of backend developers. So we leveraged generative code tools and the Internet to create the front end and connect it to our back end. While we would have preferred to code the front end entirely on our own and learn something, we decided to use generative code tools because of the time constraints. For the 3D pipeline, we mainly struggled because 3D was a completely new concept to us. Before this project, we had never heard of point clouds, voxel grids, or GLB files. But we overcame this through extensive research of the Open3D and TriMesh documentation and rigorous trial and error. But eventually, we overcame these challenges and were able to put together the final 3D pipeline.
Accomplishments that we're proud of
The thing we're most proud of is probably the 3D pipeline, especially given that we had no experience with it prior. Additionally, we're proud that we were able to connect the front-end and the back-end, especially with large payloads of 3D models.
What we learned
I think we all learned a lot about processing 3D models and using code to generate 3D models. Additionally, I think we learned a lot about using 3D models on a web app.
What's next for BrickMe
We need a better system for deciding what piece is next in the instructions, because even though it's all going to be connected in the end, going layer by layer doesn't always guarantee that the piece you're adding in that layer has a connection. If it's only connected from above, it won't have a connection at the time it gets placed. Additionally, we want to work on proper authentication, storage, and database features. Finally, we want to host this project for anyone to use. To do this, we plan to use Vercel to deploy the front end, AWS for the back end, and Supabase for the auth, storage, and database.
Built With
- claude
- fastapi
- nextjs
- open3d
- python
Log in or sign up for Devpost to join the conversation.