WO2022142081A1 - Self-defined animation curve generation method and apparatus - Google Patents

Self-defined animation curve generation method and apparatus Download PDF

Info

Publication number
WO2022142081A1
WO2022142081A1 PCT/CN2021/094858 CN2021094858W WO2022142081A1 WO 2022142081 A1 WO2022142081 A1 WO 2022142081A1 CN 2021094858 W CN2021094858 W CN 2021094858W WO 2022142081 A1 WO2022142081 A1 WO 2022142081A1
Authority
WO
WIPO (PCT)
Prior art keywords
animation
interpolation algorithm
animation curve
key frames
curve
Prior art date
Application number
PCT/CN2021/094858
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 WO2022142081A1 publication Critical patent/WO2022142081A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation

Definitions

  • the present invention relates to the technical field of animation design, in particular to a method for generating a custom animation curve, a computer-readable storage medium, a computer device, and a device for generating a custom animation curve.
  • Animation is the process of turning a static picture into a moving picture by changing the position and effect of different frames.
  • it needs to rely on animation curves for processing.
  • the animation frames of the existing animation curves all use preset fixed values.
  • the animation is generated, it is only necessary to set the start value and the end value, and pass in different time points to obtain the corresponding time points through the animation curve.
  • the animation value of this method makes it impossible to customize the animation curve, so that the animation is solidified and single.
  • an object of the present invention is to propose a method for generating a custom animation curve, by selecting a corresponding interpolation algorithm between adjacent key frames to customize the animation curve, so as to configure the animation curve flexibly, so that the animation is no longer single-solidified.
  • a second object of the present invention is to provide a computer-readable storage medium.
  • the third object of the present invention is to propose a computer device.
  • the fourth object of the present invention is to provide a device for generating custom animation curves.
  • an embodiment of the first aspect of the present invention proposes a method for generating a custom animation curve, which includes the following steps: acquiring the start and end time periods and key frame information of the animation curve to be generated, and performing the analysis on all the animation curves according to the key frame information.
  • the start and end time periods of the animation curve to be generated are segmented to be split into a plurality of key frames, wherein the key frame information includes the time corresponding to each key frame and the state value corresponding to each key frame;
  • An interpolation algorithm corresponding to two adjacent keyframes, and an animation curve corresponding to each two adjacent keyframes is generated according to the interpolation algorithm; the animation curve between each two adjacent keyframes is spliced Process to get the full animation curve.
  • the start and end time periods and key frame information of the animation curve to be generated are obtained, and the start and end time periods of the animation curve to be generated are segmented according to the key frame information to be divided into Multiple key frames, wherein the key frame information includes the time corresponding to each key frame and the state value corresponding to each key frame; then, the corresponding interpolation algorithm between each two adjacent key frames is obtained, and generated according to the interpolation algorithm Corresponding to the animation curve between every two adjacent keyframes, finally, the animation curve between every two adjacent keyframes is spliced to obtain a complete animation curve; thus, the animation curve can be configured flexibly, so that the animation does not change. Then single curing.
  • the method for generating a custom animation curve proposed according to the above embodiments of the present invention may also have the following additional technical features.
  • obtaining an interpolation algorithm corresponding to every two adjacent key frames, and generating an animation curve corresponding to every two adjacent key frames according to the interpolation algorithm including: obtaining every two adjacent key frames Corresponding interpolation algorithm, wherein, there are corresponding adjustable parameters in the interpolation algorithm; obtain the parameter value corresponding to each adjustable parameter of the interpolation algorithm, and adjust the corresponding adjustable parameter according to the parameter value The parameters are adjusted to obtain the animation value corresponding to each two adjacent keyframes; the animation curve corresponding to each two adjacent keyframes is generated according to the corresponding animation value between each two adjacent keyframes .
  • the interpolation algorithm includes any one of cubic curve interpolation algorithm and spherical interpolation algorithm.
  • the second aspect of the present invention provides a computer-readable storage medium on which a custom animation curve generation program is stored, and when the custom animation curve generation is executed by a processor, the above-mentioned custom Animation curve generation method.
  • the processor by storing the custom animation curve generation program, the processor implements the above-mentioned custom animation curve generation method when executing the custom animation curve generation program, thereby realizing flexible configuration Animation curve, so that the animation is no longer a single solidification.
  • a third aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the program, Implement the custom animation curve generation method described above.
  • the computer program is stored in the memory, so that the processor implements the above-mentioned custom animation curve generation method when executing the custom animation curve generation program, so as to realize the flexible configuration of the animation curve, so that the Animations are no longer monolithic.
  • an embodiment of the fourth aspect of the present invention provides an apparatus for generating a custom animation curve, including: a first acquisition module, where the first acquisition module is configured to acquire the start and end time periods and key frames of the animation curve to be generated information; a splitting module, the splitting module is configured to perform segmentation processing on the start and end time periods of the animation curve to be generated according to the key frame information to split into multiple key frames, wherein the key frame information Including the time corresponding to each key frame and the state value corresponding to each key frame; the second acquisition module, the second acquisition module is used to acquire the interpolation algorithm corresponding to each two adjacent key frames; the calculation module, the The calculation module is used to generate an animation curve corresponding to each two adjacent key frames according to the interpolation algorithm; the splicing module is used to perform the animation curve between the every two adjacent key frames. Stitch processing to get the full animation curve.
  • the first acquisition module is configured to acquire the starting and ending time period and key frame information of the animation curve to be generated
  • the splitting module is used for starting and ending the animation curve to be generated according to the key frame information.
  • the time period is segmented to be divided into multiple key frames, wherein the key frame information includes the time corresponding to each key frame and the state value corresponding to each key frame, and the second obtaining module is used to obtain every two adjacent frames.
  • the calculation module is used to generate animation curves corresponding to every two adjacent key frames according to the interpolation algorithm
  • the splicing module is used to splicing animation curves between every two adjacent key frames Processing to obtain a complete animation curve; thus realizing flexible configuration of animation curves, so that animation is no longer single-cured.
  • the device for generating a custom animation curve proposed according to the above embodiments of the present invention may also have the following additional technical features.
  • obtaining an interpolation algorithm corresponding to every two adjacent key frames, and generating an animation curve corresponding to every two adjacent key frames according to the interpolation algorithm including: obtaining every two adjacent key frames Corresponding interpolation algorithm, wherein, there are corresponding adjustable parameters in the interpolation algorithm; obtain the parameter value corresponding to each adjustable parameter of the interpolation algorithm, and adjust the corresponding adjustable parameter according to the parameter value The parameters are adjusted to obtain the animation value corresponding to each two adjacent keyframes; the animation curve corresponding to each two adjacent keyframes is generated according to the corresponding animation value between each two adjacent keyframes .
  • the interpolation algorithm includes any one of cubic curve interpolation algorithm and spherical interpolation algorithm.
  • FIG. 1 is a schematic flowchart of a method for generating a custom animation curve according to an embodiment of the present invention.
  • FIG. 2 is a schematic block diagram of an apparatus for generating a custom animation curve according to an embodiment of the present invention.
  • the animation framework of each platform is provided to the user with a preset fixed value, and the style is too simple to meet the needs of the design category (especially the application with high demand for dynamic effect scenes), and the provided The animation curve is too simple; according to the method for generating a custom animation curve according to the embodiment of the present invention, first, the start and end time periods and key frame information of the animation curve to be generated are obtained, and the start and end time periods of the animation curve to be generated are segmented according to the key frame information.
  • the key frame information includes the time corresponding to each key frame and the state value corresponding to each key frame; then, obtain the corresponding interpolation algorithm between each two adjacent key frames, and An animation curve corresponding to each two adjacent keyframes is generated according to the interpolation algorithm, and finally, the animation curve between each two adjacent keyframes is spliced to obtain a complete animation curve; Interpolation algorithm is provided to obtain the corresponding animation curve, and the corresponding animation curve can be obtained according to the customized interpolation algorithm, and then the entire animation process can be customized to solve the problem of single animation curing.
  • FIG. 1 is a schematic flowchart of a method for generating a custom animation curve according to an embodiment of the present invention. As shown in FIG. 1 , the method for generating a custom animation curve includes the following steps.
  • Step 101 Obtain the start and end time periods and key frame information of the animation curve to be generated, and perform segmentation processing on the start and end time periods of the animation curve to be generated according to the key frame information to split into multiple key frames, wherein the key frame information includes each key frame. The time corresponding to each keyframe and the state value corresponding to each keyframe.
  • each keyframe in the plurality of keyframes has its corresponding state value.
  • the key frame refers to the first frame of a certain animation curve to be generated within the start and end time period of the animation curve to be generated; the start and end time period of the animation curve to be generated is the animation curve to be generated input by the user.
  • the duration of the animation including the start time point and the end time point; key frame information, including multiple key frames at the corresponding time points within the start and end time period of the animation curve to be generated and the state corresponding to each key frame entered by the user value; state value, which can be the change state value of the length, width, height, displacement, transparency and other effects of the object to be animated by the user, and the object to be animated can be the image, text and other information input by the user .
  • the key frame information can insert a key frame in the 3S between the start and end time period 0-12S, and the object to be animated at this moment is enlarged to 1 times of the previous key frame; between the start and end time period 0-12S Insert a key frame in the 6S, and the object to be animated at this moment is reduced to the previous key frame, that is, 0.5 times when it is 3S; Insert a key frame in the 9S between the start and end time period 0-12S, And the object to be animated at this moment is enlarged to the previous key frame, that is, 0.5 times of the 6S time, and so on, the animation process is divided into multiple key frames, so that each key frame carries a certain moment. Status value.
  • Step 102 Obtain an interpolation algorithm corresponding to each two adjacent key frames, and generate an animation curve corresponding to each two adjacent key frames according to the interpolation algorithm.
  • a plurality of interpolation algorithms are preset, and a corresponding animation curve is generated according to the interpolation algorithm corresponding to each two adjacent key frames input by the user.
  • the interpolation algorithm first obtain the corresponding interpolation algorithm between every two adjacent key frames, wherein the interpolation algorithm has corresponding adjustable parameters; then obtain the parameter value corresponding to each adjustable parameter of the interpolation algorithm, and according to the parameter The corresponding adjustable parameter is adjusted to obtain the corresponding animation value between every two adjacent keyframes; then each two adjacent keyframes are generated according to the corresponding animation value between every two adjacent keyframes The corresponding animation curve between them.
  • the above-mentioned interpolation algorithm may be any one of a cubic curve interpolation algorithm and a spherical interpolation algorithm, wherein the cubic curve interpolation algorithm uses a third-order Bezier curve for processing, and the spherical interpolation algorithm uses a quaternion slerp for processing.
  • the animation curve can be configured, by using an interpolation algorithm between adjacent keyframes to generate animation curves corresponding to adjacent keyframes, wherein, between different keyframes Different difference algorithms can be used to make the animation more abundant, and the animation curve can be customized according to user preferences, which solves the problem of single animation curing.
  • Step 103 splicing animation curves between every two adjacent key frames to obtain a complete animation curve.
  • the corresponding animation value can be obtained from the generated animation curve according to the time point to complete the animation.
  • the start and end time periods and key frame information of the animation curve to be generated are obtained, and the start and end time periods of the animation curve to be generated are segmented according to the key frame information.
  • the process is divided into multiple key frames, wherein the key frame information includes the time corresponding to each key frame and the state value corresponding to each key frame; then, the corresponding interpolation algorithm between each two adjacent key frames is obtained, And according to the interpolation algorithm, the animation curve corresponding to each two adjacent keyframes is generated, and finally, the animation curve between each two adjacent keyframes is spliced to obtain a complete animation curve; so as to realize flexible configuration animation Curve, so that the animation is no longer a single solidification.
  • the embodiments of the present invention provide a computer-readable storage medium on which a custom animation curve generation program is stored, and when the user-defined animation curve generation program is executed by a processor, realizes the above-mentioned custom animation Curve generation method.
  • the processor by storing the custom animation curve generation program, the processor implements the above-mentioned custom animation curve generation method when executing the custom animation curve generation program, thereby realizing flexible configuration Animation curve, so that the animation is no longer a single solidification.
  • the embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the program, the processor implements the following The above-mentioned custom animation curve generation method.
  • the computer program is stored in the memory, so that the processor implements the above-mentioned custom animation curve generation method when executing the custom animation curve generation program, so as to realize the flexible configuration of the animation curve, so that the Animations are no longer monolithic.
  • the embodiment of the present invention proposes a device for generating a custom animation curve.
  • the device for generating a custom animation curve includes: a first acquiring module 10 , a splitting module 20 , and a second acquiring module 10 .
  • module 30 calculation module 40 , and stitching module 50 .
  • the first acquisition module 10 is used for acquiring the start and end time periods and key frame information of the animation curve to be generated;
  • the splitting module 20 is used for segmenting the start and end time periods of the animation curve to be generated according to the key frame information to split into multiple key frames, wherein the key frame information includes the time corresponding to each key frame and the state value corresponding to each key frame, and the second obtaining module 30 is configured to obtain the interpolation algorithm corresponding to each two adjacent key frames, and calculate
  • the module 40 is used for generating an animation curve corresponding to each two adjacent key frames according to the interpolation algorithm, and the splicing module 50 is used for splicing the animation curves between every two adjacent key frames to obtain a complete animation curve. .
  • obtaining an interpolation algorithm corresponding to every two adjacent key frames, and generating an animation curve corresponding to every two adjacent key frames according to the interpolation algorithm includes: obtaining every two adjacent key frames Corresponding interpolation algorithm between frames, wherein, there are corresponding adjustable parameters in the interpolation algorithm; obtain the parameter value corresponding to each adjustable parameter of the interpolation algorithm, and adjust the corresponding adjustable parameter according to the parameter value to obtain each parameter value.
  • the animation value corresponding to two adjacent keyframes; the animation curve corresponding to each two adjacent keyframes is generated according to the corresponding animation value between each two adjacent keyframes.
  • the interpolation algorithm includes any one of a cubic interpolation algorithm, a spherical interpolation algorithm.
  • the first acquisition module is configured to acquire the start and end time period and key frame information of the animation curve to be generated, and the split module is used to treat the animation curve according to the key frame information.
  • the start and end time periods of the generated animation curve are segmented to be divided into multiple key frames, wherein the key frame information includes the time corresponding to each key frame and the state value corresponding to each key frame, and the second acquisition module is used to acquire Corresponding interpolation algorithm between every two adjacent keyframes, the calculation module is used to generate an animation curve corresponding to each two adjacent keyframes according to the interpolation algorithm, and the splicing module is used to compare the difference between every two adjacent keyframes
  • the animation curves are spliced to obtain a complete animation curve, so as to realize the flexible configuration of the animation curve, so that the animation is no longer single-cured.
  • embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
  • An apparatus implements the functions specified in a flow or flows of the flowcharts and/or a block or blocks of the block diagrams.
  • These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in one or more of the flowcharts and/or one or more blocks of the block diagrams.
  • any reference signs placed between parentheses shall not be construed as limiting the claim.
  • the word “comprising” does not exclude the presence of elements or steps not listed in a claim.
  • the word “a” or “an” preceding an element does not preclude the presence of a plurality of such elements.
  • the invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware.
  • the use of the words first, second, and third, etc. do not denote any order. These words can be interpreted as names.
  • first and second are only used for description purposes, and cannot be interpreted as indicating or implying relative importance or the number of indicated technical features. Thus, a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • “plurality” means two or more, unless otherwise expressly and specifically defined.
  • the terms “installed”, “connected”, “connected”, “fixed” and other terms should be understood in a broad sense, for example, it may be a fixed connection or a detachable connection , or integrated; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of the two elements or the interaction relationship between the two elements.
  • installed may be a fixed connection or a detachable connection , or integrated; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of the two elements or the interaction relationship between the two elements.
  • a first feature "on” or “under” a second feature may be in direct contact between the first and second features, or the first and second features indirectly through an intermediary touch.
  • the first feature being “above”, “over” and “above” the second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is level higher than the second feature.
  • the first feature being “below”, “below” and “below” the second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature has a lower level than the second feature.

Landscapes

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

Abstract

A self-defined animation curve generation method, a medium, a device and an apparatus. Said method comprises: acquiring a start and end time period and key frame information of an animation curve to be generated, and segmenting, according to the key frame information, the start and end time period of the animation curve to be generated, so as to split same into a plurality of key frames, wherein the key frame information comprises a time corresponding to each key frame and a state value corresponding to each key frame (101); acquiring an interpolation algorithm corresponding to each two adjacent key frames, and generating, according to the interpolation algorithm, an animation curve corresponding to each two adjacent key frames (102); and performing splicing processing on the animation curve between each two adjacent key frames, so as to obtain a complete animation curve (103). In this way, the animation curve is flexibly configured, and the animation is not dull and fixed.

Description

自定义动画曲线生成方法及装置Method and device for generating custom animation curve 技术领域technical field
本发明涉及动画设计技术领域,特别涉及一种自定义动画曲线生成方法、一种计算机可读存储介质、一种计算机设备以及一种自定义动画曲线生成装置。The present invention relates to the technical field of animation design, in particular to a method for generating a custom animation curve, a computer-readable storage medium, a computer device, and a device for generating a custom animation curve.
背景技术Background technique
动画,是通过改变不同帧画面的位置、效果等,以实现将静态画面变为活动画面的过程,然而在将静态画面变为活动画面的过程,需要依靠动画曲线来进行处理。Animation is the process of turning a static picture into a moving picture by changing the position and effect of different frames. However, in the process of turning a static picture into a moving picture, it needs to rely on animation curves for processing.
相关技术中,现有动画曲线的动画框架都是采用预设化的固定值,动画生成时只需设置好起始值和终点值,并传入不同的时间点通过动画曲线获取对应时间点上的动画值,该方式导致无法对动画曲线进行自定义设置,从而使得动画固化单一。In the related art, the animation frames of the existing animation curves all use preset fixed values. When the animation is generated, it is only necessary to set the start value and the end value, and pass in different time points to obtain the corresponding time points through the animation curve. The animation value of this method makes it impossible to customize the animation curve, so that the animation is solidified and single.
技术解决方案technical solutions
本发明旨在至少在一定程度上解决上述技术中的技术问题之一。为此,本发明的一个目的在于提出一种自定义动画曲线生成方法,通过在相邻关键帧之间选择相应插值算法以自定义动画曲线,从而灵活配置动画曲线,使动画不再单一固化。The present invention aims to solve one of the technical problems in the above technologies at least to a certain extent. To this end, an object of the present invention is to propose a method for generating a custom animation curve, by selecting a corresponding interpolation algorithm between adjacent key frames to customize the animation curve, so as to configure the animation curve flexibly, so that the animation is no longer single-solidified.
本发明的第二个目的在于提出一种计算机可读存储介质。A second object of the present invention is to provide a computer-readable storage medium.
本发明的第三个目的在于提出一种计算机设备。The third object of the present invention is to propose a computer device.
本发明的第四个目的在于提出一种自定义动画曲线生成装置。The fourth object of the present invention is to provide a device for generating custom animation curves.
为达到上述目的,本发明第一方面实施例提出了一种自定义动画曲线生成方法,包括以下步骤:获取待生成动画曲线的起止时间段和关键帧信息,并根据所述关键帧信息对所述待生成动画曲线的起止时间段进行分段处理以拆分成多个关键帧,其中,所述关键帧信息包括每个关键帧对应的时间和每个关键帧对应的状态值;获取每两个相邻关键帧之间对应的插值算法,并根据所述插值算法生成对应每两个相邻关键帧之间的动画曲线;对所述每两个相邻关键帧之间的动画曲线进行拼接处理,以得到完整的动画曲线。In order to achieve the above object, an embodiment of the first aspect of the present invention proposes a method for generating a custom animation curve, which includes the following steps: acquiring the start and end time periods and key frame information of the animation curve to be generated, and performing the analysis on all the animation curves according to the key frame information. The start and end time periods of the animation curve to be generated are segmented to be split into a plurality of key frames, wherein the key frame information includes the time corresponding to each key frame and the state value corresponding to each key frame; An interpolation algorithm corresponding to two adjacent keyframes, and an animation curve corresponding to each two adjacent keyframes is generated according to the interpolation algorithm; the animation curve between each two adjacent keyframes is spliced Process to get the full animation curve.
根据本发明实施例的自定义动画曲线生成方法,首先,获取待生成动画曲线的起止时间段和关键帧信息,并根据关键帧信息对待生成动画曲线的起止时间段进行分段处理以拆分成多个关键帧,其中,关键帧信息包括每个关键帧对应的时间和每个关键帧对应的状态值;接着,获取每两个相邻关键帧之间对应的插值算法,并根据插值算法生成对应每两个相邻关键帧之间的动画曲线,最后,对每两个相邻关键帧之间的动画曲线进行拼接处理,以得到完整的动画曲线;从而实现灵活配置动画曲线,使动画不再单一固化。According to the method for generating a custom animation curve according to the embodiment of the present invention, first, the start and end time periods and key frame information of the animation curve to be generated are obtained, and the start and end time periods of the animation curve to be generated are segmented according to the key frame information to be divided into Multiple key frames, wherein the key frame information includes the time corresponding to each key frame and the state value corresponding to each key frame; then, the corresponding interpolation algorithm between each two adjacent key frames is obtained, and generated according to the interpolation algorithm Corresponding to the animation curve between every two adjacent keyframes, finally, the animation curve between every two adjacent keyframes is spliced to obtain a complete animation curve; thus, the animation curve can be configured flexibly, so that the animation does not change. Then single curing.
另外,根据本发明上述实施例提出的自定义动画曲线生成方法还可以具有如下附加的技术特征。In addition, the method for generating a custom animation curve proposed according to the above embodiments of the present invention may also have the following additional technical features.
可选地,获取每两个相邻关键帧之间对应的插值算法,并根据所述插值算法生成对应每两个相邻关键帧之间的动画曲线,包括:获取每两个相邻关键帧之间对应的插值算法,其中,所述插值算法中对应有可调的参数;获取所述插值算法的每个可调参数对应的参数值,并根据所述参数值对所述对应的可调参数进行调整,以得到每两个相邻关键帧之间对应的动画值;根据所述每两个相邻关键帧之间对应的动画值生成每两个相邻关键帧之间对应的动画曲线。Optionally, obtaining an interpolation algorithm corresponding to every two adjacent key frames, and generating an animation curve corresponding to every two adjacent key frames according to the interpolation algorithm, including: obtaining every two adjacent key frames Corresponding interpolation algorithm, wherein, there are corresponding adjustable parameters in the interpolation algorithm; obtain the parameter value corresponding to each adjustable parameter of the interpolation algorithm, and adjust the corresponding adjustable parameter according to the parameter value The parameters are adjusted to obtain the animation value corresponding to each two adjacent keyframes; the animation curve corresponding to each two adjacent keyframes is generated according to the corresponding animation value between each two adjacent keyframes .
可选地,所述插值算法包括三次曲线插值算法、球面插值算法中的任意一种。Optionally, the interpolation algorithm includes any one of cubic curve interpolation algorithm and spherical interpolation algorithm.
为达到上述目的,本发明第二方面实施例提出了一种计算机可读存储介质,其上存储有自定义动画曲线生成程序,该自定义动画曲线生成被处理器执行时实现如上述的自定义动画曲线生成方法。In order to achieve the above purpose, the second aspect of the present invention provides a computer-readable storage medium on which a custom animation curve generation program is stored, and when the custom animation curve generation is executed by a processor, the above-mentioned custom Animation curve generation method.
根据本发明实施例的计算机可读存储介质,通过存储自定义动画曲线生成程序,以使得处理器在执行该自定义动画曲线生成程序时实现如上述的自定义动画曲线生成方法,从而实现灵活配置动画曲线,使动画不再单一固化。According to the computer-readable storage medium of the embodiment of the present invention, by storing the custom animation curve generation program, the processor implements the above-mentioned custom animation curve generation method when executing the custom animation curve generation program, thereby realizing flexible configuration Animation curve, so that the animation is no longer a single solidification.
为达到上述目的,本发明第三方面实施例提出了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如上述的自定义动画曲线生成方法。In order to achieve the above object, a third aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the program, Implement the custom animation curve generation method described above.
根据本发明实施例的计算机设备,通过存储器对计算机程序进行存储,以使得处理器在执行该自定义动画曲线生成程序时实现如上述的自定义动画曲线生成方法,从而实现灵活配置动画曲线,使动画不再单一固化。According to the computer device of the embodiment of the present invention, the computer program is stored in the memory, so that the processor implements the above-mentioned custom animation curve generation method when executing the custom animation curve generation program, so as to realize the flexible configuration of the animation curve, so that the Animations are no longer monolithic.
为达到上述目的,本发明第四方面实施例提出了一种自定义动画曲线生成装置,包括:第一获取模块,所述第一获取模块用于获取待生成动画曲线的起止时间段和关键帧信息;拆分模块,所述拆分模块用于根据所述关键帧信息对所述待生成动画曲线的起止时间段进行分段处理以拆分成多个关键帧,其中,所述关键帧信息包括每个关键帧对应的时间和每个关键帧对应的状态值;第二获取模块,所述第二获取模块用于获取每两个相邻关键帧之间对应的插值算法;计算模块,所述计算模块用于根据所述插值算法生成对应每两个相邻关键帧之间的动画曲线;拼接模块,所述拼接模块用于对所述每两个相邻关键帧之间的动画曲线进行拼接处理,以得到完整的动画曲线。In order to achieve the above purpose, an embodiment of the fourth aspect of the present invention provides an apparatus for generating a custom animation curve, including: a first acquisition module, where the first acquisition module is configured to acquire the start and end time periods and key frames of the animation curve to be generated information; a splitting module, the splitting module is configured to perform segmentation processing on the start and end time periods of the animation curve to be generated according to the key frame information to split into multiple key frames, wherein the key frame information Including the time corresponding to each key frame and the state value corresponding to each key frame; the second acquisition module, the second acquisition module is used to acquire the interpolation algorithm corresponding to each two adjacent key frames; the calculation module, the The calculation module is used to generate an animation curve corresponding to each two adjacent key frames according to the interpolation algorithm; the splicing module is used to perform the animation curve between the every two adjacent key frames. Stitch processing to get the full animation curve.
根据本发明实施例的自定义动画曲线生成装置,通过设置第一获取模块用于获取待生成动画曲线的起止时间段和关键帧信息,拆分模块用于根据关键帧信息对待生成动画曲线的起止时间段进行分段处理以拆分成多个关键帧,其中,关键帧信息包括每个关键帧对应的时间和每个关键帧对应的状态值,第二获取模块用于获取每两个相邻关键帧之间对应的插值算法,计算模块用于根据插值算法生成对应每两个相邻关键帧之间的动画曲线,拼接模块用于对每两个相邻关键帧之间的动画曲线进行拼接处理,以得到完整的动画曲线;从而实现灵活配置动画曲线,使动画不再单一固化。According to the device for generating a custom animation curve according to an embodiment of the present invention, the first acquisition module is configured to acquire the starting and ending time period and key frame information of the animation curve to be generated, and the splitting module is used for starting and ending the animation curve to be generated according to the key frame information. The time period is segmented to be divided into multiple key frames, wherein the key frame information includes the time corresponding to each key frame and the state value corresponding to each key frame, and the second obtaining module is used to obtain every two adjacent frames. Corresponding interpolation algorithm between key frames, the calculation module is used to generate animation curves corresponding to every two adjacent key frames according to the interpolation algorithm, and the splicing module is used to splicing animation curves between every two adjacent key frames Processing to obtain a complete animation curve; thus realizing flexible configuration of animation curves, so that animation is no longer single-cured.
另外,根据本发明上述实施例提出的自定义动画曲线生成装置还可以具有如下附加的技术特征。In addition, the device for generating a custom animation curve proposed according to the above embodiments of the present invention may also have the following additional technical features.
可选地,获取每两个相邻关键帧之间对应的插值算法,并根据所述插值算法生成对应每两个相邻关键帧之间的动画曲线,包括:获取每两个相邻关键帧之间对应的插值算法,其中,所述插值算法中对应有可调的参数;获取所述插值算法的每个可调参数对应的参数值,并根据所述参数值对所述对应的可调参数进行调整,以得到每两个相邻关键帧之间对应的动画值;根据所述每两个相邻关键帧之间对应的动画值生成每两个相邻关键帧之间对应的动画曲线。Optionally, obtaining an interpolation algorithm corresponding to every two adjacent key frames, and generating an animation curve corresponding to every two adjacent key frames according to the interpolation algorithm, including: obtaining every two adjacent key frames Corresponding interpolation algorithm, wherein, there are corresponding adjustable parameters in the interpolation algorithm; obtain the parameter value corresponding to each adjustable parameter of the interpolation algorithm, and adjust the corresponding adjustable parameter according to the parameter value The parameters are adjusted to obtain the animation value corresponding to each two adjacent keyframes; the animation curve corresponding to each two adjacent keyframes is generated according to the corresponding animation value between each two adjacent keyframes .
可选地,所述插值算法包括三次曲线插值算法、球面插值算法中的任意一种。Optionally, the interpolation algorithm includes any one of cubic curve interpolation algorithm and spherical interpolation algorithm.
附图说明Description of drawings
图1为根据本发明实施例的自定义动画曲线生成方法的流程示意图。FIG. 1 is a schematic flowchart of a method for generating a custom animation curve according to an embodiment of the present invention.
图2为根据本发明实施例的自定义动画曲线生成装置的方框示意图。FIG. 2 is a schematic block diagram of an apparatus for generating a custom animation curve according to an embodiment of the present invention.
具体实施方式Detailed ways
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。The following describes in detail the embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary, and are intended to explain the present invention and should not be construed as limiting the present invention.
相关技术中,在各平台的动画框架中都是以预设化的固定值提供给使用方,样式过于单一,无法满足设计类(尤其是动效场景需求高的应用)的需求,且提供的动画曲线过于简单;根据本发明实施例的自定义动画曲线生成方法首先,获取待生成动画曲线的起止时间段和关键帧信息,并根据关键帧信息对待生成动画曲线的起止时间段进行分段处理以拆分成多个关键帧,其中,关键帧信息包括每个关键帧对应的时间和每个关键帧对应的状态值;接着,获取每两个相邻关键帧之间对应的插值算法,并根据插值算法生成对应每两个相邻关键帧之间的动画曲线,最后,对每两个相邻关键帧之间的动画曲线进行拼接处理,以得到完整的动画曲线;从而在相邻关键帧之间提供插值算法以得到对应动画曲线,并可根据自定义的插值算法获取对应的动画曲线,进而自定义整个动画过程,解决动画固化单一的问题。In the related art, the animation framework of each platform is provided to the user with a preset fixed value, and the style is too simple to meet the needs of the design category (especially the application with high demand for dynamic effect scenes), and the provided The animation curve is too simple; according to the method for generating a custom animation curve according to the embodiment of the present invention, first, the start and end time periods and key frame information of the animation curve to be generated are obtained, and the start and end time periods of the animation curve to be generated are segmented according to the key frame information. to split into multiple key frames, wherein the key frame information includes the time corresponding to each key frame and the state value corresponding to each key frame; then, obtain the corresponding interpolation algorithm between each two adjacent key frames, and An animation curve corresponding to each two adjacent keyframes is generated according to the interpolation algorithm, and finally, the animation curve between each two adjacent keyframes is spliced to obtain a complete animation curve; Interpolation algorithm is provided to obtain the corresponding animation curve, and the corresponding animation curve can be obtained according to the customized interpolation algorithm, and then the entire animation process can be customized to solve the problem of single animation curing.
为了更好的理解上述技术方案,下面将参照附图更详细地描述本发明的示例性实施例。虽然附图中显示了本发明的示例性实施例,然而应当理解,可以以各种形式实现本发明而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本发明,并且能够将本发明的范围完整的传达给本领域的技术人员。For better understanding of the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present invention will be more thoroughly understood, and will fully convey the scope of the present invention to those skilled in the art.
为了更好的理解上述技术方案,下面将结合说明书附图以及具体的实施方式对上述技术方案进行详细的说明。In order to better understand the above technical solutions, the above technical solutions will be described in detail below with reference to the accompanying drawings and specific embodiments.
图1为根据本发明实施例的自定义动画曲线生成方法的流程示意图,如图1所示,该自定义动画曲线生成方法包括以下步骤。FIG. 1 is a schematic flowchart of a method for generating a custom animation curve according to an embodiment of the present invention. As shown in FIG. 1 , the method for generating a custom animation curve includes the following steps.
步骤101,获取待生成动画曲线的起止时间段和关键帧信息,并根据关键帧信息对待生成动画曲线的起止时间段进行分段处理以拆分成多个关键帧,其中,关键帧信息包括每个关键帧对应的时间和每个关键帧对应的状态值。Step 101: Obtain the start and end time periods and key frame information of the animation curve to be generated, and perform segmentation processing on the start and end time periods of the animation curve to be generated according to the key frame information to split into multiple key frames, wherein the key frame information includes each key frame. The time corresponding to each keyframe and the state value corresponding to each keyframe.
也就是说,首先获取待生成动画曲线的起止时间段和关键帧信息,然后根据关键帧信息中的每个关键帧对应的时间点将待生成动画曲线的起止时间段拆分成多个关键帧,另外,多个关键帧中的每个关键帧有其对应的状态值。That is to say, first obtain the start and end time period and key frame information of the animation curve to be generated, and then split the start and end time period of the animation curve to be generated into multiple key frames according to the time point corresponding to each key frame in the key frame information , and in addition, each keyframe in the plurality of keyframes has its corresponding state value.
需要说明的是,关键帧,是指位于待生成动画曲线的起止时间段内的某个待生成动画曲线开始的第一帧;待生成动画曲线的起止时间段,为用户输入的待生成动画曲线的持续时间,包括开始时间点和结束时间点;关键帧信息,为用户输入的包括位于待生成动画曲线的起止时间段内的对应时间点上的多个关键帧以及每个关键帧对应的状态值;状态值,可以为用户输入的待进行动画处理的对象的长度、宽度、高度、位移、透明度等效果的变化状态值,待进行动画处理的对象,可以为用户输入的图像、文字等信息。It should be noted that the key frame refers to the first frame of a certain animation curve to be generated within the start and end time period of the animation curve to be generated; the start and end time period of the animation curve to be generated is the animation curve to be generated input by the user. The duration of the animation, including the start time point and the end time point; key frame information, including multiple key frames at the corresponding time points within the start and end time period of the animation curve to be generated and the state corresponding to each key frame entered by the user value; state value, which can be the change state value of the length, width, height, displacement, transparency and other effects of the object to be animated by the user, and the object to be animated can be the image, text and other information input by the user .
作为一个示例,假设获取到的待生成动画曲线的起止时间段为12S、关键帧信息为0S、1;3S、1;6S,0.5,9S,1;12S,1;则,根据上述获取到的关键帧信息可在起止时间段0-12S之间的第3S***一个关键帧,且在该时刻待进行动画处理的对象放大为上一关键帧的1倍;在起止时间段0-12S之间的第6S***一个关键帧,且在该时刻待进行动画处理的对象为缩小为上一关键帧,即3S时的0.5倍;在起止时间段0-12S之间的第9S***一个关键帧,且在该时刻待进行动画处理的对象放大为上一关键帧,即6S时的0.5倍,以此类推,将动画过程拆分成多个关键帧,使每个关键帧承载着某个时刻的状态值。As an example, it is assumed that the obtained start and end time period of the animation curve to be generated is 12S, and the key frame information is 0S, 1; 3S, 1; 6S, 0.5, 9S, 1; 12S, 1; then, according to the above obtained The key frame information can insert a key frame in the 3S between the start and end time period 0-12S, and the object to be animated at this moment is enlarged to 1 times of the previous key frame; between the start and end time period 0-12S Insert a key frame in the 6S, and the object to be animated at this moment is reduced to the previous key frame, that is, 0.5 times when it is 3S; Insert a key frame in the 9S between the start and end time period 0-12S, And the object to be animated at this moment is enlarged to the previous key frame, that is, 0.5 times of the 6S time, and so on, the animation process is divided into multiple key frames, so that each key frame carries a certain moment. Status value.
步骤102,获取每两个相邻关键帧之间对应的插值算法,并根据插值算法生成对应每两个相邻关键帧之间的动画曲线。Step 102: Obtain an interpolation algorithm corresponding to each two adjacent key frames, and generate an animation curve corresponding to each two adjacent key frames according to the interpolation algorithm.
需要说明的是,预先设置多个插值算法,并根据用户输入的每两个相邻关键帧之间对应的插值算法生成对应的动画曲线。It should be noted that a plurality of interpolation algorithms are preset, and a corresponding animation curve is generated according to the interpolation algorithm corresponding to each two adjacent key frames input by the user.
作为一个示例,首先获取每两个相邻关键帧之间对应的插值算法,其中,插值算法中对应有可调的参数;接着获取插值算法的每个可调参数对应的参数值,并根据参数值对该对应的可调参数进行调整,以得到每两个相邻关键帧之间对应的动画值;然后根据每两个相邻关键帧之间对应的动画值生成每两个相邻关键帧之间对应的动画曲线。As an example, first obtain the corresponding interpolation algorithm between every two adjacent key frames, wherein the interpolation algorithm has corresponding adjustable parameters; then obtain the parameter value corresponding to each adjustable parameter of the interpolation algorithm, and according to the parameter The corresponding adjustable parameter is adjusted to obtain the corresponding animation value between every two adjacent keyframes; then each two adjacent keyframes are generated according to the corresponding animation value between every two adjacent keyframes The corresponding animation curve between them.
需要说明的是,上述插值算法可为三次曲线插值算法、球面插值算法中的任意一种,其中三次曲线插值算法采用三阶贝塞尔曲线进行处理,球面插值算法采用四元数slerp进行处理。It should be noted that the above-mentioned interpolation algorithm may be any one of a cubic curve interpolation algorithm and a spherical interpolation algorithm, wherein the cubic curve interpolation algorithm uses a third-order Bezier curve for processing, and the spherical interpolation algorithm uses a quaternion slerp for processing.
也就是说,在进行动画生成的过程中,可对动画曲线进行配置,通过在相邻关键帧之间使用插值算法以生成相邻关键帧之间对应的动画曲线,其中,不同关键帧之间可使用不同的差值算法,使得动画更加丰富,并可根据用户喜好进行自定义动画曲线,解决了动画固化单一的问题。That is to say, in the process of animation generation, the animation curve can be configured, by using an interpolation algorithm between adjacent keyframes to generate animation curves corresponding to adjacent keyframes, wherein, between different keyframes Different difference algorithms can be used to make the animation more abundant, and the animation curve can be customized according to user preferences, which solves the problem of single animation curing.
步骤103,对每两个相邻关键帧之间的动画曲线进行拼接处理,以得到完整的动画曲线。Step 103 , splicing animation curves between every two adjacent key frames to obtain a complete animation curve.
需要说明的是,在得到完整的动画曲线后,当用户需要自定义动画时,可根据时间点从生成好的动画曲线中取得对应的动画值以完成动画。It should be noted that, after obtaining the complete animation curve, when the user needs to customize the animation, the corresponding animation value can be obtained from the generated animation curve according to the time point to complete the animation.
综上所述,根据本发明实施例的自定义动画曲线生成方法,首先,获取待生成动画曲线的起止时间段和关键帧信息,并根据关键帧信息对待生成动画曲线的起止时间段进行分段处理以拆分成多个关键帧,其中,关键帧信息包括每个关键帧对应的时间和每个关键帧对应的状态值;接着,获取每两个相邻关键帧之间对应的插值算法,并根据插值算法生成对应每两个相邻关键帧之间的动画曲线,最后,对每两个相邻关键帧之间的动画曲线进行拼接处理,以得到完整的动画曲线;从而实现灵活配置动画曲线,使动画不再单一固化。To sum up, according to the method for generating a custom animation curve according to the embodiment of the present invention, first, the start and end time periods and key frame information of the animation curve to be generated are obtained, and the start and end time periods of the animation curve to be generated are segmented according to the key frame information. The process is divided into multiple key frames, wherein the key frame information includes the time corresponding to each key frame and the state value corresponding to each key frame; then, the corresponding interpolation algorithm between each two adjacent key frames is obtained, And according to the interpolation algorithm, the animation curve corresponding to each two adjacent keyframes is generated, and finally, the animation curve between each two adjacent keyframes is spliced to obtain a complete animation curve; so as to realize flexible configuration animation Curve, so that the animation is no longer a single solidification.
为了实现上述实施例,本发明实施例提出了一种计算机可读存储介质,其上存储有自定义动画曲线生成程序,该自定义动画曲线生成程序被处理器执行时实现如上述的自定义动画曲线生成方法。In order to realize the above-mentioned embodiments, the embodiments of the present invention provide a computer-readable storage medium on which a custom animation curve generation program is stored, and when the user-defined animation curve generation program is executed by a processor, realizes the above-mentioned custom animation Curve generation method.
根据本发明实施例的计算机可读存储介质,通过存储自定义动画曲线生成程序,以使得处理器在执行该自定义动画曲线生成程序时实现如上述的自定义动画曲线生成方法,从而实现灵活配置动画曲线,使动画不再单一固化。According to the computer-readable storage medium of the embodiment of the present invention, by storing the custom animation curve generation program, the processor implements the above-mentioned custom animation curve generation method when executing the custom animation curve generation program, thereby realizing flexible configuration Animation curve, so that the animation is no longer a single solidification.
为了实现上述实施例,本发明实施例提出了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如上述的自定义动画曲线生成方法。In order to implement the above embodiments, the embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the program, the processor implements the following The above-mentioned custom animation curve generation method.
根据本发明实施例的计算机设备,通过存储器对计算机程序进行存储,以使得处理器在执行该自定义动画曲线生成程序时实现如上述的自定义动画曲线生成方法,从而实现灵活配置动画曲线,使动画不再单一固化。According to the computer device of the embodiment of the present invention, the computer program is stored in the memory, so that the processor implements the above-mentioned custom animation curve generation method when executing the custom animation curve generation program, so as to realize the flexible configuration of the animation curve, so that the Animations are no longer monolithic.
为了实现上述实施例,本发明实施例提出了一种自定义动画曲线生成装置,如图2所示,该自定义动画曲线生成装置包括:第一获取模块10、拆分模块20、第二获取模块30、计算模块40、和拼接模块50。In order to realize the above-mentioned embodiment, the embodiment of the present invention proposes a device for generating a custom animation curve. As shown in FIG. 2 , the device for generating a custom animation curve includes: a first acquiring module 10 , a splitting module 20 , and a second acquiring module 10 . module 30 , calculation module 40 , and stitching module 50 .
其中,第一获取模块10用于获取待生成动画曲线的起止时间段和关键帧信息;拆分模块20用于根据关键帧信息对待生成动画曲线的起止时间段进行分段处理以拆分成多个关键帧,其中,关键帧信息包括每个关键帧对应的时间和每个关键帧对应的状态值,第二获取模块30用于获取每两个相邻关键帧之间对应的插值算法,计算模块40用于根据插值算法生成对应每两个相邻关键帧之间的动画曲线,拼接模块50用于对每两个相邻关键帧之间的动画曲线进行拼接处理,以得到完整的动画曲线。Wherein, the first acquisition module 10 is used for acquiring the start and end time periods and key frame information of the animation curve to be generated; the splitting module 20 is used for segmenting the start and end time periods of the animation curve to be generated according to the key frame information to split into multiple key frames, wherein the key frame information includes the time corresponding to each key frame and the state value corresponding to each key frame, and the second obtaining module 30 is configured to obtain the interpolation algorithm corresponding to each two adjacent key frames, and calculate The module 40 is used for generating an animation curve corresponding to each two adjacent key frames according to the interpolation algorithm, and the splicing module 50 is used for splicing the animation curves between every two adjacent key frames to obtain a complete animation curve. .
在一些实施例中,在获取每两个相邻关键帧之间对应的插值算法,并根据插值算法生成对应每两个相邻关键帧之间的动画曲线,包括:获取每两个相邻关键帧之间对应的插值算法,其中,插值算法中对应有可调的参数;获取插值算法的每个可调参数对应的参数值,并根据参数值对对应的可调参数进行调整,以得到每两个相邻关键帧之间对应的动画值;根据每两个相邻关键帧之间对应的动画值生成每两个相邻关键帧之间对应的动画曲线。In some embodiments, obtaining an interpolation algorithm corresponding to every two adjacent key frames, and generating an animation curve corresponding to every two adjacent key frames according to the interpolation algorithm, includes: obtaining every two adjacent key frames Corresponding interpolation algorithm between frames, wherein, there are corresponding adjustable parameters in the interpolation algorithm; obtain the parameter value corresponding to each adjustable parameter of the interpolation algorithm, and adjust the corresponding adjustable parameter according to the parameter value to obtain each parameter value. The animation value corresponding to two adjacent keyframes; the animation curve corresponding to each two adjacent keyframes is generated according to the corresponding animation value between each two adjacent keyframes.
在一些实施例中,插值算法包括三次曲线插值算法、球面插值算法中的任意一种。In some embodiments, the interpolation algorithm includes any one of a cubic interpolation algorithm, a spherical interpolation algorithm.
需要说明的是,前述对于自定义动画曲线生成方法的实施例的解释说明同样适用于本实施例的自定义动画曲线生成装置,此处不再赘述。It should be noted that, the foregoing explanations of the embodiments of the method for generating a custom animation curve are also applicable to the device for generating a custom animation curve in this embodiment, which will not be repeated here.
综上所述,根据本发明实施例的自定义动画曲线生成装置,通过设置第一获取模块用于获取待生成动画曲线的起止时间段和关键帧信息,拆分模块用于根据关键帧信息对待生成动画曲线的起止时间段进行分段处理以拆分成多个关键帧,其中,关键帧信息包括每个关键帧对应的时间和每个关键帧对应的状态值,第二获取模块用于获取每两个相邻关键帧之间对应的插值算法,计算模块用于根据插值算法生成对应每两个相邻关键帧之间的动画曲线,拼接模块用于对每两个相邻关键帧之间的动画曲线进行拼接处理,以得到完整的动画曲线;从而实现灵活配置动画曲线,使动画不再单一固化。To sum up, according to the device for generating a custom animation curve according to the embodiment of the present invention, the first acquisition module is configured to acquire the start and end time period and key frame information of the animation curve to be generated, and the split module is used to treat the animation curve according to the key frame information. The start and end time periods of the generated animation curve are segmented to be divided into multiple key frames, wherein the key frame information includes the time corresponding to each key frame and the state value corresponding to each key frame, and the second acquisition module is used to acquire Corresponding interpolation algorithm between every two adjacent keyframes, the calculation module is used to generate an animation curve corresponding to each two adjacent keyframes according to the interpolation algorithm, and the splicing module is used to compare the difference between every two adjacent keyframes The animation curves are spliced to obtain a complete animation curve, so as to realize the flexible configuration of the animation curve, so that the animation is no longer single-cured.
本领域内的技术人员应明白,本发明的实施例可提供为方法、***、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本发明是参照根据本发明实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block in the flowcharts and/or block diagrams, and combinations of flows and/or blocks in the flowcharts and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in one or more of the flowcharts and/or one or more blocks of the block diagrams.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions An apparatus implements the functions specified in a flow or flows of the flowcharts and/or a block or blocks of the block diagrams.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in one or more of the flowcharts and/or one or more blocks of the block diagrams.
应当注意的是,在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的部件或步骤。位于部件之前的单词“一”或“一个”不排除存在多个这样的部件。本发明可以借助于包括有若干不同部件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that, in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not preclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. do not denote any order. These words can be interpreted as names.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。Although preferred embodiments of the present invention have been described, additional changes and modifications to these embodiments may occur to those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be construed to include the preferred embodiment and all changes and modifications that fall within the scope of the present invention.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit and scope of the invention. Thus, provided that these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
在本发明的描述中,需要理解的是,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本发明的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In the description of the present invention, it should be understood that the terms "first" and "second" are only used for description purposes, and cannot be interpreted as indicating or implying relative importance or the number of indicated technical features. Thus, a feature defined as "first" or "second" may expressly or implicitly include one or more of that feature. In the description of the present invention, "plurality" means two or more, unless otherwise expressly and specifically defined.
在本发明中,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”、“固定”等术语应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或成一体;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通或两个元件的相互作用关系。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本发明中的具体含义。In the present invention, unless otherwise expressly specified and limited, the terms "installed", "connected", "connected", "fixed" and other terms should be understood in a broad sense, for example, it may be a fixed connection or a detachable connection , or integrated; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of the two elements or the interaction relationship between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
在本发明中,除非另有明确的规定和限定,第一特征在第二特征 “上”或“下”可以是第一和第二特征直接接触,或第一和第二特征通过中间媒介间接接触。而且,第一特征在第二特征“之上”、“上方”和“上面”可是第一特征在第二特征正上方或斜上方,或仅仅表示第一特征水平高度高于第二特征。第一特征在第二特征“之下”、“下方”和“下面”可以是第一特征在第二特征正下方或斜下方,或仅仅表示第一特征水平高度小于第二特征。In the present invention, unless otherwise expressly specified and limited, a first feature "on" or "under" a second feature may be in direct contact between the first and second features, or the first and second features indirectly through an intermediary touch. Also, the first feature being "above", "over" and "above" the second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is level higher than the second feature. The first feature being "below", "below" and "below" the second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature has a lower level than the second feature.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、 “示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不应理解为必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, description with reference to the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples", etc., mean specific features described in connection with the embodiment or example , structure, material or feature is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms should not be construed as necessarily referring to the same embodiment or example. Furthermore, the particular features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, those skilled in the art may combine and combine the different embodiments or examples described in this specification, as well as the features of the different embodiments or examples, without conflicting each other.
尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。Although the embodiments of the present invention have been shown and described above, it should be understood that the above-mentioned embodiments are exemplary and should not be construed as limiting the present invention. Embodiments are subject to variations, modifications, substitutions and variations.

Claims (8)

  1. 一种自定义动画曲线生成方法,其特征在于,包括以下步骤:A method for generating custom animation curves, comprising the following steps:
    获取待生成动画曲线的起止时间段和关键帧信息,并根据所述关键帧信息对所述待生成动画曲线的起止时间段进行分段处理以拆分成多个关键帧,其中,所述关键帧信息包括每个关键帧对应的时间和每个关键帧对应的状态值;Obtain the start and end time period and key frame information of the animation curve to be generated, and perform segmentation processing on the start and end time period of the animation curve to be generated according to the key frame information to split into multiple key frames, wherein the key frame The frame information includes the time corresponding to each key frame and the state value corresponding to each key frame;
    获取每两个相邻关键帧之间对应的插值算法,并根据所述插值算法生成对应每两个相邻关键帧之间的动画曲线;Obtaining the corresponding interpolation algorithm between every two adjacent key frames, and generating an animation curve corresponding to each two adjacent key frames according to the interpolation algorithm;
    对所述每两个相邻关键帧之间的动画曲线进行拼接处理,以得到完整的动画曲线。The animation curve between each two adjacent key frames is spliced to obtain a complete animation curve.
  2. 如权利要求1所述的自定义动画曲线生成方法,其特征在于,获取每两个相邻关键帧之间对应的插值算法,并根据所述插值算法生成对应每两个相邻关键帧之间的动画曲线,包括:The method for generating a custom animation curve according to claim 1, wherein an interpolation algorithm corresponding to each two adjacent key frames is obtained, and a corresponding interpolation algorithm between each two adjacent key frames is generated according to the interpolation algorithm. animation curves, including:
    获取每两个相邻关键帧之间对应的插值算法,其中,所述插值算法中对应有可调的参数;Obtaining an interpolation algorithm corresponding to each two adjacent key frames, wherein the interpolation algorithm has corresponding adjustable parameters;
    获取所述插值算法的每个可调参数对应的参数值,并根据所述参数值对所述对应的可调参数进行调整,以得到每两个相邻关键帧之间对应的动画值;Acquire the parameter value corresponding to each adjustable parameter of the interpolation algorithm, and adjust the corresponding adjustable parameter according to the parameter value to obtain the animation value corresponding to each two adjacent key frames;
    根据所述每两个相邻关键帧之间对应的动画值生成每两个相邻关键帧之间对应的动画曲线。An animation curve corresponding to each two adjacent key frames is generated according to the animation value corresponding to each two adjacent key frames.
  3. 如权利要求2所述的自定义动画曲线生成方法,其特征在于,所述插值算法包括三次曲线插值算法、球面插值算法中的任意一种。The method for generating a custom animation curve according to claim 2, wherein the interpolation algorithm comprises any one of a cubic curve interpolation algorithm and a spherical interpolation algorithm.
  4. 一种计算机可读存储介质,其特征在于,其上存储有自定义动画曲线生成程序,该自定义动画曲线生成程序被处理器执行时实现如权利要求1-3中任一项所述的自定义动画曲线生成方法。A computer-readable storage medium, characterized in that a custom animation curve generation program is stored thereon, and when the custom animation curve generation program is executed by a processor, the self-defined animation curve generation program according to any one of claims 1-3 is realized. Defines the animation curve generation method.
  5. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时,实现如权利要求1-3中任一项所述的自定义动画曲线生成方法。A computer device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, when the processor executes the program, any one of claims 1-3 is implemented. The custom animation curve generation method described in item.
  6. 一种自定义动画曲线生成装置,其特征在于,包括:A device for generating custom animation curves, characterized in that it includes:
    第一获取模块,所述第一获取模块用于获取待生成动画曲线的起止时间段和关键帧信息;a first acquisition module, which is used to acquire the start and end time periods and key frame information of the animation curve to be generated;
    拆分模块,所述拆分模块用于根据所述关键帧信息对所述待生成动画曲线的起止时间段进行分段处理以拆分成多个关键帧,其中,所述关键帧信息包括每个关键帧对应的时间和每个关键帧对应的状态值;A splitting module, the splitting module is configured to perform segmentation processing on the start and end time periods of the animation curve to be generated according to the key frame information to split into a plurality of key frames, wherein the key frame information includes each The time corresponding to each key frame and the state value corresponding to each key frame;
    第二获取模块,所述第二获取模块用于获取每两个相邻关键帧之间对应的插值算法;a second acquisition module, the second acquisition module is used to acquire the corresponding interpolation algorithm between every two adjacent key frames;
    计算模块,所述计算模块用于根据所述插值算法生成对应每两个相邻关键帧之间的动画曲线;a calculation module, which is configured to generate an animation curve corresponding to each two adjacent key frames according to the interpolation algorithm;
    拼接模块,所述拼接模块用于对所述每两个相邻关键帧之间的动画曲线进行拼接处理,以得到完整的动画曲线。A splicing module, which is used for splicing the animation curves between each two adjacent key frames to obtain a complete animation curve.
  7. 如权利要求6所述的自定义动画曲线生成装置,其特征在于,获取每两个相邻关键帧之间对应的插值算法,并根据所述插值算法生成对应每两个相邻关键帧之间的动画曲线,包括:The device for generating a custom animation curve according to claim 6, wherein an interpolation algorithm corresponding to every two adjacent key frames is obtained, and a corresponding interpolation algorithm between every two adjacent key frames is generated according to the interpolation algorithm. animation curves, including:
    获取每两个相邻关键帧之间对应的插值算法,其中,所述插值算法中对应有可调的参数;Obtaining an interpolation algorithm corresponding to each two adjacent key frames, wherein the interpolation algorithm has corresponding adjustable parameters;
    获取所述插值算法的每个可调参数对应的参数值,并根据所述参数值对所述对应的可调参数进行调整,以得到每两个相邻关键帧之间对应的动画值;Acquire the parameter value corresponding to each adjustable parameter of the interpolation algorithm, and adjust the corresponding adjustable parameter according to the parameter value to obtain the animation value corresponding to each two adjacent key frames;
    根据所述每两个相邻关键帧之间对应的动画值生成每两个相邻关键帧之间对应的动画曲线。An animation curve corresponding to each two adjacent key frames is generated according to the animation value corresponding to each two adjacent key frames.
  8. 如权利要求7所述的自定义动画曲线生成装置,其特征在于,所述插值算法包括三次曲线插值算法、球面插值算法中的任意一种。The device for generating a custom animation curve according to claim 7, wherein the interpolation algorithm comprises any one of a cubic curve interpolation algorithm and a spherical interpolation algorithm.
PCT/CN2021/094858 2020-12-28 2021-05-20 Self-defined animation curve generation method and apparatus WO2022142081A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011584813.1A CN112634409B (en) 2020-12-28 2020-12-28 Custom animation curve generation method and device
CN202011584813.1 2020-12-28

Publications (1)

Publication Number Publication Date
WO2022142081A1 true WO2022142081A1 (en) 2022-07-07

Family

ID=75285723

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/094858 WO2022142081A1 (en) 2020-12-28 2021-05-20 Self-defined animation curve generation method and apparatus

Country Status (2)

Country Link
CN (1) CN112634409B (en)
WO (1) WO2022142081A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112634409B (en) * 2020-12-28 2022-04-19 稿定(厦门)科技有限公司 Custom animation curve generation method and device
CN113992977A (en) * 2021-10-21 2022-01-28 郑州阿帕斯数云信息科技有限公司 Video data processing method and device
CN116894893A (en) * 2023-09-11 2023-10-17 山东捷瑞数字科技股份有限公司 Nonlinear animation regulation and control method and system based on three-dimensional engine

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060192783A1 (en) * 2005-01-26 2006-08-31 Pixar Interactive spacetime constraints: wiggly splines
CN102682459A (en) * 2011-03-15 2012-09-19 新奥特(北京)视频技术有限公司 Method for interpolating keyframe animation curve
CN104318600A (en) * 2014-10-10 2015-01-28 无锡梵天信息技术股份有限公司 Method for achieving role treading track animation by using Bezier curve
CN105719330A (en) * 2014-12-05 2016-06-29 腾讯科技(北京)有限公司 Animation curve generation method and device
CN112634409A (en) * 2020-12-28 2021-04-09 稿定(厦门)科技有限公司 Custom animation curve generation method and device

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8451277B2 (en) * 2009-07-24 2013-05-28 Disney Enterprises, Inc. Tight inbetweening
CN102682458A (en) * 2011-03-15 2012-09-19 新奥特(北京)视频技术有限公司 Synchronous regulating method of multi-stunt multi-parameter of key frame animation curve
CN105809664B (en) * 2014-12-31 2020-03-17 北京三星通信技术研究有限公司 Method and device for generating three-dimensional image
CN104574481B (en) * 2015-01-26 2017-08-25 北京春天影视科技有限公司 A kind of non-linear amending method of three-dimensional character animation
CN105578184B (en) * 2016-01-27 2018-11-20 努比亚技术有限公司 The generating means and method of key-frame animation
CN106504267B (en) * 2016-10-19 2019-05-17 东南大学 A kind of motion of virtual human data critical frame abstracting method
US10521938B1 (en) * 2018-08-28 2019-12-31 Pixar System and method for smoothing computer animation curves
CN110930477B (en) * 2018-09-20 2024-04-12 深圳市优必选科技有限公司 Robot animation expression implementation method, device and storage medium
CN111815737B (en) * 2019-04-26 2023-03-28 厦门雅基软件有限公司 Interpolation data processing method, device and equipment and computer readable storage medium
CN110163939B (en) * 2019-05-28 2023-04-28 上海米哈游网络科技股份有限公司 Three-dimensional animation character expression generating method, device, equipment and storage medium
CN111445562B (en) * 2020-03-12 2023-03-03 稿定(厦门)科技有限公司 Character animation generation method and device
CN111951355A (en) * 2020-08-04 2020-11-17 北京字节跳动网络技术有限公司 Animation processing method and device, computer equipment and storage medium
CN111899320B (en) * 2020-08-20 2023-05-23 腾讯科技(深圳)有限公司 Data processing method, training method and device of dynamic capture denoising model

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060192783A1 (en) * 2005-01-26 2006-08-31 Pixar Interactive spacetime constraints: wiggly splines
CN102682459A (en) * 2011-03-15 2012-09-19 新奥特(北京)视频技术有限公司 Method for interpolating keyframe animation curve
CN104318600A (en) * 2014-10-10 2015-01-28 无锡梵天信息技术股份有限公司 Method for achieving role treading track animation by using Bezier curve
CN105719330A (en) * 2014-12-05 2016-06-29 腾讯科技(北京)有限公司 Animation curve generation method and device
CN112634409A (en) * 2020-12-28 2021-04-09 稿定(厦门)科技有限公司 Custom animation curve generation method and device

Also Published As

Publication number Publication date
CN112634409A (en) 2021-04-09
CN112634409B (en) 2022-04-19

Similar Documents

Publication Publication Date Title
WO2022142081A1 (en) Self-defined animation curve generation method and apparatus
US9430479B2 (en) Interactive frames for images and videos displayed in a presentation application
JP4937256B2 (en) Smooth transition between animations
KR100938036B1 (en) System supporting animation of graphical display elements through animation object instances
US11069109B2 (en) Seamless representation of video and geometry
KR20170067853A (en) Animation framework
JP6888098B2 (en) Adding motion effects to digital still images
US8707150B2 (en) Applying effects to a video in-place in a document
US20120280991A1 (en) Employing mesh files to animate transitions in client applications
JP2008136213A (en) Method for generating frame information for moving image, system utilizing the same and recording medium
AU2008305452A1 (en) Animating objects using a declarative animation scheme
US9396575B2 (en) Animation via pin that defines multiple key frames
US7268784B2 (en) Adaptive caching of animation controls
CN112037186A (en) Coronary vessel extraction method and device based on multi-view model fusion
WO2012071844A1 (en) Method and device for generating and playing multimedia animation
US20150002516A1 (en) Choreography of animated crowds
US7474928B2 (en) Hybrid vector/raster based paint
AU2009201433B2 (en) Improved physics-based simulation
WO2022063093A1 (en) Method and apparatus for generating video in text mode, device and medium
US8773441B2 (en) System and method for conforming an animated camera to an editorial cut
JP2022546614A (en) image souvenir generation
CN114529636A (en) Animation implementation method and system based on double buffering and linear frame interpolation technology
JP2008020943A (en) Image processing method, program and device
CN106056654A (en) Operation video output and browse method in three-dimensional assembly simulation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21912842

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21912842

Country of ref document: EP

Kind code of ref document: A1

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 23.08.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21912842

Country of ref document: EP

Kind code of ref document: A1