Showing posts with label Sponza. Show all posts
Showing posts with label Sponza. Show all posts

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)

Saturday, April 27, 2013

Voxelizer Part 1

Here follows the first results of my voxelizer (the process to take a regular mesh and create a voxel representation). For the tests I'm using an old SpiderMan model that I created in 2005 (damn, I dunno how I found it on my HD) and Sponza Palace that Crytek donated to public domain (download link). I'm glad with the results, but I still have to take in account the model's texture to colorize the voxels. This is a small part of my Global Illumination studies. hehe

Just a few million of voxels. That's I call density. :D


In the next posts I will share the Unity webplayer demo and project source.
If you are interested to understand how it's made, I recomend you to start studing the "Separating Axis Theorem" (SAT). Here is some very usefull links about it: