A C++ implementation of super fast 3D image compression using octrees, with OpenGL visualization.
![]() Figure 1: Octree layers with coloured leaf nodes |
![]() Figure 2: Complete octree with coloured leaf nodes |
Octree compression works by recursively subdividing a 3D image into eight smaller cubes (octants). If all voxels within an octant have similar or identical values, the region is represented by a single node instead of individual voxels. This reduces the amount of data by efficiently summarizing uniform areas, allowing for compact storage and faster processing.
- C++17 compiler (
g++orclang++) - CMake 3.10+
- OpenGL 4.6
- GLFW3
- GLM
- GLAD (OpenGL loader)
sudo apt update
sudo apt install build-essential cmake
sudo apt install libglfw3-dev libglm-dev
sudo apt install libgl1-mesa-dev libglu1-mesa-devgit clone https://github.com/koralkulacoglu/3d-octree-compression.git
cd 3d-octtree-compressionpython3 -m venv venv
source venv/bin/activate
pip install glad
python -m glad --profile=core --api=gl=4.6 --generator=c --out-path=.mkdir build && cd build
cmake ..
make -jcd bin
./OctreeViewercd build
rm -rf * && cmake .. && make -j







