-
Notifications
You must be signed in to change notification settings - Fork 41
Voxels
The SceneToolkit supports working with voxels in several ways.
Voxels can be generated using the server-side compute (ssc) scripts. See Assets for how to add your asset to the scene toolkit. See Headless-Rendering for how to setup headless rendering..
Use ssc/color-voxels
to surface colored voxels for a model.
-
To create surface color voxels at resolution 128^3:
NODE_BASE_URL=path/to/data ssc/color-voxels.js --source 3dw --id b192cda468f9390aa3f22b4b00de6dfb --format obj --resolution 128
Voxel outputs are saved in the nrrd format.
-
To create solid color voxels, you will need to have a initial solid voxelization to start with. For ShapeNetCore models, we have solid voxelizations generated using binvox.
NODE_BASE_URL=path/to/data ssc/color-voxels.js --source 3dw --id b192cda468f9390aa3f22b4b00de6dfb --format obj --voxels voxels-solid-256 --downsample 2
Note that the voxels are generated by direct sampling of the mesh surface and colors. For improved voxels, it is recommended that the output voxels are further downsampled and filtered.
Generated voxels can be rendered using the server-side compute (ssc) scripts.
Use ssc/render-voxels
to renders voxels (size of voxel determined by alpha channel, use --size 0.8
to render fixed size voxels). Both binvox
and nrrd
formats are supported.
-
Render single view
scc/render-voxels.js --input b192cda468f9390aa3f22b4b00de6dfb.nrrd
-
Render single view with png compression (requires pngquant)
ssc/render-voxels.js --input b192cda468f9390aa3f22b4b00de6dfb.nrrd --compress_png
-
Render turntable mp4 at steps of 10 degrees (requires ffmpeg)
ssc/render-voxels.js --input b192cda468f9390aa3f22b4b00de6dfb.nrrd --render_turntable --turntable_step 10
If you start the SSTK server, you can view generated voxelizations go going to http://localhost:8010/voxel-viewer.html and select "Load" (upper right corner).
- Home
- Main
- Annotators
- Assets
- Batch processing
- Development
- File formats
- Rendering
- Scene Tools
- Voxels