• 沒有找到結果。

IMAGE SPACE OPTIMIZATION

CHAPTER 5 LANDSCAPE PAINTING STYLES

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 strokes are drawn on layers and each stroke’s ink value is according to luminance map, the synthesized image shows light and shade. The result is more natural and similar to artists’ works. Figure 5.4 (a) is the result before the layer conception, and (b) is the result after applying layered strokes.

(a) (b)

Figure 5.4: (a) Without (b) With layered strokes.

To preserve frame coherence, the layer ID for each stroke should be fixed. To solve this problem, we define not only layer ID but also some stroke parameters after streamlines are constructed (as described in Section 3.2). Parameters, such as the size of the brush, the number of bristles, the decreasing rate of ink and water, and so on, affect the style of each stroke. The variation of each stroke also makes the result more realistic to artists’ creations. Since streamlines are consistent, layer ID and stroke

parameters are fixed, when the view point is moving, we can preserve the frame coherence.

5.3.3 Mechanism for Hemp-Fiber Ts’Un

In this section, we propose two mechanisms to improve the quality of computer generated hemp-fiber Ts’Un. The first mechanism is horizontal perturbation. When artists’ draw the hemp-fiber stroke, they wiggle the brush and the stroke looks like the hemp. So, we also want to wiggle the applied strokes. Instead of wiggling the strokes, we perturb control points in the direction perpendicular to the brush moving direction.

The scale of the perturbation level depends on the length of the stroke multiplied by a sin wave. As shown in Figure 5.5 (b), strokes are perturbed while (a) are not. We use following equations to achieve the wiggle effect.

( )

x y C

( )

x y

(

L f D

)

C′ , = , + ρ× ×sin( )× v

where C

(

x,y

)

is the perturbed location of control point C. C ,

( )

x y is the original location of control point C. ρ is weighting value. L is the length of the stroke. f is

the frequency of the sin wave and Dv

is the direction perpendicular to the brush moving direction.

(a) (b)

Figure 5.5: (a) Without (b) With horizontal perturbation.

The second mechanism is reverse drawing of strokes. We observe that in hand-drawn creations, artists draws stroke densely and tightly at the bottom of the rocks. The reason artists want to emphasize the shadow part of the terrain. Usually, the shaded area lies at the lower part of rocks where the light is occluded. Therefore, we also want to express this kind of effect. Since the construction of streamlines is from top to down, we draw the strokes in reverse direction. We apply strokes from bottom to top. More strokes are drawn at the bottom of rocks and peaks of the mountains are drawn with sparse strokes. Figure 5.6 is the comparison before and after reverse drawing of strokes.

(a) (b)

Figure 5.6: (a) Without (b) With reverse drawing of strokes.

5.3.4 Mechanism for Axe-Cut Ts’Un

For axe-cut Ts’Un, we apply center-strokes on visible silhouette edges and draw side-strokes along streamlines. This results in an impressive grand sight. In some cases, the terrain is not so cliffy but we still want to express it in axe-cut style. In this kind of situation, we notice if we use the same process as an erect and flat rock does, the synthesized result looks unnatural. Painters draw this kind of rocks with a slope.

Each stroke is tilted with a small amount of angle from the original streamline

direction. To realize this effect, we find a direction intersected with the streamline direction with a specific included angle θ , then we apply the stroke along this

direction. We constantly apply strokes along the streamline until it meets the terminal point. In Figure 5.7, (a) is the original axe-cut strokes and (b) is the results with tilt

(a) (b)

stroke direction stroke direction

streamline direction streamline direction

(c)

Figure 5.7: (a) Without (b) With (c) Sketch (of) tilt strokes.

相關文件