This chapter includes discussion on proposed algorithms and theories in the end. But, first, we are going to explain the concept of modeling graphs. Next, we are going to talk about the theory of the cardinal spline curve that is used for specifying the curved shape of roofs. Finally, we will talk about parameters for the roofs of three different giwa houses.
3.1. Modeling Graphs
At a high level, modeling of the house is designed on a conceptual modeling graph data structure. By using the modeling graph, we are able to break down the whole house into several components and explain the geometrical connection between them. In a modeling graph, the nodes are specific components of a house such as a base, a body or a roof. The edges on the graph, which are represented as direct arrows, represent the connection between the components. The extensibility is one of the benefits of the modeling graph technique. By adding nodes with edges on the existing graph, we can make more complicated house model.
Figure 2 shows the general modeling graph. In this modeling graph, nodes are represented as
and edges are represented as
where
i and
j are incoming and out-going nodes respectively and
p is a set of parameters for constructing the out-going nodes. The parameter includes the 3D offset between two connected nodes and all parameters required numerical values such as types or sizes for specifying a particular shape of the component.
There are two important features in the modeling graph. First, as we can see in the right side of
Figure 2, two nodes are allowed to be connected with multiple directed edges. The edges may connect the same components, but they have a different set of parameters. It means that even if we visit the same node repeatedly, we are able to create different shapes, depending on which edge the algorithm chooses. Second, our modeling graph allows self-edges. The self-edges are used to model the same component repetitively. Again, there might be several self-edges for a same node. This provides an ability to construct similar but different styles of component multiple times.
At the runtime, the modeling is processed by traversing the graph from the starting node to the end node. When the algorithm transits from one node to the other, it applies the parameters set contained in the edge.
Figure 3 shows an example of the modeling graph and its result after a traversal. The sample
giwa house has four major components which are bottom, body, pillars and roof, and the bottom node is the starting node. In this graph, the bottom node is connected with the body node, and the body node is connected with the roof node. Afterwards, the body node is connected with another pillar node. In particular, the four pillars of the house are added to the central body through four self-edges on the pillar node of the modeling graph.
Extensibility is the main advantage of the modeling graph. By adding nodes and edges, we are able to construct the architecture in a scalable manner.
Figure 4 indicates the addition of pillars on the lower part of house by adding edges on the graph. In this case, two nodes, which are the pillar node and the lower body node, are connected with multiple edges. Each edge has a different set of parameters including 3D offset vectors. By selecting a particular edge, we are able to put the pillar on the particular position.
Figure 5 indicates the variability of houses made by the modeling graph. This example applies self-edges, which is one of novel features of this modeling technique.
Figure 5a shows a
giwa house designed by repetition of a roof component.
Figure 5b shows a house with double bottom components.
Figure 5c shows a house with two body components. As shown in these figures, even though we repeat the same node of the graph several times, we can construct different styles by using a different parameter set.
3.2. Cardinal Spline
One of the important features of Korean
giwa houses is their beautiful curved shape of roofs. To achieve the curved silhouette, we apply the Cardinal spline with a set of control points. The curve acts as a guideline to add a series of
giwa, which is a tile block of roof, along the curve. Among many different spline curves, we chose the Cardinal spline because it is an interpolation spline. The interpolation spline is quite useful for procedural modeling because the curve always passes through the control points. The Cardinal spline is made of segments where each segment is defined by means of four control points but only goes from the second point to the third one. Mathematically, given four control points from
to
for a segment, the position at parameter
t, denoted as
, can be calculated as the following equation.
where
s is the tension value and
. The tangent at parameter
t,
, also can be calculated as follows:
Designing a long curve can be easily done by adding more control points on the curve. A four- pairwise control set, where some of control points are repeated from the previous curve segment, is able to create a new segment that is smoothly extended from the previous segment.
3.3. Parameterziation of Three Different Giwa Houses
One of the prominent characteristics of Korean traditional houses is that no roofs are flat. Almost all of them have curved lines and surfaces, which is one of the unique originalities of Korean architecture [
4,
21]. Also, because the roof structures are quite symmetrical, if we define one front side of the roof, then the rear side is automatically designed by calculating the reflection. The overall shape of roof is designed by the Cardinal spline curve that we explained in
Section 3.1.
In this section, we aim to parameterize three most popular Korean roof styles in a procedural way. These are
Pal-jak, Mat-bae and Woojin-gak. Figure 6a shows those roof styles, respectively. In general,
giwa roofs are supported by three big beams:
yong-maru, narim-maru and
chenyo-maru as shown in
Figure 6b. The
Yong-maru is the horizontal beam that is located on the central part of the roof. It supports the whole roof. The
Narim-maru is the vertical beam at both ends of the
Yong-maru, and the
Chunyeo-maru is the beam around the edge of the roof outside.
Depending on the roof type, some beams are not needed. For example, Mat-bae roof does not need Chunyeo-maru. When we parameterize such roof style, we need to take that into account.
3.3.1. Pal-Jak Roof
The most beautiful and complicated roof style is
Pal-jak. As you can see on the left side of
Figure 6, the side of
Pal-jak roof looks like the Chinese letter eight (八). This makes its overall appearance very majestic and solemn. However, the most important characteristic of the
Pal-jak roof is that three beams are attached to the roof, as illustrated in
Figure 7. To build the 3D model of the roof, we first need to design the outline through the Cardinal-spline curve.
Figure 7 shows the top, front and side view of
Pal-jak and some of the important parameters for the roof. Note that all blue dashed lines on the figure indicate the parameters for the roof and red dots represent some of the control points of the spline curves. Note that the picture on the bottom of
Figure 7 shows the real
Pal-jak roof rendered with our proposed rendering tool. As explained in
Section 3.1, the whole roof component is represented as a single node in a modeling graph, and those parameters we extracted are entered on an edge of the graph.
To specify a silhouette of the roof, the cardinal spline requires at least four control points. If the curve is short, then four control points are sufficient. However, if it is too long, then we need to add more control points. In our approach, we set a threshold value to determine the number of control points.
Designing the roof outline follows the steps below:
Step 1. Given the size parameters in x, y and z axes for the roof and eave length, we design the central part of the roof (shaded area is noted as A and B) with two rectangles. The two rectangles look like a wedge ( ) on the front. Then, they are subdivided into three parts in z axis to have different heights.
Step 2. We specify four curves on each corner (curves are noted (1) in
Figure 5). Positions of the first and end control points of the four curves can be set from the two rectangles from Step 1.
Step 3. We connect four ending positions of the curves from Step 2 with other curves. (Curves are noted as (2) and (3) in
Figure 5.)
Step 4. We subdivide the curves of Step 2 into three segments vertically and horizontally, and repeat step 3 on the segments to get a set of quads. (center of
Figure 5)
The curvatures of the curve are controlled by the y coordinate of control points located inside. After going through 4 steps above, we can have a set of quads as an output. Then, we can apply the automatic way of layering 3D
giwa tiles on the quads. This process is explained in detail in
Section 3.4.
3.3.2. Mat-Bae Roof
The
Mat-bae roof is a subset version of the
Pal-jak roof which does not have
Chunyeo-maru. By removing
Chunyeo-maru on the front and back, we can easily design the
Mat-bae roof from the
Pal-jak roof.
Figure 8 shows an example of
Mat-bae roof and its important parameters (Blue dashed lines). Similar to the
Pal-jak roof, thanks to spline curve specification, we are able to represent the beauty of curved roof shapes easily.
Figure 8 shows all parameters associated with the
Mat-bae roof and the actual rendered image obtained by our rendering tool.
3.3.3. Mat-Bae Roof
The
Woojin-gak roof is also a simplified version of the
Pal-jak roof in which the
Narim-maru does not exist. The front and rear parts of the roof look like a triangle, and the sides look like a trapezoid.
Figure 9 shows the important parameters and the final shape of the
Woojin-gak roof with its rendered image.
3.4. Automatic Layout of Giwa Tiles
One of the most important characteristics of Korean traditional
giwa houses is that the entire surface of roofs is covered with tiles called ‘
giwa’ [
4]. For a realistic implementation of this
giwa layering, the simplest solution is texture mapping, where we basically wrap the entire geometry with
giwa images. However, because the image-based texture mapping makes it impossible to represent the architectural silhouette which is one of the most important features in 3D architecture modeling, we instead procedurally place real 3D
giwa geometry on the roof.
Figure 8 explains the layering process of
giwa tiles. Note that we use bolt font to represent vectors.
When we lay out the whole set of
giwa tiles on the roof, we must align them in a single direction. Also, because the polygons that are compositing the roof can form a random shape in some cases, we must control the number of
giwa tiles for the polygon and adjust the gap between tiles without causing any visual discontinuity. Without loss of generality, we assume that the plane of the roof is comprised of a set of quadrilaterals, which is true for most Korean
giwa houses [
21].
Given a quadrilateral plane defined by four vertices
, where vector
and vector
are parallel, the algorithm first finds a 3D normal vector,
, of the plane by calculating cross product of two vectors
and
. Then, from the align vector
entered by the user, the up vector
u can be easily found through the cross product
. Those vectors and vertices are shown in
Figure 10.
Our basic idea is that we layer the giwa blocks one row at a time until we cover the entire rectangle polygon. The number of rows of tiles, , for the polygon, can be calculated as ) where u is the unit up vector, , h is the height of a single giwa tile and the operator represent the dot product. The int() converts from a real number to an integer value.
If we know
, then the next step is to find the starting position of layering,
, and ending position
, for the row
r.
Figure 10 shows the position of
and
for the last row in which the blue squares represent
giwa tiles. To find the position of
, we use the proportional property between two similar right triangles
and
which are formed by three points
,
,
and
,
respectively. Note that the points
and
are always on the line of up vector
u in our formulation. Because the two similar right-angled triangles
and
have proportional edge lengths
and
against
and
, the length of vector
can be computed through the following equation:
where
h is the height of a single
giwa tile,
and
u is the up vector.
From the length of vector
, we can calculate the position of
. By applying similar way to the other side, we can get the
on the right side. If we know the
and
, the number of
giwa tiles for row
r, denoted as
, can be estimated by
where
w is the width of a single
giwa. However, because the distance between
and
is not an exact multiple of fixed width
w, there might be some space left or some tiles may pass through
at the end of the row. In order to fix this problem, our algorithm automatically calculates gaps between tiles for each row so that the last position of
giwa would match the
exactly. The gap between adjacent tile j and j+1 in row
r, say
, can be calculated through the following equation:
where
w is the width of the single
giwa and
is the number of
giwa tiles for row
r.
From the
, the position of
ith giwa,
, is then computed as
. At rendering time, we draw a single
giwa at
and repeat this until
equals
. Once we finish one row, we move up to the next row and reiterate the same process until we fill out the entire polygon. We summarize the layering algorithm in the box below.
Figure 11 shows the result that we get from applying our algorithm to the
Pal-jak roof.