Need help with voxelizer?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

karimnaaji
517 Stars 51 Forks 24 Commits 3 Opened issues

Description

Header only mesh voxelizer in c99

Services available

!
?

Need anything else?

Contributors list

# 28,114
glsl
city-bu...
srtm
Raspber...
21 commits
# 55,590
C
terrain...
voxels
html5
1 commit

Mesh voxelizer

Header only mesh voxelizer in ANSI C

About

Converts meshes and performs triangle-cube intersection to output a voxelized mesh.

How to use

Include the header only file as following once: ```c

define VOXELIZER_IMPLEMENTATION

include "voxelizer.h"

To generate a voxelized mesh, create an instance of `vx_mesh_t` and initialize its
vertices and indices like this:

```c vx_mesh_t* mesh; vx_mesh_t* result;

mesh = vx_mesh_alloc(nvertices, nindices);

// Add vertices and indices from the original mesh you want to voxelize // [...]

// Precision factor to reduce "holes" artifact float precision = 0.01;

// Run voxelization result = vx_voxelize(mesh, 0.025, 0.025, 0.025, precision);

vx_mesh_free(result); vx_mesh_free(mesh);

TODO

  • Colorized output mesh (from input mesh)
  • Hidden voxel removal
  • Triangle face merging
  • Option for input triangle ordering (right now only supports GL_TRIANGLES indexed triangles)
  • Option for output format

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.