• 沒有找到結果。

Classification of Motion Effects

CHAPTER 3 INVESTIGATION OF ANIMATION

3.2 Classification of Motion Effects

As mention before, animators take into account the different situations and use various expressions to present the movement of a character correspondently.

Kawagishi et al. [5] classify these non-photorealistic motion effects into three groups.

In the rest of this section, we discuss these motion effects in detail. Table 3.1 summarize this classification.

A. Lines

Effective lines are the simplest and most frequently used skill to present movement in cartoons and comics. Additionally, the skills are often applied to represent the emotion of characters. It can be further classified into three types:

parallel straight lines, tracking curves, and radiative rays.

Table 3.1 Classification of Non-photorealistic Motion Effects

Group Type Expression

Parallel straight lines In rear side, draw straight lines along path.

Tracking curves In rear side, draw curves tracking movements.

Lines

Radiative rays All lines are toward center, the character.

Replication of contours In rear side, replicate part or whole of contours

After-images

Replication of character In rear side, replicate whole image of character.

Jagged Contours In rear side, deform contours of objects by using jagged edges.

Style change of contours In front side, draw heaps of short lines to replace the contour.

Deformation

Squashed objects Squash objects on the direction contrary to moving.

1. Parallel straight lines

This technique is referred to as speed-lines and is usually drawn in the rear side of objects. The direction of lines is along the direction of movement. An example is shown in Figure 3.2 [11]. According to the density of line, the sense of speed is changed. If the lines are longer and denser, we will feel the speed is faster.

(a) (b)

Figure 3.2 Parallel straight lines (a) Sparser and shorter lines. (b) Denser and longer lines

2. Tracking curves

This technique is similar to previous one, but more faithfully represent the track of movement. Since the character does not only move along a straight line, the artist may use curves to represent the movement. The curves are also usually drawn in the rear side but not always parallel to each other. This skill usually use in the situation that moving track is longer. Figure 3.3 is an example of this skill [2].

Figure 3.3 An example of Tracking curves

3. Radiative rays

Whilst drawing this effect, artists need to decide a center region that is always a circle. Then they draw lines toward the center point but do not cover center region. This skill can be regard as speed-line. It is usually used when the moving direction is perpendicular to the image. For example, in Figure 3.4, the characters fall into a hole. Additionally, the skill is powerful to express shocked emotions.

Figure 3.4 Radiative rays (Magister Negi Magi)

B. After-images

This technique replicates images or contours between the positions in two different frames and is always drawn on the rear side of objects. It can be classified into two types: replication of contours or characters.

1. Replication of contours

An example of this technique is shown in Figure3.5 [7]. The style of drawn part of the contours is more often used than the entire of them. The repeated part may get smaller and smaller.

(a) (b) (c)

Figure 3.5 Replication of contours (a) Full rear edge (b) Gradually decreased rear edge (c) Full contours

2. Replication of character

This technique is often used in the situation that utilizing slow motion to emphasize fast moving. It always repeat entire of characters, but the color gets lighter and lighter as shown in Figure 3.6.

Figure 3.6 Replication of character

C. Deformation

We define the effects that cause the stroke style or the shape of objects changed are belong to this type. It consists of three types: jagged contour, style change of contours, and squashed objects.

1. Jagged Contours

This technique uses jagged edges to deform the rear contours of an object as shown in Figure 3.7 [5]

Figure 3.7 Jagged contours

2. Style change of contours

This technique is drawing a lot of heaps of short lines to cover the contours of objects. The direction of lines stands on the direction of movement. It is usually drawn on the front contour of objects, as shown in Figure 3.8 [2].

Figure 3.8 Style change of contours

3. Squashed objects

This technique is squashing objects along the contrary direction of movement and may be stretching objects along the direction of moving, as shown in Figure 3.9. This style of motion effect is always accomplished at the same procedure as character drawing. On the other words, the job of painting this effect does not belong to post-processing. According to this, we do not implement this effect in this thesis.

Figure 3.9 Squashed objects (Keroro Kunso)

Chapter 4

Feature Extraction

It is mentioned that animators always draw motion effects after they accomplish drawing characters and backgrounds. Besides the software used in animation painting generally has the concepts of layers. Characters and backgrounds are always painted in the different layers. On the other words, painting motion effects can be regard as a post processing, and the objects and film model in embryo are easily available. We use these data as inputs.

After users input data, we need to analyze it and obtain useful information. In this chapter, we describe feature extraction about motion estimation in Section 4.1 and rear and front edges in Section 4.2.

4.1 Motion Estimation

In painting of motion effects, motion direction is an important feature.

Kawagishi et al. [5] proposed a method that estimates motion pixel by pixel. Since the objects in cartoon are always deformed or scaled in different frames, the situation which can use the method is very limited. In order to deal with this problem, we

proposed a simpler but useful technique to accomplish the motion estimation.

Motion impressions often represent the movement of the whole objects, rather than display the movement part of objects that may have corresponding deformation in different frames. For example, when a man is running, his legs have corresponding changes in different frames. If we want to represent that he is running fast by motion effects, we focus on the fast movement of the whole body rather then the fast moving legs. If we want to emphasize the fast movement of his legs, we can regard the legs as an independent object. According to this theory, we decide to estimate the movement of the whole object rather than the movement of each pixel.

First of all, according to the input objects, we construct the bounding rectangle of each object in each frame. At the same time, we can obtain the width, height, and center of the object. Then we use the movement of center in each frame to descide the movement of an object.

As shown in Figure 4.1, a character moves from Fi-2 to Fi (Fi means in the i-th

Figure 4.1 Motion direction

frame). After we construct the bounding rectangles of characters in each frame, we can obtain the position of centers, C which is the center of bounding rectangle. The direction of movement in the i-th frame, Di, can be derived from Ci – Ci-1. In the first frame, since there is not previous frame, we use the direction of the second frame as its direction.

In animation, there are often multiple objects in a frame. In order to judge which object needs to draw motion effects, we use a function to estimate:

m length of Di, the vector of moving direction in the i-th frame. It can measure the movement of object in x and y direction. We sum the moving distance from the second frame to the last. Then we calculate the average of moving distance from frame to frame. N represents the number of frames.

Si is the estimator of scaling. Because the input data is 2D information, how to estimate the movement along the z direction becomes a difficult problem. After analyzing the 2D cartoon painting, we discover animators use scaling objects for the perception of moving along z direction. This painting technique is derived from linear perspective as shown in Figure 4.2. For example, if a character is running toward viewers, the character is getting bigger and bigger. Oppositely, if a character is running away from viewers, the character is getting smaller and smaller.

Figure 4.2 Linear Perspective

According this concept, we use the degree of scaling to estimate the movement in z direction:

Wi and Hi are the width and height of bounding rectangle respectively in the i-th frame. Then we can derive the area of bounding rectangle, Ai, from the product of them. Si is defined as the scaling factor of areas between current and previous frame.

To moving distance, we calculate the average of scaling factors.

Since these two estimators are estimated in different units, we use two weighting values, λL and λS, to modulate the influence of them. In detail, Li estimates moving distance by pixel, and the value is usually over tens. Si estimates movement by the percentage, and the value is always between 0 to 1. Then the influence of both estimators will not be ignored.

The parameter, εm, is the threshold for motion estimation. If the first term of equation (4.1) is over the threshold, it means the moving degree of object is large enough, and the object need to paint motion effects.

4.2 Rear Edges and Front Edges

The most difficult problem in automatic generation of motion effects is location of these effects. By observation, we found most style of motion effects are painted behind the objects. If we can determine which part of contour belongs to rear, we can use the rear edge to be the basic positions for painting motion effects.

Kawagishi et al. [5] proposed a technique to detect rear edges. They use the positive of dot product between moving direction and the vector from current vertex to next to judge rear edges. Their method has a defect that when dealing with concave polygons the judgment of rear edge is wrong. Due to the characters in cartoon mostly have complex shapes, the algorithm only can deal with convex polygon is not enough.

We proposed a novel method to detect rear edges.

First, according to the input objects, we analyze the contours of objects in each frame, and sort the vertices of the contour counterclockwise. Then we detect these vertices is front or rear in sequence.

We detect rear as shown in Figure 4.3. We use the information obtained in motion estimation. Di is the moving direction in ith frame, and Vi, j is the vector from center of objects to the point we detect, Pi, j, which means the jth point in ith frame.

We normalize these two vectors, and if a vertex belongs to rear, it would conform to the inequality below:

θ

, ≤cos

i j

i V

D (4.3)

Ci

Figure 4.3 Detection of Rear Edges

This method is very simple, and corresponds to our intuition. Users can obtain different length of rear edge through the parameter, θ. For example, in Figure 4.4 (a),

if θ is 90°, the rear edges of the object are the border parts. If θ change to 135°, the result is shown in Figure 4.4 (b). The lengths of rear edges will affect the region of painting motion effects. For example, if we want to paint the same number of speed-lines, the rear edge is longer, and the density of speed-line should be sparser. It result in different perception of speed.

Contrary to the rear edges, the points which do not belong to rear are front. So, after judging the rear edges, we also obtain the front edges.

Chapter 5

Generation of Motion Effects

In this chapter, we discuss how to generate motion effects as mentioned in Chapter 3. In Section 5.1, we describe the techniques of stoke generation. In the following sections, we demonstrate the generation of the three groups of motion effects which includes lines, after-images, and deformation.

5.1 Stroke Generation

In stroke generation, our purpose is to simulate hand-drawn pen stroke which get thinner slowly. We deal with painting straight lines and curves utilized in two different ways respectively.

In straight line painting, we generate stokes as shown in Figure 5.1. The path of stroke is from Ps to Pe. After user specified widths of a line, Ws and We, at starting and ending points respectively, we use a trapezoid to simulate the stroke. According to the normal direction of stroke, Vn, we can obtain four vertices of trapezoid:

⎪⎪

Figure 5.1 Stroke generation of straight line painting

Because gradient colors can enhance the perception of movement, we fill the trapezoid with them. Users also can specify colors of stroke at starting and ending points respectively.

In curve painting, we generate stokes as shown in Figure 5.2. The path of stroke is from Ps to Pe. We draw a sequence of circles to generate the stroke. The centers of circles are points positioned on the curve. The diameters gradually decrease from Ws

to We, widths of stroke at starting and ending point respectively.

Figure 5.2 Stroke generation of curve painting

Like the straight line painting, we implement gradient color for the curve strokes.

Figure 5.3 shows the resulting stroke which applied single or gradient color.

(a)

(b)

Figure 5.3 Curve painting (a) Color: black (b) Color: from black to white

5.2 Motion Effects: Lines

It has been mentioned that there are three type of motion effects belong to the group of lines. We discuss their generation in this section.

5.2.1 Parallel Straight Lines

Since this type of motion effect is always drawn on the rear side, we use the position of rear edge as the basic starting points to generate the motion effect. Users need to specify the number of lines, and the minimum and maximum distances from rear edge, Lmin and Lmax respectively. We propose two methods to generate the position of starting points for line painting, as shown in Figure 5.4. The parameter, Ps, i, is the starting point of rear edge in i-th frame, and Pe, i is the ending point. The bolder lines are rear edges.

Lmin

Lmax

Ps, i Pe, i

(a)

Le, i Ls, i

(b)

Figure 5.4 The generation of starting points (a) Random (b) Regular random

The first method is shown in Figure 5.4 (a). If the number of lines is 4, we randomly choose 4 points on the rear edge. The starting points are these points shift between Lmin and Lmax along the moving direction.

The other method is shown in Figure 5.4 (b). When animators utilize the motion effects of straight lines or curves to represent the movement, they often draw lines focused on some parts. For example, when they represent the movement of rotation, they draw lines focused on the part whose moving distance is longer. According to

this, we propose this method by considering the difference of moving distance between starting and ending points of rear edges. After users specify the proportional length of rear edge, R, we can derive the point Q:

( )

I(Q) means the index number of the point, Q. We obtain new groups of candidate points from Ps, i or Pe, i to Q to generate the starting position for painting lines. Then we divide these vertices into equal parts. The number of division is equal to the number of lines. We randomly select a point on the rear edge in each part and shift the point between Lmin and Lmax along the moving direction. The resulting point is the starting point for painting lines.

After obtaining all starting points for painting lines, we derive ending points according to lengths and the moving direction of the object. Users need to specify the maximum and minimum length of lines, and we determine the final length randomly between them. The point shift final length from the starting point along the reverse direction of movement is the ending point.

After obtaining both starting and ending points, we use the stroke for straight line painting as mentioned in Section 5.1 to generate this motion effect.

5.2.2 Tracking Curves

As mentioned before, painting the motion effect of tracking curves is quite similar to painting the motion effect of straight lines. Starting points are also

generated by the same approach.

However, in order to simulate the continuous path of movement from discrete moving position, we use Cardinal Spline to simulate the path. Since Cardinal Spline is an interpolation curve, we may select central points of objects, C, as the control points.

Then we may adjust the smoothness of curve by parameter α. Figure 5.5 shows an example to represent the moving path by using Cardinal Spline, where α= 2.0.

Figure 5.5 Cardinal Spline for moving path

In Figure 5.6, we demonstrate the method to generate the paths for the motion effect of tracking curves. The parameters, i, j, k, represent the j-th control point of the k-th tracking curve in the i-th frame. After the generation of starting points, Qi, k, j, we can derive the vector, Vi, k, from the central point to the new starting point. Then, the other control points of a tracking curve, such as Qi, k, j+1 and Qi, k, j+2, are derived from shifting the central points in each frame. After obtaining all control points, we can accomplish the new path, such as path k, using Cardinal Spline. The number of tracking curves and the number of referring frames can be specified by users.

Figure 5.6 Paths generation of tracking curves

Since the maximum length of path is determined by the number of referring frames, users need to give the maximum and minimum percentages to specify the range of length. And we randomly generate the final length in the range. Finally, we apply the stroke for painting curve, as mentioned in Section 5.1, to generate this motion effect.

5.2.3 Radiative Rays

Unlike other motion effects in the group of lines, radiative rays do not use the position of rear edge as the basic position to draw the motion effect. As animators paint this effect, we begin the generation of radiative rays from determining the circular center region. The diameter of the circle is the maximum between the width and the height of the bounding rectangle. The center of the circle is the center of the bounding rectangle. Then we need to determine the direction and length of each ray for painting.

Users need to specify the parameters as follows: The number of lines is determined by the number of segments, M, and the maximum number of rays in each segment. Rmin and Rmax are the percentages of shifting distances, and they determine the shifting ranges of starting and ending points for each ray respectively. Lmax is the maximum length of rays. NL is the number of layers. The parameters, θs and θe, are starting and ending angles respectively.

Since there may be multiple layers of radiative rays, we need to determine the maximum length of each layer. We determine the length as shown in Figure 5.7 (a). In this example, the number of layers, NL, is two. Since the length of layers should be increasing from center, we determine the length of each layer, such as L1 and L2, as follows:

The parameter, k, means the k-th layer. Since the rays in each layer should be distance away, the maximum length of rays in each layer does not equal to the length of layer. We use a parameter, RL, which is the percentage of length, to determine the

The parameter, k, means the k-th layer. Since the rays in each layer should be distance away, the maximum length of rays in each layer does not equal to the length of layer. We use a parameter, RL, which is the percentage of length, to determine the

相關文件