Skip to content

Voxel and UI work

6 days of work on xade so far. But only 6 to 8 hours per day since there is always a lot of shit you have to take care of when you come home from a big trip.

I have been working on 2 parallel lines, one is the hardcore voxel code and the other is the UI. I really like splitting my work like this since if I get stuck or really bored in of the lines I can switch to the other.

On the hardcore voxel side of things I have found a wonderful PhD thesis from Andreas Baerentzen covering a lot of the things I need to research. He’s thesis introduced me to a couple of things I hadn’t thought much about:

1. Having the voxel value represent the signed distance to the closest ISO surface. This introduce some advantages ex. it’s easy to find the foot point. But there is also at least one drawback, which is that after you have done operations on the volume the voxel distanced is probably fucked and you have to run a algorithm called the Fast Marching Method to correct it.

2. The Level-Set Method. Which is a more mathematical correct way of deformation sculpting. The theory is quite complex, but as I understand it comes down to 2 voxel look-ups and one gradient calculation per voxel and then running the FMM algorithm on all the effected voxels.

When it comes to rendering the voxel volume, the way I see it , there is 4 realistic solutions:

1. Convert the volume to triangles with Marching Cubes algorithm and then let OpenGL render it.
2. Convert the volume to splats and then let OpenGL render it with the GL_POINTS and the GL_DISTANCE_ATTENUATION_EXT extension.
3. Ray casting directly against the voxel volume.
4. Convert the volume to a SVO and ray cast against it.

I will probably implement all of the above and compare the results but my guess is that it’s the two ray cast solutions that will win in the end.

One the UI side of things, I’m thinking of rendering everything with OpenGL. This have some big advantages like speed, easy porting and that you don’t have to touch crummy OS API’s. The only disadvantage I can come up with is that translating the application to a non ANSI based character set will probably be a lot more difficult.

I have thought a lot about the UI desgin and have come up with a solution which borrows ides from Photoshop, Mari, Chrome, Modo and Lightroom. In my opinion the ZBrush and Mudbox interfaces are ugly so not much to learn from there.

In a later post I will talk more about the UI…

Categories: Chatter.