Stochastic Microgeometry for Displacement Mappingdavid/Downloads/SMI05_paper.pdf · Fig. 1....

9
Stochastic Microgeometry for Displacement Mapping Craig A. Schroeder, David E. Breen, Christopher D. Cera, and William C. Regli Geometric and Intelligent Computing Laboratory Department of Computer Science Drexel University Philadelphia, PA 19104 Abstract— Creating surfaces with intricate small-scale features (microgeometry) and detail is an important task in geometric modeling and computer graphics. We present a model processing method capable of producing a wide variety of complex surface features based on displacement mapping and stochastic geom- etry. The latter is a branch of mathematics that analyzes and characterizes the statistical properties of spatial structures. The technique has been incorporated into an interactive modeling environment that supports the design of stochastic microge- ometries. Additionally a tool has been developed that provides random exploration of the technique’s entire parameter space by generating sample microgeometry over a broad range of values. We demonstrate the effectiveness of our technique by creating diverse, complex surface structures for a variety of geometric models, e.g. arrowheads, candy bars, busts, planets and coral. I. I NTRODUCTION Generating complex surface textures with powerful and effi- cient techniques is an important problem in computer graphics. To solve this problem procedural modeling techniques, as well as procedural texture mapping methods, have been developed to increase the visual complexity of geometric models and computer graphics scenes. Ideally these techniques produce geometric models with intricate and realistic surface features with a concise representation and a minimum of user input, while also providing a user with flexible tools for adjusting low-level parameters that may be used to fine-tune a desired result. We describe a geometry processing method based on techniques from the field of stochastic geometry that addresses these issues and offers an approach to creating a wide variety of complex, realistically-appearing geometric models. The method produces detailed small-scale features on triangle meshes by reconstructing stochastic feature distributions on the meshes in order to define offset values for displacement maps. Given stochastic functions and statistical information that characterize and describe complex 2D patterns, the offset values are assigned to the individual vertices of the mesh, producing stochastic microgeometry on the model’s surface. The technique is useful for producing many different kinds of irregular surface detail with a single mathematically- and physically-sound computational approach; thus providing a powerful model processing tool for transforming smooth, “ideal” geometric models into convincing representations of natural or hand-made objects. See Figure 1. For example, smooth objects can be made to appear to be formed from clay, or chiseled from stone. Since the method is based on a reconstruction of a statistical distribution, it may be used to create large numbers of different, but statistically and visually similar models. This allows for the automated construction of whole families of complex objects that share a common visual characteristic, but individually are quite different. This may be useful when populating a scene with numerous objects that are of the same type, while each object is still unique; for example when creating models of a gravel walk, a cinder-block wall, a coral reef, a tray of prehistoric stone implements, or a candy counter. The statistical properties of the microgeometry can be produced from several sources. For instance they may be derived from scanning real materials [1], [2]. Alternatively the distributions and parameters that characterize these patterns may be computationally generated or interactively defined. We have created three tools that allow a user to design stochastic microgeometries. Similar to Sim’s image generation technique [3] and the Design Galleries concept [4], we are able to randomly sample the parameter space that defines the resulting surface structures. For each random point in the parameter space a specific reconstruction is produced for a given model. If the exact desired displacement map is not produced and further fine-tuning is required, an interactive environment is available for adjusting the model and algorithm parameters. Finally, feature distributions may be produced by analyzing images of textured surfaces. We demonstrate the effectiveness of our technique by creating diverse, complex surface structures for a variety of geometric models, e.g. arrowheads, candy bars, busts, planets and coral. Additionally, descriptions of our tools with rep- resentative results are presented. Once a desired displacement map is defined, it is used to randomly process a single model to produce numerous instantiations of the stochastic distribution. The stochastic displacement map may then be applied to any triangle mesh. II. RELATED WORK Procedural texture mapping is a common technique for computationally adding complexity to simple geometric mod- els [5]. Most of these techniques combine noise functions and/or simulations to produce varied and realistic texture maps for surfaces [6], [7], [8], [9], [10] and volumes [11], [12].

Transcript of Stochastic Microgeometry for Displacement Mappingdavid/Downloads/SMI05_paper.pdf · Fig. 1....

Page 1: Stochastic Microgeometry for Displacement Mappingdavid/Downloads/SMI05_paper.pdf · Fig. 1. Turquoise arrowhead, coral disk, chocolate candy bar, Giacometti-style bust and a virtual

Stochastic Microgeometry forDisplacement Mapping

Craig A. Schroeder, David E. Breen, Christopher D. Cera, and William C. RegliGeometric and Intelligent Computing Laboratory

Department of Computer ScienceDrexel University

Philadelphia, PA 19104

Abstract— Creating surfaces with intricate small-scale features(microgeometry) and detail is an important task in geometricmodeling and computer graphics. We present a model processingmethod capable of producing a wide variety of complex surfacefeatures based on displacement mapping and stochastic geom-etry. The latter is a branch of mathematics that analyzes andcharacterizes the statistical properties of spatial structures. Thetechnique has been incorporated into an interactive modelingenvironment that supports the design of stochastic microge-ometries. Additionally a tool has been developed that providesrandom exploration of the technique’s entire parameter space bygenerating sample microgeometry over a broad range of values.We demonstrate the effectiveness of our technique by creatingdiverse, complex surface structures for a variety of geometricmodels, e.g. arrowheads, candy bars, busts, planets and coral.

I. INTRODUCTION

Generating complex surface textures with powerful and effi-cient techniques is an important problem in computer graphics.To solve this problem procedural modeling techniques, as wellas procedural texture mapping methods, have been developedto increase the visual complexity of geometric models andcomputer graphics scenes. Ideally these techniques producegeometric models with intricate and realistic surface featureswith a concise representation and a minimum of user input,while also providing a user with flexible tools for adjustinglow-level parameters that may be used to fine-tune a desiredresult. We describe a geometry processing method based ontechniques from the field of stochastic geometry that addressesthese issues and offers an approach to creating a wide varietyof complex, realistically-appearing geometric models. Themethod produces detailed small-scale features on trianglemeshes by reconstructing stochastic feature distributions onthe meshes in order to define offset values for displacementmaps. Given stochastic functions and statistical informationthat characterize and describe complex 2D patterns, the offsetvalues are assigned to the individual vertices of the mesh,producing stochastic microgeometry on the model’s surface.

The technique is useful for producing many different kindsof irregular surface detail with a single mathematically- andphysically-sound computational approach; thus providing apowerful model processing tool for transforming smooth,“ideal” geometric models into convincing representations ofnatural or hand-made objects. See Figure 1. For example,smooth objects can be made to appear to be formed from

clay, or chiseled from stone. Since the method is based on areconstruction of a statistical distribution, it may be used tocreate large numbers of different, but statistically and visuallysimilar models. This allows for the automated construction ofwhole families of complex objects that share a common visualcharacteristic, but individually are quite different. This may beuseful when populating a scene with numerous objects that areof the same type, while each object is still unique; for examplewhen creating models of a gravel walk, a cinder-block wall, acoral reef, a tray of prehistoric stone implements, or a candycounter.

The statistical properties of the microgeometry can beproduced from several sources. For instance they may bederived from scanning real materials [1], [2]. Alternativelythe distributions and parameters that characterize these patternsmay be computationally generated or interactively defined. Wehave created three tools that allow a user to design stochasticmicrogeometries. Similar to Sim’s image generation technique[3] and the Design Galleries concept [4], we are able torandomly sample the parameter space that defines the resultingsurface structures. For each random point in the parameterspace a specific reconstruction is produced for a given model.If the exact desired displacement map is not produced andfurther fine-tuning is required, an interactive environment isavailable for adjusting the model and algorithm parameters.Finally, feature distributions may be produced by analyzingimages of textured surfaces.

We demonstrate the effectiveness of our technique bycreating diverse, complex surface structures for a variety ofgeometric models, e.g. arrowheads, candy bars, busts, planetsand coral. Additionally, descriptions of our tools with rep-resentative results are presented. Once a desired displacementmap is defined, it is used to randomly process a single model toproduce numerous instantiations of the stochastic distribution.The stochastic displacement map may then be applied to anytriangle mesh.

II. RELATED WORK

Procedural texture mapping is a common technique forcomputationally adding complexity to simple geometric mod-els [5]. Most of these techniques combine noise functionsand/or simulations to produce varied and realistic texture mapsfor surfaces [6], [7], [8], [9], [10] and volumes [11], [12].

Page 2: Stochastic Microgeometry for Displacement Mappingdavid/Downloads/SMI05_paper.pdf · Fig. 1. Turquoise arrowhead, coral disk, chocolate candy bar, Giacometti-style bust and a virtual

Fig. 1. Turquoise arrowhead, coral disk, chocolate candy bar, Giacometti-style bust and a virtual planet. Displacement maps based on stochastic microgeometryprovide the surface features.

Other less general approaches have been proposed for specificmodeling tasks, e.g. modeling stone facades [13], stone solidtextures [2] and flow patterns [14]. Texture values may alsobe utilized to define offsets from the surface to producedisplacement maps [15], [16]. Additionally, computationaltechniques have been used to tile complex models with imagefragments [17], [18], [19], [20] and geometric surface textures[21].

Another related field of study is stochastic procedural mod-eling [22], [23], [24], [25], [26], [27]. Here stochastic tech-niques are used to place particle systems, subdivide surfacesand define 3D density functions. Our work differs from allthe previous examples in that it brings a new mathematicalmodeling construct (stochastic geometry) to computer graphicsand geometry processing. Reconstruction and texture mappingalgorithms based on stochastic geometry provide a generaland powerful approach for generating varied and intricate 2D(the work described here) and 3D [1] structures with well-defined and consistent statistical properties; thus providinga superior method for adding naturally-appearing details tosmooth “ideal” geometric models.

III. STOCHASTIC GEOMETRY

Stochastic geometry1 is the study of the random processesthat produce geometric structures and spatial patterns. It fo-cuses on analyzing and understanding the connections betweengeometry and probability in order to describe and characterizegeometric small-scale features and large-scale spatial events[28], [29]. It has been used to analyze the porosity of materialslike sandstone [30], [31], the spatial arrangement of particlestrikes on a detector in order to detect bias or skew [29],the microstructure of biological materials [1], [32], fracturepatterns in rock [33], vegetation distribution [34], humansettlement patterns [35], and even bomb coverage patterns[36], [37]. For all these applications, stochastic geometry pro-vides a rich and concise representation for complex structuresand a mathematical framework for computing and analyzingaggregate statistical geometric properties. Stochastic geometryis supported by a number of key concepts.

1Stochastic geometry is a branch of mathematics primarily focused onstatistics and geometry. When using the term stochastic geometry in thispaper we are refering to this distinct technical field rather than the heuristicperturbation techniques generally used in computer graphics.

A. The Stochastic Point Process

Definition: A point process is the family of all sequencesof points satisfying two special conditions: (1) the sequenceis locally finite; Each bounded subset must contain a finitenumber of points, and (2) the sequence is simple, i.e. itcontains no duplicates. These sequences can in general beconsidered as a random set, when order is not important. Theterm point process is introduced to aid in defining a contactdistribution.

Stationarity and Isotropy: A stationary point processis one whose properties are invariant under translation. Anisotropic point process is one whose properties are invariantunder rotation. A motion invariant point process is one that isboth stationary and isotropic.

B. Contact Distributions

The contact distribution function���������

is defined as theprobability that

��does not intersect , where

�is a non-

negative scalar and

is a convex compact set.� �

may beexpressed as

���������� �������������������� ������(1)

where�����! "�

is the number of items from point process thatare included in set

, and

����#$�is the probability of event

#.

If we let

be the unit disk, we are left with the radial contactdistribution (or hitting distribution). The distribution

�%�"�����gives the probability that a disk

of radius

�can be randomly

placed inside the object without intersecting (contacting) theobject.

In general, there are many choices for

. If

were acube centered at the origin, the distribution would describe thelikelihood that a non-intersecting cube of a given size would fitat a point (without changing its orientation).

can generalized

to star-shaped sets in place of the convex requirement.Radial Contact Distribution: The radial contact distribu-

tion attempts to characterize the microstructure of an object byanalyzing the distances associated with points outside of an ob-ject’s boundary (porous region). Additional useful informationis obtained by supplementing this with a second distributionthat considers points inside of an object’s boundary (solidregion) in the same manner. In our 2D work the boundarydefines an interface between two regions on the surface ofthe processed meshes, with each region containing a differentdisplacement sub-map.

Page 3: Stochastic Microgeometry for Displacement Mappingdavid/Downloads/SMI05_paper.pdf · Fig. 1. Turquoise arrowhead, coral disk, chocolate candy bar, Giacometti-style bust and a virtual

Fig. 2. Our variation of the radial contact distribution is based on theprobability that a random point is a particular distance to a positive region(blue) and the negative region (red). Since we are taking measurements oncomplex surfaces, we utilize geodesic distances during this calculation. Theterm spherical contact distribution would be used for 3D calculations.

We model microstructures on the mesh with two distribu-tions; one specifies the likelihood that points in the negative(porous) region are a certain distance from the positive (solid)region, and the other specifies the likelihood that points inthe positive region are a certain distance from the negativeregion. The measured distances are not Euclidian; they aregeodesic and are calculated over the surface of the mesh.See Section IV-B for more detail. Our variation of the radialcontact distribution is illustrated in Figure 2.

IV. STOCHASTIC RECONSTRUCTION

Stochastic displacement mapping begins with the definitionof the two distributions for the positive and negative regionsand the triangle mesh to be processed. The general strategyinvolves assigning a distance value to each triangle in themesh, where the value corresponds to the minimum distance tothe positive/negative boundary and is consistent with a givenradial contact distribution. The total number of triangles inthe mesh and the distributions are used to create a histogram,where each bin represents the number of triangles that shouldbe assigned a distance value in a particular interval. Aswe assign distance values to triangles compatible with theconstraints of the measure, we decrement the appropriate binin the histogram. Once this process is completed, offset valuesfor the vertices are computed by averaging the distance valuesof the surrounding triangles. The average value is then used todisplace the vertex in the direction of the local surface normal.

A. Stochastic Function

The stochastic function we use is a variation of the radialcontact distribution for complex surfaces. The function cap-tures information regarding the distance from random pointson a surface to the nearest region boundary. In the context ofa porous object, the distribution gives the probability that arandom point is a distance R from the pore/material interface.This information is stored in the form of two distributions asshown in Figure 3. In our prior work we used this informationto describe the geometric properties of a porous 3D object [1],[32]. In the work described here, the distinction between poreand material is not germane. We simply define two regionswith different displacement maps on a triangle mesh. As such,the use of pore and material to describe the two types ofregions is abandoned. The two regions are identified by thesign of their associated distances.

0

0.05

0.1

0.15

0.2

1 2 3 4 5 6 7 8 9 10

Negative RegionPositive Region

Fig. 3. Distributions obtained from a porous bone sample. The horizontalaxis is the distance R to the pore/material interface. The vertical axis is theprobability that a point is distance R from the interface.

Radius

Pro

bab

ilit

y

Radius-2 2 4 6-4 0

Fre

quen

cy

Fig. 4. The distributions are originally defined separately. The distributionsare merged into a single distribution that extends in both positive and negativedirections. Using the mesh’s triangle count, the distribution is converted intothe histogram that is used by the reconstruction algorithm.

B. Geodesic Distance

We measure distance over the surface of a triangle meshwith an approximation of the geodesic distance. Consider thedual of the mesh, where nodes are located at the centroidsof triangles. Given two triangles, we compute the distancebetween them as the shortest path between the correspondingnodes along the dual graph. The measure is computed incre-mentally and is thus efficiently obtained [38].

C. Preparing the Distributions

The two contact distributions may be derived from realmaterials, randomly generated, or interactively defined by auser. The two initial distributions, which are at first definedonly for non-negative distance values, are combined into asingle distribution over all real numbers. One distributionremains defined for positive real numbers, and the otherdistribution is reflected into the negative real numbers. Thefrequency value for each interval (bin) in the distribution iscalculated by multiplying the total number of triangles bythe average probability, given by the distribution, over theinterval. The transformation of two distributions into a singlehistogram is outlined in Figure 4. Creating a single histogramsimplifies the reconstruction algorithm and its implementation,by allowing us to define two microstructure regions with asingle set of frequency values.

Page 4: Stochastic Microgeometry for Displacement Mappingdavid/Downloads/SMI05_paper.pdf · Fig. 1. Turquoise arrowhead, coral disk, chocolate candy bar, Giacometti-style bust and a virtual

-2 2 4 6-4 0-6 -2 2 4 6-4 0-6 -2 2 4 6-4 0-6 -2 2 4 6-4 0-6 -2 2 4 6-4 0-6 -2 2 4 6-4 0-6

Fig. 5. Labels are assigned beginning with high absolute values (red and blue), progressing towards zero (white). Labeling occurs in two ways: randomplacement (most evident in the first illustration), and mandatory placement (causing the spreading effect seen in the remaining stages). Note that the randomplacements are similar to seeding a crystal, which grows from its seed.

D. Processing a Triangle Mesh

Stochastic geometry reconstruction is the process that takesa contact distribution and generates a specific model withstructures statistically consistent with the distribution. Forstochastic displacement mapping this process involves re-moving distance values from the bins of the histogram andassigning them to triangles in a mesh based on a geodesiccontact distribution.

Since our approach creates surface detail with microgeome-try, it is sometimes necessary to first remesh and/or subdividean input model [39] before the reconstruction step in order toproduce a surface with minute, high-resolution facets. Becausethe reconstruction technique works at the triangle level, itis necessary to split triangles until the mesh is fine enoughto obtain the desired level of detail and avoid aliasing. Itis important to choose a triangulation method that producesreasonable aspect ratio triangles, since high aspect ratios couldlead to undesirable artifacts.

Reconstruction: We begin by identifying the bins in thehistogram that have the highest absolute value. Processing be-gins from the outside (highest absolute value) of the histogramand terminates after the zero bin has been considered. Eachiteration of the algorithm assigns values from a bin until it isempty or cannot be processed further due to the constraintsdescribed below. From our experience processing from highto low absolute values creates a more structured, efficient andless random result. The choice of direction is not arbitrary, butrather is related to the bin packing nature of the problem [40].

The assignment of these values has a geometric interpre-tation, and with this interpretation comes a constraint. If atriangle has been assigned the value & (which implies thatthe triangle is a distance & from the region boundary), anothertriangle located at a distance ' away must be assigned a valuein the range ()& � ' � &�*+'�, . Here, distances are computedbetween the centroids of triangles along the surface of themesh. For example, if a triangle has been assigned the value5.0, a triangle that is 0.4 units away, must be assigned a valuein the range [4.6, 5.4]. This constraint is global and applies toany pair of triangles. However, the constraint has little effecton triangles that are widely separated.

Each iteration of the algorithm consists of two steps. First,triangles that are constrained to have a value that falls withinthe interval of the current bin are identified. Values arecalculated for these triangles based on the distance to thenearest assigned triangle. A range of acceptable values ismaintained for each unassigned triangle.

For example, if the range of a triangle is [2.3, 5.7] and bins3-5 are empty, the triangle must be assigned a label from bin 2.It will receive the label 2.3, the most extreme value it may begiven. Note that the range of any particular triangle gives therange of labels that may be assigned to that triangle withoutviolating any distance constraint.

When a label is assigned, the constraint is propagatedoutwards and the ranges are adjusted if necessary. This wouldnormally require that every triangle be checked to see if it musthave its range updated. Because the measure is geodesic, it canbe computed incrementally in increasing order. In this way,the propagation can be terminated when the distance is largeenough that it can no longer have an impact. More specifically,one can stop when the value assigned plus or minus the currentdistance both lie outside of the range of any triangle.

The next step distributes the remaining labels from thecurrent bin randomly in a way that does not violate anyconstraints. If bin 4 is being processed, the value 4.0 (thoughany value between 4.0 and 5.0 would work) is assigned torandom triangles if 4.0 is in the acceptable range for thattriangle and the triangle isn’t already labeled. If no trianglesmeet these criteria, the bin is considered finished and the nextbin is processed. The algorithm terminates when all bins havebeen processed. The reconstruction algorithm is illustrated inFigure 5.

Dealing With Error: Our reconstruction algorithm iseffectively a form of bin packing [40], which cannot in generalbe accomplished in polynomial time without some error. Inmost cases the algorithm is unable to assign all values inthe histogram to triangles. This leaves a certain number oftriangles without an offset value. These triangles are thenassigned a value which is an average of neighboring valuesand is consistent with the distance constraints, regardless of thevalues remaining in the histogram. This heuristic guarantees

Page 5: Stochastic Microgeometry for Displacement Mappingdavid/Downloads/SMI05_paper.pdf · Fig. 1. Turquoise arrowhead, coral disk, chocolate candy bar, Giacometti-style bust and a virtual

Fig. 6. Processing different triangle meshes with the same stochastic microgeometry displacement map.

that an output can be generated for any input, and that theoutput will not violate the distance constraint. However, thiswill degrade the statistical properties of the resulting structure.

E. Displacement Mapping

Once the triangles of the mesh are labeled with signeddistance values, values for vertices are calculated by averagingthe values of adjacent triangles. The user is then offered avariety of options and parameters for mapping vertex valuesinto offset values, which may be independently chosen foreach region. These choices give the user freedom to finelyadjust the look and feel of the processed model and providea powerful approach to generating a wide variety of surfacedetail.

First, the direction of the offset is specified. The verticesmay be offset outward, inward or left untouched. The param-eter - in . �$�/�0�/�1�32 specifies the sign of the offset value, with�

signifying an outward offset,�$�

inward, and�

no change.Second, a scale factor 4 that determines the magnitude ofthe offset is available. Finally, we have two functions 576 � & �and 598 � & � that map the value & into a displacement amount536 �;: & : � for vertices in the negative region or 5/8 �;: & : � forvertices in the positive region. A vertex is in the positiveregion if the value for that vertex is positive, and similarly fornegative. The final offset distance is -<4=5>6 �;: & : � or -<4=5?8 �;: & :)� .We utilize the functions .@& �<A & 2 as choices for 536 � & � and598 � & � to generate our examples (the latter for its smoothingeffect). Once the parameters/options are specified, the model’svertices are offset in the direction of the local surface normalBC . An additional parameter D defines the ratio of the units ofthe distribution with the units of the geometric model, andcontrols the spatial frequency of the surface structures.

V. USER TOOLS

A geometry processing technique that does not offer auser effective handles for controlling the resulting output haslimited usefulness and value. We therefore developed threestrategies for designing displacement maps based on stochasticmicrogeometry. The first strategy employs random samplingof the parameter space of the contact distributions and thealgorithm input values. Similar to Sim’s image generationtechnique [3] and the Design Galleries concept [4], a useris able to quickly view the results produced by a largenumber of parameter combinations. Once an interesting set of

approximate parameter values are found the second strategyallows the user to interactively modify those parameters tocreate the final desired effect. Finally, contact distributionsmay be computationally generated by analyzing images oftextured surfaces.

A. Parameter Space Exploration

The first tool is implemented with a set of scripts that canbe used to explore the parameter space. These scripts allowthe user to specify a subset of the entire parameter space andthe number of test results to be generated for a given trianglemesh. The scripts randomly sample the selected subset andgenerate a large number of processed models. The modelsare rendered and presented on a web page for rapid viewing,along with the parameters associated with each result. Givena number of potential candidate models, a tighter search canbe employed on a smaller range of the parameter space. Atany time the parameters for a specific candidate model maybe fed to an interactive tool for further fine-tuning. Figures 1,8 and 9 present several processed meshes that were randomlygenerated with our parameter space exploration tool.

B. Interactive Design

The second tool is an interactive application for fine-tuning amodel’s distribution and the algorithm’s parameters in order toobtain a desired final processed mesh. The interactive programvisually divides the design process into three parts. In thefirst part the contact distribution is designed, modified, andfine-tuned. This involves setting the number of elements inthe individual bins of the histogram described in Section IV-D. Distributions may be normalized and saved for furtherexplorations at a later time. The second part gives the useraccess to algorithm parameters. These parameters includemesh resolution, distribution frequency (coarse effects versusfine ones), and offsetting parameters, e.g. scale factors anddisplacement functions. The third part is the actual reconstruc-tion, displacement and rendering. This stage occurs quickly,requiring only a few seconds to apply and display a newstochastic microgeometry displacement map; thus allowing theuser to rapidly converge on a desired result. Figure 10 presentsseveral screen-shot of our interactive tool while it is being usedto design a specific stochastic displacement map.

Page 6: Stochastic Microgeometry for Displacement Mappingdavid/Downloads/SMI05_paper.pdf · Fig. 1. Turquoise arrowhead, coral disk, chocolate candy bar, Giacometti-style bust and a virtual

C. Image-Based Acquisition

The radial contact distribution can be computed from a 2Dimage of a textured surface. Via a thresholding process theinput image is first converted into a binary image of blackand white regions. The white regions can be labeled as positiveand the black as negative. The distribution generation processbegins by zeroing a set of counters for each integer distancevalue of the histogram. A radial search is then performed ateach pixel in the image until a pixel with the opposite coloris found. The distance between these two pixels is computed.The unsigned distance value is negated if the original pixelis black. The counter corresponding to the distance value isincremented. Once this process is completed for all pixels, thevalues in every counter are divided by the total number ofpixels in the image to produce the histogram for the radialcontact distribution associated with the texture.

VI. IMPLEMENTATION

Let C be the number of triangles in the mesh after subdivi-sion has been performed. All of the initial meshing operationsare E � C � . The reconstruction considers in the worst case everypoint in the mesh for every distribution value, yielding a worstcase cost of E � C � . (The number of values in the distribution isassumed to be constant.) Because a propagation of constraintinformation must be performed when random placements aremade, reconstruction has (worst case) time complexity ofE � CGF � . In practice, the behavior is much faster than quadratic(after the first few passes, the propagation affects only thelocal portion of the mesh) and behaves linearly. The finaldisplacement mapping and other mesh operations are all linearin the number of triangles. The reconstruction algorithms wasimplemented in ANSI C++ and was run on Solaris and RedhatLinux systems. For meshes with tens of thousands of triangles,the code completes in a few seconds on a 900MHz SPARCSolaris workstation.

The parameter space exploration tools are a collection ofseveral programs and scripts. The programs are written inC++. The scripts are written in perl and bash. Libraries used inthese tools include OpenGL and ImageMagick. The programsrun on Solaris and Redhat Linux. Typically, generation ofeach candidate model and associated image requires a fewseconds on the same 900MHz SPARC Solaris workstation.The interactive program was developed in C++ with Qt andOpenGL. The program was tested on Redhat Linux. Thereconstruction code is also integrated into this program as well.

VII. RESULTS

We have processed numerous geometric models with ourstochastic displacement mapping technique. For explorationpurposes, we generated 500 candidate models by randomlysampling the parameter space of our algorithm (frequencyvalues of the histogram, - , 4 , 5 �;: & : � and D ) for each inputmesh. Selected images for six of the meshes are shown inFigures 1, 8 and 9. These images demonstrate the diversityof possible microgeometries produced by our technique. Theprocessing loop consists of random parameter generation,

Example Scale Displacement, H Direction I>JLKNMUnits Neg Pos Neg Pos Neg Pos

Fig 1, Arrow 63.27 .02876 .03489 - in - O KFig 1, Disk 64.69 .01092 .05097 out - K -Fig 1, Candy 38.93 0.0186 0.0397 in - O K -Fig 1, Head 27.78 .02033 .01647 in in O K KFig 1, World 36.65 .05472 .02389 - out - O KFig 6, All 79.82 .04906 .03232 - in - O KFig 8, Candy 71.48 .02111 .02856 out out O K O KFig 8, Coral 57.27 .03061 .03400 in out O K O KFig 8, Head 81.97 .01083 .01319 out out O K KFig 10, All 40.00 .05000 .03000 - in - K

TABLE IPARAMETERS USED TO GENERATE EXAMPLE MODELS.

-2 2 4 6-4 0-6

-2 2 4 6-4 0-6Fig. 7. Distributions used to generate example models. The models in Figures1, 6, and 9 were created with the top distribution. The models in Figure11 were created with the bottom distribution, which was defined with theinteractive tool presented in Figure 10.

reconstruction, mesh visualization, and other background pro-cessing; the entire process takes on the order of a few secondsper model. The models have on the order of tens of thousandsof triangles, with the largest ones having over a hundredthousand triangles.

The parameter values and contact distributions used to gen-erate most of these results can be found in Table I and Figure 7.The parameter “Scale Units” sets the scale for the model. Themodel is contained within a box with edge size P � Scale Units

�.

Once scaled, the distances in the object correspond to distancesin the distribution. Displacement parameter 4 is the scalefactor that controls the magnitude of a vertex offset in aparticular region. The function 5 � & � influences the shape ofthe resulting displacements. In particular, the magnitude ofthe displacement is 4=5 �;: L :)� , where Q is the label assigned tothat vertex. “Direction” indicates whether vertices should bedisplaced inward or outward. Note that vertices with positiveand negative labels have their own Displacement, Direction,and Function. A dash indicates that vertices with positive ornegative labels are not displaced.

While the technique may not fully reconstruct the geometricproperties of the input distribution on the surface of the model,this does not affect its ability to create realistic microgeometry.Further, the technique exhibits the desirable properties thatwould be obtained from a faithful reconstruction, such as the

Page 7: Stochastic Microgeometry for Displacement Mappingdavid/Downloads/SMI05_paper.pdf · Fig. 1. Turquoise arrowhead, coral disk, chocolate candy bar, Giacometti-style bust and a virtual

consistency of statistical properties across varied geometry.The interactive environment has been employed to design

numerous stochastic microgeometry displacement maps. Onedesign session is presented in Figure 10. These are severalscreen shots that demonstrate how the displacement mapchanges as a user modifies the individual contact distributionvalues. Once a desired displacement map is defined, it maybe repeatedly and stochastically applied to a single mesh inorder to create numerous models that have similar overallappearance, but are all individually different, as seen in Figure11. The same stochastic displacement map may also be appliedto different models, as seen in Figure 6.

VIII. CONCLUSION

Combining stochastic geometry with displacement mappingcreates a technique for producing complex surface micro-geometry that is both visually appealing and realistic. Itprovides a powerful and effective means for generating adiverse set of surface models by stochastically defining offsetvalues on triangular meshes in statistically-consistent patterns.The approach illustrates the ability of stochastic geometry tosupplement existing texture mapping techniques for computergraphics modeling applications.

IX. ACKNOWLEDGMENTS

The coral model was provided by Dr. Stephen Jeffreyof the University of Queensland, Australia. The mannequinhead model was provided by Caltech’s Multi-Res ModelingGroup. This work was supported in part by National ScienceFoundation Grants ITR/DMI-0219176 and CCF-0310619. Anyopinions, findings, and conclusions or recommendations ex-pressed in this material are those of the author(s) and donot necessarily reflect the views of the National ScienceFoundation or the other supporting government and corporateorganizations.

REFERENCES

[1] C. Schroeder, W. C. Regli, A. Shokoufandeh, and W. Sun, “Computer-aided design of porous artifacts,” Computer-Aided Design, vol. 37, no. 3,pp. 339–353, March 2005.

[2] R. Jagnow, J. Dorsey, and H. Rushmeier, “Stereological techniques forsolid textures,” ACM Trans. Graph. (Proc. SIGGRAPH), vol. 23, no. 3,pp. 329–335, 2004.

[3] K. Sims, “Artificial evolution for computer graphics,” in Proc. SIG-GRAPH, 1991, pp. 319–328.

[4] J. Marks, B. Andalman, P. A. Beardsley, W. Freeman, S. Gibson,J. Hodgins, T. Kang, B. Mirtich, H. Pfister, W. Ruml, K. Ryall,J. Seims, and S. Shieber, “Design galleries: a general approach to settingparameters for computer graphics and animation,” in Proc. SIGGRAPH,1997, pp. 389–400.

[5] D. S. Ebert, F. K. Musgrave, D. Peachey, K. Perlin, and S. Worley,Texturing and modeling: a procedural approach. Amsterdam: MorganKaufmann, 2003.

[6] G. Turk, “Generating textures on arbitrary surfaces using reaction-diffusion,” in Proc. SIGGRAPH, 1991, pp. 289–298.

[7] A. Witkin and M. Kass, “Reaction-diffusion textures,” in Proc. SIG-GRAPH, 1991, pp. 299–308.

[8] K. W. Fleischer, D. H. Laidlaw, B. L. Currin, and A. H. Barr, “Cellulartexture generation,” in Proc. SIGGRAPH, 1995, pp. 239–248.

[9] D. J. Heeger and J. R. Bergen, “Pyramid-based texture analy-sis/synthesis,” in Proc. SIGGRAPH, 1995, pp. 229–238.

[10] S. Worley, “A cellular texture basis function,” in Proc. SIGGRAPH,1996, pp. 291–294.

[11] K. Perlin, “An image synthesizer,” in Proc. SIGGRAPH, 1985, pp. 287–296.

[12] K. Perlin and E. M. Hoffert, “Hypertexture,” in Proc. SIGGRAPH, 1989,pp. 253–262.

[13] K. Miyata, “A method of generating stone wall patterns,” in Proc.SIGGRAPH, 1990, pp. 387–394.

[14] J. Dorsey, A. Edelman, H. W. Jensen, J. Legakis, and H. K. Pedersen,“Modeling and rendering of weathered stone,” in Proc. SIGGRAPH,1999, pp. 225–234.

[15] R. L. Cook, “Shade trees,” in Proc. SIGGRAPH, 1984, pp. 223–231.[16] L. Wang, X. Wang, X. Tong, S. Lin, S. Hu, B. Guo, and H.-Y. Shum,

“View-dependent displacement mapping,” ACM Trans. Graph., vol. 22,no. 3, pp. 334–339, 2003.

[17] F. Neyret and M.-P. Cani, “Pattern-based texturing revisited,” in Proc.SIGGRAPH, 1999, pp. 235–242.

[18] G. Turk, “Texture synthesis on surfaces,” in Proc. SIGGRAPH, 2001,pp. 347–354.

[19] L.-Y. Wei and M. Levoy, “Texture synthesis over arbitrary manifoldsurfaces,” in Proc. SIGGRAPH, 2001, pp. 355–360.

[20] J. Zhang, K. Zhou, L. Velho, B. Guo, and H.-Y. Shum, “Synthesis ofprogressively-variant textures on arbitrary surfaces,” ACM Trans. Graph.(Proc. SIGGRAPH), vol. 22, no. 3, pp. 295–302, 2003.

[21] P. Bhat, S. Ingram, and G. Turk, “Geometric texture synthesis byexample,” in Proc. Eurographics Symposium on Geometry Processing,2004, pp. 43–46.

[22] A. Fournier, D. Fussel, and L. Carpenter, “Computer rendering ofstochastic models,” Comm. of the ACM, vol. 25, no. 6, pp. 371–384,1982.

[23] A. Norton, “Generation and display of geometric fractals in 3-D,” inProc. SIGGRAPH, 1982, pp. 61–67.

[24] W. T. Reeves, “Particle systems - a technique for modeling a class offuzzy objects,” in Proc. SIGGRAPH, 1983, pp. 359–376.

[25] J. Lewis, “Generalized stochastic subdivision,” ACM Trans. on Graphics,vol. 6, no. 3, pp. 167–190, 1987.

[26] F. K. Musgrave, C. E. Kolb, and R. S. Mace, “The synthesis andrendering of eroded fractal terrains,” in Proc. SIGGRAPH, 1989, pp.41–50.

[27] D. Ebert, W. Carlson, and R. Parent, “Solid spaces and inverse particlesystems for controlling the animation of gases and fluids,” The VisualComputer, vol. 10, no. 4, pp. 179–190, 1994.

[28] O. Barndorff-Nielsen, W. Kendall, and M. van Lieshout, StochasticGeometry: Likelihood and Computation. Chapman & Hall / CRC,1999.

[29] D. Stoyan, W. Kendall, and J. Mecke, Stochastic Geometry and ItsApplications. John Wiley & Sons, 1987.

[30] C. L. Y. Yeong and S. Torquato, “Reconstructing random media. II.Three-dimensional media from two-dimensional cuts,” Physical ReviewE, vol. 58, no. 1, pp. 224–33, OCT 1997.

[31] R. Hilfer and C. Manwart, “Permeability and conductivity for recon-struction models of porous media,” Physical Review E, vol. 64, JUL2001.

[32] C. Schroeder, W. C. Regli, A. Shokoufandeh, and W. Sun, “Repre-sentation of porous artifacts for bio-medical applications,” in 8th ACMSymposium on Solid Modeling and Applications, 2003, June 2003, pp.254–57.

[33] G. Baecher, “Statistical analysis of rock mass fracturing,” InternationalJournal of the Association of Mathematical Geologists, vol. 15, no. 2,pp. 333–352, 1984.

[34] P. Diggle, “Binary mosaics and the spatial pattern of heather,” Biomet-rics, vol. 37, pp. 531–539, 1981.

[35] A. Bradley and C. Small, “Looking for circular structure in post holedistributions: quantitative analysis of two settlements from Bronze AgeEngland,” Journal of Archaeological Science, pp. 285–297, 1985.

[36] H. Robbins, “On the measure of a random set I,” Annals of MathematicalStatistics, vol. 15, pp. 70–74, 1944.

[37] ——, “On the measure of a random set II,” Annals of MathematicalStatistics, vol. 16, pp. 342–347, 1945.

[38] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and Cliffor, Introductionto Algorithms, Second Edition. MIT Press, 2001.

[39] P. Alliez, M. Meyer, and M. Desbrun, “Interactive geometry remeshing,”ACM Trans. Graph. (Proc. SIGGRAPH), vol. 21, no. 3, pp. 347–354,2002.

[40] S. Martello and P. Toth, Knapsack Problems: Algorithms and ComputerImplementations. John Wiley & Sons, 1990.

Page 8: Stochastic Microgeometry for Displacement Mappingdavid/Downloads/SMI05_paper.pdf · Fig. 1. Turquoise arrowhead, coral disk, chocolate candy bar, Giacometti-style bust and a virtual

Fig. 8. Five models are modified with displacement maps based on stochastic microgeometry, demonstrating a wide diversity of surface characteristics. Thefirst image is the original mesh that is processed to produce the remaining models.

Fig. 9. Close-up views of a rice-covered candy bar, coral and clay head.

Page 9: Stochastic Microgeometry for Displacement Mappingdavid/Downloads/SMI05_paper.pdf · Fig. 1. Turquoise arrowhead, coral disk, chocolate candy bar, Giacometti-style bust and a virtual

Fig. 10. Designing a stochastic microgeometry displacement map.

Fig. 11. Twenty different textured meshes using the distribution from the bottom left example in Figure 10.