compression of polygon meshes of engineering models using ...a polygon % is represented as a...

19
Compression of Polygon Meshes of Engineering Models using Discovery of Repeating Geometric Features Dinesh Shikhare and S. P. Mudur National Centre for Software Technology, Gulmohar Cross Rd. 9, Juhu, Mumbai 400049, India. dinesh|mudur @ncst.ernet.in Abstract We present a new geometry compression technique particularly suitable for 3D mesh models of engineering class – architectural models, machine plants, factories, etc. We observe that such models have a number of repeating features at various levels of granularity. In most of the widely available models in this class, the geometric description of such features are also repeated, of course in their positions and orientations. The technique described in this paper automatically detects the repetition of features and also repetition of groups of features and then compactly encodes the geometry using a “master geometry – instance transform” heirarchy. The master geometry itself can be encoded using the most suitable geometry compression algorithm developed earlier and thus our work is complementary to all the earlier work in this field. We have implemented this technique and carried out tests on a number of representative large 3D models, including many that are freely available on the net. The results are excellent giving us high compression ratios for these models. 1 Introduction Very large 3D models documenting architectural designs, heritage monuments, chemical plants and mechanical CAD designs are being increasingly deployed in various applications involving interactive visualization and Internet based access. Very often the complexity of these 3D models far exceeds the limits of what can be quickly downloaded at popular connection speeds and what can be easily stored and rendered for interactive exploration on personal desktops. Compression schemes for such large 3D geometric models have thus become a subject of intense study in recent years. A brief review of these schemes is presented in the next section. A new 3D geometry compression technique, devised by the authors is presented after that and this is followed by the results from a straight forward implementation of this new technique. While a number of mathematical representations such as quadrics, bi-polynomials, NURBS, sweeps, Boolean operations etc. may be used during the initial creation of the 3D models, the final evaluated and stored representation is usually in the form of polygonal meshes, most commonly, triangle meshes. Many compression techniques have therefore focused on such triangle mesh representations. Quite naturally, specific compression schemes are best suited to specific classes of such complex 3D models with well distinguishable shape characteristics. There have been a few attempts to classify 3D models. These are normally based on some formulation for measuring the complexity of the shapes and their representations. An early attempt is by Forrest [11] in which he classifies geometric models along three axes: geometric complexity (lines, planes, curves, surfaces, etc.), combinatorial complexity (number of components, edges, faces, etc.) and dimensional complexity (2D, 2.5D, 3D). More recent attempts have tried to relate polygonal representations to shape factors [39, 2, 12, 19, 26]. The shape factor addresses the complexity measure along the geometric complexity dimension. For the work being reported in this paper, Forrest’s formulation is more applicable. This is because earlier methods address compression of the inherent shape complexity in singleton surfaces, where as our scheme addresses compression of geometric models with high combinatorial complexity. Some of the large 3D geometric models presently being worked upon in various computer graphics research laboratories around the world are shown in Figure 1 positioned in Forrest’s model classification space. The new 3D geometry compression technique that we present in this paper is particularly suitable for large digital 3D models of engineering class – architectural complexes, heritage monuments, factories, plants, etc. Unlike digital models of natural shapes such as terrains, anatomies, sculptures and so on, such engineering models invariably have a number of repeated components, e.g., windows, pillars, fixtures, etc. in different orientations and positions. Typically such models 1

Upload: others

Post on 16-Jul-2020

17 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

Compressionof PolygonMeshesof EngineeringModelsusingDiscoveryof RepeatingGeometricFeatures

DineshShikhareandS.P. MudurNationalCentrefor SoftwareTechnology, GulmoharCrossRd. 9, Juhu,Mumbai400049,India.�

dinesh|mudur � @ncst.ernet.in

Abstract

We presenta new geometrycompressiontechniqueparticularlysuitablefor 3D meshmodelsof engineeringclass–architecturalmodels,machineplants,factories,etc. We observe thatsuchmodelshave a numberof repeatingfeaturesatvariouslevelsof granularity. In mostof thewidely availablemodelsin thisclass,thegeometricdescriptionof suchfeaturesarealsorepeated,of coursein their positionsandorientations.

The techniquedescribedin this paperautomaticallydetectsthe repetitionof featuresandalsorepetitionof groupsoffeaturesandthencompactlyencodesthegeometryusinga “mastergeometry– instancetransform”heirarchy. Themastergeometryitself canbe encodedusingthe mostsuitablegeometrycompressionalgorithmdevelopedearlierandthusourwork is complementaryto all theearlierwork in this field.

We have implementedthis techniqueandcarriedout testson a numberof representative large 3D models,includingmany thatarefreelyavailableon thenet.Theresultsareexcellentgiving ushighcompressionratiosfor thesemodels.

1 Intr oduction

Verylarge3D modelsdocumentingarchitecturaldesigns,heritagemonuments,chemicalplantsandmechanicalCAD designsarebeingincreasinglydeployedin variousapplicationsinvolving interactive visualizationandInternetbasedaccess.Veryoften thecomplexity of these3D modelsfar exceedsthe limits of whatcanbequickly downloadedat popularconnectionspeedsandwhatcanbeeasilystoredandrenderedfor interactiveexplorationon personaldesktops.Compressionschemesfor suchlarge3D geometricmodelshave thusbecomea subjectof intensestudyin recentyears.A brief review of theseschemesis presentedin thenext section.A new 3D geometrycompressiontechnique,devisedby theauthorsis presentedafterthatandthis is followedby theresultsfrom a straightforwardimplementationof this new technique.

While a numberof mathematicalrepresentationssuchasquadrics,bi-polynomials,NURBS, sweeps,Booleanoperationsetc.may be usedduring the initial creationof the 3D models,the final evaluatedandstoredrepresentationis usually intheform of polygonalmeshes,mostcommonly, trianglemeshes.Many compressiontechniqueshave thereforefocusedonsuchtrianglemeshrepresentations.Quitenaturally, specificcompressionschemesarebestsuitedto specificclassesof suchcomplex 3D modelswith well distinguishableshapecharacteristics.

Therehave beena few attemptsto classify3D models.Thesearenormallybasedon someformulationfor measuringthecomplexity of the shapesandtheir representations.An early attemptis by Forrest[11] in which he classifiesgeometricmodelsalongthreeaxes: geometriccomplexity (lines, planes,curves,surfaces,etc.),combinatorialcomplexity (numberof components,edges,faces,etc.) anddimensionalcomplexity (2D, 2.5D, 3D). More recentattemptshave tried to relatepolygonalrepresentationsto shapefactors [39, 2, 12, 19, 26]. Theshapefactoraddressesthecomplexity measurealongthegeometriccomplexity dimension.For thework beingreportedin this paper, Forrest’s formulationis moreapplicable.Thisis becauseearliermethodsaddresscompressionof theinherentshapecomplexity in singletonsurfaces,whereasourschemeaddressescompressionof geometricmodelswith high combinatorialcomplexity. Someof the large3D geometricmodelspresentlybeingworkeduponin variouscomputergraphicsresearchlaboratoriesaroundthe world areshown in Figure1positionedin Forrest’smodelclassificationspace.

The new 3D geometrycompressiontechniquethat we presentin this paperis particularly suitablefor large digital 3Dmodelsof engineeringclass– architecturalcomplexes,heritagemonuments,factories,plants,etc. Unlike digital modelsof naturalshapessuchasterrains,anatomies,sculpturesandsoon, suchengineeringmodelsinvariablyhave a numberofrepeatedcomponents,e.g.,windows, pillars, fixtures,etc. in differentorientationsandpositions. Typically suchmodels

1

Page 2: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

CombinatorialComplexity

Geometric Complexity

DigitalMODELSSMALL

modelsDetailed machine

CAD models

MichelangeloTerrain

of machine parts

models likeaircraft, automobile

Architectural

models

Figure1: Classificationof 3D models:Geometriccomplexity versusCombinatorialcomplexity

consistof a largenumberof smallpolygonalmeshes,eachconsistingof up to a few hundredtriangles.In Figure1, thesemodelswould betypically positionedin theupperright triangularregion.

Our techniqueseeksto detectrepeatingshapefeaturesin the modelso that multiple instancesof a shapeor a groupofshapesneednot be storedin all detailsmultiple times. Although mostmodelinglanguageslike VRML [7] andmodelingtools like 3DStudioMAX [21] have facilities to modelrepeatinggeometriesas instancesof a prototype,in practice,onedoesin factencounterhugemodelshaving no instancestructureinformation.Re-engineeringsuchinstancingrelationshipsmanuallyis avery laborious,expensiveanderrorpronetask.Thefundamentalcomponentof our techniqueis theautomaticidentificationof repetitive geometricfeaturesin a largegeometricmodelat threedifferentlevelsof granularity– featureswithin andacrosscomponentshapes,featueresat thegranularityof componentshapesandalsoat a macro-level of groupsof features.

The model is thencompactlyencodedusinga “mastergeometry– instancetransform”hierarchy. The mastergeometryitself canbe encodedusing the mostsuitablegeometrycompressionalgorithmsdevelopedearlierand thusour work iscomplementaryto all of theearlierwork in this field. To thebestof our knowledge,oursis thefirst significantattempttoaddresscompressionof geometricmodelswith highcombinatorialcomplexity.

1.1 Summary of Contributions

Our work representsthefollowing significantcontributions:

1. In thispaperwepioneertheideaof compressinggeometryof 3D polygonalmeshmodelsby removing theredundancyin therepresentationof repeatinggeometricfeaturepatterns.

2. We presentinnovativeuseof patternmatchingtechniquesfor thepurposeof automaticdiscoveryof repeatingfeaturepatternsin 3D polygonalmeshmodels.

3. Somesimpleideashavebeenintroducedfor efficient implementationof ouralgorithmfor compressionusingdiscov-ery of repeatingfeaturepatterns.

4. Ourcompressionschemecanincorporatethebestresultsachievedin theareaof connectivity compressionof polygonmeshes,therebyalwaysachieving compressionperformancesat leastasgoodasthosereportedin the literature[22,25, 15]. In fact for engineeringmodels,our techniquegiveslargebenefitswhich cannotberealisedby simply usingtheconnectivity compressionalgorithms.

Therestof thispaperis organizedasfollows. In thenext section,webriefly outlinethepreviousart in theareaof compres-sionof 3Dpolygonmeshmodelsanddescribehow thepreviouslydevelopedtechniquesdonotfully exploit theredundancies

2

Page 3: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

in engineeringmodels.In section3, we describein detailthedifferentschemeswehavedesignedfor thediscoveryof geo-metricfeaturepatternsthatrepeat.Wealsoanalysethebenefitsof usingthediscoveryof repeatingfeaturesfor compressionof large3D models.In thefollowing section4 wepresenttheresultsof ourexperimentswith somerepresentativeengineer-ing models.Finally we concludewith otherpotentialusesof the techniquesfor discovery of repeatinggeometricfeaturesin polygonmeshmodels.

2 Previous Work

This sectionprovidesa brief review of thedifferentschemesdevisedfor compressing3D polygonalgeometricmodelsandtheir applicabilityto largemodelsof theengineeringclass.

2.1 SomePreliminary Definitions

Polygonmeshmodelsaretypically definedin termsof (a)geometry– thecoordinatevaluesof verticesof themeshesmakingup the model,(b) connectivity– the relationshipamongthe verticeswhich definesthe polygonalfacesof the mesh(alsocalledastopologyof themesh),and(c) attributes- suchascolor, normalandtexturecoordinatesat thevertices.

Otherinformationsuchastextureimagesandmaterialpropertiesarealsocommonlypresentasapartof themodels,usuallyassociatedwith meshesor groupsof meshes.

A polygonalmeshmodel� consistsof aset � of polygonmeshesandassociatednon-geometricproperties.A polygonmesh��� � consistsof a set � of vertices,a set � of edgesanda set of polygons.Eachvertex correspondsto a point positionfrom theset ��� ���� ������� . An edge� is representedasa pair ����� �!�#" $ of referencesinto the list of vertices.A polygon% is representedasasequence�&���#�!�#"'�)(*(+(*�!�',�$ of referencesinto thelist of vertices.A triangle meshis aspecialcasehavingall triangularpolygons.Generallyin theactualrepresentation,edgesareimpliedandnot explicitly stored.

A meshhaving eachedgesharedby at mosttwo polygonsandat leastonepolygonformsa manifold. A meshhaving anedgesharedby morethantwo polygonsrepresentsanon-manifold. A meshmodelrepresentingamanifoldsurfaceis closedif all edgesaresharedby 2 polygons,otherwiseit is open.

In a meshmodel � , we call two polygonsasneighbouringpolygonsif they sharean edge. Thereexists a path betweenpolygons% � and %.- if thereis a sequenceof neighbouringpolygons% � � % � � % " �)(*(+(*� %/- . A subset�10 of themeshmodel � iscalleda connectedcomponentif thereexistsa pathbetweenany two polygonsin �10 . Note thata givenmeshmodelmayhave multiple connectedcomponents.A meshcanbe trivially decomposedinto its connectedcomponentsusingsimplelabellingalgorithm.

Whenderiving a compactencodingfor 3D models,therearethreeprocessesthatwork on a polygonalmeshmodel � andarein somesenserelated:compression,simplificationandprogressivedisclosure.

Compressionis theprocessof deriving a new encodingfor a givenpolygonalmeshmodel � suchthat thenumberof bitsneededin thenew encodingis muchsmallerthanthenumberof bits neededfor theuncompressedrepresentation.If 23�4�5$and 63�7�5$ denotethenumberof bits for theuncompressedandthecompressedversionsrespectively, thenthecompressionratio is definedas

6 � � 23�7�5$98:63�4�5$2;�7�5$ (

Compressionis saidto be lossyif thedecompressionprocesscannotgivebacktheoriginalpolygonmeshmodelexactly.

Simplificationis the processof deriving a new representation��< , often referredto asan imposter, for a given polygonalmeshmodel � by which ��< becomessimplerto dealwith normally for renderingpurposes.This is usuallyin theform oflessernumberof meshesor polygonsor verticesandtheeliminationof fine detail in geometryandassociatedinformation,etc. Clearly simplificationis a kind of lossycompression.A comprehensive review of simplificationtechniquesmay befoundin [18].

Progressivedisclosure is theprocessof deriving a new representationof a givenpolygonalmeshmodel � , which enablesoneto transmita coarserepresentationof the modelfirst andsubsequentlytransmitthe detailsto refineit. Compressionstrategieshave beenusedin the progressive representationof modelsto alsomake the entiretransmissiondatacompact.Many groupshave developedcompressionschemesincorporatingprogressive disclosurecapabilities[6, 32, 35, 36]. Theschemesthatcombinecompressionandprogressivedisclosurealwayshave a trade-off betweencompressionandtheaddi-tionaldataneededfor progressiverepresentationof themodels.

3

Page 4: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

2.2 GeometryCompressionStrategies

Mostof thegeometrycompressionstrategieshave two distinctcomponents:

1. Compressionof topology or the connectivityinformation. This is usuallydoneby reducingrepeatedreferencestoverticesthataresharedby many polygons/triangles.

2. Compressionof geometricdata. This is achieved by reducingthe precisionwith which coordinatevalues,normalvectorcomponents,etc.arerepresentedandby removing highly detailedfeaturesusingtechniquesfrom signalpro-cessing.

2.2.1 Connectivity Compression

A largebodyof geometrycompressionresearchhasconcentratedoncleverencodingof theconnectivity amongtheverticesin the mesh. Typically, the numberof trianglesin a meshis roughly twice the numberof verticesand eachvertex isreferencedin 5 to 7 triangles,whichmeansthatlargepartof therepresentationof themodelis thedefinitionof connectivityamongthevertices.Schemesthatminimizerepeatedreferencesto verticesobviously resultin compression.

Almostall of theconnectivity compressiontechniques[16, 22, 33, 37, 38] encodetriangle/polygonconnectivity in alosslessmanner. Triangle-triangleadjacency is exploitedby arriving at a suitableorderingof the triangles,suchastrianglestripsandtrianglefans[42]. Recenttechniques[38, 16] constructspiralingtrianglespanningtreesin whichverticesarelabeledintheorderin which they arefirst encounteredin thetriangletree.By definingasmallsetof operatorsto encodethetraversaloverthetriangleshighcompressionratioshavebeenachievedfor connectivity encoding,typically afew bitspervertex [33].

Most of the above referencedcompressionschemesconcentrateon trianglemeshmodelsrepresentingmanifoldsurfaces.A numberof researchershave devisedandextendedcompressionalgorithmsto handlenon-manifoldsurfacesandmoregeneralpolygonmeshmodels[22, 25, 15].

2.2.2 GeometricData Compression

Deering[9] usedquantizationof coordinatevaluesfrom 32bits to 16bits,a9-bit index into agloballist of valuesfor vertexnormalsanda15-bit representationof colorvalues.Althoughthisstrategy of reducingdatais blatantlylossy, it is usableaslongastheresultsfor interactivevisualizationarenotdeteriorated.

Use of Predictors: Quantizationof coordinatesand color valuesleadsto an indiscriminatetruncationof the accuracyregardlessof the featuresin the geometricmodels. Predictive encodersperformmuchbetterby taking advantageof thecoherencein the datato predict the valueof the next elementin the sequence.Predictorsaredesignedso that mostoftheerrorvaluesaresmallandonly a few arelarge. Theseerrorvaluescanthenbequantizedeffectively andthenentropycodedfor compactrepresentation.Taubin and Rossignac[37] uselinear predictors;Toumaand Gotsman[38] usetheparallelogram rule to predict subsequentvertex positionsin triangle sequences;and Pajarolaand Rossignac[32] haveintroducedabutterflypredictorscheme.

SignalProcessingTechniques: Signalprocessingbasedtechniqueswhich have beenin usefor surfacefairing [34] andmultiresolutionanalysis[17] arebasedon theconstructionof a setof basisfunctionsfor decompositionof a trianglemeshinto signals.Thelow frequency componentsin thesignalscorrespondto smoothfeaturesandhigh frequency componentscorrespondto discontinuitiessuchascreases,folds andcorners. Retainingjust a few frequency componentssufficestocapturetheoverall perceptualshapeof themodel. This compressionschemeis analogousto the JPEG imagecompressionalgorithm[29]. Thespectral compressioneffort of Karni andGotsman[23] andwaveletbasedtechniqueof Khodakovskyet al [24] areexamplesof this.

2.3 Applicability to Lar geEngineering 3D Models

Almostall of theaboveresearchhasconcentratedon thecompressionof largemodelshaving a few connectedcomponents– oftena singlemeshof a complex surfacewith continuouslyvaryingcurvature– formedby a densecollectionof a largenumberof small polygons(mostly triangles). The graphtraversal techniquesare bestsuitedwhen we have very longtraversals.Longerthetraversalsequence,smalleris theaveragecostof representation.In mostmodelssuchasarchitectural,urbanplanning,entertainment,etc.,mesheshave associatedtexture maps. In order to capturedifferenttexture mapping

4

Page 5: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

coordinatesat thesharedvertices,theverticesarerepeated.Dueto this conditionof thedata,reducingrepeatedreferencesto verticesandcreatinglonggraphtraversalsdoesnot generallybecomepossible.

Bajaj et al [3] presentcompressionof CAD models.However, their techniqueis basedon encodingtheconnectivity usingbredth-firsttraversal.Their approachis not muchdifferentfrom theothertechniquesandwill have thesamelimitationsasdescribedearlier.

We mustalsonotehere,thatboth predictive encodingandthe signalprocessingapproachwork bestfor smoothsurfaceswith densemeshesof smalltriangles.Signalprocessingtechniquesalsorely heavily onthespecificconnectivity of themeshfor deriving thebasisfunctions[24]. Very large3D geometricmodelsof theengineeringclassusuallyhavea largenumberof meshes,with smallnumbersof largetriangles,oftenwith arbitraryconnectivity. ThearchitecturalandmechanicalCAD

modelstypically havemany non-smoothmeshesmakingthesemethodsnot thebestsuited.

3 Discovery of RepeatingFeaturePatterns for Compression

The basicapproachin our compressionschemeis to look for redundancy in a geometricmodel in the form of repeatinggeometryof nearidenticalshapefeaturesandtheneliminatethis redundancy by suitablyencodingthecomponentshapesandtheir repeatinginstances.

Figure 2: Part of the Capitol building model having 36 instancesof a shapefeatureconsistingof 68 verticesand 132triangles.Eachvertex is definedwith �=�!>?�A@ coordinates,avertex normalandtexturecoordinates.

Theshapefeatureswe seekareat differentlevelsof granularity:

B Connectedcomponentsin polygonmeshes: Engineeringmodelstypically have many componentsrepeatingin theform of identicalmeshesappearingin differentpositionsandorientations.For example,in a machineplantmodel,nuts,bolts, fasteners,etc. repeatmany times; in architecturalmodelsit is commonto seestructureshaving manyidenticalparts(seeexamplein Figure2). We denotethesetof suchfeaturesdiscoveredin amodelasfeaturesof typeC � .

B Subsetsofconnectedcomponentpolygonmeshes: Oftenthesemodelshavefeaturesrepeatingwithin oracrossmeshes.For example,in a mechanicalCAD model,a meshrepresentinga gearhasmany teeth.Eachof theteethcorrespondsto afeatureof thiskind. Wedenotethesetof suchfeaturesdiscoveredin amodelasfeaturesof type

C " . (Seeexamplein Figure3).

B Aggregatesof repeatingfeatures: Groupsof disjoint featuresare also found to repeatin many 3D models. Ouralgorithmdiscoverssuchmacro-level aggregatefeatureswhich maybecomposedfrom featuresof type

C � andC " .

Examplesof suchmacro-level featuresareoften found in architecturalmodelswheretherearemany pillars, whereeachpillar is madeof multiple features.

Ouralgorithmautomaticallydetectssetsof featuresC

(whichmaybeof typeC � , C " andtheiraggregates)thatrepeatwith a

rigid bodytransformationswithin themodel � . WealsoderivethetransformationDFE �1�HGI�1� , for eachrepeatinginstanceof a featureto enablecompactencodingin theform of “mastergeometry– instancetransform”hierarchy.

5

Page 6: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

Figure3: Repeatingfeaturepatternsin mechanicalCAD models.Featuresrepeatat the granularityof subsetsof meshes.Thesefeaturesrepeatwithin a meshandalsoacrossthemeshes.

In agivenscene,onedoesnotknow whichrepeatingfeaturepatternsto expect.Hence,thetraditionalapproachof matching3D objects[43, 4, 40, 31, 30] by maintainingadictionaryof featuresandthenlooking for thosefeaturesin thegivenmodelis not applicablefor our work. Our goal is to discover repeatingfeaturepatternsin a polygonmeshmodelautomaticallywithout using a knowledgebaseof known features. We have createda simple and genericalgorithm for discovery ofrepeatedfeatures.

Hereis a brief sketchof our algorithmfor compressionof 3D modelsusingdiscoveryof repeatinggeometricpatterns:

1. Normalization: Sincethegeometricfeaturesmayoccurin themodelin any positionandatany orientation,weobtainarotationandtranslationinvariant1 representationfor facilitatingmatchingof shapefeatures.A desirablecharacteristicof normalizationprocessis that it shouldbeablegeneratean index into a hashtablefor immediategroupingof theidenticalfeatures.Hashingprovidesequivalenceclassesof featuresof themodelwhich canbegoodstartingpointsfor discoveryof completefeaturesthatrepeat.

2. Growthof repeatingfeatures: Within eachequivalenceclassobtainedasmentionedabove,a simultaneousgrowth offeaturesis attemptedaroundtheneighbourhoodof eachmemberof a class.With every stepin growth, a geometricmatchiscarriedouttoverifythepattern.DuringverificationwealsoobtainthetransformationD for instancetransformrepresentationandsubsequentreconstructionof theoriginalpositionandorientationof thefeaturepattern.

3. Constructionof macro-level features: A set of disconnectedfeaturesthat repeatacrossthe model have the sametransformationassociatedacrossthe elementsof the set. Aggregationof featureshaving identical transformationsgivesusmacro-level featuresthatrepeat.Thisaggregationcanbecarriedoutat multiple levels.

4. Compactencoding: Oncehierarchicalrelationshipsacrossthe repeatingfeaturesarefound, a “mastergeometry–instancetransform”informationis encodedcompactly.

This overall schemeis verygenericin natureandcancaterto variouskindsof models.Thespecificuseof this schemecanbecustomizedto capturespecialfeaturesin a givenclassof models.In thefollowing subsections,we describein detailthetechniquesusedfor detectingrepeatingfeaturepatterns.

3.1 Feature Patternsat the Level of ConnectedComponents

In mostengineeringmodelswe observedthat therearea largenumberof small to mediumsizedconnectedcomponents,eachhaving upto a few hundredpolygonson an average. The examplesin Figure4 show variousmodelshaving many

1Notethatit is possibleto extendthis invarianceto non-uniformscaling,reflectionandshear.

6

Page 7: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

Figure4: Repeatingfeaturepatternsin large engineeringmodels. Thesemodelshave multiple repeatingfeatures,manyoccuringat thegranularityof connectedcomponents.

connectedcomponentsrepeatingin differentpositionsandorientations.For thepurposeof compression,it is bestto detectredundanciesat a granularityas large aspossible. Henceasa heuristicdecisionderived especiallyfor the engineeringmodels,we carryout discoveryof repeatedfeaturepatternsat thelevel of connectedcomponentsin thegivenmodel.

For modelshaving repeatingfeaturepatternsat the granularityof connectedcomponents,we usethe following stepsforcompression:

1. split the model into connectedcomponentsand pre-processthe the model to remove any erroneouslyreplicatedgeometry,

2. carryout discoveryof repeatingfeaturepatternsat theconnectedcomponentlevel (describedin detail in 3.1.1),

3. build a hierarchyof “mastergeometry– instancetransform”amongthefirst occurrencesandrepeatingoccurrencesof thefeaturepatterns.

4. acrossall thefirst occurrencesof thepatternsatthelevelof connectedcomponents,carryoutsub-meshleveldiscoveryof repeatingfeaturepatternsfor compactencodingof featuresat asmallergranularity(asdescribedin 3.2).

5. constructaggregatesof featuresby groupingrepeatedoccurrencesof featureshaving identicaltransformations(de-scribedin 3.3).

3.1.1 DetectingRepeatingConnectedComponents

Matchingpolygonmesheshasbeenanactiveareaof researchin therecentyears[43, 8, 4, 40, 31, 30]. Many sophisticatedalgorithmshavebeendevelopedfor robustmatchingof similar shapes.In our implementationwe have useda simpletech-niquebasedonprincipalcomponentanalysis(PCA) thatusesHotellingtransform[13] to determineanormalizedorientationof a givenpolygonalmeshfor matchinggeometry. We have extendedPCA to overcomethelimitation of ambiguousresultin casesof completelysymmetricmassdistribution. While this is very simpletechnique,it hasgivenusvery goodresultsaswewill seelaterin thispaper.

Pre-processing:In an actualimplementationof this scheme,we alsoneeda preprocessingstagethathealsthegeometryin the model. Healinginvolvesremoval of erroneousandinvalid geometricentities,say, spuriousor duplicatedvertices,edgesandfaces.This is requiredbecausemany modelshavetheseproblemsin data,resultingin avoidableinefficiency and

7

Page 8: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

errorsin furtheranalysisanduseof thesemodels.This is a onetime operationandneednot be consideredaspartof thecompressionscheme.

Thepreviouswork on healing,alsosometimesreferredto asCAD-datarepair[5, 10, 27] addressesthemismatchbetweenthegeometrycreatedor exportedby modelersandthespecificrequirementsimposedby the end-applications.Almost allgeometricmodelscreatedusingany of thestandarddesign/modelingtoolsrequirehealingto handlethis mismatch.

Removal of ErroneouslyRepeatedGeometry:In almostall the modelsthatwe have usedfor testingour implementation,we have found that the modelshadavoidableduplicatesor multiplesof geometricdata,for example,many verticeswithidenticaltriples( �J>.@ -coordinates,vertex-normal,texture-coordinates).In ourpre-processingstage,weremovesuchredun-dantverticesin thedata.PCA is verysensitive to spuriouslyduplicatedvertices.Hencethis stageof pre-processingprovedextremelyimportantfor the modelswe workedwith. We have alsofound in someof the models,overlappingpolygons,danglingedgesandmissingtextures.Identificationandrepairof suchartifactsis a complex problemandmoreautomatedtoolsneedto bedevelopedto healsuchcomplex problems.

Splitting Meshesinto ConnectedComponents:The sourcegeometryhasmesheswhich may containmultiple connectedcomponentsor partsof multiple connectedcomponents.At timesthe sourcepolygonalmeshmay containonly a part ofa connectedcomponent.This happensbecausemostmodellerstendto groupall thepolygonshaving sameattributeslikematerialandtexture into a singlemesh.Henceit is commonto comeacrossan architecturalmodel,for example,with afew pillars andsomeunconnectedwalls in themodelforming a singlemesh.We reorganizethetotal setof polygonsin thesourcemodel into a new setof meshessuchthat eachmeshin the reorganizedmodel is a connectedcomponent.This isdoneusingastraightforwardrecursive labellingalgorithmof �3��KL$ complexity.

While this intermediaterepresentationmaybesometimesslightly verboseascomparedto theoriginal collectionof poly-gons,it is necessaryin thesubsequentstepsof our techniquefor detectingnearidenticalcomponents.Splitting thesourcegeometricdescriptioninto smallerconnectedcomponentsalsooftenprovidesa finer granularityfor detectionof repeatingcomponents.

Normalized Orientation: We first obtaina normalizedorientationfor a givenmesh.An orthonormalbasisin 3-spacethatdescribestheeccentricitiesof themeshirrespectiveof theorientationis computedusingtheHotellingtransformation.Usingthis basisasa purerotationmatrix,ameshis broughtto anormalizedorientation.

TheHotelling transformationis basedonstatisticalpropertiesof vectorrepresentations.Wetakethelist of verticesdefiningthemeshasa clusterof points M�N �� � ��(+(*(+�A��O � for thefollowing steps.

1. Determinethecentroidof theclusterof thepoints:

P �QK

OR�*S=� ���

2. Obtainthecovariancematrix, 6 , as:

6N�QK

OR�+S=� ���7��T� 8 PFP T

This is a symmetricmatrixandits eigenvectorsaremutuallyorthogonal.

3. Determineeigenvectorsandcorrespondingeigenvaluesof thecovariancematrix. Sort theeigenvectorsin increasingorderof eigenvalues.Normalizetheeigenvectors.

4. Usethethreenormalizedeigenvectorsto constructapurerotationmatrix � .

� is the orthonormalbasisthat describesthe eccentricityof the mesh. If UWVYX representsa translationby vector 8 Pcomputedin Step1 above,thecompositetransformUWVYX[Z � placesthemeshin a normalizedorientationat theorigin 2.

The orthonormalbasisdeterminedusingthis methodis quite sensitive to any straygeometrythat may be presentin themodel.Hencewehave foundit necessaryto cleanup themeshesof any unusedverticesandduplicatedtriangles.

Our Implementation for Matching Components: We usethesimpletechniquedescribedbelow to determinetheextentof matchbetweentwo connectedcomponents.

2It hasbeenusedearlierby Gottschalket al [14] in their work to obtainanorientedboundingbox (OBB) for a given setof points. On obtaininganorientedbasisfor agivenmesh,theextremalverticesalongeachof thevectorsin thebasisgive thesizeof theorientedboundingbox.

8

Page 9: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

1. Obtaincentroids,orthonormalbasisfor the two componentsandthe dimensionsof their OBBs asdescribedin theprevioussubsection.Let usdenotethecomponentsas �\0 � , �10 " , their centroidsas P � , P " andtheorthogonalbasesrepresentingtheir respectiveeccentricitiesas � � , � " .

2. If thedimensionsof theOBBscorrespondingto thetwo meshesdo not matchthenthereis no matchpossible.

3. Matchthenumberof verticesandnumberof trianglesin eachof thecomponents.If thedifferenceis greaterthan5%,thenthereis no match.We do not seekexactequalityin numberof verticesandtrianglesacrosscomponents.This isto accommodatetheexistenceof commonlyfoundstraygeometrythatmight escapethepre-processingphaseof ourscheme.

4. We obtainthe transformationneededto align mesh� 0 � with mesh� 0 " asa compositionof thefollowing sequenceof transformations:

(a) translateby 8 P �(b) rotateby usingthetransformation:

Rot E]� � " Z � V ��(c) translateby P "

Usingthis transformation,wealign thetwo meshesfor matchinggeometry.

5. Wethencarryoutafuzzycomparisonof positionsof verticesandedgesacrossthemeshes.If thegeometrysoalignedmatchesagainupto 95%,thenwedeclaremesh�\0 " to beaninstanceof mesh�\0 � andalsorecordthetransformationcompositedas U=V?X_^`Z Rot Z�UaXcb requiredto reconstruct�10 " from �\0 � .

Matchingverticesimpliesmatchingtheirpositions,texturecoordinatesandvertex normals,if they aredefinedfor thegivenmodel.

Thismethodof matchingmeshesis tolerantto smalltopologicalandgeometricaldifferencesbetweenmeshesbeingtested.Also it canhandlemanifoldsandnon-manifoldsuniformly andis not restrictedto trianglemeshes.

First

MeshesInstance

Mesh j

Geom + Conn + Attrib

Mesh k

Geom + Conn + Attrib

Mesh Instance

T4

Mesh Instance

T3

Mesh Instance

T2

Mesh Instance

T1

Mesh Instance

T4

Mesh Instance

T5

Mesh Instance

T3

Mesh Instance

T3

Mesh Instance

T5

Mesh Instance

T3

Mesh Instance

T4

Mesh Instance

T6

Mesh Instance

Tp

Mesh Instance

Tm

Mesh Instance

Tn

Mesh i

Geom + Conn + Attrib

DEF DEF DEF

USE

USE

USE

USE

USE

USE

USE

USE

USE

USE

USE

USE

USE

USE

USE

DEF:

USE:

First Occurrence

Repeating occurrence

Tx: Transformation

Figure5: Creationof equivalenceclassesof features.

Oncewe have detectedsimilarity of the differentmeshesin the geometricmodel,we canpartition the entiremodel intoequivalenceclassesasmentionedearlier. All similar meshesbelongto a singleclass.Figure5 illustratestheconstructionof equivalenceclassesof mesheshaving similar geometriesasUSE-instancesof thefirst occurrenceof thegeometrywhichis taggedasthe DEF-instance.A USE-instanceis representedasa namereferenceto the DEF-instanceandthe rigid bodytransformationrequiredto reconstructtheoriginal mesh.The transformationis representedin the form of a purerotationencodedasa quaternionanda positionvectorcorrespondingto the locationof centroidof the USE-instance.The DEF-instancesarerepresentedin full detailsincludinggeometry, connectivity andattributes.

9

Page 10: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

Overcoming limitations of PCA: While attemptingto matchtwo componentsusing PCA ambiguity canarrise. If theeigenvectorsof thecorrelationmatrixareverydifferent,it is easyto find thecorrectcorrespondenceacrosstwo componentsbeingmatched.But whenthe componetshave a completelysymmetricalmassdistribution, eigenvectorswill be similar.Examplesof sucha caseare: a cylinder which hasa symmetricalmassdistribution aboutanaxisanda spherewhich hassymmetricalmassdistributionaboutthecentreof mass.

This limitation of PCA is overcomeby a minimizationprocedureto obtainthebestrotationtransformationfor matchingofcomponents.This procedureis similar to thatproposedby Novotni andKlein [30]. Considerall possiblerotationsaroundtheaxisor centrepoint of symmetrychoosetherotationcorrespondingto themaximummatch.Thus,for a singleaxisofsymmetry, � is givenby � �ed;f�ghWi*j�k �7lm� � �7nW$`�o�10 � �p�\0 " $)q r �:s t �ou#v?wx$where n denotesthe angleof rotationaroundthe axis of symmetry, � �7nW$ denotesthe rotationand lm� � ��ny$z�o�10 � �p�\0 " $denotesthedegreeof matchbetweenthecomponents�\0 � and �\0 " when �10 " is alignedwith �10 � asdescribedearlier. Incaseof sphericalsymmetrythecorrectalignmentis obtainedas

� � d;f�ghWi*{�| j.| }Jk �7lm� � �4r=�An~�!�c$`�o� 0 ���p� 0 "�$)q r �:s t �ou#v?w4�A� ��s t �Av?w4�A� �:s t �pu�v?w&$

wheretheangles�4rL�on��A�c$ denoteEuleranglesfor parameterizationof three-dimensionalrotations.

Therotationspaceis discretizeduniformly to consideruniformly distributedsamples.For a cylindrical symmetry(wherethe massis symmetricalaroundoneof the principal axes), this is an efficient approach.However in casesof sphericalsymmetrythisapproachis impracticaldueto thelargenumberof configurations.Fortunately, componentshaving sphericalsymmetryarevery rarein practice.

3.1.2 AccelerationTechniques

A naive implementationof theaboveschemeof discoveringidenticalconnectedcomponentlevel featuresin themodelhasacomplexity of �3��K " $ , whereK is thenumberof commectedcomponentsin thegivenmodel.In mostengineeringmodels,K tendsto be large. It is very inefficient to compareeachcomponentlevel featurewith every othercomponentandcarryout a geometricmatch. A methodthatallows an accessto smallerclassof componentsfor this matchis incorporatedinour implementation.Our techniqueis in thespirit of what is known asgeometrichashingandindexing in computervisionliterature[20, 41]. While theworstcasecomplexity evenafterhashingis �3�&K " $ , for mostpracticalsituationsthespeedupachievedis substantial.

To achievehashingof componentssuchthatcandatesfor detailedgeometricmatchingareput into thesamebucket,weneedsomeinvariantdescriptors.Thesedescriptorsmustbeinvariantto theorientationandpositionof thecomponentsbut musthave identicalvaluesfor identicalfeaturecomponents.Someexamplesof suchinvariantpropertiesare:

B dimensionsof theorientedboundingboxof thecomponent,

B surfaceareaof thecomponent(thiscanbetrivially computedbyaddinguptheareasof thetrianglesof thecomponent),or

B a simplecombinatoricdescriptorsuchasnumberof verticesandtrianglesin thecomponent.

In our implementation,we carryout hashingusingthenumberof verticesandtrianglesfor hashing,andbeforeperforminga detailedwe checkif thedimensionsof theOBBs alsomatch.

Matchingtwo alignedcomponents� and � having K verticeseachis aprocedureof �3�&K " $ complexity. It is sobecausethecorrespondencebetweenverticesof thetwo componentsis notknown. Henceeachvertex of mesh� mustbecomparedwitheveryunmatchedvertex of mesh� to determinethecorrespondenceandalsothecountof matchingvertices.Thisprocedureis easilyacceleratedby discretizingthe3D boundingbox of thefeaturecomponentsinto uniform cellsandclassifyingtheverticesacrossthesecells. Thetestfor correspondenceis thenperformedonly amongtheverticesof thetwo componentsthatlie within acell. Theworstcasecomplexity of thisprocessalsotendsto be �3�&K " $ for therarepathologicalcaseswherealmostall their verticesareclusteredin a few regionsof their boundingboxes.

10

Page 11: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

3.2 Sub-meshLevel FeaturePatterns

The problemof discovering repeatingpatternswithin or acrosspolygon meshesrepresentingconnectedcomponentsisdifficult. Thedifficulty lies in automaticpartitioningof themeshesto cut out somepartsthat representrepeatingpatterns.We approachthis problemby our techniqueof “growing” patternsbottomup from the granularityof vertices.To enableeffectiveclassificationof verticesin a givenmodel,we assigninvariant footprints3 to eachvertex in themodel.A footprintcanbea scalaror vectorvaluewhich mustbeinvariantunderrotationsandtranslations,andshouldbe“descriptive” in thesensethattwo verticesshouldbesaidto representthesamefeatureif thestructureformedby theirrespectiveneighbourhoodsis mostly identical. Also, the footprintsmustenableus to effectively discriminatebetweentwo verticesif they belongtodifferentfeaturesin thelocal neighbourhood.

More formally, to form a footprint we mustselectinvariantproperties�Y�7�a$ over thefeatures� � Cin themodelsuchthat

undera lineartransformation�<��eUH of coordinates,���4�a$��e�Y�&U��4�a$!$ . In our implementationwehavesoughtinvarianceto rigid-bodytransformationD .

Examplesof invariantpropertiesthatcanbecomefootprintsfor a vertex � in a polygonmeshare: (a) q ���.q , thenumberofverticesconnectedto � , where� � is thesetof verticesconnectedto � . Theelementsof � � arealsocalledtheneighbourhoodof � , (b) � � , the averageof the lengthsof the connectededges,(c) � � , the averageof the dihedralanglesof the facesmeetingat theedgesconnectedto vertex � . Thesepropertiesaredescriptiveof thelocal features:q � � q describesthedensityat thevertex � , � � describesthesizeof thefeature,and � � approximatesthesurfacecurvatureat vertex � . In additiontotheseinvariantpropertiesbasedon thefirst orderneighbourhoodof thevertices,we canalsousefootprintscomputedoverhigherorderneighbourhoods.Wehaveexperiencedthatthehigherorderinvariantquantitieshelpin distinguishingbetweenfeatures.In ourimplementationweuseavectorfootprintconsistingof q � � q , � � , � � andasecondorderfootprintelementintheform of averageof � - where� � � � . A simpledistancemeasurehasbeenconstructedfor determiningthesimilarity ordisparitybetweentwo givenfeaturesin thespacedefinedby thefootprints.For engineeringmodelsthiscompositefootprinthasperformedverywell.

We describeouralgorithmof discoveringrepeatingsub-meshlevel featurepatternsasfollows:

1. Computation of Footprints:

(a) Computethefootprintsfor eachvertex � in themodel.

(b) Createequivalenceclassesof verticeshaving near-identical footprints. Let us denoteequivalenceclassesas6c� , andthe setof equivalenceclassesas 6 . The verticeshaving identicalfootprintsrepresentmatchinglocalfeaturesandarelikely to form goodstartingpointsfor the“growth” of identicalpatternsaroundthem.

(c) Mark all theverticesasnot visited.

2. Growth Phase: This phaseattemptsa simultaneousgrowth of the patternsaroundthe verticesin the equivalenceclasses(seeds).Theconnectivity in thepolygonmeshis consideredasagraphwith verticesasthenodesof thegraphandthe sidesof the polygonsconnectingverticesmakingup the edgesin the graph. Consideringoneequivalenceclassat a time,a bredth-firstgrowth is carriedour simultaneouslyaroundeachseed,while geometricallyverifying ifthepatternsmatchaftereachstepin traversal.

This phaseis appliedto eachequivalenceclass6c� :(a) Associatea patterncontainerwith eachvertex in thecurrentequivalenceclass.A patterncontaineris a struc-

tureconsistingof current seed, current neighbourhood, a queueof bredth-firsttraversalbf q, a list of verticesmakingup thepatternpattern. Initialize thequeuesof eachof thepatternsby insertingthecorrespondingseedvertex.

(b) While thequeuesbf q arenot empty:

i. For eachpattern,current seed� headof thequeuebf q.

ii. For eachpattern,current neighbourhood����0�� �A�p��O�� ������� . Theelementsof theneighbourhoodaresortedin thenon-decreasingorderof theeuclideandistanceof theseedfrom theneighbour. This neighbourhoodcontainsonly thoseverticeswhich arenot markedasvisited. If current neighbourhoodis non-emptyforlessthantwo patterncontainers,skip this iterationin theloop.

3We have borrowed the term Footprint from the work of Barequetand Shariron Partial SurfaceandVolumeMatching in ThreeDimensions[4].However ourdefinitionanduseof footprintsaresignificantlydifferent.

11

Page 12: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

iii. Matchtheneighbourhoodsbycomparingthefootprintsof thecorrespondingelementsin current neighbourhood.(Note: Within an equivalenceclass,it is possibleto obtainmultiple typesof repeatingpatterns.Careistakento do all thehousekeepingto keeptrackof thesemultiple growths.To trackthemultiple patternsthepatterncontainerhasanelementref pointingto thenext matchingpatternsothatrepeatingpatternscanbetrackedduringthesimultaneousgrowth.)

iv. To eachpartialpatternof currentloop,applytheVerificationStep(3) to verify thatthepatternsareinstancesof thesamefeaturesobtainableby rigid-bodytransformations.If thepatternsatthislevelof growthmatchthenaddtheelementsof theneighbourhoodto thecorrespondingqueuesbf q. Also addthematchedverticesto thecorrespondingpatternlists.

v. Theverticesthatareaddedto patternsaremarkedasvisited.

3. Verification Step: This phasehastwo purposes,firstly verify geometricmatchbetweenthe two featuresidentifiedassimilar basedon their footprintsandconnectivities,secondlydeterminethetransformationD . Giventwo patternsrepresentedasa two sequencesof verticeshaving oneto onecorrespondence,thepatternstestedfor amatch:

(a) selectsomethreenon-collinearverticesfrom onepatternandthe correspondingsetof threeverticesfrom theotherpattern,

(b) determinethetransformationto align thesetwo setsof vertices,

(c) transformthetwo patternsusingthis transformationandverify if thecorrespondingverticesin thetwo patternsmatchgeometricallywithin a tolerance.

This algorithmreturnsa setof patternswhich correspondfeaturesthat repeatin the given model. Sincethe processofdiscoveringtherepeatingpatternsusesmeshconnectivity for traversal,thematchingpatternsareidenticalin coordinatesofthevertices(in thesenseof rigid-bodytransformation)aswell astheconnectivity.

We havechosento associatethefootprintswith verticesandnot with higherorderelementslikeedgesor polygons.This isbecauseEuler’s relationfor planargraphs[28] indicatesthat for trianglemeshesthe numberof trianglesis roughly twicethenumberof vertices,andthenumberof edgesis roughlythricethenumberof vertices.

This “mastergeometry– instancetransform” hierarchyamongthe repeatingfeaturepatternsis encodedcompactlyasdiscussedbelow.

3.2.1 Analysis

Compressionof Vertex List: The compressedrepresentationof the list of verticesthat constitutethe repeatingpatternsis obtainedusingthe following scheme.On obtainingthe patterns,we renumberthe verticesandalsothe indicesin thepolygonlists suchthat the sequencesof the verticesbelongingto the repeatingpatternsaregroupedby the patternsandhavea contiguousnumberingwithin thegroups.Thevertex list for eachpatternformsa nodethatrepresentseitherthefirstoccurrenceof thepatternor its repeatedoccurrence.If thepatternnodeis thefirst occurrencethenit consistsof aninteger �indicatingthenumberof verticesin thepatternfollowedby coordinatesof the � vertices.If it is a repeatedoccurrence,thenit consistsof anintegerreferenceto thefirst occurrence,a rigid-bodytransformationto reconstructtheoriginalpositionandorientationandanintegerindicatingthenumberof elementsof thisoccurrencethatmatchwith thefirst occurrence.A rigidbodytransformationcanberepresentedin termsof apurerotationandatranslation.Sinceapurerotationcanberepresentedusinga quaternionwith four floatsanda translationvectorwith threefloats,therepresentationfor transformationrequiresonly sevenfloatingpoint numbers.

Thus a repeatedinstancerequiresthreeintegersand seven point numbersas opposedto ��� floating point numbersforrepresentinga repeatedoccurrenceof a patternhaving � vertices.We notethat for a patternof four or moreverticesthisschemeof encodingbeginsto yield compression.

Complexity Analysis:Thecomputationof footprintsis an �3�&KL$ operationwhere K is thenumberof verticesin themodel.On computationof a footprint the vertex index is hashedinto using the value of the computedfooprint. The hashingfunction is basedon two keys from thefootprint vector: q � � q and � � . Thebucketsformedby hashingtheverticesgive ustheequivalenceclassesof verticesrepresentingstartingpointsof growth of repeatingfeatures.Classificationof a vertex isa constanttimecomplexity operation.

Thecomplexity of theGrowth Phasevarieswith thecharacteristicsof thegivenmodel.Theworstcasedependson charac-teristicssuchasthemaximum q � � q in themodel,numberof equivalenceclassesof vertices,sizeof thelargestequivalenceclass,numberof repeatingfeaturepatternsandsizesof thefeaturepatternsin termof numberof vertices.In anequivalence

12

Page 13: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

classof � vertices,theworstcasecomplexity of thegrowth of featuresis �3�7� " $ . Thiscaseoccurswhenit is notpossibletogrow any repeatingpatternsstartingfrom theseedsin theclass.

(a) (b)

Figure6: Examplesof repeatingstructures:(a)eachstructureaddsupto 18meshes,1112trianglesand560vertices;and(b)eachstructureaddsup to 6 meshes,212trianglesand470vertices(notethat therecouldbegapsin automaticcompositingof suchmacrostructures).

3.3 AggregateFeatures

Most large engineeringplant modelshave many repeatedinstancesnot only of meshesbut alsoof structuresformedbygroupsof meshes.For example,apillar in anarchitecturalmodelis oftenformedusingnumeroussmallmeshesandusuallytherearemany suchpillars acrossthe model; in mechanicalCAD models,many identicalstructuresareformedusinganassemblyof partswhich repeatin multiple locations.

Figure6 showstwo examplesof repeatingmacro-levelcomponentsconsistingof multiplemeshes.After carryingoutmesh-level instancedetection,many USE-instancesof differentmeshesarefoundto havenearidenticalrigid bodytransformations.This iso-transformationsetenablesus to infer repeatingmacro-level componentstructures. Figure7 shows aggregationof iso-transformationinstances(drawn in shadedenvelopes)to identify macrostructuresin the model. Note that thesemacrostructuresmay not alwayscorrespondto completeuseridentifiablecomponentaggregates. Therecould be gapsin the automaticcompositingof suchmacrostructures,becauseof the needfor numericaltoleranceswhile matchingthemodels(seeFigure6(b)). Thesegapsdo not representany shortcomingof this approach,sincethegoal is not to correctlyreconstructthecompletestructuresbut to obtainaslargestructuresaspossibleto minimize therepeatedrepresentationoftransformations.

As a sidebenefitof considerablevalue,our schemealsoletsusautomaticallyidentify thecommonproblemof erroneousduplicationof meshesin large models. In Figure7, we seethat therearetwo instancesof Mesh-khaving the samerigidbodytransformationassociatedwith them. This is anundesirablecaseof coincidinggeometriesin themodel. It is almostimpossibleto identify suchcasesvisually to heal the model to remove suchartifacts. It mustalsobe notedthat a USE-instancehaving anidentity transformationassociatedwith it is alsoaduplicatemesh,andmustberemoved.

3.4 Structure of CompressedStorage

Forcompactlystoringthemasterdefinitionof components,wemakeuseof thegeometryandconnectivity encodingschemesreportedearlier. Figure8 shows the elementsof the compressedstoragewe usefor our scheme.The storagestructureconsistsof a file header;descriptionof numberof materialnodes,numberof DEF-meshesand numberof macro-levelcomponentstructures;a global list of representative normal directions;a list of DEF-meshes;anda list of macro-levelcomponentstructures.

13

Page 14: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

First

MeshesInstance

DuplicatedMesh

Mesh j

Geom + Conn + Attrib

Mesh k

Geom + Conn + Attrib

Mesh Instance

T4

Mesh Instance

T3

Mesh Instance

T2

Mesh Instance

T1

Mesh Instance

T4

Mesh Instance

T5

Mesh Instance

T3

Mesh Instance

T3

Mesh Instance

T5

Mesh Instance

T3

Mesh Instance

T4

Mesh Instance

T6

Mesh Instance

Tp

Mesh Instance

Tm

Mesh Instance

Tn

Mesh i

Geom + Conn + Attrib

Structure 1

Structure 2

Structure 3

DEF DEF DEF

USE

USE

USE

USE

USE

USE

USE

USE

USE

USE

USE

USE

USE

USE

USE

Figure7: Creationof equivalenceclassesof geometricshapes:mesh-level taggingof instancesandidentificationof iso-transforminstancesasrepeatingstructures.Also notetheidentificationof duplicategeometries.

number of materials, number of DEF−meshesnumber of structures

SIZE

LIST OF MATERIALS

Material: Name Ambient, diffuse, specular, shininess Transparency, emission, light−cone

LIST OF QUANTIZED NORMALS

LIST OF DEF−INSTANCES

Mesh Name Material, texture Vertex geometry, texture coordinates

quantized normals Vertex normal indices into list of

LIST OF STRUCTURE INSTANCES

HEADER (version, id, description of model)

Structure Mesh count List of DEF−instance names List of USE−instance names Rigid body transformation quaternion (describing rotation) position vector (for translation)

Figure8: Structureof compressedstorage

14

Page 15: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

Quantizationof vertex normals: In the sourcemodel, eachvertex hasan associatednormal (3 floats). A simple lossycompressiontechniqueis to maintaina globallist of normalsfor thescene.UsingDeering’sstrategy [9] we build a globallist of normalsby uniformly tessellatingaunit sphere.We thenrepresentvertex normalsusingindicesto theclosestentriesin thelist. More sophisticatedglobalquantizationmethodscanbeusedfor encodingnormals.

Encodingmeshesas triangle-strips: In our currentimplementation,for encodingthe connectivity information of DEF-meshes,we have implementeda simplealgorithmfor traversingverticesin the meshandforming OpenGLtype trianglestrips.More sophisticatedencodingschemesdescribedin Section2 canalsobeusedfor evenmorecompactstorage.

Representationof macro-level componentstructures: Macro-level structurecomponentsconsistof one or more USE-instancesrepresentedby (i) asequenceof integerreferencesto DEF-instancesprecedingthelist of structures,(ii) asequenceof meshnamesfor thecorrespondingUSE-instances,(iii) rigid bodytransformationconsistingof arotationandatranslation,representedusinga quaternion(4 floats)anda translationvector(3 floats).

3.4.1 Reconstructionof the Model

During reconstructionfrom the compressedrepresentationof the model, the DEF-meshesare obtainedfrom the file bystraight-forwardparsingof thename-valuepairs. Thevertex normalsof thesemeshesareobtainedfrom theglobal list ofvertex normals.

While building the structureinstancemeshes,for the reconstructionof eachUSE-meshthe following stepsaretaken: (i)obtainthecentroidP � of theDEF-mesh,(ii) obtaintherotationmatrix � from thequaternioncomponentof thetransforma-tion andthepositionvector P " of the USE-mesh,(iii) transformthevertex positionsandnormalsof the DEF-meshby thecompositetransformationUH<J��U V?X ^WZ � Z~U X b .

4 Resultsand Discussion

Wecarriedoutour testsonalargenumberof 3D modelsthatareavailablefor downloadonthenet.Wepresentsomedetailsof our resultson six of theseshown in Figure4. Theresultsdemonstratetheeffectivenessof themethodon suchmodels.OnDiwan-i-Khaasmodel,for example,ouralgorithmgivesusover90%compressionratio. It is importantto notethatthisperformancehasbeenachievedwithout usingany specialtechniquesfor connectivity encodingof the DEF-meshesin themodel.

4.1 Detectionof RepeatingComponentShapes

Thefollowing tableshows theresultsof our techniquefor detectingrepeatingcomponentshapesin thesix models.Clearlyin suchengineeringmodelsa smallnumberof componentshapesarerepeatedin differentpositionsandorientations.

Model TotalNo. No. of No. ofof meshes DEF-meshes USE-meshesin original

Capitol 2662 93 2569Colosseum 1129 20 1109Diwan-i-Khaas 3726 848 2878Helicopter 976 480 496Piping 1051 122 929Taj Mahal 375 45 330

Thesavings achieved in storingthe datain termsof actualamountof geometryandconnectivity canbegaugedfrom thetablebelow.

15

Page 16: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

Model No. of No. of No. of No. ofvertices triangles vertices triangles

(orig) (orig) (DEF) (DEF)

Capitol 52606 87258 10347 19944Colosseum 69868 135159 18912 38103Diwan-i-Khaas 295695 162590 44363 46165Helicopter 105079 187929 76231 136372Piping 13103 20794 3753 6366Taj Mahal 65323 126453 28427 55238

Anotherimportantobservationthatwe havemadehasbeenthat in mostmodelsa smallnumberof shapesthatrepeatmostoftenaccountfor a largepartof themodel. Thefollowing tableshows thefour mastercomponentshapesthat repeatmostoften in the six modelsandthe correspondingsavings in storagespace.The numberof bytesdenotedin the compressedencodingcolumncompriseof thespaceneededfor thestorageof the DEF-instance,integerreferencesto the DEF-instanceandtherigid bodytransformationsassociatedwith theUSE-instances.

DEF No. of No. total # bytes No. % savedmesh inst of bytes # bytes in compr of bytes

permesh encoding saved

Capitolbuilding:220 824 181280 3233 178047 98.22199 1856 369344 4034 365310 98.9136 2192 78912 2577 76355 96.7318 3760 67680 3947 63733 94.17

Colosseum:105 1072 112560 2216 110344 98.0396 624 59904 1669 58235 97.2192 736 67712 1737 65975 97.4336 10592 381312 10977 370335 97.12

Diwan-i-Khaas:102 1136 115872 2247 113625 98.0636 14032 505152 14417 490735 97.1524 35552 853248 35805 817443 95.8024 9760 234240 10013 224227 95.73

Helicopter:49 3648 178752 4176 174576 97.6649 1408 68992 1936 67056 97.1216 823 13312 988 12180 92.008 5160 41280 5237 36043 87.31

Piping:79 400 31600 1258 30342 96.0236 848 30528 1233 29295 95.9610 1792 17920 1891 16029 89.454 4096 16384 4129 12255 74.80

Taj Mahal:80 4248 339840 5117 334723 98.498 39432 315456 39509 334723 87.484 46376 185504 46409 139095 74.894 23920 95680 23953 71727 74.97

4.2 Reduction in StorageRequirements

Thefollowing tableshows reductionin file sizes(in bytes)from theoriginal raw datato thecompressedformat.

16

Page 17: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

Model original original compressed compressed CR(gzip) (gzip) (%)

Capitol 1790767 875337 433922 211720 88.1Colosseum 2503030 2090255 570931 401974 83.9D’-Khaas 10072648 2850640 1978765 671828 93.3Helicopter 4891936 1916270 1664592 899383 81.6Piping 469891 172964 133329 35876 92.3Taj Mahal 2329465 1122914 757002 467413 79.9

Thecompressionachievedhereis by avoiding detailedmultiple descriptionsof repeatingmeshes.Only DEF-instancesarewritten out in detail usingsimpletechniquesfor compressedsinglemeshencoding.For the DEF-instancemeshencoding,we have simply usedgzip. This givesusan ideaof theminimumcompressionperformancewe canexpect. Clearlywecanachieveevenbetterperformanceby usingbettersinglemeshandinstancetransformationcompressionschemes.

5 Conclusion

We have presenteda new 3D compressionschemeparticularly suitedto very large engineeringmodels,with repeatinggeometricshapefeatures.Testresultsfrom a straightforwardimplementationof this schemeon a numberof largemodelsincluding thosethatareavailableon the net have shown excellentcompressionperformance.TheschemeusesHotellingtransformbasedregistrationtechniqueandsimplegeometrymatchingprocedurefor identifying nearidenticalmeshesandthendetectsiso-transformationgroupsof USE-instancesto determinerepeatingstructuresin thegivenmodel.Compressionis achievedby representingonly themastergeometryin full detailsandavoiding thedetaileddescriptionof theinstances.

Our approachis significantlydifferentfrom earlierapproacheswhich have tried to compresslargesinglemeshcurvaturecontinuoussurfaces. Our schemeis somewhat analogousto dictionary-basedalgorithms[29] for compressionof text;componentshapesandgroupsof suchcomponentstake theplaceof dictionaryphrases.

The basicprinciple of detectingsimilar shapefeaturesin a large 3D modelhasamplescopeto be appliedto the other3D geometryhandlingprocessesof healing,simplificationandprogressive transmission.Fuzzymatchingcanhelp us indetectingandcorrectingsmallgeometricandtopologicalerrors.SimplificationandLoDsof aDEF-instancemeshor agroupof meshesautomaticallywill serve many meshesin themodelthatareUSE-instances.Theobservationthat it is only a fewcomponentsthataccountfor a largepartof themodelis significantasit may leadto anoptimalprogressive transmissionsequence.

Acknowledgements

For thetestresultsreportedin thispaper, themodelsof Capitolbuilding,Colosseum,PipingandTajMahalweredownloadedfrom www.3dcafe.com. Diwan-i-Khaasmodel[1] is from VisionsMultimediaVisualizationStudioandtheHelicoptermodelwasdownloadedfrom theAvalon3D archive(avalon.viewpoint.com).

References

[1] FatehpurSikri: An Epic in RedSandstone.http://www.visions-net.com,VisionsMultimedia VisualizationStudio,Mumbai,India.,1999.(First publicdemonstrationasashowcaseapplicationduringthelaunchof Intel PIII processorin SanJose,USA.).

[2] N. Amenta,M. Bern,andM. Kamvysselis.A New Voronoi-basedSurfaceReconstruction.In SIGGRAPH98, pages415–421,1998.

[3] C. Bajaj,V. Pascucci,andG. Zhuang.Compressionandcodingof largecadmodels,1998.

[4] Gill BarequetandMichaSharir. PartialSurfaceandVolumeMatchingin ThreeDimensions.IEEEPAMI, 19(9):929–948,1997.

17

Page 18: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

[5] G. Butlin andC. Stops.CAD DataRepair. In Proceedingsof the5th InternationalMeshingRoundtable, pages7–12.SandiaNationalLaboratory, October1996.

[6] D. Cohen-Or, D. Levin, andO.Remez.ProgressiveCompressionof Arbitrary TriangleMeshes.In IEEEVisualization99, pages67–72,1999.

[7] TheWeb3DConsortium.TheVirtual RealityModelingLanguage.http://www.web3d.org,ISO/IEC14772-1,Septem-ber1997.

[8] GeorgeCybenko, Aditya Bhasin,andKurt D. Cohen.PatternRecognitionof 3D CAD Objects:TowardsElectronicYellow Pagesof mechanicalParts.In SmartEngineeringSystemsDesign,VolumeI, pages1–13.1997.

[9] M. Deering.GeometryCompression.In SIGGRAPH95, pages13–22,1995.

[10] J. El-SanaandA. Varshney. TopologySimplification for PolygonalVirtual Environments. IEEE TransactionsonVisualizationandComputerGraphics, 4(2):133–144,April-June1998.

[11] A. R. Forrest. Computationalgeometry- achievementsandproblems.In R.E.Barnhill andR.F. Riesenfeld,editors,ComputerAidedGeometricDesign, pages17–44.AcademicPress,1974.

[12] M. Garland.Quadric-basedPolygonalSurfaceSimplification. PhDthesis,CarnegieMellon University, 1998.

[13] R. GonzalezandR. Woods.Digital ImageProcessing. Addison-Wesley PublishingCompany, 1992.

[14] S.Gottschalk,M. C. Lin, andD. Manocha.OBBTree:A HierarchicalStructurefor RapidInterferenceDetection.InSIGGRAPH96, pages171–180,1996.

[15] A. Guiziec,F. Bossen,G. Taubin,andC. Silva. Efficient Compressionof Non-manifoldPolygonalMeshes.In IEEEVisualization1999, pages73–80,1999.

[16] S.GumholdandW. Strasser. Real-timeCompressionof TriangleMeshConnectivity. In SIGGRAPH98, pages133–140,1998.

[17] I. Guskov, W. Sweldens,andP. Schroeder. MultiresolutionSignalProcessingfor Meshes.In SIGGRAPH99, pages325–334,1999.

[18] P. HeckbertandM. Garland. Survey of polygonalsimplificationalgorithms. In Multi-resolutionSurfaceModelingCourse. ACM SIGGRAPHCourseNotes,1997.

[19] P. HeckbertandM. Garland.OptimalTriangulationandQuadric-basedSurfaceSimplification.ComputationalGeom-etry, 14:49–65,1999.

[20] YaronC. HeckerandRuddM. Rolle. On GeometricHashingandtheGeneralizedHoughTransform.IEEE Transac-tionson Systems,ManandCybernetics, 24(9):1328–1338,September1994.

[21] Discreet(AutodeskInc.). 3dstudioMAX R4. http://www.discreet.com,2000.

[22] M. Isenbueg andJ.Snoeyink. FaceFixer: CompressingPolygonMesheswith Properties.In SIGGRAPH2000, pages263–270,2000.

[23] Z. Karni andC. Gotsman.SpectralCompressionof MeshGeometry. In SIGGRAPH2000, pages279–286,2000.

[24] A. Khodakovsky, P. Schroeder, andW. Sweldens.Progressive GeometryCompression.In SIGGRAPH2000, pages271–278,2000.

[25] D. King andJ.Rossignac.Connectivity compressionirregularquadrilateralmeshes.TechnicalReportGIT-GVU-99-36,GVU Center, GeorgiaTech.,Atlanta,USA, 1999.

[26] D. King andJ.Rossignac.OptimalBit Allocation in Compressed3D Models.ComputationalGeometry, 14:91–118,1999.

[27] FEGSLtd. CADFix: A Productfor CAD DataExchange,RepairandUpgrade.http://www.fegs.co.uk,1997.

[28] M. E. Mortensen.GeometricModeling. Wiley & Sons,New York, 1985.

[29] M. Nelson.Data CompressionHandbook. M & T Publishing,Inc., 1991.

18

Page 19: Compression of Polygon Meshes of Engineering Models using ...A polygon % is represented as a sequence & # ! #"' )(*(+(* ! ', $ of references into the list of vertices. A triangle mesh

[30] Marcin Novotni andReinhardKlein. A GeometricApproachto 3D ObjectComparison.In Proceedingsof Interna-tional ConferenceonShapeModellingandApplications(SMI2001), May 2001.

[31] RobertOsada,ThomasFunkhouser, BernardChazelle,andDavid Dobkin. Matching3D Modelswith ShapeDistribu-tions. In Proceedingsof InternationalConferenceon ShapeModellingandApplications(SMI2001), May 2001.

[32] R. PajarolaandJ. Rossignac.CompressedProgressive Meshes. TechnicalReportGIT-GVU-99-05,GVU Center,GeorgiaTech.,Atlanta,USA, 1999.

[33] J.Rossignac.Edgebreaker: Connectivity Compressionfor TriangleMeshes.IEEE Transactionson VisualizationandComputerGraphics, 5(1):47–61,January-March1998.

[34] G. Taubin.A SignalProcessingApproachto FairSurfaceDesign.In SIGGRAPH95, pages351–358,1995.

[35] G. Taubin,A. Gueziec,W. Horn, andF. Lazarus. Progressive ForestSplit Compression.In SIGGRAPH98, pages123–132,1998.

[36] G. Taubin,W. Horn, andP. Borrel. CompressionandTransmissionof Multi-resolutionClusteredMeshes.TechnicalReportRC21398-(96630)-2FEB1999,IBM T.J.WatsonResearchCentre,New York, USA, 1999.

[37] G. TaubinandJ.Rossignac.GeometryCompressionthroughTopologicalSurgery. ACM Transactionson Graphics,17(2):84–115,April 1998.

[38] C. ToumaandC. Gotsman.TriangleMeshCompression.In Proceedingof GraphicsInterface98, June1998.

[39] G. Turk. Re-tilingPolygonalSurfaces.In SIGGRAPH92, pages55–64,1992.

[40] D. V. Vranic andD. Saupe.3d Model Retrieval. In Proceedingsof SpringConferenceon ComputerGraphicsanditsApplications(SCCG2000),BudmericeManor, Slovakia, pages89–93,May 2000.

[41] Haim J. Wolfson and Isidore Rigoutsos. GeometricHashing: An Introduction. IEEE ComputationalScience&Engineering, pages10–21,October-December1997.

[42] M. Woo,J.Neider, andT. Davis. OpenGLProgrammingGuide. Addison-Wesley PublishingCompany, 1996.

[43] Andrew Zisserman,David Forsyth,JoeMundy, CharlieRothwell,JaneLiu, andNic Pillow. 3D ObjectRecognitionusingInvariants.TechnicalReportOUEL 2027/94,RoboticsResearchGroup,Universityof Oxford,November1994.

19