A rule-based method for generating bookshelf models

Naoki Kita
Kazunori Miyatay
Japan Advan ed Institute of S ien e and Te hnology

Figure 1: left: A generated bookshelf model. The books on its shelves are randomly pla ed and they vary every generation. middle: Alarge-s ale library s ene. Ea h bookshelf has a different layout of books. right: A oor layout of bookshelves varies from that in the middle
image. Su h variation is easily a hieved by altering rules.

1 Introdu tion

3.1

Modeling bookshelves and books

The more hardware performan e improves, the more detail isneeded in the produ tion of 3D models. However, the modelingpro ess be omes tedious if it is done manually. It is therefore important to generate ontents pro edurally or automati ally, so as toprodu e su h models ef iently. This paper proposes a rule-based
method for generating bookshelf models. By applying different
rules, we an easily vary the appearan e or details of models.

Bookshelves onsist of shelf frames and shelf boards, therefore,
they are des ribed as follows based on EisenS ript notation:

2 Related WorkThe rules are nally interpreted into primitives (su h as Box), translation and rotation dire tion. Fig. 2 shows the rendering results.
Books onsist of pages and over (ja ket), and have rounded orners on their spines. We realized rounded orners by using Cylinder
primitives. Fig. 3 shows modeling results for books.

Grammar-based modeling overs many targets, from generationof natural shapes to ar hite tural models. CityEngine extends LSystem and applies it to generating road networks [Parish 2001℄.
Shape Grammar [Stiny 1980℄, Split Grammars [Wonka 2003℄, andCGA Shape [Muller 2006℄ are also used for shape, fa ade and detailmodeling. There are automati generation methods using a model
input by a user, to generate a large omplex-shaped model that resembles the user input [Merrell 2007; Merrell 2009℄. These approa hes are extensions of texture synthesis based on 3D geometry.
There are also ways of ombining pro edural methods and intera tive editing. In [Chen 2008℄, users an reate a street network ormodify an existing street network by editing an underlying tensor
eld.

rule bookshelf {shelf_frame
N * { y height } shelf_board}rule shelf_frame { ... }rule shelf_board { ... }Figure 2: Bookshelves
3.2

3 Pro ess Overview
Our approa h is a ombination of rule-based methods and pro edural methods to generate bookshelf models. Considering repetitive patterns o urring in a s ene with bookshelves and employing
stru tural patterns, we an easily hange from one s ene to another.
We

implemented our modeling s ript on Stru tureSynth[Christensen 2009℄. In Stru ture Synth, we use a s ripting
language alled EisenS ript whi h is based on ontext free design
grammar. Stru ture Synth allows us to edit s ripts while he kingpreview results. This enables us to reate or modify shapes, as inintera tive pro edural modeling approa hes.
 e-mail: s0950018jaist.a .jp
y e-mail:miyataka m.org
Copyright is held by the author / owner(s).
SIGGRAPH Asia 2010, Seoul, South Korea, December 15 – 18, 2010.
ISBN 978-1-4503-0439-9/10/0012

PlaFigure 3: Books

ing books in a bookshelf

In a tual bookshelves, books are not always well-organized whenpla ed. For example, there are books leaning over on other books,
piled up randomly and so on. To a hieve su h pla ements, ourmethod employs the term lot, whi h is based on the on ept ofhandling some books together as one blo k. We prepare some kindsof lots, and hoose two of them to ompose pairs. Then, lots arepla ed in bookshelves. The omposition of the pairs are a hievedby hoosing two lot rules a ording to their weight.
Lots' patterns are illustrated in Fig. 4 (left) from (a) to (d). We
also prepare books with two different heights, and vary the books
by hoosing books a ording to their weight. Pairing of the lots
is a hieved by hoosing two rules a ording to their weight, andombining them into a new rule. Fig. 4 (right) des ribes an example
when hoosing from lots illustrated in Fig. 4 (left) to ompose apair. The pla ement of paired lots in a bookshelf is a hieved bypla ing some pairs on one shelf and building up to ll a bookshelf.

Figure 4: Composition of lots, and a pair`````lot`weight a```modelr( )

(b)

( )

(d)

(d0 )

( 1)
(r 2)

15
1

1
1

1
1

1
1

1
1(r 3)

3

1

1

1

HHHH

(a) Bookshelves(b) Bookshelves and Desks

Figure 7: Example of Library

Table 1: lot weights of ea h modelFig. 5 shows rendering results of bookshelves. Table 1 shows lot
weights of bookshelves from (r1) to (r3) models rendered in Fig.
5, where (d0 ) is a lot in the dire tion of a book leaning over onother books is ipped. Fig. 5 (r3) is the rendering result using
bookshelves with lower shelves slanted.
In rule-based modeling, it is easy to vary the generated models
by onsidering their hierar hi al stru tures. Fig. 6 is obtained byhanging the pair level stru tures of Fig. 5 (r3).

(a) S ene 1(b) S ene 2

Figure 8: Example of bookstore

Also, we have shown how the generated models an easily be varied by employing stru tural patterns, su h as repetitive patterns orhierar hi al stru ture.

Referen es
C HEN , G., E SCH , G., W ONKA , P., M ÜLLER , P., AND Z HANG , E.
2008. Intera tive Pro edural Street Modeling. In Pro . of ACM
SIGGRAPH 2008, 110.
C HRISTENSEN , M. H., 2009. Stru tural Synthesis using a Context
Free Design Grammar Approa h. Generative Art Conf. Milan.
Figure 5: Rendering results

Figure 6: Variation

4 Results
From Fig. 7 to Fig. 9, we employ repetitive patterns to vary generated models by substituting appli able rules with other rules during
repetitive pla ing of bookshelves. In Fig. 7(a), bookshelves arepla ed from ba k to front repetitively. Fig. 7(b) is obtained bysubstituting an equipment rule for a bookshelf rule along the way,employing a repetitive pla ement method. Fig. 8 shows a s ene ofa bookstore. Fig. 8(b) employs the substitution te hnique in thesame way to pla e book lots fa ing ustomers.
Fig. 9 is generated by applying a rule that the bookshelves be pla edso as to draw a gentle urve by rotating during repetitive pla ements. Fig. 10 shows a se ondhand bookstore. In a se ondhandbookstore, there are many books piled up on the oor. To showsu h hara teristi s, the appli ation of piles of books is restri ted
only to the lower shelves, and the piled books are in front of thebookshelves. We modify the dire tion of spines of books to restri t
the range of their angles, and prepare some rules so that books pileup randomly.

M ERRELL , P., AND M ANOCHA , D. 2009. Constraint-based Model
Synthesis. In SPM '09: 2009 SIAM/ACM Joint Conferen e onGeometri and Physi al Modeling, 101111.
M ERRELL , P. 2007. Example-based Model Synthesis. In I3D '07:
Pro eedings of the 2007 Symposium on I3D, 105112.
M ULLER , P., W ONKA , P., H AEGLER , S., U LMER , A., AND
G OOL , L. V. 2006. Pro edural Modeling of Buildings. ACM
Transa tions on Graphi s 25, 3, 614623.
PARISH , Y. I. H., AND M ULLER , P. 2001. Pro edural Modelingof Cities. In Pro . of ACM SIGGRAPH 2001, 301308.
S TINY, G. 1980. Introdu tion to Shape and Shape Grammars.
Environment and Planning B: Planning and Design 7, 3 (May),343351.
W ONKA , P., W IMMER , M., S ILLION , F., AND R IBARSKY, W.
2003. Instant Ar hite ture. ACM TOG 22, 4 (July), 669677.

5 Con lusion
We have outlined a ombination approa h with both rule-basedmodeling and pro edural modeling for generating bookshelf models. It allows wide variations to the generated models by adding
rules or ontrolling rule weights, following the rule-based method.

Figure 9: Bookshelves in ar

Figure 10: Se ondhand bookstore