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 »

3 Responses to “Colored Voxels”

  1. Matt Says:

    Hey there,

    I was wondering if you could share the updated code that samples the source model’s texture. I know you already explained how you did it, but I have no clue how to implement that into your previous code.

    Thanks so much for any help.


  2. zoomy Says:

    Hey Matt –

    As it happens, the method I describe in this post is now out-of-date — it would pretty reliably crash Maya past a few iterations, I suspect memory leaks. The method I used for the latest Vimeo posts involves making a shader for each cube and animating the color, which is also pretty hacky, but more stable.

    I’m currently busy with other projects, including turning said code into a plugin, but I do plan to eventually release it once I’ve had the chance to clean it up.

  3. zoomy Says:

    Voxelzer 1.0 with colored voxels:

Leave a Reply