Interactive Procedural Modeling of Pebble Mosaics
Naoki Kita∗
Kazunori Miyata†
Japan Advanced Institute of Science and Technology(a) Reference image(b) Stream curves(c) Generated pattern(d) ResultFigure 1: Example: Heart design

1

Introduction

In computer graphics, with improvement in hardware performance,
more detailed production of three-dimensional (3D) models is required. However, the modeling process becomes tedious if it iscarried out manually, in particular for natural objects because of
their complexities. Therefore, it is important to generate content
procedurally or automatically in order to efficiently produce suchmodels. Furthermore, a purely procedural approach prevents theuser from exercising total control over the outcome. The solution
we proposed here is to combine the power of procedural modelingwith the flexibility of manual editing. In this paper, we focus on thegeneration of pebble mosaics to achieve the distribution of numerous pebbles while maintaining distribution controllability. Existing
research on rock modeling and digital mosaics has not focused onuser-specified arrangements, whereas in this work, we present aninteractive method for generating pebble mosaics. This is achieved
through designing an underlying tensor field that specifies the pattern of pebble arrangement. The experimental results show that arealistic visual quality is obtained using our proposed method.

2Related Work

Miyata et al. proposed a method that packs rectangles into
two-dimensional (2D) specified regions and then creates rockshapes by subdividing the surface in order to generate a pavement[Miyata 01]. A method presented by Peytavie et al. [Peytavie 09]
can generate aperiodic rock piles by using tiling, a 3D Voronoi diagram, and an erosion simulation. Hausner proposed a method for
simulating decorative tile mosaics using a centroidal Voronoi diagram [Hausner 01]. The method is used to place tiles along a specified direction field; therefore, the generated mosaic images represent a fine flow of tiling.

3Process Overview

The proposed method generates an initial flow field on the basis ofreference image gradients. Next, the user can edit the flow field via
a stroke interface. Considering the tensor values of the flow field,
site distribution is generated by a Poisson disk distribution using an∗ e-mail: naoki.nth@gmail.com† e-mail:miyatak@acm.org

Copyright is held by the author / owner(s).
SIGGRAPH Asia 2011, Hong Kong, China, December 12 – 15, 2011.
ISBN 978-1-4503-0807-6/11/0012

elliptical disk. Pebble volumes are generated in each disk region.
Therefore, our method generates 3D pebble mosaics by means ofuser-specified arrangements.

3.1 Tensor Field Generation
Most previously proposed methods employ a vector field for theflow field at which elements such as mosaic tiles are directed. Instead, of a vector field, we employ a tensor field for the flow field[Chen 08; Zhang 07], which allows a user to interactively edit theflow field. In our method, we employ a 2 × 2 symmetric tensor, t ,given by Eq. 1. Here µ ≥ 0, θ ∈ [0, 2π), and t have two orthogonal
eigenvectors.
()cos 2θ
sin 2θ
t=µ(1)
sin 2θ − cos 2θ
We employ two types of tensor fields to generate a pebble mosaic:a grid pattern for regular flow and a radial pattern for revolving
flow. Fig. 2 shows examples of the tensor fields and the generated
pebble patterns represented by elliptical disks. The long axis of anelliptical disk is placed so as to follow the major eigenvector of its
underlying tensor field.

(a) Grid pattern(b) Grid result(c) Radial pattern(d) Radial result

Figure 2: Tensor fields and generated pebble patterns

3.2 Initial Flow Field
For a given input image I (Fig. 3(a)), the procedure computes its
gradient ∆I (Fig. 3(c)) from the edge curves (Fig. 3(b)) and normal vectors s · ∇p at each pixel p from ∆I, and then rotates themcounterclockwise by π/2 to obtain the tangent vectors. Here s isscaling factor s = e−dD(p) , where D(p) is the distance value fromits nearest edge point and d is the scalar scaling parameter. Fromthe tangent vector, the tensor value at pixel p is calculated using thegrid pattern described in Section 3.1.

(a) Input image(b) Edge curve(c) Distance map(d) Initial field

4 Results
Fig. 1(d) and Fig. 5(a) are generated from 2D images. It can be seenthat the pebbles are aligned to the specified stream curves. Fig. 5(b)and Fig. 6(b) are generated from 3D models. Here the initial flow
field is calculated from the normal map and the depth map of the 3Dmodel, as shown in 6(a). The pebbles are scaled in proportion to thedepth value of the model. In addition, we can obtain an alternative
decoration pattern, whose background is generated with rocks from
Voronoi diagrams instead of pebbles, as shown in Fig. 5(b).

Figure 3: Initial flow field generation

3.3

Editing Flow Field

A user can edit the initial flow field by drawing arbitral curves onit. The drawn curves are divided into uniform segments, and tensor
value Ti (p) at pixel p is calculated for each i-th segment si . Finalvalue T (p) is calculated by summing up Ti (p) weighted with thedistance between si and p, as given by Eq. 2.
T (p) =∑ −d∥p−s ∥2ieTi (p)(a) Yin-yang symbol(b) Bunny

Figure 5: Examples

(2)

i

3.4

Cell Distribution

Each cell of a pebble is placed along the generated stream field. To
distribute the cells, our method employs the Poisson disk distribution using an elliptical disk instead of a circular one. The method
also distributes the cells so as to avoid the edge curves. Fig. 4(b)shows an example of the distributed cells.
(a) Data(b) Result
Figure 6: Example: Horse model

5 Conclusion(a) Stream curves(b) Distributed cells

Figure 4: Poisson disk distribution

We proposed an interactive method for generating pebble mosaics
that enables the generation of an intended pattern freely by drawing
stream curves. In the future, we would like to solve the problem ofnoticeable gaps among pebbles by applying a relaxation process.

References
3.5

Pebble Mosaic Generation

A pebble mosaic is obtained by generating a pebble for each cell
distributed by the aforementioned method. Each pebble is generated in two steps:
1. Generation of an initial mesh for each cell
2. Smoothing of the initial mesh by the subdivision surface
methodAn initial mesh is generated according to the geometry of each cell.
A 3D prism shape is obtained by sweeping the extent rectangle ofeach cell to a given height in the cell’s normal vector direction. The
initial mesh is then generated by deforming this prism by displacing
each top corner at random and tapering the prism. After the initialmeshes have been generated, they are subdivided and refined byusing the Loop’s subdivision method.

C HEN , G., E SCH , G., W ONKA , P., M ÜLLER , P., AND Z HANG ,E. 2008. Interactive procedural street modeling. In Proc. of
SIGGRAPH 2008, 103:1–10.
H AUSNER , A. 2001. Simulating decorative mosaics. In Proc. of
SIGGRAPH 2001, 573–580.
M IYATA , K., I TOH , T., AND S HIMADA , K. 2001. A method
for generating pavement textures using the square packing technique. The Visual Computer, 17(8): 475–490.
P EYTAVIE , A., G ALIN , E., G ROSJEAN , J., AND S. M ÈRILLOU
2009. Procedural generation of rock piles using aperiodic tiling.
Computer Graphics Forum, 28(7): 1801–1809.
Z HANG , E., H AYS , J., AND T URK ., G 2007 Interactive tensor
field design and visualization on surfaces. IEEE Transactions onVisualization and Computer Graphics, 13: 94–107.