Texturing a mesh generated from voxel data

Posted by Minja on Game Development See other posts from Game Development or by Minja
Published on 2014-08-17T15:00:35Z Indexed on 2014/08/18 22:33 UTC
Read the original article Hit count: 347

Filed under:
|

I have implemented the Marching Cubes algorithm to display an isosurface based on voxel data. Currently, it is displayed with triplanar texturing. I'm working with unity, so I have a material with the triplanar shader attached. Now, the whole isosurface is rendered using this material. And thats my problem: I want the texture to represent the voxel data. I'm storing a material value for every point in the grid, and based on this value, I want the texture of the isosurface to change. Sadly, I have no clue how to do this. So if the voxel is sand, I want sand to be displayed; if it's stone, then there should be stone. Right now, everything is displayed as sand. Thanks in advance!

© Game Development or respective owner

Related posts about textures

Related posts about marching-cubes