Colored Voxels

May 25th, 2010

Returning to the scene of the cubical crime…

I’ve found a way to apply colors to my mesh-voxelizing script, by sampling the color of the source model with Maya’s polyGeoSampler command. Incredibly, polyGeoSampler isn’t queryable. It’s used to bake the color of a mesh’s textures to the vertices of the mesh. So once you’ve done that, you can query *that* color with the polyNormalPerVertex command.

This technique only gives the expected result as long as your voxels are larger than your polys. Isn’t there any way to return the color of a texture at a given point on a poly?

« previously: Venetian Snares – Szamar Madar | Home | next: Banana »