1 Using Voxelization and Ray-Tracing to Identify Wall Thinness of ...
1 Using Voxelization and Ray-Tracing to Identify Wall Thinness of ...
1 Using Voxelization and Ray-Tracing to Identify Wall Thinness of ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>and</strong> less 'boxy' the more polygons are used <strong>to</strong> render the object. We see 3D content crea<strong>to</strong>rs usingvast numbers <strong>of</strong> polygons as is, <strong>and</strong> the numbers <strong>of</strong> polygons used will only continue <strong>to</strong> grow.Therefore, when performing computations on 3D models now <strong>and</strong> in the future, dealing with theenormous memory costs is the biggest challenge. Indeed, one might need a specialized datastructure in order <strong>to</strong> h<strong>and</strong>le all the data, such as an octree.145. Octrees<strong>Voxelization</strong>, <strong>to</strong> reiterate, is a representation <strong>of</strong> a geometric shape as a set <strong>of</strong> voxels, or cubes. Itis natural when approaching voxelization <strong>to</strong> think only <strong>of</strong> the smallest voxel-cubes used in theprocess. After all, the smallest voxels are what determines the accuracy <strong>of</strong> the final voxelization;as size is reduced, the more 'true' the voxelization becomes. With this in mind, one (poor)implementation <strong>of</strong> a voxelization algorithm would be <strong>to</strong> first make a flat list <strong>of</strong> every minimallysizedvoxel needed <strong>to</strong> represent the final model. Given a flat list, one could then evaluate whichvoxels contain triangle geometry by performing a triangle-voxel intersection test for everyavailable triangle against every available minimally-sized voxel.Calculating the algorithmic cost <strong>of</strong> such an operation shows us just how computationallyexpensive that would be. Where M is the number <strong>of</strong> minimally-sized voxels <strong>and</strong> N is the number<strong>of</strong> triangles in the triangle mesh, our intersection tests would be O(M*N). Note that M isdependent upon the size <strong>of</strong> the input model. One calculates the number <strong>of</strong> minimally-sizedvoxels needed <strong>to</strong> represent the model by first taking the bounds <strong>of</strong> the model <strong>and</strong> calculatingmodel width, height, <strong>and</strong> depth. Then the maximum number <strong>of</strong> minimally-sized voxels possiblyneeded is equal <strong>to</strong> (model width/smallest voxel size)*(model height/smallest voxel size)*(modeldepth/ smallest voxel size). As the size <strong>of</strong> the model increases <strong>and</strong> the size <strong>of</strong> the smallest voxelsdecreases, M grows exponentially.Memory costs for s<strong>to</strong>ring all the triangle intersection data with this method are evenworse – one might call them prohibitively expensive. Best case, <strong>of</strong> course, would be a modeldesigned purposely with the intent <strong>to</strong> minimize the number <strong>of</strong> triangle-voxel intersections. Evenin that case, each triangle is bound <strong>to</strong> intersect at least a few minimally-sized voxels. Conversely,the worst case would be for every triangle <strong>to</strong> intersect with a very large number <strong>of</strong> voxels.Imagine, for instance, some model that is composed out <strong>of</strong> hundreds <strong>of</strong> thous<strong>and</strong>s <strong>of</strong> very largetriangles, ones that are practically the same width as the model they describe. It might be difficult<strong>to</strong> model such an object, since it would necessitate a very convoluted structure, but it could bedone. This intersection data would be crippling. Triangles <strong>of</strong> such size would intersect tens <strong>of</strong>thous<strong>and</strong>s <strong>of</strong> minimally-sized voxels, each <strong>of</strong> which would need <strong>to</strong> remember that fact for theray-tracing step <strong>to</strong> follow. A situation would arise where each <strong>of</strong> the hundreds <strong>of</strong> thous<strong>and</strong>s <strong>of</strong>voxels was remembering each <strong>of</strong> the thous<strong>and</strong>s <strong>of</strong> triangles which intersected it! In other words,