top of page
Search
Writer's pictureAlbert Li

Legolizer: A GPU-accelerated plug-in for generating voxels and LEGO bricks

Updated: Apr 13, 2023


Legolizer is a GPU-accelerated Grasshopper plug-in for generating voxels and LEGO bricks. The implementation refers to [1] and [2]. Many thanks for their amazing work.


There are two components: Voxelizer and Legolizer. They can be found in the `Mesh` label.

  • Voxelier: It allows users to create a large number of voxels within a few seconds. For example, it produced about 0.2 million voxels within 1 second on my computer (RTX 3060). If the `Solid` toggle is True, this component can generate voxels inside the model, meaning the produced voxel model will be a solid model.



  • Legolizer: It allows users to create a LEGO layout. However, I have not yet achieved a LEGO layout to improve the global structural stability, although it has been presented in [2]. This component is slow but useful because it saves the data structure for construction. I have tried to build a sculpture in the real world. All the same LEGO bricks are grouped in the same branch, and users can check the bricks layer-by-layer.



*By the way, joining meshes can significantly improve the rendering speed.


If you get an error "Unable to load DLL (Module could not be found"...):

(1) You can move all the downloaded .dll files to "C:\Windows\System32". Then, restart your Rhinoceros. If it still doesn't work, please move to (2).

(2) This plug-in is developed based on CUDA 11. I guess only NVIDIA's GPUs can be supported, such as RTX 2060, RTX3060, etc. This is a very young project, so please let me know if you cannot run it on your device. I have developed this plug-in according to the sample flags on CUDA 11, which has maximum compatibility with V100, T4 Turing cards, newer RTX 3080, and other Ampere cards. If you are not sure whether your GPU can be supported, please visit here to find your gencode.



References:

[1] https://github.com/Forceflow/cuda_voxelizer

[2] Luo, S. J., Yue, Y., Huang, C. K., Chung, Y. H., Imai, S., Nishita, T., & Chen, B. Y. (2015). Legolization: Optimizing lego designs. ACM Transactions on Graphics (TOG), 34(6), 1-12.

311 views0 comments

Recent Posts

See All

Comments


bottom of page