help: how to smooth a mesh generated by Marching Cubes in real
I'm now using the marching cubes algorithm for a project (real-time rendering of human teeth from CT images). Here is the rendering result:
http://www.freeimagehosting.net/uploads/4c2e2c94be.jpg
You can see that the mesh generated by MC is not so smooth. Are you guys aware of any real-time smoothing algorithm which can be applied to the output the MC? Or, is there any improved version of MC which can generate smooth surface?
Any help would be strongly appreciated!
Pls note that that the smoothing algorithm needs to be fast, cause later I have to use MC at about 30HZ, for the re-calculation of the isosurface during interactive deformation.
Kevin
Catmull-Clark subdivision is a nice algorithm which gives quite good results for smoothing. You can apply it several times.
The algorithm is quite simple to implement.
About it being real-time, so far I've only implemented it statically, but - AFAIK - it is absolutely possible to implement it as a geometry shader.
There's also the smoothing algorithm used in Blender. It's not based on subdivision (it doesn't modify the vertex or face count); it just repositions the vertices in order to reduce the angles between neighbouring vertices. Again, should be possible to be implemented in GLSL, clearly in real-time.
Those two can be used together.
Just a check. If you have vertices duplicated recalculating normals will not have a smoothing effect. So, be sure to not have duplicated vertices after marching cube algorithm. I had the same problem and then I deleted the duplicates now I have a smooth mesh
链接地址: http://www.djcxy.com/p/37254.html