This is the voxelizer code in my slide: Incarnation - Turning Real World Objects Into Perfume-World .
Voxelizer export Perfume-World JSON format from *.OBJ
and *.MTL
.
- Make sure your *.obj and *.mtl files have the same name. Put it into the same directory as
index.html
. - Set the
modelName
variable in index.html - Change the
step
variable. Bigger step means less voxels. - Open
index.html
in Chrome. You need to run a HTTP server to serve the file since Chrome doesn't allow AJAX throught local file URL. The easiest way is runpython -m SimpleHTTPServer
under the directory and connect tohttp://localhost:8000
in Chrome. - After the browser rendered the voxels, click the
Save
link on the page.
- Yung-Luen Lan (@yllan)
- three.js by @mrdoob
- OBJMTLLoader from @angelxuanchang
Voxelizer is available under the MIT license. See the LICENSE file for more info.