|
From: Roch M. C. <ro...@ro...> - 2007-10-10 01:43:27
|
Hello, I recently made a small change in how I implemented a marching cubes algorithm to generate a smoother "skin" segmentation from MR image data (see attachments). The change did not alter the number of triangles (about 200k) but did increase the smoothness quite a lot, and more importantly for me, more accurate normals. The side-effect I encountered was a dramatic increase in time to render the image for the first time. When I submit the old skin for rendering for the first time, there is an almost imperceptible pause before rendering (about 1 second). When I submit the second one, I get a 60 second delay before it appears. My program is unresponsive (spinning wheel) until it completes so this is not desired. I ran it under Shark and found that it spends its time in TriMeshOptimizer and mainly in ArePointsSImilar and Q3FastVector3D_Dot within the optimizer. The old skin had a lot of polygons that were co-planar while the smoother one has more variation in the orientations of the triangles, if that helps. The 3dmf files are almost equal in size (about 11MB) and once the skin has been rendered once, rotates in real time. When I reload the image from file, it also displays immediately the first time. Any thoughts? I really want this nice smooth skin, but a 60 second pause (vs. 1 second) is a huge hit. Thanks, Roch Comeau Rogue Research INc. |