Quixel to Lego Converter

Ever wanted to turn the scans from quixel into a Lego building? Well now its possible. I created this little converter with the geometrie nodes and it can take any scan and turn it into Legos.

Basicly the Geometrie nodes take the imported mesh and turn it into voxels. I did this by creating a 3 dimentional grid and then using the geometrie proximity node to remove every vertice that is outside of the original mesh. On each vertex i am now able to place a lego brick with the instance on points node. I did this once for the normal Lego bricks and again with a three times more dense grid on the z axis to get the result for the thinner Lego plates.



After i got the voxel grids i seperated the vertices from those grids based on the normal of the original shape. Each normal value got a different type of Lego piece. Intersecting pieces also needed to be removed and i added a little bit of a random value to the plates and bricks by replacing some plates with round ones, those grill like Lego tiles or round ones with holes. Afterwards i transfered the vertex color of the original shape to the Lego piece instances and thats it.



https://www.artstation.com/artwork/RnZPKr

70 Likes

Super interesting !
It would be great to know a bit more on how you managed to do that ! At least the general theory behind it.
Well done !

1 Like

Basicly it takes the original mesh and puts it into a grid. With the geometry proximty node i turn the mesh into a voxel grid. That i do once for the big bricks and then for the small plates, which have one third of the height of the normal bricks. Based on the normal of the original mesh i then distriputed the different lego pieces across the grid and everywhere those bricks where placed i remove the base bricks. To phrase it simple if there is a normal of a certain value place this 1x2 slope here and remove the bricks that it intersects with.

5 Likes

This is so cool, it would be awesome if you shared your geometry nodes setup!

2 Likes

Super cool ! Thanks for these great insights !

1 Like

i am trying to publish something, but first i need to tidy up the whole node tree

2 Likes

Amazing!

Are those profile bricks and hollow studs random, or are they placed based on the texture?

It would also be really awesome but a lot more complex to create a SNOT-based converter too!

1 Like

currently everything is based on thhe normals. the hollow studs are just random but are placed random at points where tiles and flat plates where suposed to be too keep it a little bit organized. Also right now i dont use the official lego colors because i didnt manage to reduce the color of the shader into the oficcial colors.

1 Like

Very cool - lol. You’ll be hearing from the Lego Movie people any time now - :slight_smile:

2 Likes

I featured you on BlenderNation, have a great weekend!

1 Like

Any place I can buy this? Thanks!

1 Like

You’re on the #featured row! :+1:

2 Likes

This is really cool.
Though it could use some settings for different results. For example to toggle whether to use odd pieces, smaller pieces, or not, etc.

1 Like

I have a second question. How does it deal with interior pieces? Are they separated so it doesn’t increase memory, or are they left adding extra unnecessary geometry?

1 Like

When i create the voxel version of the base mesh it is not a filled up version just a hull. Because of the Geometry proximity node it only leaves those vertices that are near the surface of the base mesh so inner vertices will be deleted as well.

1 Like

cool work!!)

1 Like

Congratulations, this work has been nominated for the ‘Best of Blender Artists 2022’ award in the #geometry-nodes category! You can vote for it here.

I would pay for this if you put it on Gumroad or something. $5-$10 Maybe?

1 Like

Where i can find a free download or tutorial for recreating this masterpiece ?