A high performance voxel engine.
Run the following commands, in order if starting from scratch. The beginning of each line is the directory to run each command from.
build/: make -j
experiments/: ./experiment.sh download
experiments/: ./experiment.sh compile
build/: make -j
experiments/: ./experiment.sh convert
experiments/: ./experiment.sh run
- Build the entire project (
make -j
) - Run
drivers/compiler "[format]"
.[format]
, in between the quotes, should be a space-separated list of formats, listed below:
Raw(W, H, D)
:W
,H
, andD
are the width, height, and depth of the raw gridDF(W, H, D, M)
:W
,H
, andD
are the width, height, and depth of the distance field,M
is the maximum distance stored (construction time scales cubically withM
)SVO(L)
:L
is the maximum number of levels in the SVO - the dimensions of the subvolume are 2^L
x 2^L
x 2^L
SVDAG(L)
:L
is the maximum number of levels in the SVDAG - the dimensions of the subvolume are 2^L
x 2^L
x 2^L
- Step 2 will produce two files:
[format]_construct.cpp
and[format]_intersect.glsl
, where[format]
is the lower-case and underscored version of the format described in step 2 - add these files tovoxels/CMakeLists.txt
andshaders/CMakeLists.txt
, respectively - copy these files into thevoxels/
andshaders/
folders, respectively - Build the entire project again (
make -j
) - Edit
drivers/convert_model.cpp
- add a prototype for the constructing function at the top of the file, with the lower-case and underscored format name from step 3 - add that function as a value in theformat_to_conversion_function
unordered_map, with the format name from step 2 as the key - Run
drivers/convert_model [path to obj] 0.0 "[format]"
, where[path to obj]
is a path to the obj model to voxelize, and[format]
is the same format used in step 2 - Run
drivers/model_viewer [path to voxelized model] "[format]"
, where[path to voxelized model]
is the path to the voxelized model produced in step 6, and[format]
is the same format used in step 2