CHAPTER 3 FEATURE LINE EXTRACTION
3.5 MESH SIMPLIFICATION
The Chinese landscape painting pays attention to express an artistic concept. So painters usually care about an overall arrangement among objects. The detail of an object is not so important; we only need to depict major characteristics. To further improve the quality and performance of the rendered image, we have some ideas for synthesizing Chinese landscape painting. Since we don’t need “detail” information of a model, why don’t we simplify the triangle meshes? By doing this, performance can be increased and feature lines extracted from the simplified model can be relative meaningful. We use Progressive Mesh approach [14] to reduce the terrain model. We can change the accuracy of the model by adjusting the total number of vertices in the
(a) Original Meshes (b) 75% of vertices
(a) 50% of vertices (b) 25% of vertices Figure 3.8: Progressive mesh.
Chapter 4 Painting Algorithm
In this chapter, we describe the painting algorithm we used to simulate Chinese ink painting styles. After we generate feature lines, brush strokes should be applied on them. There are many well established painting algorithms and brush models. Some of them are physically-based and some are parameter-based model. For example, Weng’s brush model [37] is dedicated to Chinese ink painting and Curtis’s model [6]
simulated various effects of watercolor.
There are three main components in our painting algorithm. First, a physically based brush model describes the shape of the brush, the number and locations of bristles. Second, a brush movement control mechanism determines the position and orientation of a brush during the painting process. Third, an ink depositing mechanism simulates various brush stroke effects such as gradient effect, dry brush effect, concentration of ink and the difference among bristles.
While painting, our brush model will move along the path of stroke and deposit ink on the canvas. In Section 4.1 we introduce a deformable brush model. Section 4.2 discusses the movement, pressure variation and rotation of brushes. Then the ink depositing model is presented in Section 4.3. The ink depositing model controls the amount of ink that deposited by each bristle at each time instant thus generates various effects of brush strokes.
4.1 Brush Model
Horace and Helena [17] used a 3D model to simulate the brush, and used an ellipse to simulate the contact region of the canvas and brush. Horace’s model is usually applied on calligraphy because it performs turning effects very well. Weng’s model [37] distributes bristles uniformly in a 2D circle. In Chinese ink painting, since turning effects are not so emphasized, a 2D brush model is enough to simulate painting strokes.
Weng’s model focused on simulating center-stroke effect. However, in Chinese
landscape painting, side-stroke effect is also necessary. Especially when we simulate axe-cut Ts’Un painting styles, almost every stroke is side-stroke. Unlike center-
stroke’s brushwork, side-stroke tilts the brush while painting. Chiang [7] modified
Weng’s model to achieve side-stroke effect. The contact region of side-stroke is similar to an ellipse, and the tip of the brush is on the side, as shown in Figure 4.1.
Figure 4.1: Side-stroke effect.
To implement both center-stroke and side-stroke effects, we use a deformable ellipse structure to simulate the contact region of the canvas and brush. By adjusting the ratio of ellipse’s main shaft and countershaft, we can simulate various side-stroke styles. When the shaft ratio is equal to one, the contact region is a circle and center-stroke effect is simulated. As shown in Figure 4.2, the distribution of bristles is similar to concentric ellipses. O is the center point of concentric ellipses. We use the outmost ellipse (E1) as the criterion and distribute other ellipses inside E1 in a ratio of equality. We define the Y direction of E1 as the main shaft (B). B is also the standard of the shaft length. The X direction of E1 is the countershaft (A). The shaft length of each ellipse is defined as follows:
I number of ellipses and i is the index of ith ellipse.
E
1 YB
X
O A ( brush moving direction)
Figure 4.2: The contact region of brush.
The parametric equation of each ellipse Ei is:
u
Inside the contact region, contact points of each bristle and canvas can be figured by calculating the intersection points of concentric ellipse and lines radiated from center point O. In Figure 4.3, each radiant line segment divides the ellipse into regions
Rj in a equal angle. The angle between radiant line and A can be calculated by
and j is the index of jth division.
Contact point of
Figure 4.3: The contact point of each bristle.
So, the contact point of each bristle is the intersection point of Rj and Ei. Figure 4.4 shows the contact point of bristle hi,j. We use the polar coordinate to represent the position of hi,j. The center point of the polar coordinate is O.
hi,j = (di,j,θj)
where i is the index of the ellipse and j is the index of the division. di,j is the distance from hi,j to O. di,j can be calculated by:
2
Figure 4.4: The position of contact point.
The parameters A and B control the overall contact shape and region of the brush.
In our system, A is replaced by the ratio of ellipse’s main shaft and countershaft (R) where A = R × B. So we use B to decide the contact region of the brush and R to
determine the shape. I controls the number of concentric ellipses and J decides the number of contact region divisions. Both I and J are related to the distribution density of bristles. Since we have parameterized the contact points of the bristles, we can generate the desired brush styles by adjusting B, R, I and J. Both center-stroke and side-stroke effect can be simulated by this method.
hi,j = (di,j,
θ
j)4.2 Brush Movement Control Mechanism
During painting process, the brush moves its contact region along the stroke trajectory and deposits ink to generate expected strokes. In this Section, we discuss three parameters that varied constantly during this process: position of the contact region, size of the contact region and brush orientation.
We use Cardinal Spline to simulate the stroke trajectory. Since it is an interpolating curve, we could obtain interpolated points between two neighboring control points. Figure 4.5 shows the generated trajectory by arranging control points.
(a)
(b)
Figure 4.5: (a) Control points (b) Interpolating curve.
While painting, the center of contact region goes through these interpolated
the center of contact region on the canvas is (ox, oy), the position of bristle hi,j can be
While painting, the pressure of the brush affects the size of the contact region. It also affects the amount of ink deposition and we will discuss this in the next section.
To ensure the brush pressure changes naturally and smoothly between two neighboring control points, we use linear interpolation to assign the pressure of each interpolated trajectory point. Figure 4.6 shows the variation of pressure while painting.
The brush starts slightly and pushes down gradually. Finally it lifts quickly.
Figure 4.6: Linear variation of brush pressure.
Assume we have n + 1 control points c1, c2, c3, …, cn, cn+1, we can separate this curve into n segments s1, s2, s3, …, sn. When an interpolated trajectory point d is inside
segment si, we use the following equation to get d’s pressure value:
≦1 is the Cardinal Spline parameter of c
ci
u
1
ci+
u
i and ci+1 respectively.When the brush moves along the stroke trajectory, it’s orientation is changed constantly. If the brush orientation is never changed, bristles stand in fixed positions in the contact region during the whole painting process. In this case, as shown in Figure 4.7 (a), they leave twisted footprint paths and strokes look unnatural. To solve this problem, we take brush orientation as an important parameter.
(a)
(b)
Figure 4.7: (a) Fixed orientation (b) Orientation by tangent vector.
In Figure 4.7 (b), when the brush moves along a track and comes to kth trajectory point (dk), the moving orientation is determined by the tangent of dk. We approximate it by:
Figure 4.8: Brush orientation according to tangent vector Tk.
Figure 4.8 shows the bristle position before and after the orientation. Bristles in a
contact region rotate θ with respect to the center of contact region. The equation we
obtain new coordinates of bristles is as follow:
y
4.3 Ink Depositing Mechanism
Weng’s model [37] has 4 parameters to control painting styles: decreasing, concentration, difference and discontinuity. These parameters satisfy the request of simulating calligraphy or plant in Chinese ink painting. However, to present rock texture in Chinese landscape painting, we need more parameters to depict effects of dry stroke. In Weng’s model, ink quantity and ink color are equivalent, so it is hard to simulate strokes with dark ink color but low ink quantity. To solve this problem, we use two parameters to present ink quantity and ink color respectively. In Section 4.3.1, we explain how to modify Weng’s ink decreasing effect to achieve dry strokes. We introduce basic painting styles inherited from Weng’s model in Section 4.3.2. Finally, pressure mechanism for center-stroke and side-stroke is described in Section 4.3.3.
4.3.1 The Ink Decreasing Effect
As shown in Figure 4.9, we can see that color drawn by the brush is decided by
the mixed rate of water and ink. If the brush is total soaked in water and then ink is soaked on the tip of the brush, ink and water will blend gradually. So the color of the painted stroke will change from dark to light. To simulate this kind of effect, we apply additional parameters to control the ink color. We set each stroke’s beginning and ending ink color. Then we use linear interpolation to get the ink decreasing effect, as shown in Figure 4.10.
(a)
(c)
(b)
(d)
Figure 4.9: (a) Soaked in water (b) Soaked with ink (c) Blending (d) Decreasing.
Figure 4.10: The ink decreasing effect.
4.3.2 The Characteristic of Ink
Our brush model inherits basic painting styles of Weng’s model which are introduced briefly as follows:
1. The Ink Soaking Variation
In a brush stroke, the concentration of ink is not uniform. This could be caused by ink itself or made by painters. Some effects, such as the leaves of bamboo, are depicted with different concentration of ink. Weng’s model proposed 4 different concentration types, in which ink concentration is linearly interpolated in the contact region, to simulate different aroma, as shown in Figure 4.11.
Figure 4.11: A stroke with soaking variation.
2. The Bristle Fan-Out Effect
To simulate this effect, as shown in Figure 4.12, a random array, difference, is proposed. Values in difference are ranged from -5 to 5. When we construct a brush, each bristle is mapped to an element of difference to get its difference value, which
will be added to ink concentration in the bristles to make the ink color darker or lighter.
Figure 4.12: A stroke with ink fan-out.
3. The Bristle Dry-Out Effect
The bristle dry-out effect occurs when deposited ink is less (lighter) than a threshold. To simulate this effect, as shown in Figure 4.13, the max gap size is predefined in an array, discontinuity, and each bristle is mapped to discontinuity randomly to get its max gap size. Once a bristle deposits ink discontinuity, its discontinuous gap size can not be larger than its max gap size. Besides, the discontinuous gap size keeps decreasing until it is equal to zero during the brush moving process.
Figure 4.13: A stroke with ink dry-out.
4.3.3 The Pressure Mechanism
For a single brush, the size of the contact region is different if we apply different pressures. On the other hand, the deposited ink from the brush depends on not only the remnant quantity of the ink but also the pressure of the brush. So it is important to discuss relations of deposited ink and pressure. However, the way to put brush to canvas is different between center-stroke and side-stroke, so we propose the pressure mechanism for both cases.
1. Center-Stroke
The brush of center-stroke goes straight down and the pressure of the brush influences the size of the contact region and the quantity of deposited ink. In Figure 4.14, the gray area means the region that the brush contacts with the canvas. The deep or light color of the ink shows the weighting value Wp of deposited ink for each bristle.
Compare to case (a) and case (b) in Figure 4.14, the pressure of (b) is greater than (a), so the size of the contact region is larger and the quantity of the deposited ink is also larger. We define Wp as:
where di,j is the distance from hi,j to the center of ellipse O and dI,j is the distance from
Figure 4.14: The relation of pressure, contact region and depositing ink.
We use Weng’s model to calculate the ink value of bristle hi,j, then we multiply it by Wp that we can simulate stroke with pressure variation. Figure 4.15 shows the pressure P increases from 0 to 1 and then decreases from 1 to 0. It simulates the stroke when a painter is drawing. The painter presses down the brush gradually. Then he pushes down entirely when it comes to a turning point. Finally, he lifts the brush by degree. Case (a) and case (b) shows the results of different brush size.
(a)
(b)
Figure 4.15: Strokes with pressure variation. P changes from 0 ->1 ->0.
(a) B = 40, R = 1, I = 80, J = 30.
(b) B = 10, R = 1, I = 20, J = 5.
2. Side-Stroke
tilts the brush while painting, just like Figure 4.1 in Section 4.1.
When the brush lifts up, the size of the contact region gets smaller from a single side to the center of the brush. In Figure 4.16, the brush pressure of (a) is smaller than (b), so the contact region is smaller. The weighting value Wp of each bristle for side-stroke is defined as follows:
The side-stroke
⎪⎪
Figure 4.16: Side-stroke lifts up the brush from a single side.
Figure 4.17 is the results of side-stroke synthesis. The brush model moves from up to down and the shape of the stroke shrink from left side to center. (a) and (b) shows two kinds of pressure variation. This simulates different styles of side-stroke brushes.
(b) (a)
Figure 4.17: Different pressure variation of side-stroke.
(a) Small axe-cut Ts’Un, R = 0.2.
(b) Big axe-cut Ts’Un, R = 0.3.
Chapter 5 Landscape Painting Styles
Chinese ink painting has a long history over three thousand years. It heavily stresses the notion of “implicit meanings” by abstracting objects. In the Tang dynasty (618 – 907 AD), the range of subjects in paintings expanded and landscape became as a distinct category. Chinese landscape painting provided a more spontaneous style that captured images in abbreviated suggestive forms. Chinese landscape painting has been cultivated by masters through a long evolution, into an exquisite art form.
In Chinese landscape painting, rocks are primary objects because of the power to create the mood. Artists use the Chinese character Ts’Un, also meaning wrinkles, to represent texture strokes when applied to rock formations. Over the centuries, masters of Chinese landscape painting developed various Ts’Un techniques. Among these Ts’Un styles, hemp-fiber strokes and axe-cut strokes are two major types of Ts’Un techniques.
In previous chapters, we show how to extract feature lines and establish
appropriate brush models. Theoretically, we have successfully synthesized Chinese style images by applying strokes on those feature lines. However, these results are quite different from painters’ works. We can’t capture characteristics of Ts’Un styles by a simple mapping from a stroke to a feature line. Hence, we design some experimental based methods to improve the quality of synthesized images. All these
procedures are done in image-space. In Section 5.1, we give an introduction to hemp-fiber Ts’Un. Axe-cut Ts’Un is described in Section 5.2. Section 5.3 describes
image-space optimization methods we used to improve the quality of results. Section 5.4 shows the frame coherence of each painting style.
5.1 Introduction to Hemp-Fiber Ts’Un
Hemp-fiber strokes, spreads and weaves like the fibers of the hemp from which it
takes its name. This may be the most important stroke in Chinese landscape painting.
Several texture strokes have been developed from the hemp-fiber strokes. Long hemp-fiber strokes express relatively smooth surfaces, while short hemp-fiber strokes
indicate a more wrinkle surface. The short hemp-fiber Ts’Un is developed by the great Southern School master Tung Yuan (907 – 960 AD), which was varied and generally favored by the literati painters, who dominated mainstream Chinese landscape
(1279 – 1368 AD). The most important of the Four Masters, Huang Gung-Wang (1269 – 1354 AD), practiced the strokes in a loose, calligraphic fashion, as show in Figure 5.1.
Figure 5.1: Hemp-fiber Ts’Un by Huang Gung-Wang.
5.2 Introduction to Axe-Cut Ts’Un
The axe-cut stroke is a slanted stroke used in painting in much the same way as an axe is used to cut wood. It is excellent for depicting smooth cliffs and flat, planar surfaces of rock. The stroke also effectively describes angularly shaped rocks of crystalline quality and sedimentary rocks displaying layered structures. The axe-cut Ts’Un was developed earlier during the Sung dynasty (960 – 1279 AD) by Li-Tang
(1049 – 1130 AD). This stroke dominated Southern Sung landscape painting between the 12th and 13th centuries. The best-known exponents of the axe-cut Ts’Un are Ma Yuan and Hsia Kwei, associated with the Northern School of landscape painting, which thrived, in particular, during the Sung dynasty. Figure 5.2 is the axe-cut Ts’Un drawn by Hsia Kwei.
Figure 5.2: Axe-cut Ts’Un by Hsia Kwei.
5.3 Image Space Optimization
In this section, we describe how to make the computer-generated images visually
characteristics for hemp-fiber Ts’Un and axe-cut Ts’Un. So we design methods to make each applied brush stroke with a suitable style. Since our brush model is controlled by specific parameters, so we can change strokes’ appearances by tuning each parameter. All these steps are done in image-space.
5.3.1 Stroke Length Control
When applying strokes, the position, shape and length are decided by control points. All these control points are extracted from object space, as described in Chapter 3. So, at each frame, after we project these 3D points to image-space, we can not guarantee the distance between control points. Some control points are close together while others are distant. Besides, the total length of a brush stroke is also uncontrollable. Some strokes look too long, and some are too short. These situations make us difficult to tune up the rendering style of each stroke. Therefore, we propose a mechanism to adjust distances between control points and strokes’ length. If the distance between two control points is far away, we insert additional control points.
Otherwise we discard unnecessary control points. If the total length of a stroke is too long, we divide the stroke into several strokes. If the length is too short, we abandon this stroke. The algorithm is shown in Figure 5.3.
Dmax: max distance allowed between two neighboring control points Dmin: min distance allowed between two neighboring control points Lmax: max length allowed for a stroke
Lmin: min length allowed for a stroke L: total length of current stroke s
for every control points ci in s D: distance between ci and ci+1
if( D > Dmax)
insert new control point(s) between ci and ci+1
if( D < Dmin) remove ci+1
L = L + D if( L > Lmax)
terminate this stroke and start a new stroke
move to next control point end of for loop
if(L < Lmin)
reject current stroke
Figure 5.3: The algorithm of stroke length control.
5.3.2 Layered Strokes
In Chinese landscape painting, artists use the variation of ink color to represent the light and shade. In the brightness area, lighter color is used and few strokes are drawn. In the shaded area, painters use dark ink color and draw more strokes. Besides, In a brightness area or a shaded area, we can still tell different tones of ink. To reach
three kinds of layers. One is the darkest layer, the other is the middle layer, and another is the brightest layer. Each layer stands for a degree of ink tone. When all
three kinds of layers. One is the darkest layer, the other is the middle layer, and another is the brightest layer. Each layer stands for a degree of ink tone. When all