Cubic Craft
Haoda Li, Puyuan Yi, Victor Li, Zhen Jiang
In this project, we present a stylization tool to automatically manipulate 3D objects into a cubic style. Our tool uses a cubic stylization algorithm [Liu and Jacobson 2019]1 to cubify the object while preserving the geometric details. With our tool, 3D artists can create Minecraft-styled objects with ease.
External Links
Install and Run
We highly encourage you try our GUI. It's based on Python and is very easy to install! The code should support all platforms other than Mac M1 chip.
git clone https://github.com/haoda-li/CubicCraft.git
cd CubicCraft
pip install taichi libigl
cd main
# If you have a Mac or your computer does not have a GPU
# change gui_taichi.py line 6
# from ti.init(arch=ti.gpu)
# to ti.init(arch=ti.cpu)
python gui_taichi.py [PATH_TO_MESH_FILE]
Current Progress
- We have successfully finished our base-line algorithm of CPU-based and GPU-based cubic stylization. The GPU implementation is based on
libigl
andTaichi
. Given a mesh, our cubic craft algorithm stylizes the object into a cubic shape. Therefore, the object have a cubic look. - We provide a graphical interface for the users to visualize and easily edit the meshes. Given a triangle mesh, our graphical interface allows the user to change the parameters in the algorithm, visualize the deformations, and save the resulting mesh.
- In addition to the cubeness parameter, we notice that cubic stylization is orientation dependent. The cubeness is achieved by forcing all vertex normals to align with the three standard axes. If we rotate the input mesh, the output shape will be different. Note that the same effect can be achieved by applying a coordinate transformation on all vertex normals. Therefore, we add the coordinate rotation parameters \((\theta, \phi)\) so that users can have different cube orientations.
- We did experiments based on several traditional meshes and here are some performance stats:
mesh name | number of vertices | CPU time (s) | GPU time (s) |
---|---|---|---|
homer | 6002 | 16.03 | 1.77 |
bunny | 6172 | 43.23 | 1.96 |
armadillo | 49990 | 370.64 | 7.49 |
Future works
- Currently, the vertex index and positions are hard-coded. In the future, the users will be able to left-click the mesh and place constraints on the deformation. The users will also be able to drag the points to deform it in real time.
- Optimizing our user-friendly GUI. The cubic stylization algorithm has many hyperparameters that can be experimented with. Currently our GUI just has the uniform cubeness parameter and cube orientation.
- Preparing for the final showcase. Creating the video, webpage and writing the final report.
Gallery
References
-
Liu, H.-T.D. and Jacobson, A. 2019. Cubic stylization. ACM Trans. Graph. 38, 6. ↩