Saturday, May 4, 2013

Voxelizer Part 2

It's time to add some colors to the voxelizer! :)



I've been busy finishing a project on my work, so unfortunately I'm not spending the time that I would like to finish the voxelizer. For now I just added colors to the voxels based on the mesh textures. The process is pretty straight forward:
1) Loop trough all vertices of the meshes and apply their texel color to the mesh vertex color.
2) When checking if the triangle collided with a voxel (SAT), calculate the average color of the triangle and store it into the voxel
3) And finally render the mesh voxels with a shader that supports vertex color.

The following images illustrate those steps:


There is many other ways to do that, but for my purposes that's good enough. The main problem with this technique is that it wont works so well for low-poly models, because you will end up with not enough color information for your voxels. But this is not the case in Sponza Pallace.

The project is not ready to share, but I believe that it will be done until the next weekend.

Thread:
Voxelizer Part 1
Voxelizer Part 2
Voxelizer Part 3
Voxelizer Part 4 (Final)

1 comment:

  1. Do you have an idea on how much memory this voxels are using?

    ReplyDelete