Houdini Lego Builder

A HDA I created that converts input geometry in to Lego. It supports a variety of bricks including slopes, tiles, wedges and also slopes that occupy multiple rows. These can be turned on or off as desired. The algorithm will favor the more complex or larger bricks and will place the regular rectangular bricks with sequential rotations until they find a spot. This ensures that if a large brick can fit at a certain orientation, it will. The result is less overall pieces in the end and a more natural structure with varying rotations and placements.

The diffuse texture of the incoming geometry is also used and matched to the actual Lego colour palette 

This model of Hornet from the Hollow Knight took 13 mins 37 seconds to process on a Threadripper 5975WX, it contains 24305 bricks and is 122 rows tall. This includes the use of the multi-row slopes which significantly slows down the calculation

The HDA operations are compiled and the rows are run in parallel on the CPU which drastically increases the speed of the calculation. The multi-row slopes however need to be run through sequentially as the lower rows will influence what can be placed above. This is the first part of the algorithm and once complete the other bricks will be placed with the parallel operations

The points analyzed for the slope and wedge placements can be changed to tweak the look of the final model for a more or less ‘blocky’ look

Leave a comment