octree textures - department of computer sciencemisha/readingseminar/papers/benson02.pdf · was...

6
Octree Textures David Benson Joel Davis Industrial Light and Magic San Rafael, CA 94912 Abstract Texturing using a set of two dimensional image maps is an estab- lished and widespread practice. However, it has many limitations. Parameterizing a model in texture space can be very difficult, par- ticularly with representations such as implicit surfaces, subdivision surfaces, and very dense or detailed polygonal meshes. This paper proposes the use of a new kind of texture based on an octree, which needs no parameterization other than the surface itself, and yet has similar storage requirements to 2D maps. In addition, it offers adap- tive detail, regular sampling over the surface, and continuity across surface boundaries. The paper addresses texture creation, painting, storage, processing, and rendering with octree textures. CR Categories and Subject Descriptors: I.3.m [Computer Graph- ics]: Texturing; Additional Key Words: Volume Texture 1 Introduction Traditionally, texturing a model with image data requires setting up a 2D parameterization of a model. This parameterization is typi- cally set up manually by an artist. This step can be automated with techniques such as the work presented by Maillot [14] and recent work by Piponi [19]. These approaches still require that dicontinu- ous cuts be introduced in the mapping. In addition, even after a parameterization is constructed, some tex- ture distortion, or “stretching” may be caused by the parameteriza- tion. Techniques such as [21] can help minimize this stretching on polygonal meshes. Another problem arises when there is the need to have a small area of a large model, such as a decal, have much higher detail than the rest. In some cases, this can result in parts of the model needing to be split to accommodate these local area of high texture detail. Furthermore, these 2D approaches may not apply to geometric rep- resentations which are difficult to assign a parameterization to, such as implicit surfaces [3] or Adaptive Distance Fields [8]. This paper was motivated by these issues, and presents a solution in a new form of texture as well as details of integrating these textures into a production environment. 2 Related Work 2.1 Previous Work Texture mapping was first introduced by Catmull [4]. This concept was extended in 1985 with the introduction of the concept of solid textures, presented independently by Perlin [17] and Peachey [16]. They realized that using a surface’s position in 3D space as tex- ture coordinates allowed complex surfaces to be texture mapped. This work was mainly concerned with procedural textures extend- ing throughout a volume enclosing the surfaces being rendered. Peachy’s work [16] also suggested the idea of digitized solid tex- tures by scanning slices of a model. He points out that for a regular voxel grid of samples, high resolution textures would require huge amounts of memory. This form of solid texture is a volume texture. Akeley [1] described a hardware implementation. They have also become part of the OpenGL [22] graphics standard. However, their main use has been volume rendering [7]. One piece of related work in volume rendering was presented in 1991 by Laur et al. [12]. In this approach, a pyramid of average colors is formed from a traditional volume texture, and then an oc- tree is constructed that approximates the original data to a given accuracy. This results in a similar data structure to work presented in this paper, but it is used as a volume rendering optimization. Octree based images have also been considered in the related sub- ject of 3D Image Processing, and work by Tamminen in 1984 [24], introduces this connection. We have recently become aware of work by DeBry et al [6], who have independently developed a similar approach to texture map- ping using octrees. 2.2 Other Approaches Turk developed a method [25] for using a regular distribution of samples spread across a surface to represent a Reaction-Diffusion texture. He suggested choosing random samples over a surface, which were then relaxed to get a more even distribution. Texture look-up was accomplished by a weighted sum of nearby samples. This contrasts with the more structured texture presented in this pa- per, in which the sample positions are implicit in its location in the octree. Recent work by Pfister et al. [18], extends this concept to represent the surface itself at the sample points and replaces the random sample points by a more uniform set, sampled on a grid pattern (a layered depth cube representation [13]), which makes it more closely related to the work in this paper, but focuses on using the structure as a representation of the geometry for fast rendering. Recent work by Frisken [8] presented the concept of Adaptive Dis- tance Fields for modeling surfaces. In this work, an octree of scalar values is used to represent the distance of each sample point from a surface. This structure is similar in some ways to the octree texture presented in this paper, but the structure and interpolation scheme are quite different. Another approach to texture mapping polygons is used extensively Copyright © 2002 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Permissions Dept, ACM Inc., fax +1-212-869-0481 or e-mail [email protected]. © 2002 ACM 1-58113-521-1/02/0007 $5.00 785

Upload: dangkiet

Post on 07-Mar-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

Octree Textures

David Benson Joel Davis

IndustrialLight andMagicSanRafael,CA 94912

Abstract

Texturing usinga setof two dimensionalimagemapsis an estab-lishedandwidespreadpractice.However, it hasmany limitations.Parameterizinga modelin texturespacecanbevery difficult, par-ticularly with representationssuchasimplicit surfaces,subdivisionsurfaces,andvery denseor detailedpolygonalmeshes.This paperproposestheuseof anew kind of texturebasedonanoctree,whichneedsno parameterizationotherthanthesurfaceitself, andyet hassimilarstoragerequirementsto 2D maps.In addition,it offersadap-tive detail,regularsamplingover thesurface,andcontinuityacrosssurfaceboundaries.Thepaperaddressestexturecreation,painting,storage,processing,andrenderingwith octreetextures.

CR Categories and Subject Descriptors: I.3.m[ComputerGraph-ics]: Texturing; Additional Key Words: VolumeTexture

1 Introduction

Traditionally, texturingamodelwith imagedatarequiressettingupa 2D parameterizationof a model.This parameterizationis typi-cally setup manuallyby anartist.This stepcanbeautomatedwithtechniquessuchasthe work presentedby Maillot [14] andrecentwork by Piponi[19]. Theseapproachesstill requirethatdicontinu-ouscutsbeintroducedin themapping.

In addition,evenaftera parameterizationis constructed,sometex-turedistortion,or “stretching”maybecausedby theparameteriza-tion. Techniquessuchas[21] canhelpminimizethis stretchingonpolygonalmeshes.Anotherproblemariseswhenthereis theneedto have a small areaof a largemodel,suchasa decal,have muchhigherdetail thantherest.In somecases,this canresultin partsofthe modelneedingto be split to accommodatetheselocal areaofhigh texturedetail.

Furthermore,these2D approachesmaynotapplyto geometricrep-resentationswhicharedifficult to assignaparameterizationto,suchasimplicit surfaces[3] or Adaptive DistanceFields [8].

Thispaperwasmotivatedby theseissues,andpresentsasolutioninanew form of textureaswell asdetailsof integratingthesetexturesinto a productionenvironment.

2 Related Work

2.1 Previous Work

Texturemappingwasfirst introducedby Catmull [4]. This conceptwasextendedin 1985with theintroductionof theconceptof solidtextures,presentedindependentlyby Perlin [17] andPeachey [16].They realizedthat using a surface’s position in 3D spaceas tex-ture coordinatesallowed complex surfacesto be texture mapped.This work wasmainly concernedwith proceduraltexturesextend-ing throughouta volume enclosingthe surfacesbeing rendered.Peachy’s work [16] alsosuggestedthe ideaof digitized solid tex-turesby scanningslicesof amodel.He pointsout thatfor a regularvoxel grid of samples,high resolutiontextureswould requirehugeamountsof memory. This form of solid textureis avolumetexture.Akeley [1] describeda hardware implementation.They have alsobecomepartof theOpenGL[22] graphicsstandard.However, theirmainusehasbeenvolumerendering[7].

Onepieceof relatedwork in volume renderingwaspresentedin1991 by Laur et al. [12]. In this approach,a pyramid of averagecolorsis formedfrom a traditionalvolumetexture,andthenanoc-tree is constructedthat approximatesthe original datato a givenaccuracy. This resultsin a similar datastructureto work presentedin this paper, but it is usedasa volumerenderingoptimization.

Octreebasedimageshave alsobeenconsideredin therelatedsub-jectof 3D ImageProcessing,andwork by Tamminenin 1984[24],introducesthisconnection.

We have recentlybecomeawareof work by DeBry et al [6], whohave independentlydevelopeda similar approachto texture map-pingusingoctrees.

2.2 Other Approaches

Turk developeda method[25] for using a regular distribution ofsamplesspreadacrossa surfaceto representa Reaction-Diffusiontexture. He suggestedchoosingrandomsamplesover a surface,which were thenrelaxed to get a moreeven distribution. Texturelook-upwasaccomplishedby a weightedsumof nearbysamples.Thiscontrastswith themorestructuredtexturepresentedin thispa-per, in which thesamplepositionsareimplicit in its locationin theoctree.Recentwork by Pfisteret al. [18], extendsthis concepttorepresentthe surface itself at the samplepoints and replacestherandomsamplepoints by a moreuniform set,sampledon a gridpattern(a layereddepthcuberepresentation[13]), which makesitmorecloselyrelatedto thework in this paper, but focuseson usingthestructureasa representationof thegeometryfor fastrendering.

Recentwork by Frisken[8] presentedtheconceptof Adaptive Dis-tanceFieldsfor modelingsurfaces.In thiswork, anoctreeof scalarvaluesis usedto representthedistanceof eachsamplepoint from asurface.This structureis similar in somewaysto theoctreetexturepresentedin this paper, but thestructureandinterpolationschemearequitedifferent.

Anotherapproachto texturemappingpolygonsis usedextensively

Copyright © 2002 by the Association for Computing Machinery, Inc.Permission to make digital or hard copies of part or all of this work for personal orclassroom use is granted without fee provided that copies are not made ordistributed for commercial advantage and that copies bear this notice and the fullcitation on the first page. Copyrights for components of this work owned byothers than ACM must be honored. Abstracting with credit is permitted. To copyotherwise, to republish, to post on servers, or to redistribute to lists, requires priorspecific permission and/or a fee. Request permissions from Permissions Dept,ACM Inc., fax +1-212-869-0481 or e-mail [email protected]. © 2002 ACM 1-58113-521-1/02/0007 $5.00

785

in researchon meshsimplification[5], [15], [23], [20]. In this ap-proacha texture tile is createdfor eachfaceof a simplified mesh.Thesetilesneedto bepaddedwith boundaryinformationfrom theirneighborsto ensurecontinuity. Thetilesarethenpackedinto regu-lar textures.

The drawbacksin this form of texture mappingare that the sam-pling is onceagainvery uneven, and the discontinuousstructureof resulting texture mapsprevents them from being turned intomipmaps.In additionthesetexturescannotbecompletelycontinu-ous,asthetechniqueof paddingtheboundariesonly approximatestherealneighboringvalues.

Gortler et al. [9] presenteda methodfor reconstructingan imagefrom onedimensionalline samples.This methodconsistedof con-structinga lower resolutionimage,andthenup-samplingandcom-bining with higherresolutionsamplesto fill in detail.This processhassomesimilaritiesto thereconstructionphasepresentedhere.

3 Octree Texture Structure and Usage

3.1 Conceptual Overview

Solid texture mappinghasbeenaroundfor sometime, andrelieson the rest position of a model as the texture coordinates.Thesecoordinatescanbecreatedautomatically, in contrastto thelengthymanualprocessof assigningtwo dimensionalcoordinatesto sur-faceswhich are rarely easyto parameterize.While solid texturesareusuallyprocedural,they canalsocomefrom a traditionalvol-umetexture.

This paperproposesthe useof octreetextures,a variationon thevolume texture idea in which only the subsetof the volume thatactuallyintersectsthesurfaceof amodelis stored.Thetexturesaresparsebecauseonly octreecellswhich intersectanobject’s surfacearestored.The octreestructureprovidesan efficient way to storeandlook up thesetextures.

Traditionalvolumetexturesarea regular 3D lattice of color sam-ples.Their memoryusagegrows with the cubeof the resolution.This hasmadethemimpracticalfor generaluseandconfinedtheiruseto primarily medicalandscientificimaging[10].

However, solid textureshave other nice properties.For example,at any particularresolutiontheir samplesareuniformly distributedacrossspacein the region the surfaceoccupies.In addition,thesecoordinatesarecontinuousacrosstheboundariesbetweendifferentgeometrytypes,andindependentof theactualtextureassignments.

In thevisualeffectsindustry, we aremainly concernedwith colorson thesesurfaces,which representonly a two dimensionalsubsetof thevolume.Thesetexturesconcentrateall their detailat thesur-faceitself, andat the limit, behave like two dimensionaltextures.In otherwords,at the limit, their sizegrows with thesquareof theresolution.This meansthat they arecapableof achieving thehighresolutionsrequiredin thevisualeffectsindustrywithoutbecomingunmanageablylarge.

3.2 Storage

Thesetexturesmaybepotentiallyvery large,sotherepresentationmustbe compact.We choseto representa nodeby a setof flagsindicatingwhich of thenode’s childrenarepresent,andwhich areleaves.Then,we storeanarrayof pointersto child nodes,andan-otherarraycontainingthevaluesof thechild nodesthatareleaves(Figure 1).

Sincemostnodesof thetreewill typically beleaf nodes,andsincenear the surfacean averageof half of a node’s children will be

Leaf Value 0

Leaf Value 1

Leaf Value 2

Leaf Value 3

Leaf

Flags

Child Node Vector

Child Leaf Vector

Node

Leaf Value 0

Leaf Value 1

Leaf Value 2

Leaf Value 3

Node Pointer 0

Node Pointer 1

Node Pointer 2

Node Pointer 3

Figure 1 A compactrepresentationof thetextureoctree.Child nodepointersandleaf dataarestoredin two contiguousarraysto mini-mizepointeroverhead.

leavesandcontainacolorsample,thisgreatlycutsdown onstoragerequiredby pointersto child nodes.

3.3 Texture Coordinates

In most cases,the texture coordinateswill simply be the surfaceposition.But in somecases,it is convienentto useanotherparam-eterization.For example,whenusingsubdivision surfaces,theco-ordinateson the control hull may be usedratherthancoordinateson the limit surface.In this way, a polygonalapproximationof thelimit surfacewill be texturedconsistentlyat any level of subdivi-sion.This introducesa smallamountof texturestretching.

For a deforminganimatedmodel, the coordinatesof the model’srestposemaybeusedastexturecoordinatesto attachthetexturetotheanimatingmodel.

3.4 Interpolation

To look up a sampleandmaintaina continousfield of color, tri-linearor tri-cubic interpolationis used.

With an octreetexture, the resolutionvariesacrossthe texture,sowe have the additionalproblemof how to interpolatebetweenre-gions at different levels of detail. Our approachis basedon theideasdevelopedfor generatingsmoothtexturesfrom quadtreeim-agespresentedby Kobbeltetal [11]. Theirapproachusesasubdivi-sionstrategy whichcouldberepeatedlyappliedto lower resolutionareasuntil the whole imagewasat the samehigh resolutionandcouldthenbeinterpolatedin theusualway.

To look up the texture at a samplepoint, a small neighborhoodisfolloweddown from theoctreeroot to theleaves.Our implementa-tionusesa3x3x3neighborhoodfor tri-linearinterpolation.A 5x5x5neighborhoodcouldbeusedfor tri-cubic interpolation.

Figure 2 A fixedneighborhoodaroundasamplepoint is subdividedto thenext higherresolutionandfilled or interpolatedfromtheoctreevalues.

Figure 2 demonstrateshow this processworks.On the left is theneighborhoodat depthn, andon the right the neighborhood(out-lined in black)atdepth(n+1).Theblackdot representsthatsample

786

point, andat eachstageit lies at the centerof the neighborhood.Thehigherresolutionneighborhood(right) is constructedfrom thelower resolutionone (left) by subdividing the cells closestto thesamplepoint. Thenthe sub-cellsadjacentto the samplepoint aregatheredtogether. As noneof the cells in the new neighborhoodcanbetouchingtheboundaryof theold one,theold neighborhoodcontainsall theinformationnecessaryto createthenew one.

Thefollowing stepsgive therule for subdividing a cell:

1. If thecell containsemptyspace,thenall childrenareempty.

2. Otherwise,if thecell containsa non-leafnode,thenthechil-drenarethenode’s children.

3. Otherwise,if thecell containsa leafor asubdividedleaf,thenform the children from a weightedsum of the neighboringcell’s colors. Extrapolatefor node neighborswhich do nothave a color.

Figure 3 Texture interpolationbetweenthedifferentresolutionsofasamplepoint’s surroundingcellsis achievedby following a3x3x3neighborhoodfrom theoctreeroot.

Theneighborhoodis initially setto beempty, exceptfor thecentralcell,whichpointsto theentireoctree.As weprogressdown thetree,theregionof theoctreerepresentedby theneighborhoodconvergestowardsthesamplepointasshown in Figure 3.Thisprocessis con-tinueduntil nocell in theneighborhoodcontainsanoctreenode,i.e.westopwheneverycell containsa leaf,asubdividedleaf,or emptyspace.The neighboringcolorsare thentri-linearly interpolatedtogive theresult.

This processresultsin a continuousinterpolationof the samplepointsacrossregionswith varyinglevel of detail.However, this al-gorithmis a point samplingof thetexture,andit maybenecessaryto averagea numberof thesesamplesto obtain a filtered texturelook-up.

3.5 Texture Filtering

Whenatexturedobjectis drawn at adistance,somekind of minifi-cationfilter is desiredto preventaliasing.Theidealfilter is to taketheaverageof many visibletexelscontainedin theareathatis beingsampled.

With traditional2D textures,it is commonto usemipmaps[27] orsummedareatablesto effectively dosomeof thisfiltering aheadoftimeasapreprocessingstep.Mipmapsalsohelpreducetheamountof thetexturethatneedsto beaccessedwhenthesurfaceis far fromthecamera,andsmallin theview, becauseonly thelowerresolutionversionof thetextureneedbeaccessed.

Traditionally this averageis simply madeover a rectanglein a 2Dtexture’sparameterspace.Makingtheaveragein thetexture’sspacemayincludeareasof thetexturethatarenotvisiblefrom adistance,andmay even includeregionsthat arenot assignedto any part ofthemodel.

Figure 4 On a modelwith two surfacesof different color nearbybut facingdifferentdirections–suchasa thin sheetwith contrastingcolorsoneachside–simplyaveragingthetexturevaluescanfail andcausecolorsto bleedor mix.

3.5.1 Problems With Extending 2D Mipmapping

Theoctreetexturehasastructuresimilar to amipmapandit is natu-ral to considerfollowing thesameprocedureto build a3D mipmap.This ideawasexploredfor volumerenderingin [12], but thosere-sultsarenot directly applicableto surfacerendering.Replacinganeighborhoodof voxels in a texture by a single larger voxel is insomecasesa poor approximationto the ideal averagementionedabove, becausethis averagemay containcolorsfrom neighboringsurfaceswhich arenot visible at the higher resolutionlevel (Fig-ure 4). Becauseof this,colorscanbleedfrom nearby. For example,if the backand front of a thin model aredifferentcolors, the re-sultingaveragecolor representsa color thatshouldnever be seen.Colormayalsobleedbetweenunconnected,but neighboring,closesurfaces.

3.5.2 Normal Flags

In mostcases,theseproblemscanbe solved manuallyby assign-ing the conflicting partsof the model to separateoctreetextures.However, in orderto handlea broaderrangeof situationsautomat-ically, theoctreenodescanbeextendedby addingnormalflagsforrendering.

Our goal is to preserve the behavior that we get interpolatingthehighestlevelsof the texture.We maintiana setof six normalflagswith eachnode,onefor eachdirectionof eachaxis.A flag is setfor any directionof a nodewhich containsa surfacewith a normalcloserto theflag’s directionthanto any other. If any axishasbothdirectionflagssetthentheminificationisconsiderednolongervalid(Figure 5),andalook-upis forcedto continueto ahigherresolutionnode.As an optimization,this rule may be ignoredif thesamplesbelow the nodeare within someuser-specifiedthresholdof eachother, andcanthusbeaveragedwithoutproducingany visiblecolorbleeding.

3.6 File Format Considerations for Rendering

In orderto allow quick accessto a lower resolutionversionof thetexture,the treemustbestoredin breadthfirst ordering,not depth

787

+X�

-X

+Y�

-Y

+Z�

-Z

Figure 5 For rendering,everyoctreenodecontainsanormalflagforeachdirectionof eachaxis.If thenormalflagsfor bothdirectionsofany axisareset,mipmaplook-upis forcedto continueto thenode’schildren.

first.Unfortunatelythisrequiresoneor two pointersto bestoredforeachnode,pointingto thechild leafandchild nodepositionsin thefile.

Fortunately, for any sectionof nodeson the samelevel of the hi-erarchythepointerswill beconsecutive,andcanberecreatedfromthenode’sflagsgivenastartingpositionfor thechildrenandleaves.This meansthat they canbe storedin a file in a compressedformwith few pointers,andexpandedbackup to the two pointerformwhenreading.In our implementation,the octreewasalsotiled toallow only a subsetof theactualtextureto beheldin memory.

4 Painting

An octreetexture may begeneratedprocedurally, but in this case,onecanjustusetheproceduralmodeldirectly to texturetheobject.In mostcases,an artist will be asked to paint the detailsonto themodels,or apply scannedphotographsto the model.We mustbeableto applythis techniqueto anoctreetexture.

4.1 Overview

Thesimplestform of 3D paintprogramsinvolve paintingon a pro-jection of a model, and then projecting the paint back onto themodel.In thetwo dimensionalcase,thesurfacegeometryis subdi-videdto theresolutionof the2D texturesandeachof theresultingmicropolygonsprojectedbackontothepaintedimageto getacolorfor the correspondingtexel [2]. This conceptextendsnaturally tothreedimensionsfor octreetextures.In this casewe needto raster-ize therestgeometryinto theoctree,againkeepingtherealsurfaceposition as a texture coordinatefor the look up from the paintedimage.

If theoctreeis keptat a fixeddepth,paintingis greatlysimplified,asthehierarchyof thenew paintandtheexistingpaintwill beiden-tical. However, for an adaptive octree,the hierarchycandiffer. Inpractice,it is convenientto first createa“new paint” octreeandthenmerge thatwith theexisting octree,ratherthantry to combinethepaintandrearrangetheoctreein onestep.

This two stepprocessalsoensuresthatblendingthenew paint intotheexisting textureoccursonly oncefor eachvoxel whenthenewpainthasanalphachannel.

Thestepsinvolvedin mappingpaintbackontoanoctreetextureareasfollows:

1. Rasterizesurfacesinto the paint octree,using the surface’s

restcoordinatesasits locationandits projectedpositionasitstexturecoordinateto look-upa color from thepaintedimage.

2. Wherethe existing octreeresolutionis higher than the newpaint’sandthepaint’salphais betweenzeroandone,increasethepaintoctree’s resolutionto matchthetexture.

3. Form a boundarylayer of emptyvoxels aroundthe paint, atthe sameresolutionasthe neighboringpaint.The intensitiesof theboundarydon’t matter, only its effect on thenext step.

4. Increasetheresolutionin themainoctreeanywherewherethepaintoctree’s resolutionis higher.

5. Mergethepaintoctreeinto themainoctree,ignoringthetem-poraryboundarylayervoxels.

6. Deletethepaintoctree.

7. Cull any voxels in themainoctreethatarenot intersectedbyany surface.

4.2 Merging Existing Paint

Theapproachpresentedby [2] for multiresolutionpaintingcanbeappliedto 3D. If anartistpaintsa transparentwashover someex-isting detail, their intention is clearly to modify the color of theregion. If we simply merged in the wash(which is probablyat alowerresolution),thedetailwouldbelost in theprocess.In ordertopreserve it, the resolutionof thewashmustbe increasedto matchtheexistingdetail.

Anothersituationoccurswhenanartistpaintssomefinedetailoveran areawhich waspreviously coveredby somesmoothlyinterpo-latedlow resolutionpaint.In thiscase,theresolutionof theexistinglow resolutionpaintmustbeincreasedto matchthenew detail.

In orderto increasetheresolutionof anoctreetexture,we needtotake into accountthe interpolationschemebeingused.If we sim-ply split eachleaf into children with the samevalue, the bound-ariesof the original voxel will becomevisible as discontinuitiesin the resultingtexture. This is analogousto performingthe cor-respondingoperationon a 2D texture,wherethenew pixel valueswould be formed by interpolatingthe lower resolutionvalues.Inaddition,the effect of an edit on neighboringvoxels mustalsobetaken into account.Ideally, when the resolutionof a voxel is in-creased,the neighboringregions shouldremainunchanged.Thiscanbeachievedby keepingtheold low resolutionleaf around,andusingit duringthelower resolutionstepsof thereconstructionpro-cess.Theseresolutionincreasesarecalculatedandappliedlocally,andnot to thetextureasa whole.

4.3 Considerations for Painting

4.3.1 Color Bleeding

If themodelcontainsintersectingsurfaces,they mustbeseparatedout into their own octreetextures,or a specialversionof the restmodel needsto be constructedin which thoseparts have beenmoved apart.If thesestepsarenot taken, the intersectingregionswill sharea commonpaintcolor. This is mainly a problemif theseregionsareanimating,and theseintersectionregionsbecomeex-posed.

4.3.2 File Format for Painting

Thesparseoctreecanbestoredveryefficiently in aconsistentdepthfirst order. This methodis outlinedin work by M. Samet[24], andtheauthorsshow thatevenfurthercompressionis possible.

788

Figure 6 Comparisionof octreetexturesat several resolutionsto asetof 2D texturemaps.

Whenrendering,thetextureshouldbeconvertedto afile formatliketheonesuggestedin Section 3.6to performlook-upsefficiently.

5 Results

Our initial work involved converting a model that was alreadypaintedwith a set of traditional textures.The textureswere con-vertedinto octreetexturewithout any lossof visualquality or arti-facts.The octreetexture took lessdisk spacethanthe large setof2D imagesit wasgeneratedfrom.

For comparison,a part of a traditionally textured versionof thedroid model in Figure 8 is comparedto an octreetextured ver-sion of the samemodel.This part of the modelwaspaintedwithfivemaps:two of size256x1024,one1024x512andone128x1024.Theassignmentsweretypicalof thewaymapsareassigned.

Max Depth UncompressedSize8 (256) 190,1899 (512) 740,613

10 (1024) 2,901,7892D Version 3,534,944

The mapswere thenconvertedto octreetexture at differentfixedmaximumdepths.In thiscase,theoctreetexturewerenotadaptive,soareasof similar color weresampledat thesamerateasdetailedareas.

Whentheoctreetexture is at thesameresolutionasthe largestdi-mensionof the texturemaps,the resultingfile canbesmallerthanthe2D texturemaps.Theoctreetexturestoressamplesonly wheregeometryis present,whereasthetraditionallymappedversionmust

oversamplesomeareasin order to get otherareassampledat thedesiredresolution.

Of course,carefulassignmentof texturecoordinates,or methodstorelaxthethetexturecoordinatessuchaspresentedby [14] canoffsetthis small difference.Additionally, imagecompressiontechniquesaremuchmorewell-studiedfor 2D images.What is importanttonote is that octreetextureshave similar storagecharacteristicstosetsof 2D texturesasthetextureresolutionincreases.

To integratethenew texturesinto our productionpipeline,we firsttestedit ona smallprop(Figure 7).

Currently, octreetexturesareusedoncharactersandpropsthatneedto be setup quickly, or aredifficult to assigntexture coordinatesto. Modelsthatusea mix of surfacerepresentationsalsoaremorestraightforward to texture usingoctreetextures.The droid modelshown in Figure 8 is an exampleof a modelwhich waspaintedusingoctreetexturesfor thesereasons.

Octreetextureshavealsoallowedusto experimentwith othertypesof surfacerepresentations,suchas Adaptive DistanceFields andSubdivision Surfaceswithout worrying abouthow or even if theycanbeparameterizedfor 2D texturemaps.

6 Known Problems and Future Work

6.1 Painting in 2D

Themostimmediatedrawbackto usingoctreetexturesis thatonelosesthe ability to paint on the model in texture space,that is, topaintdirectly on themaps.An approachsimilar to thatwhich WeiandLevoy [26] usedto generatealocalparameterizationfor texturesynthesiscouldbeusedto locally unwrapa regionof thetexturetobepaintedon.

6.2 Very Close or Intersecting Surfaces

Octreetexturesdo not handlesurfacesin the rest model that areintersectingor very close,suchasskin andclothing. The normalflagsmentionedin section 3.5.2help to prevent the minificationartifactsthatthis cancause,but caremustbetakenwhensettingupa modelto eitherassigndifferentoctreetexturesto intersectingorvery closesurfaces,or to createa specialversionof therestmodelwherethesesurfacesaremovedaway from eachother.

Figure 7 Theoctreetextureswerefirst testedon a minor prop(thecharacter’s necklace)to ensurethatthey wouldwork within ourpro-ductionpipeline.(Fig. JoshuaLeBeauandScottBonnenfant)

789

Figure 8 Several versionsof this droid modelwerepaintedusingoctreetextures.(Fig. BridgetGoodman)

6.3 Interactive Viewing

Currently, nohardwaresupports3D texturesasanything otherthana regular 3D grid. Until this, or somesimilar compressedform oftexturecanbesupportedin hardware,thetexturemustbeapproxi-matedby a setof automaticallygenerated2D texturesif it is to beviewedinteractively.

Also, bettertechniquesto automaticallygeneratesuchsetsof tex-turesfrom an octreetexture efficiently, andat high quality, wouldhelpmakeit easierto manipulateoctreetextureswith existingtools.

6.4 Adaptive Resolution Limits

With theability to adddetailatany scale,anoctreetexturecangrowto bemuchlargerthanis neededto representaparticularsetof tex-ture.Our solutionis to simply allow the artist to adjustthe maxi-mumresolutionthey wishto paintwith atany giventime.However,imageprocessingtechniquescould be usedto adaptively discoverthe optimal resolutionof any new paint without manualinterven-tion.

7 Summary and Conclusion

We have describeda new approachto storingtexturesfor geomet-ric modelsby using a sparseoctreeto storetexture information,typically color. The approachis useful independentof the surfacerepresentationanddoesnot needany parameterizationother thanthesurfacecoordinatesthemselves.

Furthermore,wepresentsomeapproachesto usingthesetexturesinaproductionenvironmentandextendtraditional2D samplingtech-niquesto renderthesetextureswith fewer visualartifacts.We alsoprovide a techniqueto createthe texturesby paintingontoprojec-tionsof geometry.

Our experienceusingthesetypesof texturesin a productionenvi-ronmentshows themto be fastandrobust, andsimilar or smallerin disk spaceto a setof traditional2D texturesat thesameresolu-tion. In addition,therecanbe a tremendoussavings in artist timebecausetexture coordinatesdo not needto be assignedmanuallyfor eachmodel.

References

[1] K. Akeley. Realityenginegraphics. Proceedings of SIGGRAPH 93,1993.

[2] D. Berman,J. Bartell, andD. Salesin. Multiresolutionpaintingandcompositing.Proceedings of SIGGRAPH 94, 1994.

[3] J. Bloomenthal.Polygonizationof implicit surfaces.Proceedings ofSIGGRAPH 88, 1988.

[4] E.E.Catmull.A subdivisionalgorithmfor computerdisplayof curvedsurfaces.Master’s thesis,Universityof Utah,December1974.

[5] P. Cignoni, C. Montani, C. Rocchini, and R. Scopigno. A generalmethodfor preservingattribute valueson simplified meshes. IEEEVisualization 1998 Proceedings, pages59–66,1998.

[6] D. DeBry, J. Gibbs,D. Petty, andN. Robins. Paintingandrenderingtextureson unparameterizedmodels.Proceedings of SIGGRAPH 02,2002.

[7] R. Drebin,L. Carpenter, andP. Hanrahan.Volumerendering. Pro-ceedings of SIGGRAPH 88, 1988.

[8] S. F. Frisken, R. N. Perry, A. P. Rockwood, andT. R. Jones.Adap-tively sampleddistancefields: A generalrepresentationof shapeforcomputergraphics.Proceedings of SIGGRAPH 00, 2000.

[9] S.Gortler, R. Grzeszczuk,R. Szeliski,andM. Cohen.Thelumigraph.Proceedings of SIGGRAPH 96, pages43–54,1996.

[10] J. T. Kajiya and B. P. Von Herzen. Ray tracing volume densities.Proceedings of SIGGRAPH 84, 1984.

[11] L. Kobbelt,M. Stamminger, andH. P. Seidel. Using subdivision onhierarchicaldatato reconstructradiositydistribution. Proceedings ofEUROGRAPHICS 97, 1997.

[12] D. LaurandP. Hanrahan.Hierarchicalsplatting:A progressive refine-mentalgorithmfor volumerendering.Proceedings of SIGGRAPH 91,1991.

[13] D. Lischinski and A. Rappoport. Image-basedrenderingfor non-diffusesyntheticscenes.Rendering Techniques 98, pages165–174,1998.

[14] J Maillot, Y. Hussein,andA. Verroust. Interactive texture mapping.Proceedings of SIGGRAPH 93, 1993.

[15] M. Maruya.Generatingtexturemapfrom object-surfacetexturedata.Proceedings of EUROGRAPHICS 95, pages397–405,1995.

[16] D. R. Peachy. Solid texturing of complex surfaces. Proceedings ofSIGGRAPH 85, 1985.

[17] K. Perlin. An imagesynthesizer. Proceedings of SIGGRAPH 85,1985.

[18] H. Pfister, M. Zwicker, J.VanBaar, andM. Gross.Surfels:surfaceele-mentsasrenderingprimitives. Proceedings of SIGGRAPH 00, 2000.

[19] DanPiponi andGeorge Borshukov. Texture mappingof subdivisionsurfacesby modelpeltingandtextureblending. Proceedings of SIG-GRAPH 00, 2000.

[20] P. Sander, X. Gu,S.Gortler, andH. Hoppe.Silhouetteclipping. Pro-ceedings of SIGGRAPH 00, pages327–334,2000.

[21] P. Sander, J.Snyder, S.Gortler, andH. Hoppe.Texturing progressivemeshes.Proceedings of SIGGRAPH 01, 2001.

[22] M. SegalandK. Akeley. Theopenglgraphicssystem:A specification.http://www.opengl.org/Documentations/Specs.html, 1997.

[23] M. Soucy, G. Godin,andM. Rioux. A texturemappingapproachforthe compressionof colored3d triangulations.The Visual Computer,pages503–514,1986.

[24] M. TamminenandH. Samet.Efficient octreeconversionby connec-tivity labeling.Proceedings of SIGGRAPH 84, 1984.

[25] G. Turk. Generatingtextureson arbitrary surfacesusing reaction-diffusion. Proceedings of SIGGRAPH 91, 1991.

[26] Li-Yi Wei andMarc Levoy. Texturesynthesisover arbitrarymanifoldsurfaces.Proceedings of SIGGRAPH 01, 2001.

[27] L. Williams. Pyramidalparametrics.Proceedings of SIGGRAPH 83,1983.

790