WO2011085674A1 - Method and device for animating and method and device for playing animation - Google Patents

Method and device for animating and method and device for playing animation Download PDF

Info

Publication number
WO2011085674A1
WO2011085674A1 PCT/CN2011/070176 CN2011070176W WO2011085674A1 WO 2011085674 A1 WO2011085674 A1 WO 2011085674A1 CN 2011070176 W CN2011070176 W CN 2011070176W WO 2011085674 A1 WO2011085674 A1 WO 2011085674A1
Authority
WO
WIPO (PCT)
Prior art keywords
animation
unit
frame
frame data
key frame
Prior art date
Application number
PCT/CN2011/070176
Other languages
French (fr)
Chinese (zh)
Inventor
熊智敏
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2011085674A1 publication Critical patent/WO2011085674A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/802D [Two Dimensional] animation, e.g. using sprites

Definitions

  • Animation production method device and animation playing method and device
  • the present invention relates to the field of computer animation technology, and in particular, to an animation production method, apparatus, and animation playing method and apparatus. Background of the invention
  • each frame corresponds to a complete animated picture.
  • the animation picture of multiple frames includes the same background, when editing the animation picture of each frame, it must be repeatedly set.
  • the information of the background causes waste of the background information.
  • the existing animation production tool does not support the calculation of the animation bounding box, which is not conducive to the post-production synthesis of the animation. Summary of the invention
  • the embodiment of the invention provides an animation production method, device and animation playing method and device, which can improve the utilization of animated pictures, reduce the workload in the animation production process, and simultaneously support The calculation of the animation bounding box is convenient for post-production of animation.
  • the animation production method provided by the embodiment of the present invention includes: determining a key frame of the animation unit; the frame in which the animation unit is nonlinearly changed during playback is a key frame of the animation unit;
  • Each of the animation units is updated in the current frame based on key frame data or transition frame data of each of the animation units.
  • An animation unit creation module for creating an animation unit
  • An animation data setting module configured to set key frame data of the animation unit; a frame in which the animation unit has a nonlinear change during playback is a key frame of the animation unit; and the animation unit is recorded in the key frame data The parameters of the key frame.
  • An animation playing module configured to traverse each animation unit in a current frame, and update each of the animation units according to the key frame data or transition frame data of the current frame of each animation unit; the animation unit is playing The frame in which the nonlinear change occurs during the process is the animation a key frame of the unit; recording the parameters of the animation unit in the key frame in the key frame data;
  • a transition frame obtaining module configured to: when the animation unit does not have key frame data in the current frame, calculate a transition frame of the animation unit in the current frame according to the key frame data of the animation unit in the key frame Data, and the transition frame data is sent to the animation playing module; the transition frame data of the animation unit records the parameters of the animation unit in the transition frame.
  • an animation is divided into a plurality of animation units, and when each frame of the animation picture is created, the user only needs to perform key for the animation unit in which the nonlinear change occurs.
  • the frame data is set, during the animation process, the transition frame data is automatically generated according to the key frame data, and each frame of the animation picture is played according to the key frame data or the transition frame data. In this way, the amount of work in the animation process is reduced, and the animation frames are more smoothly connected and the movements are more natural.
  • the animation method, the device and the animation playing method and the device provided by the embodiment of the invention support the calculation of the bounding box of the current frame of the animation, and facilitate the post-production synthesis of the animation.
  • FIG. 1 is a schematic flowchart of an embodiment of an animation production method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of an animation playback method according to an embodiment of the present invention
  • Embodiment process shows Intention
  • FIG. 4 is a schematic flow chart of a second embodiment of an animation production and playing method according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of an animation of an animation production and playback method according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of animation playback of an animation production and playback method according to an embodiment of the present invention
  • FIG. 7 is an animation bounding box calculation according to an embodiment of the present invention
  • FIG. 8 is a schematic structural diagram of an embodiment of an animation production apparatus according to an embodiment of the present invention
  • FIG. 9 is a schematic structural diagram of a first embodiment of an animation playback apparatus according to an embodiment of the present invention
  • FIG. 10 is a schematic diagram of an animation production apparatus and a playback according to an embodiment of the present invention
  • Schematic diagram of the structure of the device
  • FIG. 11 is a schematic diagram of an animation playback of an animation playback device according to an embodiment of the present invention
  • FIG. 12 is a schematic structural diagram of a second embodiment of an animation playback device according to an embodiment of the present invention. Mode for carrying out the invention
  • the animation unit may be a primitive, or a bone, or a combination of both.
  • the primitive is the smallest graphical unit that can be edited, and is the most basic element for manipulating and organizing the picture.
  • a picture consists of one or more primitives.
  • a primitive is a set of simple, generic geometry or characters.
  • Bone is generally animated in animation by changing its orientation and position.
  • the animation usually consists of a number of interconnected bones.
  • step 100 an animation unit is created, and keyframes of the animation unit are determined.
  • step 100 the frame in which the animation unit changes nonlinearly is the key frame of the animation unit.
  • step 100 the frame in which the animation unit changes linearly is the transition frame of the animation unit.
  • the linear change of the animation unit means that the animation unit performs a uniform change, such as the distance of the animation unit movement, the rotation angle, and the like, uniformly changing with time.
  • step 101 key frame data of the animation unit is set; and key parameters of the animation unit in the key frame are recorded in the key frame data. Similarly, the parameters of the transition frame of the animation unit are recorded in the transition frame data of the animation unit. It should be noted that the transition frame data is not set during the animation process, but is calculated in real time according to the key frame data of the animation unit during the animation playback.
  • the parameters of the key frame include parameters of the horizontal position parameter, the vertical position parameter, the rotation angle parameter, the scaling ratio of the animation unit in the key frame.
  • the parameters of the transition frame include parameters of the horizontal position parameter, the vertical position parameter, the rotation angle parameter, the scaling ratio of the animation unit in the transition frame.
  • an animation is divided into a plurality of animation units, and when each frame of the animation image is created, the user only needs to set the key frame data for the animation unit in which the nonlinear change occurs, and plays During the animation process, the transition frame data is automatically generated according to the key frame data, so that the animation frames are smoothly and naturally connected, and the workload in the animation process is reduced.
  • FIG. 2 is a schematic flowchart diagram of an embodiment of an animation playing method according to an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps.
  • step 200 all animation units are traversed in the current frame. More specifically, when the animation unit is a primitive, the queue of the primitive is traversed in reverse, and when the animation unit is a skeleton, the queue of the skeleton is traversed in sequence.
  • step 201 it is determined whether there is key frame data of each animation unit in the current frame. If it is determined that the key frame data of the animation unit exists in the current frame, step 202 is performed; if it is determined that the key frame of the animation unit does not exist in the current frame Data, then step 203 is performed.
  • step 202 keyframe data of the animation unit in the current frame is obtained.
  • the transition frame data of the animation unit in the current frame is calculated according to the key frame data of the animation unit in the key frame.
  • calculating the transition frame data of the animation unit in the current frame includes: calculating the number of frames between the current frame and the key frame, and between the key frame data The linear interpolation, or the average of the keyframe data, or other mathematical function containing keyframe data, calculates the transition frame data for the animation unit in the current frame. If there is no keyframe of the animation unit in a subsequent frame of the current frame, the transition frame of the animation unit is a key frame on the animation unit.
  • each animation unit is updated based on key frame data or transition frame data of each animation unit. Specifically, the change of each animation unit is determined according to key frame data or transition frame data of each animation unit, and then each animation unit is updated to play the current frame.
  • the transition frame data can be calculated according to the key frame data of the animation unit in real time during the playing process, so that the animation frames are more smoothly connected and the movement is more natural. Accordingly, in the animation process, only the key frame data is set for the animation unit in which the nonlinear change occurs, and the workload of the animation is reduced.
  • FIG. 3 is a schematic flowchart diagram of a first embodiment of an animation production and playback method according to an embodiment of the present invention. In the present embodiment, the flow of the animation production and playback method will be described in detail. As shown in FIG. 3, the method includes the following steps.
  • an animation unit is created, and keyframe data of the animation unit is set.
  • the animation unit may be a primitive or a bone. More specifically, an animation by One or more animation units are composed; in each frame of picture, the user only needs to set the key frame data for the animation unit in which the non-linear change occurs.
  • the key frame data records the parameters of the animation unit in the key frame, and specifically includes: a horizontal position parameter, a vertical position parameter, a rotation angle parameter, a scaling factor, and the like of the animation unit. This step is only performed in the process of creating an animation. This step is not required to play the animation.
  • the key element setting of the animation unit is described by taking the picture element as an example.
  • the animation consists of two primitives: the dial primitive, hereinafter referred to as the h primitive and the pointer primitive, and the lower cartridge is called the i primitive.
  • the key frame data of the h primitive and the i primitive in the first frame are generated. Since the dial is not moving during the animation playback, the dial is not moving. Therefore, when setting the key frame data of each primitive, you only need to set the key frame data of the i primitive. Since there is no need to set other keyframe data for the h primitive, the animation is more targeted and more efficient.
  • the first and 60th frames of the i primitive are its key frames.
  • the first frame of the animation is as shown in Figure 5a.
  • the key frame data of the i-tu in the first frame is generated, and the center of the dial is set to i.
  • the angle of the i element in the first frame is 0 degrees
  • the angle of rotation of the i element in the 60th frame is 360 degrees, as shown in Fig. 5b.
  • the transformation of the primitive may include: rotating, translating, scaling, shearing, transforming, etc., centering on any point.
  • the transformation of the primitive may include: rotating, translating, scaling, and the like of the bone centered on the starting point of the bone.
  • step 301 start playing the animation, traversing all the animation units in each frame, determining whether there is key frame data of each animation unit in the current frame; if there is key frame data of the animation unit in the current frame, step 302 is performed; If the animation unit does not exist in the current frame For key frame data, go to step 303.
  • the skeleton queue is traversed in turn; when the animation unit is a primitive, the primitive queue is traversed in reverse. Because when the animation unit is a primitive, there may be an occlusion relationship between the primitives. In the animation process, the lowest occluded primitive is generally at the end of the queue of the primitive, so the reverse traversal primitive queue can Ensure that the animation has the correct hierarchical relationship.
  • step 302 key frame data of the animation unit in the current frame is obtained.
  • step 303 the transition frame data of the animation unit in the current frame is calculated according to the key frame data of the animation unit in the key frame.
  • calculating the transition frame data of the animation unit in the current frame includes: the number of frames according to the interval between the current frame and the key frame, and the key frame data.
  • the linear interpolation between the linear interpolation, or the average of the key frame data, or other mathematical function containing the key frame data calculates the transition frame data of the animation unit in the current frame.
  • the transition frame data of the current frame is obtained by linear interpolation of the key frame data, but the scope of protection of the present invention cannot be limited thereto.
  • the key frame of the animation unit and the key frame are linearly changed, for the animation unit having no key frame data in the current frame, only the key frame data of the key frames before and after it is acquired, and the intermediate interval is obtained.
  • the number of frames can be calculated by linear interpolation to obtain the transition frame data of the animation unit in the current frame.
  • the pointer is clocked around the dial at a constant speed
  • the i-picture has key frame data in the first frame and the 60th frame.
  • the linear interpolation of the key frame data can be calculated, and the transition frame data of the i-picture element is relative in the second frame.
  • the position of the picture element in the first frame, the rotation angle is 6 degrees;
  • the transition frame data of the i picture in the third frame is the position of the i picture element in the first frame, and the rotation angle is 12 degrees; the remaining frames are analogy.
  • the transition frame of the h primitive in the current frame is the first frame of the h primitive, that is, the previous key. frame.
  • each animation unit is updated according to key frame data or transition frame data of each animation unit and each animation unit is displayed. After the update of all animation units is completed, the full picture of the animation in the current frame is formed. Steps 301 through 304 are performed for each frame of the animation until the end of the animation.
  • the animation production and playback method provided by the embodiment of the present invention, it is only necessary to set the animation in the picture of the first frame.
  • key frame data needs to be set for the frame in which the nonlinear change occurs.
  • the transition frame data is automatically generated to make the animation frames more smoothly connected.
  • the animation method provided by the embodiment of the present invention can divide an animation into a plurality of parallel animation units, and in each frame, only key frame data needs to be set for an animation unit in which nonlinear changes occur, without using other
  • the animation unit sets keyframe data, enhances the targeting of animation, and reduces the workload of animation.
  • FIG. 4 is a schematic flowchart of a second embodiment of an animation production and playback method according to an embodiment of the present invention.
  • an animation is composed of a bone and a primitive bound to the skeleton, and the animation is played. As shown in Figure 4.
  • step 400 after completing the keyframe data settings for the bones and primitives, the animation begins to play.
  • step 401 all the bones are first traversed in each frame, and it is determined whether there is key frame data of each bone in the current frame; if the key frame data of the bone exists in the current frame, step 402 is performed; if the current frame does not exist in the skeleton For key frame data, step 403 is performed.
  • step 402 keyframe data for each bone in the current frame is obtained.
  • a linear interpolation is calculated according to the key frame data of the key in the key frame, and The transition frame data of the bone in the current frame.
  • the transition frame data of the bone in the current frame can also be calculated by other mathematical functions.
  • the present invention takes the calculation of the linear interpolation to obtain the transition frame data as an example.
  • each bone is updated based on key frame data or transition frame data for each bone.
  • the bones may include a parent bone and a child bone.
  • a parent bone can connect multiple child bones to form a skeleton. The change of the parent bone will drive the change of the child bone connected to it, so the child bone will transform accordingly according to the transformation of the parent bone.
  • step 405 key frame data or transition frame data of each bone in the current frame is saved.
  • step 406 all the primitives are traversed in the current frame, and it is determined whether the key frame data of each primitive exists in the current frame. If the key frame data of the primitive exists in the current frame, step 407 is performed; if the current frame does not exist, the map is not present. For the key frame data of the element, step 408 is performed.
  • step 407 keyframe data of the primitive in the current frame is obtained.
  • linear interpolation is calculated based on the key element data of the other key frames according to the primitive, and the transition frame data of the primitive in the current frame is obtained.
  • each primitive is updated according to key frame data or transition frame data of each primitive.
  • key frame data or transition frame data of the saved bones in the current frame is obtained.
  • each primitive is updated again according to the key frame data or the transition frame data of the current frame of the bone bound to each primitive.
  • the animation production and playing method provided by the embodiment of the invention is used to bind the primitive to the bone, and the change of the bone will drive the change of the primitive, making the animation more convenient, more targeted, and easy to implement in the animation process.
  • a variety of complex transformations, and the effect is more fluid and natural.
  • the animation production and playing method provided by the embodiment of the invention improves the utilization of the animation unit and the key frame data, and further reduces the workload in the animation production process.
  • FIG. 7 is a schematic flowchart of a calculation process of an animation bounding box according to an embodiment of the present invention.
  • move The bounding box of the painting is the key to detecting the boundary and collision of the animation.
  • Accurate collision detection plays an important role in improving the authenticity of the animation and enhancing the immersion of the virtual environment.
  • the animation playing method provided by the embodiment of the present invention further supports the bounding box calculation of the current frame of the animation after completing the traversal updating of the animation unit. The process is shown in Figure 7.
  • the initialization coordinates of the four vertices of the animation bounding box are preset. More specifically, the minimum X-axis coordinate and the minimum Y-axis of the four vertices of the preset bounding box are positive infinity, the maximum X-axis coordinate, and the maximum Y-axis coordinate are negative infinity.
  • the upper left corner of the generally defined picture is the starting coordinate of the X-axis and Y-axis coordinates.
  • the coordinates of the upper left corner of the preset bounding box are ( +
  • the coordinates of the upper right corner are ( - 00 , + 00 ), the coordinates of the lower left corner are ( + 00 , - 00 ), and the coordinates of the lower right corner are ( - ⁇ , - ⁇ ).
  • the coordinates of the upper left corner of the animation unit must be smaller than the coordinates of the upper left corner of the preset bounding box, thereby facilitating the initial update replacement of the coordinates of the bounding box vertex, and the other three vertices of the bounding box.
  • the coordinate preset method is the same.
  • the bounding box of the 2D animation is quadrangular, the bounding box can be determined as long as the coordinates of the upper left corner and the lower right corner of the bounding box are determined. Therefore, in this step, you can only preset the coordinates of the upper left corner of the bounding box to be ( + 00 , + ⁇ ), and the coordinates of the lower right corner are ( - GO ,
  • step 701 all the animation units of the current frame are traversed, and each animation unit is updated according to the key frame data or the transition frame data of each animation unit in the current frame.
  • step 702 after each animation unit completes the update, the minimum X-axis coordinate and the minimum Y-axis coordinate in each animation unit in the current frame are used as the minimum X-axis coordinate and the minimum Y-axis coordinate of the bounding box;
  • the maximum X-axis coordinate and the maximum Y-axis coordinate in the unit are the maximum X-axis coordinate and the maximum Y-axis coordinate of the bounding box. More specifically, after each animation unit completes the update, the X-axis coordinate and the Y-axis coordinate of the upper left corner and the lower right corner of the current bounding box are respectively associated with the animation unit in the upper left corner and the lower right corner of the current frame.
  • the X-axis coordinates and the Y-axis coordinates are compared.
  • the animation unit replaces the current bounding box with the X-axis coordinate of the upper left corner vertex of the current frame.
  • the X-axis coordinate of the top left vertex similarly, if the Y-axis coordinate of the upper left corner vertex of the current bounding box is greater than the Y-axis coordinate of an animation unit in the upper left corner vertex of the current frame, the animation unit is used on the upper left of the current frame.
  • the Y-axis coordinate of the corner vertex replaces the Y-axis coordinate of the upper left corner vertex of the current bounding box.
  • the animation unit replaces the current bounding box with the X-axis coordinate of the lower right corner vertex of the current frame.
  • the X-axis coordinate of the vertex of the lower right corner similarly, if the Y-axis coordinate of the bottom right corner vertex of the current bounding box is smaller than the Y-axis coordinate of the animation cell at the lower right corner of the current frame, the animation unit is used to the right of the current frame.
  • the Y-axis coordinate of the lower corner vertex replaces the Y-axis coordinate of the lower right corner vertex of the current bounding box.
  • the coordinates of the four vertices of the bounding box are: coordinates of the upper left corner (minimum X coordinate, minimum Y coordinate), coordinates of the upper right corner (maximum X coordinate, minimum Y coordinate), The coordinates of the lower left corner (minimum X coordinate, maximum Y coordinate), the coordinates of the lower right corner (maximum X coordinate, maximum Y coordinate).
  • the bounding box of the animation in the current frame is generated according to the four vertex coordinates of the bounding box finally determined in step 702.
  • FIG. 8 is a schematic structural diagram of an embodiment of an animation production apparatus according to an embodiment of the present invention. As shown in FIG. 8, the apparatus includes:
  • the animation data setting module 2 is configured to set key frame data of the animation unit; during the playing process, the frame where the animation unit changes nonlinearly is the key frame of the animation unit; the key frame data records the animation unit in the key frame parameter.
  • the frame in which the animation unit changes linearly is the transition frame of the animation unit;
  • the transition frame data of the animation unit records the parameters of the animation unit in the transition frame.
  • the parameters of the key frame include the horizontal position parameter of the animation unit in the key frame, the vertical position parameter, the rotation angle parameter, and the scaling parameter.
  • the parameters of the transition frame include parameters such as a horizontal position parameter, a vertical position parameter, a rotation angle parameter, and a scaling ratio of the animation unit in the transition frame.
  • the transition frame data is not set in the animation data setting module 2, but is calculated in real time according to the key frame data of the animation unit during animation playback.
  • the animation production device provided by the embodiment of the invention divides an animation into a plurality of parallel animation units. When creating each frame of the animation image, only the animation frame unit with non-linear changes needs to be set, and the animation is reduced. The amount of work produced.
  • the device includes:
  • Animation playback module 3 for playing animations.
  • the animation playing module 3 traverses all the animation units in each frame, and updates all the animation units according to the key frame data or the transition frame data of the current frame of each animation unit.
  • a transition frame obtaining module 4 configured to: when the animation unit does not have key frame data in the current frame, calculate the animation unit in the current frame according to the key frame data of the animation unit in the key frame The frame data is crossed and played through the animation playback module 3. More specifically, the calculation manner of calculating the transition frame data by the transition frame acquisition module 4 includes: the number of frames according to the interval between the current frame and the key frame, and the linear interpolation between the key frame data, or the average value of the key frame data, Or other mathematical function containing key frame data to calculate the transition frame data of the animation unit in the current frame. If there is no key frame of the animation unit in a subsequent frame of the current frame, the transition frame of the animation unit is a key frame on the animation unit. In the following embodiments, the transition frame data of the current frame is obtained by calculating the linear interpolation of the key frame data as an example, but the scope of protection of the present invention cannot be limited thereto.
  • the animation playing device provided by the embodiment of the invention can calculate the transition frame data in real time according to the key frame data of the animation unit, and play according to the key frame data and the transition frame data, so that the connection between the animation frames is smoother and the animation is more natural. At the same time, the application of this playback device will greatly reduce the workload during the animation process.
  • FIG. 10 is a schematic structural diagram of an embodiment of an animation production apparatus and a playback apparatus according to an embodiment of the present invention.
  • the function and structure of each module will be described in more detail in comparison with the previous embodiment.
  • the device provided in this embodiment is as shown in FIG.
  • An animation unit of the animation production unit creates a module 1 for creating an animation unit.
  • an animation may include a plurality of animation units. More specifically, the animation unit created by the animation unit creation module 1 includes two types of primitives and bones. In this embodiment, it is assumed that an animation including four frames needs to be completed, and the content is a flat motion of a small person's hands. Activity to the oblique upwards.
  • the animation created by the animation unit creation module 1 consists of six primitives A, B, C, D, E, and F, and bones bound to the B, C primitives of the villain's hands. It is not visible during the animation playback, as shown by 11a in Figure 11.
  • the animation data setting module 2 of the animation device is configured to set key frame data of the animation unit.
  • the animation data setting module 2 automatically creates key frame data of each primitive and bone, and saves the initial position of each primitive and bone.
  • the user only needs to set the key frame data for the animation unit in which the nonlinear change occurs, and the parameters of the animation unit are recorded in the key frame data, which specifically includes: the horizontal position of the animation unit Parameters such as parameters, vertical position parameters, rotation angle parameters, scaling, and so on.
  • the animation data setting module 2 sets the key frame data of the two bones bound to the B and C primitives in the first frame and the fourth frame.
  • frame 1 the two bones bound to the B and C primitives are 0 degrees; in the fourth frame, the two bones bound to the B and C primitives are relative to the position at the first frame.
  • the joint point of the villain's body is rotated 45 degrees clockwise and counterclockwise, respectively.
  • the animation player module of the animation player 3 is used to play the animation.
  • the animation playback module 3 traverses all animation units in each frame, and updates each animation unit according to the key frame data or transition frame data of each animation unit in the current frame. More specifically, the animation playing module 3 includes: an animation traversal unit 31, configured to reverse traverse the queue of the primitive when the animation unit is a primitive; and traverse the queue of the bone in turn when the animation unit is a skeleton. Because when the animation unit is a primitive, there may be an occlusion relationship between the primitives. In the animation process, the lowest occluded primitives are generally at the end of the queue of the primitives, so the queue that traverses the primitives in reverse can Ensure that the animation has the correct hierarchical relationship;
  • the frame data acquiring unit 32 is configured to acquire key frame data of each animation unit in the current frame, and when a certain animation unit does not have key frame data in the current frame, pass the transition frame acquiring module 4 Get the transition frame data of the animation unit in the current frame.
  • the animation playing unit 33 is configured to update each animation unit according to key frame data or transition frame data of each animation unit in the current frame, thereby playing the current frame.
  • the animation playing module 3 further includes a temporary storage unit 34 for updating the bone in the animation playing unit 33 according to the key frame data of the skeleton or the transition frame data when the animation is composed of the bone and the primitive bound to the skeleton. After that, save the keyframe data or transition frame data for the bone.
  • the animation playback unit 33 updates the primitive according to the key frame data or the transition frame data of the primitive, and then according to the key frame data or transition frame of the skeleton stored in the temporary storage unit 34 The data updates the element again.
  • the animation playing unit 33 first updates the skeleton according to the key frame data or the transition frame data of the skeleton, and saves the key frame data or the transition frame data of the skeleton in the current frame in the temporary storage unit 34. . Then the animation playing unit 33 traverses all the primitives, and although the primitives do not change, since the B and C primitives are bound to the skeleton, the animation playing unit 33 acquires the key frame data or transition of the skeleton in the current frame in the temporary storage unit 34. Frame data, and update B, C primitives according to the key frame data or transition frame data. Play each frame in turn, grouping together to form a complete animation. In the example of the present embodiment, when the animation is played, the 4 full-frame animations of the two people raising their hands are as shown in the drawings l la, l ib, l lc, l id.
  • the transition frame obtaining module 4 is configured to calculate linear interpolation of key frame data according to key frame data of the animation unit when the key frame data of the animation unit does not exist in the current frame, and obtain transition frame data of the animation unit in the current frame, And play through the animation play module 3.
  • the transition frame acquisition module 4 only needs to obtain the key frame of the key frame before and after it.
  • the data, and the number of frames in the middle interval can be calculated by linear interpolation to obtain the transition frame data of the animation unit in the current frame.
  • the transition frame acquisition module 4 can calculate the two skeletons by acquiring the key frame data of the two bones bound to B and C in the first frame and the fourth frame, and the number of frames in the interval.
  • the angle parameter of the transition bone meal data of the second frame is 15 degrees; the angle parameter of the transition bone data of the third frame is 30 degrees.
  • the animation production device and the playback device provided by the embodiments of the present invention only need to set the picture of the animation in the first frame.
  • the animation playback device device can automatically generate a transition through key frame data during the playback process. Frame data, smoothing the brazing between the animation frame and the frame.
  • the animation device provided by the embodiment of the present invention can divide an animation into a plurality of parallel animation units, and can implement binding and linkage between multiple animation units.
  • the linearly changing animation unit sets the key frame data to reduce the amount of animation work.
  • the animation playing device provided in this embodiment includes: an animation playing module 3, a transition frame acquiring module 4, and The bounding box calculation module 5.
  • the bounding box calculation module 5 is used for the animation playing module 3 to complete the traversal and update of the current frame for all the animation units, and calculate the animation in the current frame according to the key frame data and the transition data of each animation unit.
  • the bounding box of the animation is the key to detecting the boundary and collision of the animation. Accurate collision detection plays an important role in improving the authenticity of the animation and enhancing the immersion of the virtual environment.
  • the bounding box calculation module 5 provided in this embodiment specifically includes:
  • the coordinate initializing unit 51 is configured to preset initialization coordinates of the four vertices of the bounding box; preset the minimum X-axis coordinate of the four vertices of the bounding box and the minimum Y-axis is positive infinity, and set the maximum X-axis coordinate and the maximum Y-axis of the bounding box The coordinates are negative infinity.
  • the upper left corner of the generally defined picture is the starting coordinate of the X-axis and Y-axis coordinates.
  • the coordinate initializing unit 51 presets the bounding box
  • the coordinates of the vertices in the upper left corner are ( + 00 , + 00 )
  • the coordinates of the vertices in the upper right corner are ( - 00, + 00 )
  • the coordinates of the vertices in the lower left corner are ( + ⁇ , _ ⁇ )
  • the coordinates of the vertices in the lower right corner are ( _ ⁇ , - ⁇ ).
  • the vertex data acquiring unit 52 acquires the vertex coordinates of the animation unit in the subsequent step
  • the coordinates of the upper left corner of the animation unit must be smaller than the coordinates of the upper left corner of the bounding box preset, which is advantageous for the vertex calculating unit 53 to complete the initial update replacement of the coordinates.
  • the reason why the coordinates of the other three vertex coordinates of the bounding box preset by the coordinate initializing unit 51 is the same as above.
  • the coordinate initializing unit 51 can preset only the coordinates of the upper left corner of the bounding box to be (+ 00 , + 00 ), and the coordinates of the lower right corner are ( - ⁇ , - ⁇ ).
  • the vertex data obtaining unit 52 is configured to obtain vertex data of each animation unit in the process that the animation playing module 3 traverses and updates all the animation units in the current frame.
  • the vertex calculating unit 53 is configured to use the minimum X-axis coordinate and the minimum Y-axis coordinate as the minimum X-axis coordinate and the minimum Y-axis coordinate of the bounding box in the vertex data of all the animation units acquired by the vertex data acquiring unit 52;
  • the X-axis coordinate and the maximum Y-axis coordinate are used as the maximum X-axis coordinate and the maximum Y-axis coordinate of the bounding box.
  • the vertex calculation unit 53 compares the vertex coordinates of the animation unit acquired by the vertex data acquiring unit 52 with the vertex coordinates of the current bounding box, and the animation units in the current frame are The minimum X-axis coordinate and the minimum Y-axis coordinate are used as the minimum X-axis coordinate and the minimum Y-axis coordinate of the bounding box; the maximum X-axis coordinate and the maximum Y-axis coordinate in each animation unit in the current frame are used as the maximum X-axis coordinate of the bounding box, Maximum Y coordinate.
  • the vertex data obtaining unit 52 acquires the vertex coordinates of all the animation units of the current frame, and the coordinates of the four vertices of the bounding box calculated by the vertex calculating unit 53 are: the coordinates of the upper left corner (the minimum X-axis coordinate) , minimum Y-axis coordinate), coordinates of the upper right corner (maximum X-axis coordinate, minimum Y-axis coordinate), coordinates of the lower left corner (minimum X-axis coordinate, maximum Y-axis coordinate), coordinates of the lower right corner (maximum X-axis coordinate, maximum Y-axis coordinates).
  • the bounding box generating unit 54 is configured to use the vertex calculating unit 53 to obtain four tops of the bounding box Point coordinates, which are generated in the bounding box of the current frame.
  • the animation playing device includes a bounding box calculating module 5, thereby supporting calculation of the animation bounding box, and realizing the real-time calculation of the bounding box of the animation in the current frame, so that the area of the animation bounding box is as small as possible.
  • the boundary is as close as possible to the animation, which makes the collision detection more accurate, improves the authenticity of the animation, enhances the immersion of the virtual environment, and facilitates the post-production of the animation.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present invention provides a method and device for animating and a method and device for playing animation. The method for animating includes: determining key frames of an animation unit, wherein the frames in which the animation unit changes non-linearly in the playing process are the key frames; setting key frame data of the animation unit, wherein parameters of the animation unit in the key frame are recorded in the key frame data. The method for playing animation includes: traversing each animation unit in the current frame; obtaining the key frame data of said animation unit; if said animation unit does not have key frame data in the current frame, calculating transition frame data of said animation unit in the current frame according to the key frame data of said animation unit in the key frames; updating said each animation unit in the current frame according to the key frame data or the transition frame data of said each animation unit. Implementing the method and device for animating and the method and device for playing animation that are provided in the present invention can reduce the workload in animating process.

Description

一种动画制作方法、 装置和动画播放方法、 装置  Animation production method, device and animation playing method and device
技术领域 Technical field
本发明涉及电脑动画技术领域, 尤其涉及一种动画制作方法、 装置 和动画播放方法、 装置。 发明背景  The present invention relates to the field of computer animation technology, and in particular, to an animation production method, apparatus, and animation playing method and apparatus. Background of the invention
随着动画产业的快速发展, 动画制作的产量迅猛上升, 并且出现了 大量的动画制作工具。 在普遍使用的 2D动画技术中, 虽然动画制作工 具和动画播放工具的种类繁多, 但都采用了基本相同的动画制作和动画 播放的原理。 具体地, 在制作动画时, 将一个或多个编辑好的动画图片 编入一个文件, 并设置好每个动画图片之间的播放时间间隔; 在播放动 画时, 以每个动画图片作为单独的一帧进行播放, 从而达到 2D动画的 效果。  With the rapid development of the animation industry, the production of animation production has risen rapidly, and a large number of animation production tools have appeared. In the commonly used 2D animation technology, although there are many types of animation tools and animation playback tools, they basically adopt the same principle of animation and animation playback. Specifically, when making an animation, one or more edited animation pictures are programmed into one file, and the play time interval between each animation picture is set; when the animation is played, each animation picture is used as a separate Play in one frame to achieve the effect of 2D animation.
发明人在实施本发明的过程中发现, 现有的动画制作技术存在明显 的缺点:  The inventors have discovered in the course of implementing the present invention that existing animation techniques have significant drawbacks:
首先, 现有的动画制作工具在制作动画时, 每一帧对应一个完整的 动画图片, 当多个帧的动画图片中包括相同背景时, 在编辑每一帧的动 画图片时, 都必须重复设置该背景的信息, 造成该背景信息的浪费; 其 次, 现有的动画制作工具不支持对动画包围盒的计算, 不利于动画的后 期合成制作。 发明内容  First, when an existing animation tool creates an animation, each frame corresponds to a complete animated picture. When the animation picture of multiple frames includes the same background, when editing the animation picture of each frame, it must be repeatedly set. The information of the background causes waste of the background information. Secondly, the existing animation production tool does not support the calculation of the animation bounding box, which is not conducive to the post-production synthesis of the animation. Summary of the invention
本发明实施例提供一种动画制作方法、装置和动画播放方法、装置, 可以提高对动画图片的利用率, 减少动画制作过程中的工作量, 同时支 持对动画包围盒的计算, 便于动画的后期制作。 The embodiment of the invention provides an animation production method, device and animation playing method and device, which can improve the utilization of animated pictures, reduce the workload in the animation production process, and simultaneously support The calculation of the animation bounding box is convenient for post-production of animation.
为达到上述技术效果, 本发明实施例提供的动画制作方法包括: 确定动画单元的关键帧; 所述动画单元在播放过程中出现非线性变 化时所在的帧为所述动画单元的关键帧;  In order to achieve the above technical effects, the animation production method provided by the embodiment of the present invention includes: determining a key frame of the animation unit; the frame in which the animation unit is nonlinearly changed during playback is a key frame of the animation unit;
设置所述动画单元的关键帧数据; 所述关键帧数据中记录该动画单 元在所述关键帧的参数。  Setting key frame data of the animation unit; recording the parameters of the animation unit in the key frame in the key frame data.
本发明实施例提供的动画播放方法包括:  The animation playing method provided by the embodiment of the present invention includes:
在当前帧遍历每个动画单元;  Traversing each animation unit in the current frame;
获取所述动画单元在所述当前帧的关键帧数据; 若所述动画单元在 所述当前帧不存在关键帧数据, 则根据所述动画单元在关键帧的关键帧 数据, 获取所述动画单元在所述当前帧的过渡帧数据; 所述动画单元在 关键帧数据中记录该动画单元在所述关键帧的参数; 所述动画单元的过 渡帧数据中记录该动画单元在所述过渡帧的参数;  Obtaining key frame data of the animation unit in the current frame; if the animation unit does not have key frame data in the current frame, acquiring the animation unit according to the key frame data of the key frame of the animation unit The transition frame data of the current frame; the animation unit records a parameter of the animation unit in the key frame in the key frame data; and records the animation unit in the transition frame in the transition frame data of the animation unit Parameter
在当前帧根据所述每个动画单元的关键帧数据或过渡帧数据, 更新 所述每个动画单元。  Each of the animation units is updated in the current frame based on key frame data or transition frame data of each of the animation units.
本发明实施例提供的动画制作装置包括:  The animation production apparatus provided by the embodiment of the invention includes:
动画单元创建模块, 用于创建动画单元;  An animation unit creation module for creating an animation unit;
动画数据设置模块, 用于设置动画单元的关键帧数据; 动画单元在 播放过程中出现非线性变化时所在的帧为所述动画单元的关键帧; 所述 关键帧数据中记录所述动画单元在所述关键帧的参数。  An animation data setting module, configured to set key frame data of the animation unit; a frame in which the animation unit has a nonlinear change during playback is a key frame of the animation unit; and the animation unit is recorded in the key frame data The parameters of the key frame.
本发明实施例提供的动画播放装置包括:  The animation playing device provided by the embodiment of the invention includes:
动画播放模块, 用于在当前帧遍历每个动画单元, 根据所述每个动 画单元在所述当前帧的关键帧数据或过渡帧数据, 更新所述每个动画单 元; 所述动画单元在播放过程中出现非线性变化时所在的帧为所述动画 单元的关键帧; 所述关键帧数据中记录该动画单元在所述关键帧的参 数; An animation playing module, configured to traverse each animation unit in a current frame, and update each of the animation units according to the key frame data or transition frame data of the current frame of each animation unit; the animation unit is playing The frame in which the nonlinear change occurs during the process is the animation a key frame of the unit; recording the parameters of the animation unit in the key frame in the key frame data;
过渡帧获取模块, 用于当所述动画单元在所述当前帧不存在关键帧 数据时, 根据所述动画单元在关键帧的关键帧数据, 计算所述动画单元 在所述当前帧的过渡帧数据, 并将所述过渡帧数据发送给所述动画播放 模块; 所述动画单元的过渡帧数据中记录该动画单元在所述过渡帧的参 数。  a transition frame obtaining module, configured to: when the animation unit does not have key frame data in the current frame, calculate a transition frame of the animation unit in the current frame according to the key frame data of the animation unit in the key frame Data, and the transition frame data is sent to the animation playing module; the transition frame data of the animation unit records the parameters of the animation unit in the transition frame.
根据本发明实施例提供的动画制作方法、 装置和动画播放方法、 装 置, 一个动画分为多个动画单元, 在制作每一帧动画图片时, 用户只需 要针对出现非线性变化的动画单元进行关键帧数据的设置, 在播放动画 过程中, 根据关键帧数据自动生成过渡帧数据, 并根据关键帧数据或过 渡帧数据播放每一帧动画图片。 这样一来, 既减少动画制作过程中的工 作量, 又使动画帧之间衔接更加流畅、 动作更加自然。 同时, 本发明实 施例提供的动画制作方法、 装置和动画播放方法、 装置支持对动画当前 帧的包围盒计算, 便于动画的后期合成制作。 附图简要说明  According to an animation production method, apparatus, and animation playing method and apparatus provided by an embodiment of the present invention, an animation is divided into a plurality of animation units, and when each frame of the animation picture is created, the user only needs to perform key for the animation unit in which the nonlinear change occurs. The frame data is set, during the animation process, the transition frame data is automatically generated according to the key frame data, and each frame of the animation picture is played according to the key frame data or the transition frame data. In this way, the amount of work in the animation process is reduced, and the animation frames are more smoothly connected and the movements are more natural. At the same time, the animation method, the device and the animation playing method and the device provided by the embodiment of the invention support the calculation of the bounding box of the current frame of the animation, and facilitate the post-production synthesis of the animation. BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将 对实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见 地, 下面描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技 术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获 得其他的附图。  In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图 1为本发明实施例提供的动画制作方法实施例流程示意图; 图 2为本发明实施例提供的动画播放方法实施例流程示意图; 图 3为本发明实施例提供的动画制作及播放方法第一实施例流程示 意图; 1 is a schematic flowchart of an embodiment of an animation production method according to an embodiment of the present invention; FIG. 2 is a schematic flowchart of an animation playback method according to an embodiment of the present invention; Embodiment process shows Intention
图 4为本发明实施例提供的动画制作及播放方法第二实施例流程示 意图;  4 is a schematic flow chart of a second embodiment of an animation production and playing method according to an embodiment of the present invention;
图 5为本发明实施例提供的动画制作及播放方法图元变换示意图; 图 6为本发明实施例提供的动画制作及播放方法动画播放示意图; 图 7为本发明实施例提供的动画包围盒计算流程示意图;  FIG. 5 is a schematic diagram of an animation of an animation production and playback method according to an embodiment of the present invention; FIG. 6 is a schematic diagram of animation playback of an animation production and playback method according to an embodiment of the present invention; FIG. 7 is an animation bounding box calculation according to an embodiment of the present invention; Schematic diagram of the process;
图 8为本发明实施例提供的动画制作装置实施例结构示意图; 图 9为本发明实施例提供的动画播放装置第一实施例结构示意图; 图 10 为本发明实施例提供的动画制作装置及播放装置施例结构示 意图;  8 is a schematic structural diagram of an embodiment of an animation production apparatus according to an embodiment of the present invention; FIG. 9 is a schematic structural diagram of a first embodiment of an animation playback apparatus according to an embodiment of the present invention; FIG. 10 is a schematic diagram of an animation production apparatus and a playback according to an embodiment of the present invention; Schematic diagram of the structure of the device;
图 11为本发明实施例提供的动画播放装置动画播放示意图; 图 12为本发明实施例提供的动画播放装置第二实施例结构示意图。 实施本发明的方式  FIG. 11 is a schematic diagram of an animation playback of an animation playback device according to an embodiment of the present invention; FIG. 12 is a schematic structural diagram of a second embodiment of an animation playback device according to an embodiment of the present invention. Mode for carrying out the invention
本发明实施例提供一种动画制作方法、装置和动画播放方法、装置, 可以提高动画图片的利用率, 减小动画制作过程中的工作量。 在本发明 各实施例中, 动画单元可以是图元、 或骨骼、 或两者的结合。 其中, 图 元是可编辑的最小图形单位, 是用于操作和组织画面的最基本的元素。 一幅画面由一个或多个图元组成。 图元是一组简单的、 通用的几何图形 或字符。 骨骼在动画中一般通过改变其朝向和位置来生成动画, 动画中 通常由若干互相连接的骨骼构成骨架。 在应用本发明实施例时, 由于对 骨 的操作更为便捷, 可以将图元和骨骼绑定, 通过依次更新骨骼和与 该骨骼绑定的图元, 筒化动画制作过程。  The embodiment of the invention provides an animation production method, device and animation playing method and device, which can improve the utilization rate of the animation picture and reduce the workload in the animation production process. In various embodiments of the invention, the animation unit may be a primitive, or a bone, or a combination of both. Among them, the primitive is the smallest graphical unit that can be edited, and is the most basic element for manipulating and organizing the picture. A picture consists of one or more primitives. A primitive is a set of simple, generic geometry or characters. Bone is generally animated in animation by changing its orientation and position. The animation usually consists of a number of interconnected bones. When the embodiment of the present invention is applied, since the operation on the bone is more convenient, the primitive and the bone can be bound, and the animation is completed by sequentially updating the skeleton and the primitive bound to the skeleton.
参见图 1 , 为本发明实施例提供的动画制作方法实施例流程示意图。 如图 1所示, 该方法包括以下步骤。 在步骤 100, 创建动画单元, 并确定动画单元的关键帧。 在播放过 程中, 动画单元发生非线性变化时所在的帧为该动画单元的关键帧。 另 外, 在播放过程中, 动画单元进行线性变化时所在的帧为该动画单元的 过渡帧。 1 is a schematic flowchart of an embodiment of an animation production method according to an embodiment of the present invention. As shown in Figure 1, the method includes the following steps. In step 100, an animation unit is created, and keyframes of the animation unit are determined. During playback, the frame in which the animation unit changes nonlinearly is the key frame of the animation unit. In addition, during playback, the frame in which the animation unit changes linearly is the transition frame of the animation unit.
在本发明实施例中, 动画单元进行线性变化指该动画单元进行匀速 的变化, 如动画单元运动的距离, 旋转的角度等随时间均匀变化。  In the embodiment of the present invention, the linear change of the animation unit means that the animation unit performs a uniform change, such as the distance of the animation unit movement, the rotation angle, and the like, uniformly changing with time.
在步骤 101 , 设置该动画单元的关键帧数据; 关键帧数据中记录该 动画单元在关键帧的参数。 同样的, 动画单元的过渡帧数据中记录该动 画单元在过渡帧的参数。 需要注意的是: 过渡帧数据并非在动画制作过 程中设置, 而是在动画播放过程中, 根据该动画单元的关键帧数据实时 计算得出。  In step 101, key frame data of the animation unit is set; and key parameters of the animation unit in the key frame are recorded in the key frame data. Similarly, the parameters of the transition frame of the animation unit are recorded in the transition frame data of the animation unit. It should be noted that the transition frame data is not set during the animation process, but is calculated in real time according to the key frame data of the animation unit during the animation playback.
更为具体的, 关键帧的参数包括动画单元在该关键帧的水平位置参 数、 垂直位置参数、 旋转角度参数、 缩放比例等参数。 同样地, 过渡帧 的参数包括动画单元在该过渡帧的水平位置参数、 垂直位置参数、 旋转 角度参数、 缩放比例等参数。  More specifically, the parameters of the key frame include parameters of the horizontal position parameter, the vertical position parameter, the rotation angle parameter, the scaling ratio of the animation unit in the key frame. Similarly, the parameters of the transition frame include parameters of the horizontal position parameter, the vertical position parameter, the rotation angle parameter, the scaling ratio of the animation unit in the transition frame.
根据本发明实施例提供的动画制作方法, 将一个动画分为多个动画 单元, 在制作每一帧动画图片时, 用户只需要针对出现非线性变化的动 画单元进行关键帧数据的设置, 在播放动画过程中, 根据关键帧数据自 动生成过渡帧数据, 使动画帧之间衔接流畅、 自然, 减少动画制作过程 中的工作量。  According to the animation production method provided by the embodiment of the present invention, an animation is divided into a plurality of animation units, and when each frame of the animation image is created, the user only needs to set the key frame data for the animation unit in which the nonlinear change occurs, and plays During the animation process, the transition frame data is automatically generated according to the key frame data, so that the animation frames are smoothly and naturally connected, and the workload in the animation process is reduced.
参见图 2, 为本发明实施例提供的动画播放方法实施例流程示意图。 如图 2所示, 该方法包括如下步骤。  FIG. 2 is a schematic flowchart diagram of an embodiment of an animation playing method according to an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps.
在步骤 200, 在当前帧遍历所有动画单元。 更为具体的, 当动画单 元为图元时, 反向遍历图元的队列, 当动画单元为骨骼时, 依次遍历骨 骼的队列。 在步骤 201 , 判断在当前帧是否存在各动画单元的关键帧数据, 若 判断在当前帧存在该动画单元的关键帧数据, 则执行步骤 202; 若判断 在当前帧不存在该动画单元的关键帧数据, 则执行步骤 203。 At step 200, all animation units are traversed in the current frame. More specifically, when the animation unit is a primitive, the queue of the primitive is traversed in reverse, and when the animation unit is a skeleton, the queue of the skeleton is traversed in sequence. In step 201, it is determined whether there is key frame data of each animation unit in the current frame. If it is determined that the key frame data of the animation unit exists in the current frame, step 202 is performed; if it is determined that the key frame of the animation unit does not exist in the current frame Data, then step 203 is performed.
在步骤 202, 获取该动画单元在当前帧的关键帧数据。  At step 202, keyframe data of the animation unit in the current frame is obtained.
在步骤 203, 根据该动画单元在关键帧的关键帧数据, 计算该动画 单元在当前帧的过渡帧数据。 具体的, 根据该动画单元在关键帧的关键 帧数据, 计算该动画单元在当前帧的过渡帧数据的计算方式包括: 根据 当前帧与关键帧之间间隔的帧数, 以及关键帧数据之间的线性插值、 或 关键帧数据的平均值、 或其它包含关键帧数据的数学函数计算该动画单 元在当前帧的过渡帧数据。 如果在当前帧的后续帧中没有该动画单元的 关键帧, 则该动画单元的过渡帧为该动画单元上一个关键帧。  In step 203, the transition frame data of the animation unit in the current frame is calculated according to the key frame data of the animation unit in the key frame. Specifically, according to the key frame data of the animation unit in the key frame, calculating the transition frame data of the animation unit in the current frame includes: calculating the number of frames between the current frame and the key frame, and between the key frame data The linear interpolation, or the average of the keyframe data, or other mathematical function containing keyframe data, calculates the transition frame data for the animation unit in the current frame. If there is no keyframe of the animation unit in a subsequent frame of the current frame, the transition frame of the animation unit is a key frame on the animation unit.
在步骤 204, 根据各动画单元的关键帧数据或过渡帧数据更新各动 画单元。 具体地, 根据各动画单元的关键帧数据或过渡帧数据确定每个 动画单元的变化, 进而更新各动画单元, 从而播放当前帧。  At step 204, each animation unit is updated based on key frame data or transition frame data of each animation unit. Specifically, the change of each animation unit is determined according to key frame data or transition frame data of each animation unit, and then each animation unit is updated to play the current frame.
根据本发明实施例提供的动画播放方法, 在播放过程中可以实时的 根据动画单元的关键帧数据计算过渡帧数据, 使动画帧之间衔接更加流 畅、 动作更加自然。 相应地, 在动画制作过程中, 只需要针对出现非线 性变化的动画单元进行关键帧数据的设置, 减少动画制作的工作量。  According to the animation playing method provided by the embodiment of the present invention, the transition frame data can be calculated according to the key frame data of the animation unit in real time during the playing process, so that the animation frames are more smoothly connected and the movement is more natural. Accordingly, in the animation process, only the key frame data is set for the animation unit in which the nonlinear change occurs, and the workload of the animation is reduced.
为了更好的理解本发明实施例提供的动画制作方法、动画播放方法, 下面将二者结合在一起进行描述。  In order to better understand the animation production method and animation playback method provided by the embodiments of the present invention, the following two will be described together.
参见图 3 , 为本发明实施例提供的动画制作及播放方法第一实施例 流程示意图。在本实施例中,将详细的描述动画制作及播放方法的流程。 如图 3所示, 该方法包括以下步骤。  FIG. 3 is a schematic flowchart diagram of a first embodiment of an animation production and playback method according to an embodiment of the present invention. In the present embodiment, the flow of the animation production and playback method will be described in detail. As shown in FIG. 3, the method includes the following steps.
在步骤 300, 创建动画单元, 并设置动画单元的关键帧数据。 在本 发明实施例中, 动画单元可以是图元或骨骼。 更为具体的, 一个动画由 一个或多个动画单元组成; 在每一帧图片中, 用户只需要针对出现非线 形变化的动画单元进行关键帧数据的设置。 关键帧数据中记录该动画单 元的在该关键帧的参数, 具体包括: 该动画单元的水平位置参数、 垂直 位置参数、 旋转角度参数、 缩放比例等参数。 本步骤只在制作动画的流 程中执行, 播放动画的流程不需要执行本步骤。 In step 300, an animation unit is created, and keyframe data of the animation unit is set. In an embodiment of the invention, the animation unit may be a primitive or a bone. More specifically, an animation by One or more animation units are composed; in each frame of picture, the user only needs to set the key frame data for the animation unit in which the non-linear change occurs. The key frame data records the parameters of the animation unit in the key frame, and specifically includes: a horizontal position parameter, a vertical position parameter, a rotation angle parameter, a scaling factor, and the like of the animation unit. This step is only performed in the process of creating an animation. This step is not required to play the animation.
本实施例以图元为例, 对动画单元的关键帧设置进行说明。 现假设 需要完成一个包含 60 帧的动画: 一指针绕表盘一周。 在本例中, 动画 由 2个图元组成: 表盘图元, 以下简称为 h图元、 指针图元, 以下筒称 为 i图元。预置好指针与表盘的初始位置后, 生成 h图元和 i图元在第 1 帧的关键帧数据。 由于在动画播放过程中, 只有指针存在变化, 表盘是 不动的, 所以在设置各图元其后的关键帧数据时, 只需设置 i图元的关 键帧数据即可。 由于无需为 h图元设置其它关键帧数据, 因此动画的制 作的针对性更强, 效率得到提高。  In this embodiment, the key element setting of the animation unit is described by taking the picture element as an example. Now suppose you need to complete an animation with 60 frames: a pointer around the dial for a week. In this example, the animation consists of two primitives: the dial primitive, hereinafter referred to as the h primitive and the pointer primitive, and the lower cartridge is called the i primitive. After the initial position of the pointer and the dial is preset, the key frame data of the h primitive and the i primitive in the first frame are generated. Since the dial is not moving during the animation playback, the dial is not moving. Therefore, when setting the key frame data of each primitive, you only need to set the key frame data of the i primitive. Since there is no need to set other keyframe data for the h primitive, the animation is more targeted and more efficient.
因为在动画的播放过程中, 指针匀速的绕表盘一周,故 i图元的第 1 帧和第 60帧为其关键帧。 在制作该动画时, 首先设置好各图元的位置, 该动画的第 1帧如图 5a所示, 相应地, 生成 i图元在第一帧的关键帧数 据, 设置表盘的中心为 i图元的中心, i图元在第一帧的角度为 0度, i 图元在第 60帧的旋转角度为 360度, 如图 5b所示。  Because the pointer wraps around the dial at a constant speed during the playback of the animation, the first and 60th frames of the i primitive are its key frames. When making the animation, first set the position of each primitive. The first frame of the animation is as shown in Figure 5a. Correspondingly, the key frame data of the i-tu in the first frame is generated, and the center of the dial is set to i. At the center of the element, the angle of the i element in the first frame is 0 degrees, and the angle of rotation of the i element in the 60th frame is 360 degrees, as shown in Fig. 5b.
需要说明的是, 当动画单元为图元时, 该图元的变换可以包括: 以 任一点为中心对进行旋转、 平移、 缩放、 斜切 (shearing ) 变换的等。 当动画单元为骨骼时, 该图元的变换可以包括: 以骨骼的起始点为中心 对骨骼进行旋转、 平移、 缩放变换等信息。  It should be noted that when the animation unit is a primitive, the transformation of the primitive may include: rotating, translating, scaling, shearing, transforming, etc., centering on any point. When the animation unit is a bone, the transformation of the primitive may include: rotating, translating, scaling, and the like of the bone centered on the starting point of the bone.
在步骤 301 , 开始播放动画, 在每一帧都遍历所有动画单元, 判断 在当前帧是否存在各个动画单元的关键帧数据; 若在当前帧存在该动画 单元的关键帧数据, 则执行步骤 302; 若在当前帧不存在该动画单元的 关键帧数据, 则执行步骤 303。 In step 301, start playing the animation, traversing all the animation units in each frame, determining whether there is key frame data of each animation unit in the current frame; if there is key frame data of the animation unit in the current frame, step 302 is performed; If the animation unit does not exist in the current frame For key frame data, go to step 303.
优选的, 当动画单元为骨骼时, 依次遍历骨骼队列; 当动画单元为 图元时, 反向遍历图元队列。 因为当动画单元为图元时, 各图元之间可 能存在遮挡关系, 而在动画制作过程中, 最底层被遮挡的图元一般排在 图元的队列末端, 所以反向遍历图元队列可以保证动画具有正确的层次 关系。  Preferably, when the animation unit is a bone, the skeleton queue is traversed in turn; when the animation unit is a primitive, the primitive queue is traversed in reverse. Because when the animation unit is a primitive, there may be an occlusion relationship between the primitives. In the animation process, the lowest occluded primitive is generally at the end of the queue of the primitive, so the reverse traversal primitive queue can Ensure that the animation has the correct hierarchical relationship.
在步骤 302, 获取该动画单元在当前帧的关键帧数据。  In step 302, key frame data of the animation unit in the current frame is obtained.
在步骤 303 , 根据该动画单元在关键帧的关键帧数据, 计算该动画 单元在当前帧的过渡帧数据。  In step 303, the transition frame data of the animation unit in the current frame is calculated according to the key frame data of the animation unit in the key frame.
更为具体的, 根据该动画单元在关键帧的关键帧数据, 计算该动画 单元在当前帧的过渡帧数据的计算方式包括: 根据当前帧与关键帧之间 间隔的帧数, 以及关键帧数据之间的线性插值、或关键帧数据的平均值、 或其它包含关键帧数据的数学函数计算该动画单元在当前帧的过渡帧 数据。 在实施例中, 以通过计算关键帧数据的线性插值获取当前帧的过 渡帧数据为例, 但不能以此限定本发明的保护范围。  More specifically, according to the key frame data of the animation unit in the key frame, calculating the transition frame data of the animation unit in the current frame includes: the number of frames according to the interval between the current frame and the key frame, and the key frame data. The linear interpolation between the linear interpolation, or the average of the key frame data, or other mathematical function containing the key frame data, calculates the transition frame data of the animation unit in the current frame. In the embodiment, the transition frame data of the current frame is obtained by linear interpolation of the key frame data, but the scope of protection of the present invention cannot be limited thereto.
更进一步的, 因为动画单元的关键帧与关键帧之间都是线性变化的 关系, 所以对于在当前帧没有关键帧数据的动画单元, 只要获取其前后 关键帧的关键帧数据, 及中间间隔的帧数, 就可以通过计算线性插值, 得出该动画单元在当前帧的过渡帧数据。  Further, because the key frame of the animation unit and the key frame are linearly changed, for the animation unit having no key frame data in the current frame, only the key frame data of the key frames before and after it is acquired, and the intermediate interval is obtained. The number of frames can be calculated by linear interpolation to obtain the transition frame data of the animation unit in the current frame.
在本实施例的举例中,指针匀速的绕表盘一周, i图元在第 1帧和第 60帧具有关键帧数据。 根据 i图元在第 1帧和第 60帧的关键帧数据, 以及间隔的帧数,可以通过计算关键帧数据的线性插值,得出在第 2帧, i图元的过渡帧数据是相对 i图元在第 1帧的位置, 旋转角度为 6度; i 图元在第 3帧的过渡帧数据是相对 i图元在第 1帧的位置, 其旋转角度 为 12度; 其余各帧以此类推。 另外, 由于 h图元的关键帧只有第一帧, 在后续帧中没有 h图元的 关键帧, 因此, h图元在当前帧的过渡帧为 h图元的第一帧, 即上一个 关键帧。 In the example of this embodiment, the pointer is clocked around the dial at a constant speed, and the i-picture has key frame data in the first frame and the 60th frame. According to the key frame data of the i-picture in the first frame and the 60th frame, and the number of spaced frames, the linear interpolation of the key frame data can be calculated, and the transition frame data of the i-picture element is relative in the second frame. The position of the picture element in the first frame, the rotation angle is 6 degrees; the transition frame data of the i picture in the third frame is the position of the i picture element in the first frame, and the rotation angle is 12 degrees; the remaining frames are analogy. In addition, since the key frame of the h primitive has only the first frame, and there is no key frame of the h primitive in the subsequent frame, the transition frame of the h primitive in the current frame is the first frame of the h primitive, that is, the previous key. frame.
在步骤 304, 根据各动画单元的关键帧数据或过渡帧数据更新各动 画单元并显示各动画单元。 对所有动画单元的更新完成后, 形成动画在 当前帧的完整图片。 在动画的每一帧都执行步骤 301至步骤 304, 直至 动画播放结束。  In step 304, each animation unit is updated according to key frame data or transition frame data of each animation unit and each animation unit is displayed. After the update of all animation units is completed, the full picture of the animation in the current frame is formed. Steps 301 through 304 are performed for each frame of the animation until the end of the animation.
在本实施例的举例中, 指针匀速的绕表盘一周的完整动画如图 6所 示。  In the example of this embodiment, a complete animation of the pointer around the dial at a constant speed is shown in Fig. 6.
实施本发明实施例提供的动画制作及播放方法, 只需要设置该动画 在第一帧的图片, 当该动画存在后续变化时, 只需要为出现非线性变化 的帧设置关键帧数据。 在播放该动画的过程中, 自动生成过渡帧数据, 使动画的帧之间衔接更加流畅。 同时, 本发明实施例提供的动画制作方 法可以将一个动画分为多个并行的动画单元, 在每一帧中, 只需要针对 出现非线性变化的动画单元进行关键帧数据的设置, 无需为其它的动画 单元设置关键帧数据,增强动画制作的针对性,减少动画制作的工作量。  To implement the animation production and playback method provided by the embodiment of the present invention, it is only necessary to set the animation in the picture of the first frame. When there is a subsequent change in the animation, only key frame data needs to be set for the frame in which the nonlinear change occurs. During the playback of the animation, the transition frame data is automatically generated to make the animation frames more smoothly connected. Meanwhile, the animation method provided by the embodiment of the present invention can divide an animation into a plurality of parallel animation units, and in each frame, only key frame data needs to be set for an animation unit in which nonlinear changes occur, without using other The animation unit sets keyframe data, enhances the targeting of animation, and reduces the workload of animation.
参见图 4, 为本发明实施例提供的动画制作及播放方法第二实施例 流程示意图, 在本发明实施例中, 动画由骨骼和与该骨骼绑定的图元共 同组成, 播放该动画的流程如图 4所示。  4 is a schematic flowchart of a second embodiment of an animation production and playback method according to an embodiment of the present invention. In the embodiment of the present invention, an animation is composed of a bone and a primitive bound to the skeleton, and the animation is played. As shown in Figure 4.
在步骤 400, 完成骨骼和图元的关键帧数据设置后, 开始播放动画。 在步骤 401 , 在每一帧首先遍历所有骨骼, 判断在当前帧是否存在 各骨骼的关键帧数据; 若当前帧存在该骨骼的关键帧数据, 则执行步驟 402; 若当前帧不存在该骨骼的关键帧数据, 则执行步骤 403。  In step 400, after completing the keyframe data settings for the bones and primitives, the animation begins to play. In step 401, all the bones are first traversed in each frame, and it is determined whether there is key frame data of each bone in the current frame; if the key frame data of the bone exists in the current frame, step 402 is performed; if the current frame does not exist in the skeleton For key frame data, step 403 is performed.
在步骤 402, 获取在当前帧各骨骼的关键帧数据。  At step 402, keyframe data for each bone in the current frame is obtained.
在步骤 403 , 根据骨骼在关键帧的关键帧数据计算线性插值, 得出 该骨骼在当前帧的过渡帧数据。 当然, 本实施例中也可以通过其它的数 学函数计算骨骼在当前帧的过渡帧数据, 本发明以计算线性插值的方式 获取过渡帧数据为例。 In step 403, a linear interpolation is calculated according to the key frame data of the key in the key frame, and The transition frame data of the bone in the current frame. Of course, in this embodiment, the transition frame data of the bone in the current frame can also be calculated by other mathematical functions. The present invention takes the calculation of the linear interpolation to obtain the transition frame data as an example.
在步骤 404, 根据各骨骼的关键帧数据或过渡帧数据更新各骨骼。 在本发明实施例中, 骨骼可以包括父骨骼和子骨骼。 一个父骨骼可以连 接多个子骨骼, 形成骨架。 父骨骼的变化将带动与之连接的子骨骼的变 化, 因此子骨骼根据父骨骼的变换进行相应的变换。  At step 404, each bone is updated based on key frame data or transition frame data for each bone. In an embodiment of the invention, the bones may include a parent bone and a child bone. A parent bone can connect multiple child bones to form a skeleton. The change of the parent bone will drive the change of the child bone connected to it, so the child bone will transform accordingly according to the transformation of the parent bone.
在步骤 405 , 保存各骨骼在当前帧的关键帧数据或过渡帧数据。 在步骤 406, 在当前帧遍历所有图元, 判断在当前帧是否存在各图 元的关键帧数据; 若当前帧存在该图元的关键帧数据, 则执行步骤 407; 若当前帧不存在该图元的关键帧数据, 则执行步骤 408。  At step 405, key frame data or transition frame data of each bone in the current frame is saved. In step 406, all the primitives are traversed in the current frame, and it is determined whether the key frame data of each primitive exists in the current frame. If the key frame data of the primitive exists in the current frame, step 407 is performed; if the current frame does not exist, the map is not present. For the key frame data of the element, step 408 is performed.
在步骤 407, 获取该图元在当前帧的关键帧数据。  At step 407, keyframe data of the primitive in the current frame is obtained.
在步骤 408, 根据该图元在其它关键帧的关键帧数据计算线性插值, 得出该图元在当前帧的过渡帧数据。  At step 408, linear interpolation is calculated based on the key element data of the other key frames according to the primitive, and the transition frame data of the primitive in the current frame is obtained.
在步骤 409, 根据各图元的关键帧数据或过渡帧数据更新各图元。 在步骤 410, 获取保存的各骨骼在当前帧的关键帧数据或过渡帧数 据。 At step 4 09, each primitive is updated according to key frame data or transition frame data of each primitive. At step 410, key frame data or transition frame data of the saved bones in the current frame is obtained.
在步骤 411 , 根据与各图元绑定的骨骼在当前帧的关键帧数据或过 渡帧数据, 再次更新各图元。  In step 411, each primitive is updated again according to the key frame data or the transition frame data of the current frame of the bone bound to each primitive.
实施本发明实施例提供的动画制作及播放方法,将图元与骨骼绑定, 且骨骼的变化将带动图元的变化,使动画的制作更加方便,针对性更强, 易于实现动画过程中的各种复杂的变换, 且效果更加流畅自然。 同时, 本发明实施例提供的动画制作及播放方法提高了对动画单元及关键帧 数据的利用率, 进一步减少动画制作过程中的工作量。  The animation production and playing method provided by the embodiment of the invention is used to bind the primitive to the bone, and the change of the bone will drive the change of the primitive, making the animation more convenient, more targeted, and easy to implement in the animation process. A variety of complex transformations, and the effect is more fluid and natural. At the same time, the animation production and playing method provided by the embodiment of the invention improves the utilization of the animation unit and the key frame data, and further reduces the workload in the animation production process.
参见图 7, 为本发明实施例提供的动画包围盒计算流程示意图。 动 画的包围盒是检测动画的边界、 碰撞等问题的关键, 精确的碰撞检测对 提高动画的真实性、 增强虚拟环境的沉浸感起着至关重要的作用。 本发 明实施例提供的动画播放方法在完成遍历更新动画单元后, 还支持对该 动画当前帧的包围盒计算。 其流程如图 7所示。 FIG. 7 is a schematic flowchart of a calculation process of an animation bounding box according to an embodiment of the present invention. move The bounding box of the painting is the key to detecting the boundary and collision of the animation. Accurate collision detection plays an important role in improving the authenticity of the animation and enhancing the immersion of the virtual environment. The animation playing method provided by the embodiment of the present invention further supports the bounding box calculation of the current frame of the animation after completing the traversal updating of the animation unit. The process is shown in Figure 7.
在步骤 700, 预置该动画包围盒四个顶点的初始化坐标。 更为具体 的,预置包围盒四个顶点的最小 X轴坐标和最小 Y轴为正无穷大、最大 X轴坐标和最大 Y轴坐标为负无穷大。  At step 700, the initialization coordinates of the four vertices of the animation bounding box are preset. More specifically, the minimum X-axis coordinate and the minimum Y-axis of the four vertices of the preset bounding box are positive infinity, the maximum X-axis coordinate, and the maximum Y-axis coordinate are negative infinity.
更进一步的, 在动画制作中, 一般定义图片的左上角为 X轴和 Y轴 坐标的起始坐标。 在本发明实施例中, 预置包围盒左上角的坐标为 ( + Further, in animation, the upper left corner of the generally defined picture is the starting coordinate of the X-axis and Y-axis coordinates. In the embodiment of the present invention, the coordinates of the upper left corner of the preset bounding box are ( +
00 , + 00 ), 右上角的坐标为( - 00 , + 00 ), 左下角的坐标为( + 00 , - 00 ) , 右下角的坐标为 ( -∞, -∞)。 通过上述设置, 在后续步骤中遍历动画 单元时, 动画单元的左上角坐标必然小于预置的包围盒左上角坐标, 从 而利于完成对包围盒顶点坐标的初次更新替换, 包围盒其它三个顶点的 坐标预置方式同理。 00 , + 00 ), the coordinates of the upper right corner are ( - 00 , + 00 ), the coordinates of the lower left corner are ( + 00 , - 00 ), and the coordinates of the lower right corner are ( -∞, -∞). With the above settings, when the animation unit is traversed in the subsequent steps, the coordinates of the upper left corner of the animation unit must be smaller than the coordinates of the upper left corner of the preset bounding box, thereby facilitating the initial update replacement of the coordinates of the bounding box vertex, and the other three vertices of the bounding box. The coordinate preset method is the same.
另外, 由于 2D动画的包围盒是四边形的, 只要确定该包围盒的左 上角坐标和右下角坐标, 就可以确定该包围盒。 因此, 在本步骤中, 可 以只预设包围盒左上角的坐标为 ( + 00 , +∞), 右下角的坐标为 ( - GO , In addition, since the bounding box of the 2D animation is quadrangular, the bounding box can be determined as long as the coordinates of the upper left corner and the lower right corner of the bounding box are determined. Therefore, in this step, you can only preset the coordinates of the upper left corner of the bounding box to be ( + 00 , +∞), and the coordinates of the lower right corner are ( - GO ,
— O )。 — O ).
在步骤 701 , 遍历当前帧的所有动画单元, 根据各动画单元在当前 帧的关键帧数据或过渡帧数据, 更新各动画单元。  In step 701, all the animation units of the current frame are traversed, and each animation unit is updated according to the key frame data or the transition frame data of each animation unit in the current frame.
在更新各动画单元后, 获取每个动画单元的顶点数据。  After updating each animation unit, the vertex data of each animation unit is obtained.
在步骤 702 , 在各动画单元完成更新后, 以当前帧中各动画单元中 的最小 X轴坐标、 最小 Y轴坐标作为包围盒的最小 X轴坐标、 最小 Y 轴坐标; 以当前帧中各动画单元中的最大 X轴坐标、最大 Y轴坐标作为 包围盒的最大 X轴坐标、 最大 Y轴坐标。 更为具体的, 在各动画单元完成更新后, 将当前包围盒的左上角顶 点和右下角顶点的 X轴坐标和 Y轴坐标分别与各动画单元在当前帧的左 上角顶点和右下角顶点的 X轴坐标和 Y轴坐标进行比较。 In step 702, after each animation unit completes the update, the minimum X-axis coordinate and the minimum Y-axis coordinate in each animation unit in the current frame are used as the minimum X-axis coordinate and the minimum Y-axis coordinate of the bounding box; The maximum X-axis coordinate and the maximum Y-axis coordinate in the unit are the maximum X-axis coordinate and the maximum Y-axis coordinate of the bounding box. More specifically, after each animation unit completes the update, the X-axis coordinate and the Y-axis coordinate of the upper left corner and the lower right corner of the current bounding box are respectively associated with the animation unit in the upper left corner and the lower right corner of the current frame. The X-axis coordinates and the Y-axis coordinates are compared.
如果当前包围盒的左上角顶点的 X轴坐标大于某个动画单元在当前 帧的左上角顶点的 X轴坐标,则用该动画单元在当前帧的左上角顶点的 X轴坐标替换当前包围盒的左上角顶点的 X轴坐标, 类似地, 如果当前 包围盒的左上角顶点的 Y 轴坐标大于某个动画单元在当前帧的左上角 顶点的 Y轴坐标,则用该动画单元在当前帧的左上角顶点的 Y轴坐标替 换当前包围盒的左上角顶点的 Y轴坐标。  If the X-axis coordinate of the upper left corner vertex of the current bounding box is greater than the X-axis coordinate of an animation unit in the upper left corner vertex of the current frame, the animation unit replaces the current bounding box with the X-axis coordinate of the upper left corner vertex of the current frame. The X-axis coordinate of the top left vertex, similarly, if the Y-axis coordinate of the upper left corner vertex of the current bounding box is greater than the Y-axis coordinate of an animation unit in the upper left corner vertex of the current frame, the animation unit is used on the upper left of the current frame. The Y-axis coordinate of the corner vertex replaces the Y-axis coordinate of the upper left corner vertex of the current bounding box.
如果当前包围盒的右下角顶点的 X轴坐标小于某个动画单元在当前 帧的右下角顶点的 X轴坐标,则用该动画单元在当前帧的右下角顶点的 X轴坐标替换当前包围盒的右下角顶点的 X轴坐标, 类似地, 如果当前 包围盒的右下角顶点的 Y 轴坐标小于某个动画单元在当前帧的右下角 顶点的 Y轴坐标,则用该动画单元在当前帧的右下角顶点的 Y轴坐标替 换当前包围盒的右下角顶点的 Y轴坐标。  If the X-axis coordinate of the bottom right corner vertex of the current bounding box is smaller than the X-axis coordinate of a certain animation unit in the lower right corner vertex of the current frame, the animation unit replaces the current bounding box with the X-axis coordinate of the lower right corner vertex of the current frame. The X-axis coordinate of the vertex of the lower right corner, similarly, if the Y-axis coordinate of the bottom right corner vertex of the current bounding box is smaller than the Y-axis coordinate of the animation cell at the lower right corner of the current frame, the animation unit is used to the right of the current frame. The Y-axis coordinate of the lower corner vertex replaces the Y-axis coordinate of the lower right corner vertex of the current bounding box.
当与所有动画单元比较后, 包围盒的四个顶点坐标分别为: 左上角 的坐标(最小 X轴坐标, 最小 Y轴坐标), 右上角的坐标(最大 X轴坐 标, 最小 Y轴坐标), 左下角的坐标(最小 X轴坐标, 最大 Y轴坐标), 右下角的坐标 (最大 X轴坐标, 最大 Y轴坐标)。  When compared with all animation units, the coordinates of the four vertices of the bounding box are: coordinates of the upper left corner (minimum X coordinate, minimum Y coordinate), coordinates of the upper right corner (maximum X coordinate, minimum Y coordinate), The coordinates of the lower left corner (minimum X coordinate, maximum Y coordinate), the coordinates of the lower right corner (maximum X coordinate, maximum Y coordinate).
在步骤 703 , 根据步骤 702 中最终确定的包围盒四个顶点坐标, 生 成该动画在当前帧的包围盒。  At step 703, the bounding box of the animation in the current frame is generated according to the four vertex coordinates of the bounding box finally determined in step 702.
实施本发明实施例提供的动画包围盒计算方法, 可以实时的计算得 出的动画在当前帧的包围盒, 从而使包围盒的面积尽可能小, 其边界与 动画尽可能接近, 使碰撞检测更加精确, 提高动画的真实性、 增强虚拟 环境的沉浸感, 便于动画的后期制作。 参见图 8 , 为本发明实施例提供的动画制作装置实施例结构示意图, 如图 8所示, 该装置包括: By implementing the animation bounding box calculation method provided by the embodiment of the invention, the animation can be calculated in real time in the bounding box of the current frame, so that the area of the bounding box is as small as possible, and the boundary is as close as possible to the animation, so that the collision detection is more Accurate, improve the authenticity of the animation, enhance the immersion of the virtual environment, and facilitate post-production of animation. FIG. 8 is a schematic structural diagram of an embodiment of an animation production apparatus according to an embodiment of the present invention. As shown in FIG. 8, the apparatus includes:
动画单元创建模块 1 , 用于创建动画单元; 该动画单元包括图元和 / 或骨骼;  An animation unit creation module 1 for creating an animation unit; the animation unit includes a primitive and/or a bone;
动画数据设置模块 2, 用于设置动画单元的关键帧数据; 在播放过 程中, 动画单元发生非线性变化时所在的帧为该动画单元的关键帧; 关 键帧数据中记录动画单元在关键帧的参数。  The animation data setting module 2 is configured to set key frame data of the animation unit; during the playing process, the frame where the animation unit changes nonlinearly is the key frame of the animation unit; the key frame data records the animation unit in the key frame parameter.
更为具体的, 在播放过程中, 动画单元进行线性变化时所在的帧为 该动画单元的过渡帧; 动画单元的过渡帧数据中记录该动画单元在过渡 帧的参数。 关键帧的参数包括动画单元在该关键帧的水平位置参数、 垂 直位置参数、 旋转角度参数、 缩放比例参数。 同样地, 过渡帧的参数包 括动画单元在该过渡帧的水平位置参数、垂直位置参数、旋转角度参数、 缩放比例等参数。  More specifically, during playback, the frame in which the animation unit changes linearly is the transition frame of the animation unit; the transition frame data of the animation unit records the parameters of the animation unit in the transition frame. The parameters of the key frame include the horizontal position parameter of the animation unit in the key frame, the vertical position parameter, the rotation angle parameter, and the scaling parameter. Similarly, the parameters of the transition frame include parameters such as a horizontal position parameter, a vertical position parameter, a rotation angle parameter, and a scaling ratio of the animation unit in the transition frame.
过渡帧数据不在动画数据设置模块 2中设置, 而是在动画播放过程 中, 根据该动画单元的关键帧数据实时计算得出。  The transition frame data is not set in the animation data setting module 2, but is calculated in real time according to the key frame data of the animation unit during animation playback.
本发明实施例提供的动画制作装置, 将一个动画分为多个并行的动 画单元, 在制作每一帧动画图片时, 只需要针对出现非线性变化的动画 单元进行关键帧数据的设置, 减少动画制作的工作量。  The animation production device provided by the embodiment of the invention divides an animation into a plurality of parallel animation units. When creating each frame of the animation image, only the animation frame unit with non-linear changes needs to be set, and the animation is reduced. The amount of work produced.
参见图 9, 为本发明实施例提供的动画播放装置第一实施例结构示 意图, 如图 9所示, 该装置包括:  Referring to FIG. 9, a first embodiment of an animation playing device according to an embodiment of the present invention is shown. As shown in FIG. 9, the device includes:
动画播放模块 3 , 用于播放动画。 动画播放模块 3在每一帧均遍历 所有动画单元, 根据各动画单元在当前帧的关键帧数据或过渡帧数据, 更新所有动画单元。  Animation playback module 3 for playing animations. The animation playing module 3 traverses all the animation units in each frame, and updates all the animation units according to the key frame data or the transition frame data of the current frame of each animation unit.
过渡帧获取模块 4 , 用于当动画单元在当前帧不存在关键帧数据时, 根据该动画单元在关键帧的关键帧数据, 计算该动画单元在当前帧的过 渡帧数据, 并通过动画播放模块 3进行播放。 更为具体的, 过渡帧获取 模块 4计算过渡帧数据的计算方式包括: 根据当前帧与关键帧之间间隔 的帧数, 以及关键帧数据之间的线性插值、 或关键帧数据的平均值、 或 其它包含关键帧数据的数学函数计算该动画单元在当前帧的过渡帧数 据。 如果在当前帧的后续帧中没有该动画单元的关键帧, 则该动画单元 的过渡帧为该动画单元上一个关键帧。 在以下实施例中, 以计算关键帧 数据的线性插值的方式获取当前帧的过渡帧数据为例, 但不能以此限定 本发明的保护范围。 a transition frame obtaining module 4, configured to: when the animation unit does not have key frame data in the current frame, calculate the animation unit in the current frame according to the key frame data of the animation unit in the key frame The frame data is crossed and played through the animation playback module 3. More specifically, the calculation manner of calculating the transition frame data by the transition frame acquisition module 4 includes: the number of frames according to the interval between the current frame and the key frame, and the linear interpolation between the key frame data, or the average value of the key frame data, Or other mathematical function containing key frame data to calculate the transition frame data of the animation unit in the current frame. If there is no key frame of the animation unit in a subsequent frame of the current frame, the transition frame of the animation unit is a key frame on the animation unit. In the following embodiments, the transition frame data of the current frame is obtained by calculating the linear interpolation of the key frame data as an example, but the scope of protection of the present invention cannot be limited thereto.
本发明实施例提供的动画播放装置, 可以根据动画单元的关键帧数 据实时的计算出过渡帧数据, 并根据关键帧数据和过渡帧数据进行播 放, 使动画帧之间的衔接更加流畅, 动画更加自然。 同时, 本播放装置 的应用将大大较少动画制作过程中的工作量。  The animation playing device provided by the embodiment of the invention can calculate the transition frame data in real time according to the key frame data of the animation unit, and play according to the key frame data and the transition frame data, so that the connection between the animation frames is smoother and the animation is more natural. At the same time, the application of this playback device will greatly reduce the workload during the animation process.
为了更好的理解本发明实施例提供的动画制作装置、动画播放装置, 下面将二者结合在一起进行描述, 但二者的功能实现是互不影响的, 不 能一次限定本发明的保护范围。  In order to better understand the animation production apparatus and the animation playback apparatus provided by the embodiments of the present invention, the following two are described together, but the function realization of the two is mutually incompatible, and the protection scope of the present invention cannot be limited at one time.
参见图 10, 为本发明实施例提供的动画制作装置及播放装置实施例 结构示意图。 与上一实施例相比, 在本实施例中, 将更为详细的描述装 置各模块的功能和结构。 本实施例提供的装置如图 10所示。  FIG. 10 is a schematic structural diagram of an embodiment of an animation production apparatus and a playback apparatus according to an embodiment of the present invention. In the present embodiment, the function and structure of each module will be described in more detail in comparison with the previous embodiment. The device provided in this embodiment is as shown in FIG.
动画制作装置的动画单元创建模块 1, 用于创建动画单元。 在本发 明实施例中, 一个动画可以包括多个动画单元。 更为具体的, 动画单元 创建模块 1创建的动画单元包括图元和骨骼两种, 在本实施例中, 现假 设需要完成一个包含四帧的动画, 内容为一个小人双手匀速的由平举活 动到斜向上举。在本例中, 动画单元创建模块 1创建的小人由 A、 B、 C、 D、 E、 F六个图元, 以及与小人的双手 B、 C图元绑定的骨 组成, 骨 骼在动画播放过程中是不可见的, 如图 11中的 11a所示。 动画制作装置的动画数据设置模块 2, 用于设置动画单元的关键帧 数据。 在动画的第 1帧, 用户设置好各图元和骨骼的位置后, 动画数据 设置模块 2 自动创建各图元和骨骼的关键帧数据, 保存各图元和骨骼的 初始位置。 在该动画其后的每一帧的图片中, 用户只需要针对出现非线 性变化的动画单元进行关键帧数据的设置, 该关键帧数据中记录动画单 元的参数, 具体包括: 动画单元的水平位置参数、 垂直位置参数、 旋转 角度参数、 缩放比例等参数。 An animation unit of the animation production unit creates a module 1 for creating an animation unit. In an embodiment of the invention, an animation may include a plurality of animation units. More specifically, the animation unit created by the animation unit creation module 1 includes two types of primitives and bones. In this embodiment, it is assumed that an animation including four frames needs to be completed, and the content is a flat motion of a small person's hands. Activity to the oblique upwards. In this example, the animation created by the animation unit creation module 1 consists of six primitives A, B, C, D, E, and F, and bones bound to the B, C primitives of the villain's hands. It is not visible during the animation playback, as shown by 11a in Figure 11. The animation data setting module 2 of the animation device is configured to set key frame data of the animation unit. In the first frame of the animation, after the user sets the position of each primitive and bone, the animation data setting module 2 automatically creates key frame data of each primitive and bone, and saves the initial position of each primitive and bone. In the picture of each frame after the animation, the user only needs to set the key frame data for the animation unit in which the nonlinear change occurs, and the parameters of the animation unit are recorded in the key frame data, which specifically includes: the horizontal position of the animation unit Parameters such as parameters, vertical position parameters, rotation angle parameters, scaling, and so on.
在本实施例的举例中, 由于在小人活动的过程中, 只是双手运动, 即只有与 ^ C图元绑定的两块骨 存在变化, B、 C图元随骨骼变化。 故在设置关键帧数据时, 只需设置与 B、 C图元绑定的两块骨骼的关键 帧数据即可。 因为小人双手运动为线性过程, 故通过动画数据设置模块 2设置与 B、 C图元绑定的两块骨骼在第 1帧和第 4帧的关键帧数据即 可。 在第 1帧, 与 B、 C图元绑定的两块骨骼为 0度; 在第 4帧, 与 B、 C图元绑定的两块骨骼相对于在第 1帧的位置, 绕其与小人身体的结合 点, 分别顺时针和逆时针向上旋转 45度。  In the example of the embodiment, since the two hands are moving during the activity of the villain, that is, only the two bones bound to the ^C primitive are changed, the B and C primitives vary with the bone. Therefore, when setting key frame data, you only need to set the key frame data of the two bones bound to the B and C elements. Because the small person's hands move as a linear process, the animation data setting module 2 sets the key frame data of the two bones bound to the B and C primitives in the first frame and the fourth frame. In frame 1, the two bones bound to the B and C primitives are 0 degrees; in the fourth frame, the two bones bound to the B and C primitives are relative to the position at the first frame. The joint point of the villain's body is rotated 45 degrees clockwise and counterclockwise, respectively.
动画播放装置的动画播放模块 3 , 用于播放动画。 动画播放模块 3 在每一帧均遍历所有动画单元, 根据各动画单元在当前帧的关键帧数据 或过渡帧数据, 更新各动画单元。 更为具体的, 动画播放模块 3包括: 动画遍历单元 31 ,用于在动画单元为图元时,反向遍历图元的队列; 在动画单元为骨骼时,依次遍历骨骼的队列。 因为当动画单元为图元时, 各图元之间可能存在遮挡关系, 而动画制作过程中, 最底层被遮挡的图 元一般排在图元的队列末端, 所以反向遍历图元的队列可以保证动画具 有正确的层次关系;  The animation player module of the animation player 3 is used to play the animation. The animation playback module 3 traverses all animation units in each frame, and updates each animation unit according to the key frame data or transition frame data of each animation unit in the current frame. More specifically, the animation playing module 3 includes: an animation traversal unit 31, configured to reverse traverse the queue of the primitive when the animation unit is a primitive; and traverse the queue of the bone in turn when the animation unit is a skeleton. Because when the animation unit is a primitive, there may be an occlusion relationship between the primitives. In the animation process, the lowest occluded primitives are generally at the end of the queue of the primitives, so the queue that traverses the primitives in reverse can Ensure that the animation has the correct hierarchical relationship;
帧数据获取单元 32, 用于获取各动画单元在当前帧的关键帧数据, 当某一动画单元在当前帧不存在关键帧数据时, 通过过渡帧获取模块 4 获取该动画单元在当前帧的过渡帧数据。 The frame data acquiring unit 32 is configured to acquire key frame data of each animation unit in the current frame, and when a certain animation unit does not have key frame data in the current frame, pass the transition frame acquiring module 4 Get the transition frame data of the animation unit in the current frame.
动画播放单元 33, 用于在当前帧根据各动画单元的关键帧数据或过 渡帧数据, 更新各动画单元, 从而播放当前帧。  The animation playing unit 33 is configured to update each animation unit according to key frame data or transition frame data of each animation unit in the current frame, thereby playing the current frame.
优选的, 动画播放模块 3还包括临时存储单元 34, 用于当动画由骨 骼和与该骨骼绑定的图元共同组成时, 在动画播放单元 33 根据骨骼的 关键帧数据或过渡帧数据更新骨 后, 保存该骨骼的关键帧数据或过渡 帧数据。 对于与该骨骼绑定的图元, 在动画播放单元 33 根据该图元的 关键帧数据或过渡帧数据更新该图元后, 再根据临时存储单元 34 中存 储的骨骼的关键帧数据或过渡帧数据再次更新该图元。  Preferably, the animation playing module 3 further includes a temporary storage unit 34 for updating the bone in the animation playing unit 33 according to the key frame data of the skeleton or the transition frame data when the animation is composed of the bone and the primitive bound to the skeleton. After that, save the keyframe data or transition frame data for the bone. For the primitive bound to the skeleton, after the animation playback unit 33 updates the primitive according to the key frame data or the transition frame data of the primitive, and then according to the key frame data or transition frame of the skeleton stored in the temporary storage unit 34 The data updates the element again.
在本发明实施例的举例中,动画播放单元 33首先根据骨骼的关键帧 数据或过渡帧数据, 更新该骨骼, 并在临时存储单元 34 中保存该骨骼 在当前帧的关键帧数据或过渡帧数据。 然后动画播放单元 33 遍历所有 图元, 虽然各图元没有变化, 但因为 B、 C图元与骨骼绑定, 动画播放 单元 33在临时存储单元 34中获取骨骼在当前帧的关键帧数据或过渡帧 数据, 并根据该关键帧数据或过渡帧数据, 更新 B、 C图元。 依次播放 每个帧, 组合在一起形成完整的动画效果。 在本实施例的举例中播放动 画时, 小人举起双手的 4帧完整动画如图 l la、 l ib, l lc、 l id所示。  In an example of the embodiment of the present invention, the animation playing unit 33 first updates the skeleton according to the key frame data or the transition frame data of the skeleton, and saves the key frame data or the transition frame data of the skeleton in the current frame in the temporary storage unit 34. . Then the animation playing unit 33 traverses all the primitives, and although the primitives do not change, since the B and C primitives are bound to the skeleton, the animation playing unit 33 acquires the key frame data or transition of the skeleton in the current frame in the temporary storage unit 34. Frame data, and update B, C primitives according to the key frame data or transition frame data. Play each frame in turn, grouping together to form a complete animation. In the example of the present embodiment, when the animation is played, the 4 full-frame animations of the two people raising their hands are as shown in the drawings l la, l ib, l lc, l id.
过渡帧获取模块 4, 用于在当前帧不存在该动画单元的关键帧数据 时, 根据该动画单元的关键帧数据计算关键帧数据的线性插值, 获取该 动画单元在当前帧的过渡帧数据, 并通过动画播放模块 3进行播放。  The transition frame obtaining module 4 is configured to calculate linear interpolation of key frame data according to key frame data of the animation unit when the key frame data of the animation unit does not exist in the current frame, and obtain transition frame data of the animation unit in the current frame, And play through the animation play module 3.
更为具体的, 因为动画单元的关键帧与关键帧之间都是线性变化的 关系, 所以对于在当前帧没有关键帧数据的动画单元, 过渡帧获取模块 4 只要获取其前后关键帧的关键帧数据, 及中间间隔的帧数, 就可以通 过计算线性插值, 得出该动画单元在当前帧的过渡帧数据。  More specifically, because the key frame of the animation unit and the key frame are linearly changed, for the animation unit that has no key frame data in the current frame, the transition frame acquisition module 4 only needs to obtain the key frame of the key frame before and after it. The data, and the number of frames in the middle interval, can be calculated by linear interpolation to obtain the transition frame data of the animation unit in the current frame.
假设在本实施例的举例中, 小人的双手由第 1帧的平举到第 4帧举 到斜上 45度, 过渡帧获取模块 4通过获取与 B、 C绑定的两块骨骼在第 1帧和第 4帧的关键帧数据, 及其间隔的帧数, 可以计算出两块骨骼在 第 2帧的过渡骨酪数据的角度参数为 15度; 在第 3帧的过渡骨 数据 的角度参数为 30度。 It is assumed that in the example of the embodiment, the hands of the villain are lifted from the flat of the first frame to the fourth frame. By obliquely 45 degrees, the transition frame acquisition module 4 can calculate the two skeletons by acquiring the key frame data of the two bones bound to B and C in the first frame and the fourth frame, and the number of frames in the interval. The angle parameter of the transition bone meal data of the second frame is 15 degrees; the angle parameter of the transition bone data of the third frame is 30 degrees.
实施本发明实施例提供的动画制作装置及播放装置, 只需要设置该 动画在第一帧的图片, 当该动画存在后续变化时, 动画播放装置装置可 以在播放过程中通过关键帧数据自动生成过渡帧数据, 使动画帧与帧之 间的钎接流畅。 同时, 本发明实施例提供的动画制作装置可以将一个动 画分为多个并行的动画单元, 且可以实现多种动画单元之间的绑定和联 动, 在每一帧中, 只需要针对出现非线性变化的动画单元进行关键帧数 据的设置, 減少动画制作的工作量。  The animation production device and the playback device provided by the embodiments of the present invention only need to set the picture of the animation in the first frame. When the animation has subsequent changes, the animation playback device device can automatically generate a transition through key frame data during the playback process. Frame data, smoothing the brazing between the animation frame and the frame. In the meantime, the animation device provided by the embodiment of the present invention can divide an animation into a plurality of parallel animation units, and can implement binding and linkage between multiple animation units. The linearly changing animation unit sets the key frame data to reduce the amount of animation work.
参见图 12, 为本发明实施例提供的动画播放装置第二实施例结构示 意图, 如图所示, 本实施例提供的动画播放装置不仅包括: 动画播放模 块 3、 过渡帧获取模块 4, 还包括包围盒计算模块 5。 包围盒计算模块 5 用于在动画播放过程中, 动画播放模块 3完成对所有动画单元在当前帧 的遍历和更新之后, 根据各动画单元的关键帧数据和过渡数据, 计算该 动画在当前帧的包围盒。 动画的包围盒是检测动画的边界、 碰撞等问题 的关键, 精确的碰撞检测对提高动画的真实性、 增强虚拟环境的沉浸感 起着至关重要的作用。  12 is a schematic structural diagram of a second embodiment of an animation playing device according to an embodiment of the present invention. As shown in the figure, the animation playing device provided in this embodiment includes: an animation playing module 3, a transition frame acquiring module 4, and The bounding box calculation module 5. The bounding box calculation module 5 is used for the animation playing module 3 to complete the traversal and update of the current frame for all the animation units, and calculate the animation in the current frame according to the key frame data and the transition data of each animation unit. The bounding box. The bounding box of the animation is the key to detecting the boundary and collision of the animation. Accurate collision detection plays an important role in improving the authenticity of the animation and enhancing the immersion of the virtual environment.
本实施例提供的包围盒计算模块 5具体包括:  The bounding box calculation module 5 provided in this embodiment specifically includes:
坐标初始化单元 51 , 用于预置包围盒四个顶点的初始化坐标; 预置 包围盒四个顶点的最小 X轴坐标和最小 Y轴为正无穷大,设置包围盒的 最大 X轴坐标和最大 Y轴坐标为负无穷大。  The coordinate initializing unit 51 is configured to preset initialization coordinates of the four vertices of the bounding box; preset the minimum X-axis coordinate of the four vertices of the bounding box and the minimum Y-axis is positive infinity, and set the maximum X-axis coordinate and the maximum Y-axis of the bounding box The coordinates are negative infinity.
更进一步的, 在动画制作中, 一般定义图片的左上角为 X轴和 Y轴 坐标的起始坐标。 在本发明实施例中, 坐标初始化单元 51 预置包围盒 左上角的顶点坐标为 ( + 00 , + 00 ), 右上角的顶点坐标为 ( - 00, + 00 ) , 左下角的顶点坐标为 ( +∞, _∞), 右下角的顶点坐标为 ( _∞, -∞)。 通过上述设置, 顶点数据获取单元 52 在后续步驟中获取动画单元的顶 点坐标时, 动画单元的左上角顶点坐标必然小于包围盒预置的左上角坐 标, 利于顶点计算单元 53 完成坐标的初次更新替换, 坐标初始化单元 51预置的包围盒其它三个顶点坐标的理由同上。 Further, in animation, the upper left corner of the generally defined picture is the starting coordinate of the X-axis and Y-axis coordinates. In the embodiment of the present invention, the coordinate initializing unit 51 presets the bounding box The coordinates of the vertices in the upper left corner are ( + 00 , + 00 ), the coordinates of the vertices in the upper right corner are ( - 00, + 00 ), the coordinates of the vertices in the lower left corner are ( +∞, _∞), and the coordinates of the vertices in the lower right corner are ( _ ∞, -∞). With the above setting, when the vertex data acquiring unit 52 acquires the vertex coordinates of the animation unit in the subsequent step, the coordinates of the upper left corner of the animation unit must be smaller than the coordinates of the upper left corner of the bounding box preset, which is advantageous for the vertex calculating unit 53 to complete the initial update replacement of the coordinates. The reason why the coordinates of the other three vertex coordinates of the bounding box preset by the coordinate initializing unit 51 is the same as above.
坐标初始化单元 51可以只预设包围盒左上角的坐标为( + 00 , + 00 ) , 右下角的坐标为 ( -∞, -∞)。  The coordinate initializing unit 51 can preset only the coordinates of the upper left corner of the bounding box to be (+ 00 , + 00 ), and the coordinates of the lower right corner are ( -∞, -∞).
顶点数据获取单元 52 , 用于在动画播放模块 3在当前帧对所有动画 单元进行遍历和更新的过程中, 获取各动画单元的顶点数据。  The vertex data obtaining unit 52 is configured to obtain vertex data of each animation unit in the process that the animation playing module 3 traverses and updates all the animation units in the current frame.
顶点计算单元 53 , 用于将顶点数据获取单元 52获取的所有动画单 元的顶点数据中,以最小 X轴坐标和最小 Y轴坐标作为包围盒的最小 X 轴坐标和最小 Y轴坐标; 以当前最大 X轴坐标和最大 Y轴坐标作为包 围盒的最大 X轴坐标和最大 Y轴坐标。  The vertex calculating unit 53 is configured to use the minimum X-axis coordinate and the minimum Y-axis coordinate as the minimum X-axis coordinate and the minimum Y-axis coordinate of the bounding box in the vertex data of all the animation units acquired by the vertex data acquiring unit 52; The X-axis coordinate and the maximum Y-axis coordinate are used as the maximum X-axis coordinate and the maximum Y-axis coordinate of the bounding box.
更为具体的,在更新各动画单元的过程中,顶点计算单元 53将顶点 数据获取单元 52 获取的动画单元的顶点坐标与当前包围盒的顶点坐标 进行比较,将当前帧中各动画单元中的最小 X轴坐标、最小 Y轴坐标作 为包围盒的最小 X轴坐标、最小 Y轴坐标;将当前帧中各动画单元中的 最大 X轴坐标、 最大 Y轴坐标作为包围盒的最大 X轴坐标、 最大 Y轴 坐标。 当各动画单元完成更新后, 顶点数据获取单元 52 获取了当前帧 所有动画单元的顶点坐标, 顶点计算单元 53 计算得出的包围盒四个顶 点坐标分别为: 左上角的坐标 (最小 X轴坐标, 最小 Y轴坐标), 右上 角的坐标(最大 X轴坐标, 最小 Y轴坐标), 左下角的坐标(最小 X轴 坐标,最大 Y轴坐标),右下角的坐标(最大 X轴坐标,最大 Y轴坐标)。  More specifically, in the process of updating each animation unit, the vertex calculation unit 53 compares the vertex coordinates of the animation unit acquired by the vertex data acquiring unit 52 with the vertex coordinates of the current bounding box, and the animation units in the current frame are The minimum X-axis coordinate and the minimum Y-axis coordinate are used as the minimum X-axis coordinate and the minimum Y-axis coordinate of the bounding box; the maximum X-axis coordinate and the maximum Y-axis coordinate in each animation unit in the current frame are used as the maximum X-axis coordinate of the bounding box, Maximum Y coordinate. After each animation unit completes the update, the vertex data obtaining unit 52 acquires the vertex coordinates of all the animation units of the current frame, and the coordinates of the four vertices of the bounding box calculated by the vertex calculating unit 53 are: the coordinates of the upper left corner (the minimum X-axis coordinate) , minimum Y-axis coordinate), coordinates of the upper right corner (maximum X-axis coordinate, minimum Y-axis coordinate), coordinates of the lower left corner (minimum X-axis coordinate, maximum Y-axis coordinate), coordinates of the lower right corner (maximum X-axis coordinate, maximum Y-axis coordinates).
包围盒生成单元 54, 用于以顶点计算单元 53得出的包围盒四个顶 点坐标, 生成该动画在当前帧的包围盒。 The bounding box generating unit 54 is configured to use the vertex calculating unit 53 to obtain four tops of the bounding box Point coordinates, which are generated in the bounding box of the current frame.
本发明实施例提供的动画播放装置中包括包围盒计算模块 5 , 从而 支持对动画包围盒的计算, 可以实时的计算得出动画在当前帧的包围 盒, 从而使动画包围盒面积尽可能小, 其边界与动画尽可能接近, 使碰 撞检测更加精确, 提高动画的真实性、 增强虚拟环境的沉浸感, 便于动 画的后期合成制作。  The animation playing device provided by the embodiment of the present invention includes a bounding box calculating module 5, thereby supporting calculation of the animation bounding box, and realizing the real-time calculation of the bounding box of the animation in the current frame, so that the area of the animation bounding box is as small as possible. The boundary is as close as possible to the animation, which makes the collision detection more accurate, improves the authenticity of the animation, enhances the immersion of the virtual environment, and facilitates the post-production of the animation.
以上所揭露的仅为本发明一种较佳实施例而已, 当然不能以此来限 定本发明之权利范围, 因此依本发明权利要求所作的等同变化, 仍属本 发明所涵盖的范围。  The above is only a preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, and thus equivalent changes made in the claims of the present invention are still within the scope of the present invention.
通过以上的实施方式的描述, 本领域的技术人员可以清楚地了解到 本发明可借助软件加必需的硬件平台的方式来实现, 当然也可以全部通 过硬件来实施。 基于这样的理解, 本发明的技术方案对背景技术做出贡 献的全部或者部分可以以软件产品的形式体现出来, 该计算机软件产品 可以存储在存储介质中, 如 ROM/RAM、 磁碟、 光盘等, 包括若干指令 用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备 等 )执行本发明各个实施例或者实施例的某些部分所述的方法。  Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary hardware platform, and of course, all can be implemented by hardware. Based on such understanding, all or part of the technical solution of the present invention contributing to the background art may be embodied in the form of a software product, which may be stored in a storage medium such as a ROM/RAM, a magnetic disk, an optical disk, or the like. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or portions of the embodiments.

Claims

权利要求书 Claim
1、 一种动画制作方法, 其特征在于, 包括:  An animation production method, comprising:
确定动画单元的关键帧; 所述动画单元在播放过程中出现非线性变 化时所在的帧为所述动画单元的关键帧;  Determining a key frame of the animation unit; the frame in which the animation unit is nonlinearly changed during playback is a key frame of the animation unit;
设置所述动画单元的关键帧数据; 所述关键帧数据中记录该动画单 元在所述关键帧的参数。  Setting key frame data of the animation unit; recording the parameters of the animation unit in the key frame in the key frame data.
2、 如权利要求 1所述的动画制作方法, 其特征在于, 所述动画单元 在所述动画单元播放过程中, 根据该动画单元的关键帧数据实时计 算所述过渡帧数据; 动画单元的过渡帧数据中记录该动画单元在所述过 渡帧的参数。  2. The animation production method according to claim 1, wherein the animation unit calculates the transition frame data in real time according to key frame data of the animation unit during the animation unit playing; The parameters of the animation unit in the transition frame are recorded in the frame data.
3、 如权利要求 1或 2所述的动画制作方法, 其特征在于, 所述动画 单元包括图元和\或骨骼;  The animation production method according to claim 1 or 2, wherein the animation unit comprises a primitive and a bone or a skeleton;
所述关键帧的参数包括: 所述动画单元在所述关键帧的水平位置参 数、 垂直位置参数、 旋转角度参数、 缩放比例参数;  The parameters of the key frame include: a horizontal position parameter, a vertical position parameter, a rotation angle parameter, and a scaling parameter of the animation unit in the key frame;
所述过渡帧的参数包括: 所述动画单元在所述过渡帧的水平位置参 数、 垂直位置参数、 旋转角度参数、 缩放比例参数。  The parameters of the transition frame include: a horizontal position parameter, a vertical position parameter, a rotation angle parameter, and a scaling parameter of the animation unit in the transition frame.
4、 一种动画播放方法, 其特征在于, 包括:  4. An animation playing method, characterized in that:
在当前帧遍历每个动画单元;  Traversing each animation unit in the current frame;
获取所述动画单元在所述当前帧的关键帧数据; 若所述动画单元在 所述当前帧不存在关键帧数据, 则根据所述动画单元在关键帧的关键帧 数据, 获取所述动画单元在所述当前帧的过渡帧数据; 所述动画单元在 播放过程中出现非线性变化时所在的帧为所述动画单元的关键帧; 所述 关键帧数据中记录该动画单元在所述关键帧的参数; 所述动画单元的过 渡帧数据中记录该动画单元在所述过渡帧的参数; Obtaining key frame data of the animation unit in the current frame; if the animation unit does not have key frame data in the current frame, acquiring the animation unit according to the key frame data of the key frame of the animation unit a transition frame data of the current frame; a frame in which the animation unit exhibits a nonlinear change during playback is a key frame of the animation unit; and the key frame data records the animation unit in the key frame Parameter of the animation unit Recording parameters of the animation unit in the transition frame in the frame data;
在当前帧根据所述每个动画单元的关键帧数据或过渡帧数据, 更新 所述每个动画单元。  Each of the animation units is updated in the current frame based on key frame data or transition frame data of each of the animation units.
5、 如权利要求 4所述的动画播放方法, 其特征在于, 所述关键帧的 参数在动画制作过程中进行设置;  5. The animation playing method according to claim 4, wherein the parameters of the key frame are set during an animation process;
所述关键帧的参数包括: 所述动画单元在所述关键帧的水平位置参 数、 垂直位置参数、 旋转角度参数、 缩放比例参数;  The parameters of the key frame include: a horizontal position parameter, a vertical position parameter, a rotation angle parameter, and a scaling parameter of the animation unit in the key frame;
所述过渡帧的参数包括: 所述动画单元在所述过渡帧的水平位置参 数、 垂直位置参数、 旋转角度参数、 缩放比例参数。  The parameters of the transition frame include: a horizontal position parameter, a vertical position parameter, a rotation angle parameter, and a scaling parameter of the animation unit in the transition frame.
6、 如权利要求 5所述的动画播放方法, 其特征在于, 所述动画单元 包括图元和 \或骨骼;  The animation playing method according to claim 5, wherein the animation unit comprises a primitive and a skeleton or a skeleton;
所述在当前帧遍历每个动画单元包括: 当所述动画单元为图元时, 反向遍历图元的队列; 当所述动画单元为骨骼时,依次遍历骨骼的队列。  The traversing each animation unit in the current frame comprises: traversing the queue of the primitives when the animation unit is a primitive; and traversing the queue of the bones in sequence when the animation unit is a skeleton.
7、 如权利要求 6所述的动画播放方法, 其特征在于, 当动画单元为 骨骼和与所述骨骼绑定的图元时, 当在当前帧更新所述骨骼后, 保存所 述骨骼的关键帧数据或过渡帧数据;  7. The animation playing method according to claim 6, wherein when the animation unit is a bone and a primitive bound to the bone, when the skeleton is updated in the current frame, the key of the skeleton is saved Frame data or transition frame data;
当在当前帧更新与所述骨骼绑定的图元后, 再根据所述骨骼的关键 帧数据或过渡帧数据, 更新与所述骨骼绑定的图元。  After updating the primitive bound to the bone in the current frame, the primitive bound to the skeleton is updated according to the key frame data or the transition frame data of the skeleton.
8、 如权利要求 4至 7中任一项所述的动画播放方法, 其特征在于, 所述在当前帧遍历动画的所有动画单元之后, 还包括计算在当前帧的包 围盒。  The animation playing method according to any one of claims 4 to 7, wherein after the current frame traverses all the animation units of the animation, the method further comprises calculating a bounding box in the current frame.
9、 如权利要求 8所述的动画播放方法, 其特征在于, 所述计算在当 前帧的包围盒包括:  9. The animation playing method according to claim 8, wherein the calculating the bounding box in the current frame comprises:
预置包围盒的左上角顶点和右下角顶点的初始化坐标, 其中所述左 上角顶点具有最小 X轴坐标和最小 Y轴坐标,所述左上角顶点的初始化 坐标为 (正无穷大, 正无穷大), 所述右下角坐标具有最大 X轴坐标和 最大 Y轴坐标,所述右下角顶点的初始化坐标为(负无穷大,负无穷大); 在当前帧遍历所述每个动画单元后, 获取所述每个动画单元的顶点 数据; Initializing coordinates of an upper left corner vertex and a lower right corner vertex of the bounding box, wherein the upper left corner vertex has a minimum X-axis coordinate and a minimum Y-axis coordinate, and initialization of the upper left corner vertex The coordinates are (positive infinity, positive infinity), the lower right corner coordinates have a maximum X-axis coordinate and a maximum Y-axis coordinate, and the initial coordinates of the lower right corner vertex are (negative infinity, negative infinity); After the animation unit, obtaining vertex data of each animation unit;
以所述当前帧中各动画单元中最小 X轴坐标、最小 Y轴坐标作为所 述左上角顶点的坐标; 以当前最大 X轴坐标、最大 Y轴坐标作为所述右 下角顶点的坐标;  Taking the minimum X-axis coordinate and the minimum Y-axis coordinate of each animation unit in the current frame as the coordinates of the upper left corner vertex; taking the current maximum X-axis coordinate and the maximum Y-axis coordinate as the coordinates of the lower right corner vertex;
根据所述左上角顶点的坐标和所述右下角顶点的坐标, 生成所述动 画在当前帧的包围盒。  Generating the bounding box of the animation in the current frame according to the coordinates of the upper left corner vertex and the coordinates of the lower right corner vertex.
10、 一种动画制作装置, 其特征在于, 所述装置包括:  10. An animation production apparatus, wherein the apparatus comprises:
动画单元创建模块, 用于创建动画单元;  An animation unit creation module for creating an animation unit;
动画数据设置模块, 用于设置动画单元的关键帧数据; 动画单元在 播放过程中出现非线性变化时所在的帧为所述动画单元的关键帧; 所述 关键帧数据中记录所述动画单元在所述关键帧的参数。  An animation data setting module, configured to set key frame data of the animation unit; a frame in which the animation unit has a nonlinear change during playback is a key frame of the animation unit; and the animation unit is recorded in the key frame data The parameters of the key frame.
11、 如权利要求 10所述的动画制作装置, 其特征在于, 所述动画单 动画单元的过渡帧数据中记录该动画单元在所述过渡帧的参数; 所 述过渡帧数据在所述动画单元播放过程中, 根据该动画单元的关键帧数 据实时计算得出。  The animation device according to claim 10, wherein the transition frame data of the animation single animation unit records a parameter of the animation unit in the transition frame; the transition frame data is in the animation unit During playback, it is calculated in real time based on the key frame data of the animation unit.
12、 如权利要求 11所述的动画制作装置, 其特征在于, 所述动画单 元包括图元和 /或骨骼;  12. The animation device of claim 11, wherein the animation unit comprises a primitive and/or a bone;
所述关键帧的参数包括: 所述动画单元在所述关键帧的水平位置参 数、 垂直位置参数、 旋转角度参数、 缩放比例参数;  The parameters of the key frame include: a horizontal position parameter, a vertical position parameter, a rotation angle parameter, and a scaling parameter of the animation unit in the key frame;
所述过渡帧的参数包括: 所述动画单元在所述过渡帧的水平位置参 数、 垂直位置参数、 旋转角度参数、 缩放比例参数。 The parameters of the transition frame include: a horizontal position parameter, a vertical position parameter, a rotation angle parameter, and a scaling parameter of the animation unit in the transition frame.
13、 一种动画播放装置, 其特征在于, 所述装置包括: 13. An animation playback device, the device comprising:
动画播放模块, 用于在当前帧遍历每个动画单元, 根据所述每个动 画单元在所述当前帧的关键帧数据或过渡帧数据, 更新所述每个动画单 元; 所述动画单元在播放过程中出现非线性变化时所在的帧为所述动画 单元的关键帧; 所述关键帧数据中记录该动画单元在所述关键帧的参 数;  An animation playing module, configured to traverse each animation unit in a current frame, and update each of the animation units according to the key frame data or transition frame data of the current frame of each animation unit; the animation unit is playing a frame in which a nonlinear change occurs in the process is a key frame of the animation unit; and a parameter of the animation unit in the key frame is recorded in the key frame data;
过渡帧获取模块, 用于当所述动画单元在所述当前帧不存在关键帧 数据时, 根据所述动画单元在关键帧的关键帧数据, 计算所述动画单元 在所述当前帧的过渡帧数据, 并将所述过渡帧数据发送给所述动画播放 模块; 所述动画单元的过渡帧数据中记录该动画单元在所述过渡帧的参 数。  a transition frame obtaining module, configured to: when the animation unit does not have key frame data in the current frame, calculate a transition frame of the animation unit in the current frame according to the key frame data of the animation unit in the key frame Data, and the transition frame data is sent to the animation playing module; the transition frame data of the animation unit records the parameters of the animation unit in the transition frame.
14、 如权利要求 13所述的动画播放装置, 其特征在于, 所述动画播 放模块包括:  The animation playing device according to claim 13, wherein the animation playing module comprises:
动画遍历单元, 用于在所述动画单元为图元时, 在所述当前帧反向 遍历图元的队列; 在所述动画单元为骨骼时, 在所述当前帧依次遍历骨 骼的队列;  An animation traversing unit, configured to: when the animation unit is a primitive, traverse the queue of the primitive in the current frame; and when the animation unit is a skeleton, sequentially traverse the skeleton of the skeleton in the current frame;
帧数据获取单元, 用于获取在所述当前帧所述每个动画单元的关键 帧数据; 当所述动画单元在所述当前帧不存在关键帧数据时, 获取所述 过渡帧获取模块计算的所述动画单元在所述当前帧的过渡帧数据; 动画播放单元, 用于根据所述动画单元在当前帧的关键帧数据或过 渡帧数据更新所述动画单元。  a frame data acquiring unit, configured to acquire key frame data of each animation unit in the current frame; and when the animation unit does not have key frame data in the current frame, acquire the calculation calculated by the transition frame acquiring module The animation unit is in the transition frame data of the current frame; the animation playing unit is configured to update the animation unit according to the key frame data or the transition frame data of the current frame according to the animation unit.
15、 如权利要求 14所述的动画播放装置, 其特征在于, 所述动画播 放模块还包括:  The animation playing device of claim 14, wherein the animation playing module further comprises:
临时存储单元, 用于当所述动画单元为骨骼和与所述骨骼绑定的图 元时, 在所述动画播放单元更新所述骨 后, 保存所述骨骼的关键帧数 据或过渡帧数据; a temporary storage unit, configured to: when the animation unit is a bone and a primitive bound to the bone, save the key frame number of the bone after the animation playing unit updates the bone According to or transition frame data;
所述动画播放单元还用于在更新与所述骨骼绑定的图元后, 再根据 所述临时存储单元中存储的所述骨骼的关键帧数据或过渡帧数据再次 更新与所述骨骼绑定的图元。  The animation playing unit is further configured to, after updating the primitive bound to the skeleton, update the binding to the skeleton again according to the key frame data or the transition frame data of the skeleton stored in the temporary storage unit. The primitive.
16、 如权利要求 13至 15中任一项所述的动画播放装置, 其特征在 于, 所述动画播放装置还包括:  The animation playing device according to any one of claims 13 to 15, wherein the animation playing device further comprises:
包围盒计算模块, 用于在动画播放模块更新所述每个动画单元后, 根据所述每个动画单元的关键帧数据或过渡帧数据, 计算在当前帧的包 围盒。  a bounding box calculation module, configured to calculate a bounding box in the current frame according to the key frame data or the transition frame data of each of the animation units after the animation playing module updates the each animation unit.
17、 如权利要求 16所述的动画播放装置, 其特征在于, 所述包围盒 计算模块包括:  The animation playing device according to claim 16, wherein the bounding box calculation module comprises:
坐标初始化单元, 用于预置包围盒的左上角顶点和右下角顶点的初 始化坐标,其中所述左上角顶点具有最小 X轴坐标和最小 Y轴坐标,所 述左上角顶点的初始化坐标为 (为正无穷大, 正无穷大), 所述右下角 坐标具有最大 X轴坐标和最大 Y轴坐标,所述右下角顶点的初始化坐标 为 (负无穷大, 负无穷大);  a coordinate initializing unit, configured to preset initialization coordinates of an upper left corner vertex and a lower right corner vertex of the bounding box, wherein the upper left corner vertex has a minimum X-axis coordinate and a minimum Y-axis coordinate, and an initial coordinate of the upper left corner vertex is ( Positive infinity coordinate has maximum X-axis coordinate and maximum Y-axis coordinate, and initial coordinates of the lower right corner vertex are (negative infinity, negative infinity);
顶点数据获取单元, 用于在所述动画播放模块在所述当前帧更新所 述每个动画单元时, 获取所述每个动画单元的顶点数据;  a vertex data obtaining unit, configured to acquire vertex data of each of the animation units when the animation playing module updates each of the animation units in the current frame;
顶点计算单元, 用于将所述当前帧中各动画单元中最小 X轴坐标、 最小 Y轴坐标作为所述左上角顶点的坐标; 以当前最大 X轴坐标、最大 Y轴坐标作为所述右下角顶点的坐标;  a vertex calculation unit, configured to use a minimum X-axis coordinate and a minimum Y-axis coordinate of each animation unit in the current frame as coordinates of the upper left corner vertex; and the current maximum X-axis coordinate and the maximum Y-axis coordinate as the lower right corner The coordinates of the vertices;
包围盒生成单元, 用于^^据所述左上角顶点的坐标和所述右下角顶 点的坐标, 生成所述动画在当前帧的包围盒。  The bounding box generating unit is configured to generate a bounding box of the animation in the current frame according to coordinates of the upper left corner vertex and coordinates of the lower right corner vertex.
PCT/CN2011/070176 2010-01-18 2011-01-11 Method and device for animating and method and device for playing animation WO2011085674A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010044445.1 2010-01-18
CN2010100444451A CN102129705A (en) 2010-01-18 2010-01-18 Animation production method and device, and animation playing method and device

Publications (1)

Publication Number Publication Date
WO2011085674A1 true WO2011085674A1 (en) 2011-07-21

Family

ID=44267779

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/070176 WO2011085674A1 (en) 2010-01-18 2011-01-11 Method and device for animating and method and device for playing animation

Country Status (2)

Country Link
CN (1) CN102129705A (en)
WO (1) WO2011085674A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104112288A (en) * 2014-07-24 2014-10-22 无锡梵天信息技术股份有限公司 Three-dimensional skeleton model based action transition achieving method

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130076756A1 (en) * 2011-09-27 2013-03-28 Microsoft Corporation Data frame animation
CN103500461A (en) * 2013-09-18 2014-01-08 珠海金山网络游戏科技有限公司 Animation generation method for reducing real-time interpolation calculated amount
CN104572715B (en) * 2013-10-18 2017-09-15 北大方正集团有限公司 The processing method and processing device of vector graphics
CN104574470A (en) * 2014-12-31 2015-04-29 苏州乐米信息科技有限公司 Simple animation simulation method based on picture
CN105427365A (en) * 2015-11-26 2016-03-23 盛趣信息技术(上海)有限公司 Animation implementation method, system and animation updating method
CN108205398B (en) * 2016-12-16 2021-06-11 腾讯科技(深圳)有限公司 Method and device for adapting webpage animation to screen
CN107450911A (en) * 2017-07-05 2017-12-08 口碑(上海)信息技术有限公司 Player method, device and the electronic equipment of animated element
CN109360261B (en) * 2018-09-28 2019-12-31 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN111739084B (en) 2019-03-25 2023-12-05 上海幻电信息科技有限公司 Picture processing method, atlas processing method, computer device, and storage medium
CN110102057B (en) * 2019-05-28 2022-10-21 上海米哈游网络科技股份有限公司 Connecting method, device, equipment and medium for cut-scene animations
CN111063013A (en) * 2019-12-26 2020-04-24 珠海金山网络游戏科技有限公司 Role action splicing method and device
CN111354060B (en) * 2020-02-19 2023-07-07 广州安凯微电子股份有限公司 Window animation acceleration method and device based on double-buffer technology and storage medium
CN113018855B (en) * 2021-03-26 2022-07-01 完美世界(北京)软件科技发展有限公司 Action switching method and device for virtual role
CN115618155B (en) * 2022-12-20 2023-03-10 成都泰盟软件有限公司 Method and device for generating animation, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060098014A1 (en) * 2004-11-05 2006-05-11 Seong-Min Baek Apparatus and method for generating digital character
CN101436310A (en) * 2008-11-28 2009-05-20 牡丹江新闻传媒集团有限公司 Method for automatically generating middle frame during two-dimension cartoon making process
CN101452579A (en) * 2007-12-05 2009-06-10 新奥特(北京)视频技术有限公司 Cartoon method for making based on action

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060098014A1 (en) * 2004-11-05 2006-05-11 Seong-Min Baek Apparatus and method for generating digital character
CN101452579A (en) * 2007-12-05 2009-06-10 新奥特(北京)视频技术有限公司 Cartoon method for making based on action
CN101436310A (en) * 2008-11-28 2009-05-20 牡丹江新闻传媒集团有限公司 Method for automatically generating middle frame during two-dimension cartoon making process

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
XIONG, TAO ET AL.: "Research of Collision Detection in Skinned Mesh", COMPUTER APPLICATIONS, vol. 28, no. 3, March 2008 (2008-03-01), pages 683 - 685 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104112288A (en) * 2014-07-24 2014-10-22 无锡梵天信息技术股份有限公司 Three-dimensional skeleton model based action transition achieving method

Also Published As

Publication number Publication date
CN102129705A (en) 2011-07-20

Similar Documents

Publication Publication Date Title
WO2011085674A1 (en) Method and device for animating and method and device for playing animation
US5619628A (en) 3-Dimensional animation generating apparatus
CN101156175B (en) Depth image-based representation method for 3d object, modeling method and apparatus, and rendering method and apparatus using the same
US6208360B1 (en) Method and apparatus for graffiti animation
US6011562A (en) Method and system employing an NLE to create and modify 3D animations by mixing and compositing animation data
JP4641135B2 (en) System and method for modeling graphics objects
Lefebvre et al. By-example synthesis of architectural textures
WO2007100298A1 (en) Creation and rendering of hierarchical digital multimedia data
JP2001209824A (en) Three-dimensional object deforming method for video game, video game device and computer readable recording medium with recorded program for video game
CN102811352A (en) Moving image generating method and moving image generating apparatus
Lin et al. Metamorphosis of 3d polyhedral models using progressive connectivity transformations
JPH05503379A (en) Computer animation method and device
Jin et al. AniMesh: interleaved animation, modeling, and editing.
CN115393482A (en) Expression animation redirection method and device and electronic equipment
JP4190778B2 (en) How to model multiple graphics objects
CN116310135A (en) Curved surface display method and system based on multi-resolution LOD model
CN115908656A (en) Three-dimensional expression simulation method and device, storage medium, electronic equipment and computer program product
JPH11213177A (en) Three-dimensional data converter and recording medium
JP2007500395A (en) Improved paint projection and paint projection apparatus
US8773441B2 (en) System and method for conforming an animated camera to an editorial cut
US8077183B1 (en) Stepmode animation visualization
Wang et al. Computer Aided Animation Art Design and Production Based on Virtual Reality Technology
CN113805532B (en) Method and terminal for manufacturing physical robot actions
Zhou et al. On the use of 3D scanner for chinese opera documentation
JPH11249636A (en) Expression image reproducing device and expression image reproducing method

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 6964/DELNP/2012

Country of ref document: IN

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC, EPO FORM 1205A DATED 03.12.2012

122 Ep: pct application non-entry in european phase

Ref document number: 11732664

Country of ref document: EP

Kind code of ref document: A1