CN110264554A - Processing method, device, storage medium and the electronic device of animation information - Google Patents

Processing method, device, storage medium and the electronic device of animation information Download PDF

Info

Publication number
CN110264554A
CN110264554A CN201910549094.0A CN201910549094A CN110264554A CN 110264554 A CN110264554 A CN 110264554A CN 201910549094 A CN201910549094 A CN 201910549094A CN 110264554 A CN110264554 A CN 110264554A
Authority
CN
China
Prior art keywords
animation
target
information
targeted attitude
animation information
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201910549094.0A
Other languages
Chinese (zh)
Other versions
CN110264554B (en
Inventor
许飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201910549094.0A priority Critical patent/CN110264554B/en
Publication of CN110264554A publication Critical patent/CN110264554A/en
Application granted granted Critical
Publication of CN110264554B publication Critical patent/CN110264554B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Landscapes

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

Abstract

The invention discloses a kind of processing method of animation information, device, storage medium and electronic devices.This method comprises: obtaining in the first moment target animation information associated with virtual objects, wherein, target animation information includes the information of the target animation merged by multiple first animations, and target animation is for generating the corresponding targeted attitude of target action that virtual objects execute in virtual scene;It determines that target animation is in stable state according to target animation information, establishes the target mapping relations caching of the first sub-goal animation information and targeted attitude in target animation information;Determination is corresponding with the associated second sub-goal animation information of virtual objects and the first sub-goal animation information at the second moment, and control virtual objects are targeted attitude in the posture for the movement that the second moment executed, at the time of the second moment is after the first moment.Through the invention, achieved the effect that improve the efficiency for handling animation information.

Description

Processing method, device, storage medium and the electronic device of animation information
Technical field
The present invention relates to computer fields, are situated between in particular to a kind of processing method of animation information, device, storage Matter and electronic device.
Background technique
Currently, usually passing through the animations emerging systems such as animation tree, animation figure to realize abundant, smooth animation performance To realize.Although complicated animation logic may be implemented by animation tree, animation figure, also animation system is allowed to be easier appearance property Can aspect the problem of, can by reducing the depth of animation tree or animation figure, reduction simultaneously participate in fusion animation number come Optimize animation system.
But the depth of animation tree or animation figure is reduced, limit the performance of animation tree or the establishment of animation figure;It reduces simultaneously Participate in fusion animation number, then can have a certain impact to the expression effect of final animation, so as to cause to animation information into The inefficiency of row processing.
Aiming at the problem that low efficiency handled in the prior art to animation information, effective solution is not yet proposed at present Scheme.
Summary of the invention
The main purpose of the present invention is to provide a kind of processing method of animation information, device, storage medium and electronics dresses It sets, the technical issues of at least to solve the low efficiency handled animation information.
To achieve the goals above, according to an aspect of the invention, there is provided a kind of processing method of animation information.It should Method include: obtain in the first moment target animation information associated with virtual objects, wherein target animation information include by The information for the target animation that multiple first animations are merged, target animation is for generating virtual objects in virtual scene The corresponding targeted attitude of the target action of execution;It determines that target animation is in stable state according to target animation information, establishes mesh Mark the target mapping relations caching of the first sub-goal animation information and targeted attitude in animation information;Determine the second moment with The associated second sub-goal animation information of virtual objects and the first sub-goal animation information are corresponding, and control virtual objects are the The posture for the movement that two moment executed is targeted attitude, wherein at the time of the second moment is after the first moment.
Optionally, the first sub-goal animation information includes following at least one: the information of object run, currently playing progress With multiple first animations, wherein object run passes through target for controlling the movement of virtual objects performance objective, currently playing progress The play time and playback rate of animation determine.
Optionally, the target mapping relations of the first sub-goal animation information and targeted attitude in target animation information are established Caching includes: the object key that the first sub-goal animation is determined as to target key value pair, and targeted attitude is determined as target key value pair Target value.
Optionally, it maps and closes in the target for the first sub-goal animation information and targeted attitude established in target animation information Before system's caching, this method further include: the integration percentage for merging the first animation of each of target animation is determined, in target Between remain unchanged in section, determine that target animation is in stable state, wherein target animation information includes each first animation.
Optionally, it maps and closes in the target for the first sub-goal animation information and targeted attitude established in target animation information When system's caching, this method further includes following one: according to the bone matrix of each animation frame of target frame rate caching of target animation; Determine that the difference between targeted attitude and the posture of last time caching is greater than first object threshold value, caching of target posture;From multiple storages Target storage position associated with the currently playing progress of target animation is determined in position, and by virtual objects currently playing Targeted attitude when progress, caching is to target storage position, wherein each storage location for cached virtual object with it is each Posture when the associated playback progress of storage location, and the corresponding animation of posture that each adjacent two storage location allows to store Spacing between frame is greater than the second targets threshold.
Optionally, this method further includes following one: determining the difference between currently playing progress and the first playback progress In third targets threshold, targeted attitude of the virtual objects in currently playing progress is abandoned, wherein the first playback progress is mesh Mark the playback progress of storage location target animation corresponding to the upper posture once stored;Determine currently playing progress and second Difference between playback progress abandons targeted attitude of the virtual objects in currently playing progress in the 4th targets threshold, In, the second playback progress is that the next storage location adjacent with target storage position allows target corresponding to the posture of storage The minimum playback progress of animation.
Optionally, target animation information includes at least one of: for controlling the mesh of virtual objects performance objective movement Mark the information of operation;The identification information of multiple first animations;The integration percentage of each first animation;The length of target animation;Mesh Mark the currently playing progress of animation;The playback rate of target animation.
Optionally, it determines that target animation is in stable state according to target animation information, establishes in target animation information First sub-goal animation information and the target mapping relations of targeted attitude caching include: to determine that target is dynamic according to target animation information It draws and is in stable state, and determine that target cache position is uncached to have the first sub-goal animation information and targeted attitude, establish The target mapping relations of the first sub-goal animation information and targeted attitude in the target animation information of target cache position caching Caching.
Optionally, it maps and closes in the target for the first sub-goal animation information and targeted attitude established in target animation information After system's caching, this method further include: determine that capacity shared by the data of target cache position storage is more than target capacity, and Targeted attitude is not used more than the object time, deletes the first sub-goal animation information and targeted attitude.
To achieve the goals above, according to another aspect of the present invention, a kind of processing unit of animation information is additionally provided. The device includes: acquiring unit, for obtaining in the first moment target animation information associated with virtual objects, wherein mesh Mark animation information includes the information of the target animation merged by multiple first animations, and target animation is virtual for generating The corresponding targeted attitude of the target action that object executes in virtual scene;First processing units, for being believed according to target animation It ceases and determines that target animation is in stable state, establish the first sub-goal animation information in target animation information and targeted attitude Target mapping relations caching;The second processing unit, for determining in the second moment the second sub-goal associated with virtual objects Animation information and the first sub-goal animation information are corresponding, and control virtual objects are mesh in the posture for the movement that the second moment executed Mark posture, wherein at the time of the second second moment of sub-goal animation information is after the first moment.
To achieve the goals above, according to another aspect of the present invention, a kind of storage medium is additionally provided.The storage medium In be stored with computer program, wherein computer program is arranged to execute the animation information of the embodiment of the present invention when operation Processing method.
To achieve the goals above, according to another aspect of the present invention, a kind of electronic device is additionally provided.The electronic device Including memory and processor, which is characterized in that be stored with computer program in memory, processor is arranged to operation and calculates Machine program is to execute the processing method of the animation information of the embodiment of the present invention.
Through the invention, using acquisition in the first moment target animation information associated with virtual objects, wherein target Animation information includes the information of the target animation merged by multiple first animations, and target animation is virtual right for generating As the corresponding targeted attitude of the target action executed in virtual scene;Determine that target animation is in steady according to target animation information Determine state, establishes the target mapping relations caching of the first sub-goal animation information and targeted attitude in target animation information;Really It is corresponding with the associated second sub-goal animation information of virtual objects and the first sub-goal animation information to be scheduled on for the second moment, control Virtual objects processed are targeted attitude in the posture for the movement that the second moment executed, wherein the second moment is after the first moment Moment.That is, the posture current to virtual objects caches through target animation information in reproducible situation, In the case where subsequent appearance same animation information, targeted attitude being called directly, and not having to recalculate, smaller calculate is opened Pin has reached the technical effect for improving the efficiency handled animation information, has solved the effect handled animation information The low technical problem of rate.
Detailed description of the invention
The attached drawing constituted part of this application is used to provide further understanding of the present invention, schematic reality of the invention It applies example and its explanation is used to explain the present invention, do not constitute improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of hardware block diagram of the mobile terminal of the processing method of animation information of the embodiment of the present invention;
Fig. 2 is a kind of flow chart of the processing method of animation information according to an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of the expense of animation system according to an embodiment of the present invention;
Fig. 4 is a kind of flow chart of the method for animation caching according to an embodiment of the present invention;
Fig. 5 is a kind of method of the animation caching of Stability Assessment function for introducing animation system according to embodiments of the present invention Flow chart;
Fig. 6 is the schematic diagram of the data cached storage organization of one kind according to an embodiment of the present invention;
Fig. 7 is the flow chart according to one of the relevant technologies animation caching method;
Fig. 8 is a kind of flow chart of animation caching method according to an embodiment of the present invention;And
Fig. 9 is a kind of schematic diagram of the processing unit of animation information according to an embodiment of the present invention.
Specific embodiment
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only The embodiment of the application a part, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people Member's every other embodiment obtained without making creative work, all should belong to the model of the application protection It encloses.
It should be noted that the description and claims of this application and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to embodiments herein described herein.In addition, term " includes " and " tool Have " and their any deformation, it is intended that cover it is non-exclusive include, for example, containing a series of steps or units Process, method, system, product or equipment those of are not necessarily limited to be clearly listed step or unit, but may include without clear Other step or units listing to Chu or intrinsic for these process, methods, product or equipment.
Embodiment of the method provided by the embodiment of the present application can be in mobile terminal, terminal or similar operation It is executed in device.For running on mobile terminals, Fig. 1 is a kind of processing method of animation information of the embodiment of the present invention The hardware block diagram of mobile terminal.As shown in Figure 1, mobile terminal may include one or more (only showing one in Fig. 1) (processor 102 can include but is not limited to the processing dress of Micro-processor MCV or programmable logic device FPGA etc. to processor 102 Set) and memory 104 for storing data, optionally, above-mentioned mobile terminal can also include the transmission for communication function Device 106 and input-output equipment 108.It will appreciated by the skilled person that structure shown in FIG. 1 is only to illustrate, It does not cause to limit to the structure of above-mentioned mobile terminal.For example, mobile terminal may also include than shown in Fig. 1 more or more Few component, or with the configuration different from shown in Fig. 1.
Memory 104 can be used for storing computer program, for example, the software program and module of application software, such as this hair The corresponding computer program of processing method of one of bright embodiment animation information, processor 102 are stored in by operation Computer program in reservoir 104 realizes above-mentioned method thereby executing various function application and data processing.Storage Device 104 may include high speed random access memory, may also include nonvolatile memory, as one or more magnetic storage device, Flash memory or other non-volatile solid state memories.In some instances, memory 104 can further comprise relative to processing The remotely located memory of device 102, these remote memories can pass through network connection to mobile terminal.The example of above-mentioned network Including but not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Transmitting device 106 is used to that data to be received or sent via a network.Above-mentioned network specific example may include The wireless network that the communication providers of mobile terminal provide.In an example, transmitting device 106 includes a network adapter (Network Interface Controller, referred to as NIC), can be connected by base station with other network equipments so as to It is communicated with internet.In an example, transmitting device 106 can be radio frequency (RadioFrequency, referred to as RF) Module is used to wirelessly be communicated with internet.
In the present embodiment, a kind of a kind of processing method of animation information for running on above-mentioned mobile terminal is provided, it should The optimization method that method can carry out for the efficiency to animation system (Animation System).Animation system is to pass through receiving The input of user operates, the system that control virtual objects realize various movement displayings.Virtual objects can be built-in limited multiple dynamic It draws, animation system is operated according to the input of user, is merged according to a certain percentage based on built-in limited multiple animations, mistake It crosses, obtains the movement in various situations.
Fig. 2 is a kind of flow chart of the processing method of animation information according to an embodiment of the present invention.As shown in Fig. 2, the stream Journey includes the following steps:
Step S202 is obtained in the first moment target animation information associated with virtual objects, wherein target animation letter Breath includes the information of the target animation merged by multiple first animations, and target animation is for generating virtual objects in void The corresponding targeted attitude of target action executed in quasi- scene.
In the technical solution that above-mentioned steps S202 of the present invention is provided, virtual objects can be the virtual control in virtual scene Object processed, for example, target animation information associated with virtual objects can be for by steady for the game role in scene of game Determine the effective status information for the animation system that evaluation function (Animation State Evaluation) is got, including by The information for the target animation that multiple first animations are merged, wherein Stability Assessment function can drawing for animation system A component in holding up, animation are the fine arts resource of corresponding specific action, be can be with 3dsmax software or maya software development, It is also possible to generate by motion capture, is the basis for synthesizing other movements, limited amount can be representational movement, For example, going ahead, walking to the left.In addition, current animation is also required to be melted with previous animation due to the presence of animation transition It closes, the animation of front is different, then same user inputs corresponding bone performance, it is also possible to be different, from an animation When being switched to another animation, in order to avoid the posture of virtual objects jumps, animation transition is introduced, in the animation transitional period Between, the fusion for showing as front and back animation of the posture of virtual objects, by taking " movement " as an example, virtual objects " are moved from " static " entrance It is dynamic " during, have an accelerator, this accelerated motion fine arts there is no special production, by animation transition come into What row was realized.
In this embodiment, information relevant to target animation all can serve as above-mentioned target animation information, for example, passing through The operational order of user's input carries out target action corresponding with target animation to trigger virtual objects, then target animation information can Think operational order, wherein target animation is for generating the corresponding mesh of target action that virtual objects execute in virtual scene It marks posture (Pose), target action embodies the variation of the targeted attitude and targeted attitude of virtual objects in all cases Journey is the performance of multiple first animation transition, fusion.For example, " walking " is exactly to act, " Xiang Zuoqian is walked " can be by " forward Walk " animation, " walking to the left " animation merge according to a certain percentage formed, for another example, the walking for being directed to virtual objects is applied By the target animation for hitting movement when method, is then hit animation by two walking animations, an animation of excuting a law, one and merge to obtain.
The target animation information of the embodiment can also for the name lists of multiple first animations, the length of target animation, Playback progress, playback rate of target animation of target animation etc..
Step S204 determines that target animation is in stable state according to target animation information, establishes in target animation information The first sub-goal animation information and targeted attitude target mapping relations caching.
It is associated with virtual objects at the first moment obtaining in the technical solution that above-mentioned steps S204 of the present invention is provided Target animation information after, determine that target animation is in stable state according to target animation information, establish target animation information In the first sub-goal animation information and targeted attitude target mapping relations caching.Optionally, the embodiment is dynamic by target It draws information and determines whether target animation is in stable state, can determine whether target animation is in steady by Stability Assessment function Determine state.The ratio of animation due in stablizing animation, participating in fusion is constant, thus if participating in each of fusion the The integration percentage of one animation be it is constant, then can determine that target animation is in stable state, and then determine target animation information Targeted attitude corresponding with corresponding target action be in follow-up time it is reproducible, that is, target animation information and correspondence The corresponding targeted attitude of target action have repeatability, the current state information of animation system is reproducible.Optionally, with The movement of circulating repetition is reproducible mostly, for example, prolonged walking motion, movement of running, crawl movement, attack It is reproducible Deng all.
If determining that target animation is in stable state by target animation information, first in target animation information is established Sub-goal animation information and the target mapping relations of targeted attitude caching, the first sub-goal in target animation information can be moved The data of information and targeted attitude are drawn as data cached, are stored according to target mapped cache relationship, the targeted attitude Data can be the every frame bone information converting of animation (can be matrix or quaternary number).Optionally, the embodiment is slow by animation Deposit system (Animation Cache System) establishes the first sub-goal in target animation information in target storage position Animation information and the target mapping relations of targeted attitude caching, the target mapped cache relationship make the first sub-goal animation information There is one-to-one relationship with targeted attitude, wherein the first sub-goal animation information may include the input operation of user, animation Playback progress, the animation for participating in fusion etc. can cache according to target mapping relations and quickly find target by tabling look-up and move Make corresponding targeted attitude.
Step S206 is determined in the second moment the second sub-goal animation information associated with virtual objects and the first specific item Mark animation information is corresponding, and control virtual objects are targeted attitude in the posture for the movement that the second moment executed.
In the technical solution that above-mentioned steps S206 of the present invention is provided, determined at target animation according to target animation information In stable state, the target mapping relations caching of the first sub-goal animation information and targeted attitude in target animation information is established Later, it determines in the second moment the second sub-goal animation information associated with virtual objects and the first sub-goal animation information phase Corresponding, control virtual objects are targeted attitude in the posture for the movement that the second moment executed.
At the time of second moment of the embodiment is after the first moment, the second moment associated with virtual objects second Sub-goal animation information and the first sub-goal animation information are corresponding, can be at the second moment associated with virtual objects Two sub-goal animation informations are identical with the first sub-goal animation information, for example, user inputs identical input operation, animation play It is identical to identical progress, the animation for participating in fusion, then it can determine the posture for the movement that virtual objects executed at the second moment For targeted attitude, that is, if the input operation of player, animation play progress is consistent, it is identical to participate in the animation of fusion, it is stable The posture that animation finally shows uniquely determines, and can directly obtain from caching, to skipped completely to target action Calculating process, for example, can directly skip animation tree update and animation data sample interpolation process, do not influence animation tree/ In the case where animation figure complexity and syncretizing effect, to significantly optimize the speed of service of animation system, in more people with screen In the case of available better effect of optimization, do not influence the design of animation tree/animation figure completely, do not have to cartoon making process yet Have an impact.
In this embodiment, caching system can not cache the data of all animations, but can stablize the animation reappeared Data can cache, so as to avoid data buffer storage explosion the problem of.In actual play, it is most walk, run, jump Movement can stablize reproduction.After stating method in use, the performance of animation system can be obviously improved.
Above-mentioned steps S202 to step S206 through the invention, it is associated with virtual objects at the first moment using obtaining Target animation information, wherein target animation information includes the information of the target animation merged by multiple first animations, Target animation is for generating the corresponding targeted attitude of target action that virtual objects execute in virtual scene;According to target animation Information determines that target animation is in stable state, establishes the first sub-goal animation information and targeted attitude in target animation information Target mapping relations caching;It determines in the second moment the second sub-goal animation information associated with virtual objects and the first son Target animation information is corresponding, and control virtual objects are targeted attitude in the posture for the movement that the second moment executed, wherein second At the time of moment is after the first moment.That is, through target animation information in reproducible situation, to virtual objects Current posture is cached, and in the case where subsequent appearance same animation information, calls directly targeted attitude, and does not have to weight New to calculate, smaller computing cost has reached the technical effect for improving the efficiency handled animation information, has solved to dynamic The technical issues of drawing the low efficiency that information is handled.
As an alternative embodiment, the first sub-goal animation information includes following at least one: object run Information, currently playing progress and multiple first animations, wherein object run is acted for controlling virtual objects performance objective, when Preceding playback progress is determined by the play time and playback rate of target animation.
In this embodiment, the first sub-goal animation information and targeted attitude are cached with target mapping relations, Ke Yiyong According to target mapping relations cache lookup to targeted attitude, which may include the information of object run, the target Operation can exist for the input operation for controlling the movement of virtual objects performance objective, currently playing progress for target animation The playback progress at the first moment can determine by the play time and playback rate of target animation, the first sub-goal animation Information can also be multiple first animations of participation fusion.
The target mapping relations caching of the first sub-goal animation information and targeted attitude in target animation information is established, In, can be Value=f (input, clips, phase), wherein Value can be used to indicate that targeted attitude, and f () can be with For indicating target mapping relations, input can be used to indicate that the information of object run, and phase, which can be used to indicate that, currently to be broadcast Degree of putting into.
Optionally, which, which introduces time variable, can calculate broadcasting in conjunction with animation play time and playback rate Progress.At the time of second moment is after the first moment, second is being determined by the play time and playback rate of target animation When the playback progress at moment, in the case where target action is acyclic movement, for example, target action is attack, then obtain Take the target product between the second moment and the playback rate of the first moment goal discrepancy and target animation between the two;Obtain target Target quotient between the long-pending and length of target animation;Obtain first of target quotient and target animation between currently playing progress With;By target value and first and between minimum value, be determined as the playback progress at the second moment, following formula tables can be passed through Show:
Phase1=min (phase0+v* (t1-t0)/duration, 1.0), wherein phase1 can be used to indicate that The playback progress at two moment, for phase0 for indicating currently playing progress, v can be used to indicate that the playback rate of target animation, T1 can be used to indicate that for the second moment, and t0 can be used to indicate that for the first moment, and duration can be used to indicate that target animation Length, 1.0 be pre-set target value.Wherein, min operation is the value in order to avoid phase1 greater than 1, thus Phase1 Value is between [0,1].
In this embodiment, circulation action is to continue to play from the beginning after finishing, for example, dynamic for walking Work, running movement etc..In the case where target action is circulation action, the second moment and the first moment mesh between the two are obtained Target product between mark difference and the playback rate of target animation;Obtain the target quotient between target product and the length of target animation; The currently playing progress of acquisition target quotient and target animation the second He between the two;To second and according to target value remainder, obtain To the first value;First value is determined as the first playback progress, can be indicated by following formula:
Phase1=(phase0+v* (t1-t0)/duration) mod1.0, wherein phase1 can be used to indicate that second The playback progress at moment, phase0 can be used to indicate that currently playing progress, and v can be used to indicate that the broadcasting speed of target animation Rate, t1 is for indicating for the second moment, and t0 can be used to indicate that for the first moment, and duration can be used to indicate that the length of target animation Degree, target value 1.0.
For example, target animation is circulation animation, and length is 2 seconds (duration=2), and playback rate is 1 (v= 1), most start to play (phase0=0) since 0.Then 3 (t1-t0=3) animation play progress after the second are as follows: Phase1=(0+1* 3/2) mod1.0=1.5mod1.0=0.5, that is, animation play progress is just 0.5 after 3 seconds.
The playback progress for determining for the second moment by the above method, in the second moment target behaviour associated with virtual objects The information of work, animation play progress, the animation for participating in fusion, respectively with the information of buffered object run, currently playing Under progress and the identical situation of multiple first animations, virtual objects are target appearance in the posture for the movement that the second moment executed State.
It, can in target animation information and the corresponding targeted attitude of corresponding target action after introducing time variable Any moment of reproduction can also be with by the first sub-goal animation information and targeted attitude of caching incision animation play process Original workflow management animation is used at any one time.Since the information of object run, currently playing progress, time, participation are melted The first animation closed all completely saves, and caching not will lead to the performance and state switching of animation system whether switching, thus Improve the efficiency handled animation information.
It should be noted that above-mentioned second moment can be used as the first moment when the time reaching above-mentioned second moment.From Playback rate v, the currently playing progress phase0 of above-mentioned target animation can be obtained in the engine of animation system, target animation Length duration, current time t0.The embodiment introduce time variable t, time variable t relative to entire target animation and Speech, Value=f (input, clips, phase) can be expressed as Value=f (input, t, clips).The embodiment passes through Introduce Stability Assessment function and time variable, it is ensured that data cached validity and smooth transition.
As an alternative embodiment, step S204, establishes the first sub-goal animation letter in target animation information The step of target mapping relations of breath and targeted attitude caching includes: the mesh that the first sub-goal animation is determined as to target key value pair Key is marked, targeted attitude is determined as to the target value of target key value pair.
It in this embodiment, can be with when establishing the first sub-goal animation information and targeted attitude target mapping relations and caching According to information, the currently playing progress of target animation, multiple first animations and the target of the form storage object run of key-value pair Posture.The information of object run, the currently playing progress of target animation and multiple first animations can be determined as target key value Pair object key (Key), targeted attitude is determined as to the target value (Value) of target key value pair, in this way with virtual objects phase Under associated second sub-goal animation information and the identical situation of the first sub-goal animation information, corresponding mesh can be first found Key is marked, targeted attitude is found by the object key, the posture of the movement executed as virtual objects at the second moment.
As an alternative embodiment, establishing the first sub-goal animation in target animation information in step S204 Before information and the target mapping relations of targeted attitude caching, this method further include: determine for merging each of target animation The integration percentage of first animation, remains unchanged in the target time period, determines that target animation is in stable state, wherein target Animation information includes each first animation.
In this embodiment, in the target for the first sub-goal animation information and targeted attitude established in target animation information Before mapping relations caching, it is thus necessary to determine that whether target animation is in stable state, that is, determining whether animation system is in steady Determine state.The integration percentage for merging the first animation of each of target animation is obtained, the integration percentage namely animation melt power Weight.Judge whether the integration percentage for participating in the first animation of each of fusion remains unchanged in the target time period.If it is judged that The integration percentage of each first animation remains unchanged in the target time period, it is determined that and target animation is in stable state, for example, For the animation attacked when running, the integration percentage of the animation of race is 1/3, and the integration percentage of the animation of attack is 2/3, if The integration percentage 1/3 of the animation run in target time section, the integration percentage 2/3 of the animation of attack remain unchanged, it is determined that mesh Mark animation is in stable state, then the target of the first sub-goal animation information and targeted attitude established in target animation information is reflected Relationship caching is penetrated, in the second moment the second sub-goal animation information associated with virtual objects and the first sub-goal animation letter Manner of breathing is in the case where, and virtual objects are targeted attitude in the posture for the movement that the second moment executed, to skipped completely to mesh The calculating process of mark movement, significantly optimizes the speed of service of animation system, improves the efficiency handled animation information.
As an alternative embodiment, in the first sub-goal animation information and target established in target animation information When the target mapping relations caching of posture, the processing method of the animation information further includes following one: being cached according to target frame rate The bone matrix of each animation frame of target animation;Determine that the difference between targeted attitude and the posture of last time caching is greater than the first mesh Mark threshold value, caching of target posture;Target associated with the currently playing progress of target animation is determined from multiple storage locations Storage location, and the targeted attitude by virtual objects in currently playing progress, caching to target storage position, wherein each Storage location is used for posture of the cached virtual object in playback progress associated with each storage location, and each adjacent two The spacing between the corresponding animation frame of posture that storage location allows to store is greater than the second targets threshold.
In this embodiment, dynamic according to each of target frame rate caching of target animation in the case where animation system is stablized The bone matrix for drawing frame, thus can thoroughly skip the expense of animation matrix interpolation.Wherein, target frame rate namely animation frame Rate, animation frame per second is higher, and animation quality is higher, and corresponding animation volume is bigger, otherwise animation volume is with regard to smaller.It can root According to determining the characteristics of actual play, it can generally set target frame rate to or so 30 frames/second, if to movement quality requirements It is relatively high, then target frame rate can be set as to 60 frames/second.
Optionally, the difference between the data for the posture that the data of targeted attitude and last time cache is greater than first object threshold value In the case where, the data of caching of target posture, to avoid data excessively intensive.Optionally, the data of caching are that bone updates Result.In actual play, the possible difference of the data that bone updates twice is very small, if all cached, can be not intended to Justice and space is caused to waste, the embodiment can detecte targeted attitude data and last time caching posture data between Difference, difference be greater than first object threshold value in the case where, the data of caching of target posture.Optionally, if current time with it is upper The time difference when data of the posture of secondary caching is smaller, it may be considered that the data of targeted attitude and the posture of last time caching Difference between data is smaller, can not have to cache it, to maximumlly be stored using memory space effective Data optimize renewal speed.
Optionally, which can also allocate spatial cache in advance, so that data cached update rapidly.In advance Enough storage locations are distributed, which can be bucket (bucket).Data cached gradually built when engine-operated It is vertical, as soon as it is cached into corresponding storage location, each storage location is for caching when that data cached can occur Posture of the virtual objects in playback progress associated with each storage location, and each adjacent two storage location allows to store The corresponding animation frame of posture between spacing be greater than the second targets threshold, thus make storage data dispersion, avoid data mistake In intensive.The embodiment is determined currently playing with target animation for currently playing progress from multiple storage locations The associated target storage position of progress, and the targeted attitude by virtual objects in currently playing progress, caching to target are deposited Storage space is set, and can be updated to storing data in target storage position.
As an alternative embodiment, this method further includes following one: determining that currently playing progress is broadcast with first Difference between degree of putting into abandons targeted attitude of the virtual objects in currently playing progress in third targets threshold, wherein First playback progress is the playback progress of target storage position target animation corresponding to the upper posture once stored;Determination is worked as Difference between preceding playback progress and the second playback progress abandons virtual objects in currently playing progress in the 4th targets threshold When targeted attitude, wherein the second playback progress be the next storage location adjacent with target storage position allow store The minimum playback progress of target animation corresponding to posture.
In this embodiment, in the case where animation system is in stable state, can not have to all playback progresss Corresponding targeted attitude is cached, if the first playback progress is target storage position corresponding to the upper posture once stored Target animation playback progress, then the difference between currently playing progress and the first playback progress is in third targets threshold In the case where, targeted attitude of the virtual objects in currently playing progress is abandoned, can be played in currently playing progress with first In the lesser situation of time difference between progress, the targeted attitude of virtual objects does not have significant change, then can abandon void The data of quasi- targeted attitude of the object in currently playing progress, that is, the not mesh to virtual objects in currently playing progress The data of mark posture are cached;If the second playback progress is that the next storage location adjacent with target storage position allows The minimum playback progress of target animation corresponding to the posture of storage, the difference between currently playing progress and the second playback progress In the case that value is in the 4th targets threshold, that is, the data of the corresponding targeted attitude of currently playing progress can be close to adjacent Next storage location allows the attitude data stored, can also abandon targeted attitude of the virtual objects in currently playing progress.
For example, the structure of caching can be the multiple buckets for having allocated non-uniform time spacing in advance, animation play duration It is 0.0 (time 0.0*0.6=0.00) and 0.001 (time 0.001*0.6=for 0.6S, animation play progress phase 0.0006) data of two postures correspond to the same bucket, because time interval is too short, the posture of virtual objects is not had Significant change, it is not necessary to all be cached, can give up to fall one, strategy can be set to retain the left side (being also possible to the right) The data of posture, the embodiment can give up to fall the data for the posture that playback progress is 0.001.Similarly, animation play progress Phase is the data of the posture of 0.099 (time 0.099*0.6=0.0594) because being too near to the adjacent of corresponding bucket The right side (0.060) of bucket, also can give up to fall, so that the data of caching is avoided excessively to concentrate, so that the expense of memory space is reduced, Reach preferably caching effect.
As an alternative embodiment, target animation information includes at least one of: for controlling virtual objects The information of the object run of performance objective movement;The identification information of multiple first animations;The integration percentage of each first animation;Mesh Mark the length of animation;The currently playing progress of target animation;The playback rate of target animation.
In this embodiment, target animation information may include the target behaviour for controlling the movement of virtual objects performance objective The information of work, for example, the row of virtual objects can be converted to by the operational order of the inputs such as keyboard, controller, touch screen The instruction such as walk, jump, attacking, no limitations are hereby intended;Target animation information can also include the mark of multiple first animations Information, the identification information can be the title of the first animation, pass through multiple first animation title forms animation list of file names;Target is dynamic Drawing information can also include integration percentage of each first animation when merging target animation, and target animation information can also include The length of target animation, the length can be the broadcasting total duration of target animation;Target animation information can also be dynamic including target The currently playing progress drawn, to be determined by the play time and playback rate of target animation;Target animation information is also It may include the playback rate of target animation, can be the frame number of the animation frame of broadcasting per second.
As an alternative embodiment, step S204, determines that target animation is according to target animation information and stablizes State, the target mapping relations of the first sub-goal animation information and targeted attitude established in target animation information, which cache, includes: Determine that target animation is in stable state according to target animation information, and determine that target cache position is uncached to have the first sub-goal Animation information and targeted attitude establish the first sub-goal animation information in the target animation information that target cache position caches It is cached with the target mapping relations of targeted attitude.
In this embodiment, it in the case where target animation plays pendulum, needs to update according to original animation Method is updated, not data cached after update.Optionally, the target carried out to virtual objects in target animation information is responded Operation, updates the logic of animation tree or animation figure, updated animation tree or animation figure be used for that determination to be merged multiple the The integration percentage of two animations and each second animation updates that is, determining the ratio which animation is merged, merged Animation tree or animation figure;According to animation tree or animation figure update as a result, the animation of update to be merged is found, according to playback progress Bone attitude matrix is sampled, row interpolation of going forward side by side obtains final bone transformation matrix.According to bone transformation matrix, bone is updated Tree, and then according to bone tree, covering, to draw virtual objects in virtual scene be in present condition.
Optionally, it obtains in the first moment target animation information associated with virtual objects, according to target animation information Determine that target animation is in stable state, and determine that target cache position is uncached to have the first sub-goal animation information and corresponding Targeted attitude, that is, target cache position is without target animation corresponding data cached, then that foundation is cached in target cache position The target mapping relations of the first sub-goal animation information and targeted attitude in information cache, in the second moment and virtual objects Under associated second sub-goal animation information and the identical situation of the first sub-goal animation information, by virtual objects at second The posture for carving the movement executed is determined as targeted attitude.Wherein, target cache position can be cache pool, not have in cache pool It in the case where related data, then needs to update animation, but only will be updated once, cache pool is buffered in after having updated In, in case next time directly uses.
And for the second moment after the first moment, if the second sub-goal animation information associated with virtual objects It is identical with the first sub-goal animation information, for example, for control virtual objects performance objective movement object run be it is identical, Due to the buffered data of corresponding targeted attitude in target cache position, that is, target cache position had it is corresponding It is data cached, then do not have to this time update animation again, the posture for the movement that can directly execute virtual objects at the second moment is true It is set to buffered corresponding targeted attitude.That is, can directly make if buffered related data in cache pool With buffered data.
As an alternative embodiment, establishing the first sub-goal animation in target animation information in step S204 After information and the target mapping relations of targeted attitude caching, this method further include: determine the data of target cache position storage Shared capacity is more than target capacity, and is not used in targeted attitude more than the object time, and the first sub-goal animation information is deleted And targeted attitude.
In this embodiment, in the target for the first sub-goal animation information and targeted attitude established in target animation information After mapping relations caching, if capacity shared by the data of target cache position storage has been more than target capacity, and in target Posture is more than in object time not used situation, that is, the total size of the data of target cache position caching has been more than specified Size, and the data of targeted attitude be it is least common data cached, then delete the first sub-goal animation information and corresponding mesh Mark the data of posture.It optionally, can be with if capacity shared by the data of target cache position storage is less than target capacity Without deleting the data of the first sub-goal animation information and targeted attitude, that is, if the data institute of target cache position storage The capacity accounted for is less than target capacity, even if targeted attitude is not used more than the object time, can also not have to carry out above-mentioned deletion Operation.
The embodiment can be using unused recently algorithm (Least Recently Used, referred to as LRU), and dynamic is clear Fall the data being of little use, to vacate memory space in time, to store the data of other reproducible target animation information and posture.
In the related art, caching technology typically just simply caches skeleton data.In animation fusion, bone Data possible values is very more, if all caching will lead to data cached explosion, if limiting cache size, cache hit It will appear big problem, eventually lead to the data failure of caching, and these technologies can not also optimize the update of animation tree/figure and open Pin.And the embodiment directly obtains finally from the first sub-goal animation information (the input operation of user and animation play progress etc.) Targeted attitude (skeletal form result) skipped animation tree or animation figure expense completely in the case where not influencing logic.? After introducing animation Stability Assessment function, data cached validity is very high, is not in caching explosion issues, and in not shadow In the case where ringing cartoon making, the efficiency handled animation information is improved, improves the operational efficiency of animation system, especially In the case of it is more than the same screen animation quantity, optimize more obvious.
Technical solution of the present invention is illustrated below with reference to preferred embodiment.Specifically with dynamic in animation system The processing method for drawing information is illustrated.
The animation system of the embodiment can be game animation system, can receive the input operation of game player, control The system that game role in scene of game realizes various movement displayings.Game role in scene of game can be built-in limited more A animation, animation system can be operated according to the input of game player, based on built-in limited multiple animations according to certain ratio Example merged, transition, to obtain the movement in various situations.Wherein, animation fusion, transition can be along between animation Interpolation, can be the interpolation for participating in the frame data of animation of fusion, and frame data can be quaternary number.This calculating is that every frame all needs It to be done, with increasing for the animation for participating in fusion, the expense of animation fusion can linear increase.Meanwhile the expense of animation fusion It also can be to the linear relevant relationship of the quantity of the game role in scene of game.Thus, optimize the efficiency of animation system, for Game is of great significance for the more game of same screen game role.
The embodiment can optimize the efficiency of animation system.In the complexity that does not influence animation tree or animation figure and In the case where syncretizing effect, it can significantly optimize the speed of service of animation system, this situation more in same screen game role Under effect of optimization become apparent, will not influence the design of animation tree or animation figure, cartoon making process will not be influenced.
Fig. 3 is a kind of schematic diagram of the expense of animation system according to an embodiment of the present invention.As shown in figure 3, being played to game The expense that the input operation of family is handled accounts for 3%, and the expense for updating bone accounts for 10%, calculates the weight of animation tree or animation figure Expense account for 18%, the expense of animation interpolation accounts for 69%.Thus, the efficiency of Yao Tisheng animation system, in addition to reduce to animation Except the expense that the weight of tree or animation figure is calculated, with greater need for the expense for reducing animation interpolation.
Opposite since the operation of game player is that have repeatability, the animation performance of game role is also to have to repeat Property.If finding the association between this repeatability, so that it may using the principle of caching, record the operation once occurred Or performance, when same operation occurs, corresponding performance can table look-at obtain, exported, to jump completely Cross calculating process.
Fig. 4 is a kind of flow chart of the method for animation caching according to an embodiment of the present invention.As shown in figure 4, this method packet Include following steps:
Step S401 obtains the input operation of game player.
Step S402 judges the corresponding bone of the input operation with game player in animation caching system by animation system Bone matrix whether there is.
Step S403 exists if the input with game player in animation caching system operates corresponding bone matrix, Export bone matrix.
The embodiment determines bone matrix corresponding with the input of game player operation according to the input of game player operation (buffered results) whether there is, if it is present buffered results can be used directly.
But animation system is only abstracted as the input that one receives game player and is operated, export the black of bone matrix Box is inadequate.Due to the presence of animation transition, current animation needs are merged with previous animation.Wherein, animation transition is Refer to that game role when being switched to another animation from an animation, in order to avoid the posture of game role jumps, and draws The pilot process entered, in animation transition period, the posture of game role shows as the fusion of forward and backward movement.With game angle For the movement of color, for game role from static into during movement, game role has the process of an acceleration, the fine arts The movement of this acceleration is not made specially, to realize by the static animation transition to movement.If the animation of front Difference, even then same input operation, bone matrix corresponding with input operation may also be different.
The embodiment is solved the above problems by introducing the Stability Assessment function of time variable and animation system, below it is right It is described in detail.
Fig. 5 is a kind of method of the animation caching of Stability Assessment function for introducing animation system according to embodiments of the present invention Flow chart.As shown in figure 5, method includes the following steps:
Step S501 obtains the input operation of game player.
Step S502 judges the corresponding bone of the input operation with game player in animation caching system by animation system Bone matrix whether there is.
The corresponding bone matrix of the input operation with game player in animation caching system is being judged by animation system With the presence or absence of before, needing to be implemented step S503.
Step S503, the status information of animation system is collected by Stability Assessment function, and the status information for providing collection is The no judgement that can be cached.
In this embodiment, Stability Assessment function can be a component in engine, for collecting the shape of animation system State information provides the judgement whether current state information can cache.
Optionally, the Stability Assessment function of the embodiment can collect effective status information, which can wrap It includes: the list for the animation name that instruction (for example, instruction of running, travel commands etc.), the current participation of the input operation of player are merged, The length of fused animation, the playback progress percentage of fused animation, playback rate of fused animation etc..
The Stability Assessment function of the embodiment determines the current state letter of animation system according to the current state information of collection Whether breath is reproducible.Generally, status information corresponding with circulation repeated action is all stable mostly, for example, when long Between walking, run, crawl, the corresponding status information such as attack, be all stablize it is reproducible.In stablizing animation, ginseng Ratio with the animation merged be it is constant, then its status information and the posture of corresponding game role can cache.
If animation system is in stable state, status information is reproducible, that is, status information and corresponding Posture can be cached.In order to correspond to each posture of game role, in addition to the input operation of player, fusion is participated in Animation except, it is also necessary to determine animation play progress, can set caching mapping relations as f, then:
(input operation input, participates in the animation clips of fusion, animation play progress to the posture Value=f of game role phase)。
The embodiment introduces time variable, in conjunction with animation play time and rate, so that it may calculate above-mentioned animation play Progress.
Optionally, the engine of animation system can obtain the playback rate v of current animation, currently playing progress phase0, Animation length duration, current time t0.
For acyclic movement, the playback progress phase1 at t1 moment can be with are as follows:
Phase1=min (the playback rate v* (t1 moment at moment-t0) of currently playing progress phase0+ current animation/dynamic Draw length duration, 1.0)
For circulation action, the playback progress phase1 at t1 moment are as follows:
Phase1=(playback rate v* (t1 moment at moment-t0)/animation length of currently playing progress p0+ current animation duration)mod1.0。
Thus, the mapping relations of caching are f, and the posture pose of game role is Value, then:
The posture value=f (input operation input, time t, participate in the animation clips of fusion) of model.
In this embodiment it is possible to be cached by key-value, wherein value is the posture (pose) of game role, key It can be status information, wherein all bone information convertings that the posture of game role can be the every frame of animation (can be matrix Or quaternary number).
After introducing the time, caching can be cut at any one time in the process of animation play, can also be any Moment calculates animation using original process.The progress of animation play, time, the animation for participating in merging all are completely to save , caching not will lead to the performance and state switching of animation system whether switching.
Optionally, in this embodiment, it in the case where animation system is in stable state, can be cached with certain frame per second The bone matrix of the every frame of animation thus can thoroughly skip the expense of animation matrix interpolation.Wherein, certain frame per second refers to animation frame Rate, animation frame per second is higher, and animation quality is higher, and corresponding animation volume is bigger, conversely, animation volume is with regard to smaller.Caching Frame per second can be determined according to the characteristics of actual play, 30 frames or so can be generally, if to movement quality requirements it is high, Then frame per second can be set as 60.
In the case where frame number is certain, the spacing between the frame of caching is relatively uniform, to avoid data cached excessively collecting In, just there is best effect.The structure of caching can be the bucket for having allocated spacing in advance, data cached to be stored in bucket, caching Data be gradually established when engine-operated, as soon as cached when that data cached can occur to corresponding bucket, and The data of excessively intensive posture will be removed.The model attitude at each barrel of one moment of correspondence, the data of the posture of storage exist When updating caching every time, the data of posture is allowed to fall in the side of bucket, it is ensured that there is foot between the corresponding frame of the posture of each caching Enough distances, such effect are best.
Fig. 6 is the schematic diagram of the data cached storage organization of one kind according to an embodiment of the present invention.As shown in fig. 6, such as Fig. 6 Shown, the structure of caching can be the multiple buckets (bucket 1 to bucket 38) for having allocated spacing in advance, when animation play a length of 0.6S, move Drawing playback progress phase is 0.0 (time 0.0*0.6=0.00, corresponding bucket 1) and 0.001 (time 0.001*0.6= 0.0006, fallen in bucket 1) two postures data because time interval is too short, the posture of game role is not had obviously Variation, it is not necessary to all be cached, can give up to fall one, strategy can be set to retain the posture of the left side (being also possible to the right) Data, the embodiment can give up to fall playback progress be 0.001 posture data.Similarly, animation play progress phase is The data of the posture of 0.099 (time 0.099*0.6=0.0594 has been fallen in bucket 3) are because be too near to the right side of bucket 3, meeting The data for getting too close to next bucket 4, also can give up to fall.
Step S504, the input operation of game player, animation play progress respectively broadcast by the input operation with caching and animation Degree of putting into is consistent, then the model attitude that animation finally shows uniquely determines, and can directly obtain from caching.
Fig. 7 is the flow chart according to one of the relevant technologies animation caching method.As shown in fig. 7, this method include with Lower step:
Step S701 obtains the input operation of game player.
Step S702 carries out animation tree or animation figure updates in animation system.
Step S703 carries out animation data sample interpolation in animation system.
Step S704 updates bone in animation system.
Step S705 draws and presents.
Animation system receives the input of player and updates bone as needed, finally draws and is presented to player.
Wherein, step S702 and step S703 is added up, and occupies 87% or more of animation system overhead.
Fig. 8 is a kind of flow chart of animation caching method according to an embodiment of the present invention.As shown in figure 8, this method includes Following steps:
Step S801 obtains the input operation of game player.
Player is input operation instruction by keyboard, controller, is converted to the instruction such as walking, jump, attack of game role.
Step S802 carries out caching assessment in caching system.
By the status information of Stability Assessment function combination animation system, to assess whether the data of current pose can be delayed It deposits, in the case where the data of current pose can cache, it is cached, wherein the status information of animation system can be with Including currently playing animation name, the input operation of game player, ratio of animation play progress, animation fusion etc..The embodiment The state of animation tree or animation figure can also be read, to assess whether current pose can cache.
In this embodiment, animation caches the data (state of animation system for inevitably needing memory buffers to get off The data of information and corresponding posture), therefore have certain memory overhead.In order to maximally utilize memory, and optimize caching The caching of renewal speed, the embodiment uses following strategy:
The spacing of data cached corresponding frame is detected, avoids data cached excessively intensive, the data of caching are used for Bone updates, and in actual play, the possible difference of the data that bone updates twice is very small, if corresponding data all cached Get off, memory space is caused to waste, can detecte the time difference of bone update, cache-time difference is greater than certain value Data;Spatial cache is allocated in advance, and data update rapidly, is determined data cached frame per second, is allocated enough buckets in advance (bucket), then in buffer update, as long as finding corresponding bucket, buffered data are modified;It can adopt With lru algorithm, dynamic falls clearly the data being of little use, subsequent data cached to vacate more space storages.
Step S803, judges whether the bone transformation matrix of caching can be used.
Judge game player input operation, animation play progress respectively with the input operation of caching and animation play progress Unanimously.
Step S804 reads caching.
If the input of game player operates, animation play progress respectively with the input operation of caching and animation play progress Unanimously, then the model attitude that animation finally shows uniquely determines, and can directly obtain from caching, pass through mapping function root According to the input operation of game player, currently playing animation list of file names, time etc., the bone that caching is obtained from target database becomes Change matrix.
Step S805 carries out animation tree or animation figure updates in animation system.
If it is judged that the bone transformation matrix of caching is unavailable, then player's input is responded, animation tree or animation figure are updated Logic, determine the fusion of which animation, integration percentage are how many, to update the state of animation tree or animation figure, and cache Data.For animation transition, transit time can also be updated.
Step S806 carries out animation data sample interpolation in animation system.
According to animation tree or animation figure update as a result, find the animation of update to be merged, bone is sampled according to playback progress Bone attitude matrix, row interpolation of going forward side by side obtains final bone transformation matrix, and then updates data cached.
Step S807 updates bone in animation system.
After carrying out animation data sample interpolation, or after reading caching, according to bone attitude matrix, bone is updated Tree.
Step S808 draws and presents.
According to bone tree, covering draws game role.
The embodiment, when caching is available, can directly skip step S805 and step after being added to caching system The process of S806, greatly improves efficiency.
Caching system can not cache all status informations, but as long as being to stablize replicable status information, be ok It is cached.In actual play, it is most walk, run, beat work can stablize reproduction.It is cached using animation in animation Afterwards, animation system has 45% or more performance boost.
In the related art, caching technology typically just simply caches skeleton data.In animation fusion, bone Data possible values is very more, if all caching will lead to data cached explosion, if limiting cache size, cache hit It will appear big problem, eventually lead to the data failure of caching, and these technologies can not also optimize the update of animation tree/figure and open Pin.And the embodiment directly obtains final skeletal form as a result, in not shadow from the input of user operation and animation play time In the case where ringing logic, animation tree or animation figure expense have been skipped completely.It is data cached after introducing animation Stability Assessment function Validity it is very high, be not in caching explosion issues, and in the case where not influencing cartoon making, improve animation system The operational efficiency of system optimizes more obvious especially for the situation more than same screen animation quantity.
It should be noted that step shown in the flowchart of the accompanying drawings can be in such as a group of computer-executable instructions It is executed in computer system, although also, logical order is shown in flow charts, and it in some cases, can be with not The sequence being same as herein executes shown or described step.
The embodiment of the invention also provides a kind of processing units of animation information.It should be noted that the embodiment is dynamic The processing unit of picture information can be used for executing the processing method of the animation information of the embodiment of the present invention.
Fig. 9 is a kind of schematic diagram of the processing unit of animation information according to an embodiment of the present invention.As shown in figure 9, this is dynamic The processing unit 900 for drawing information includes: acquiring unit 10, first processing units 20 and the second processing unit 30.
Acquiring unit 10, for obtaining in the first moment target animation information associated with virtual objects, wherein target Animation information includes the information of the target animation merged by multiple first animations, and target animation is virtual right for generating As the corresponding targeted attitude of the target action executed in virtual scene.
First processing units 20 establish target for determining that target animation is in stable state according to target animation information The target mapping relations of the first sub-goal animation information and targeted attitude in animation information cache;
The second processing unit 30, for determining in the second moment the second sub-goal animation information associated with virtual objects Corresponding with the first sub-goal animation information, control virtual objects are targeted attitude in the posture for the movement that the second moment executed, Wherein, at the time of the second second moment of sub-goal animation information is after the first moment.
Optionally, the first sub-goal animation information includes following at least one: the information of object run, currently playing progress With multiple first animations, wherein object run passes through target for controlling the movement of virtual objects performance objective, currently playing progress The play time and playback rate of animation determine.
Optionally, first processing units 20 comprise determining that module, for the first sub-goal animation to be determined as target key value Pair object key, targeted attitude is determined as to the target value of target key value pair.
Optionally, the device further include: determination unit, in the first sub-goal animation established in target animation information Before information and the target mapping relations of targeted attitude caching, the fusion for merging the first animation of each of target animation is determined Ratio is kept in the target time period, determines that target animation is in stable state, wherein target animation information includes each One animation.
Optionally, which further includes following one: the first cache unit, in established in target animation information When one sub-goal animation information and the target mapping relations of targeted attitude cache, according to each of target frame rate caching of target animation The bone matrix of animation frame;Second cache unit, in the first sub-goal animation information for establishing in target animation information and When the target mapping relations caching of targeted attitude, determine that the difference between targeted attitude and the posture of last time caching is greater than first object Threshold value, caching of target posture;Third cache unit, in the first sub-goal animation information for establishing in target animation information and When the target mapping relations caching of targeted attitude, determination is related to the currently playing progress of target animation from multiple storage locations The target storage position of connection, and the targeted attitude by virtual objects in currently playing progress, caching to target storage position, In, each storage location is used for posture of the cached virtual object in playback progress associated with each storage location, and every The spacing between the corresponding animation frame of posture that two neighboring storage location allows to store is greater than the second targets threshold.
Optionally, which further includes following one: the first discarding unit, for determining in currently playing progress and first Difference between playback progress abandons targeted attitude of the virtual objects in currently playing progress in third targets threshold, In, the first playback progress is the playback progress of target storage position target animation corresponding to the upper posture once stored;The Two discarding units, for determining that the difference between currently playing progress and the second playback progress in the 4th targets threshold, abandons Targeted attitude of the virtual objects in currently playing progress, wherein under the second playback progress is adjacent with target storage position The minimum playback progress of target animation corresponding to the posture that one storage location allows to store.
Optionally, target animation information includes at least one of: for controlling the mesh of virtual objects performance objective movement Mark the information of operation;The identification information of multiple first animations;The integration percentage of each first animation;The length of target animation;Mesh Mark the currently playing progress of animation;The playback rate of target animation.
Optionally, cache unit 20 includes: the 4th cache module, for being determined at target animation according to target animation information It in stable state, and determines that target cache position is uncached and has the first sub-goal animation information and targeted attitude, establish in target The target mapping relations caching of the first sub-goal animation information and targeted attitude in the target animation information of cache location caching.
Optionally, device further include: unit is deleted, in the first sub-goal animation established in target animation information After information and the target mapping relations of targeted attitude caching, determine that capacity shared by the data of target cache position storage is more than Target capacity, and be not used in targeted attitude more than the object time, delete the first sub-goal animation information and targeted attitude.
In this embodiment, it is obtained by acquiring unit 10 and is believed in the first moment target animation associated with virtual objects Breath, wherein target animation information includes the information of the target animation merged by multiple first animations, and target animation is used In the corresponding targeted attitude of target action that generation virtual objects execute in virtual scene, determined by first processing units 20 Target animation is in stable state, and the target of the first sub-goal animation information and targeted attitude established in target animation information is reflected Penetrate relationship caching;It is determined by the second processing unit 30 in the second moment the second sub-goal animation letter associated with virtual objects Breath is corresponding with the first sub-goal animation information, and control virtual objects are target appearance in the posture for the movement that the second moment executed State, wherein at the time of the second second moment of sub-goal animation information is after the first moment.That is, passing through target animation In reproducible situation, the posture current to virtual objects caches information, in the same animation information of subsequent appearance In the case of, call directly targeted attitude, and do not have to recalculate, smaller computing cost, reached raising to animation information into The technical effect of the efficiency of row processing, solves the technical issues of low efficiency handled to animation information.
The embodiments of the present invention also provide a kind of storage medium, computer program is stored in the storage medium, wherein The computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to: USB flash disk, read-only memory (Read- Only Memory, referred to as ROM), it is random access memory (Random Access Memory, referred to as RAM), mobile hard The various media that can store computer program such as disk, magnetic or disk.
The embodiments of the present invention also provide a kind of electronic device, including memory and processor, stored in the memory There is computer program, which is arranged to run computer program to execute the step in any of the above-described embodiment of the method Suddenly.
Optionally, above-mentioned electronic device can also include transmission device and input-output equipment, wherein the transmission device It is connected with above-mentioned processor, which connects with above-mentioned processor.
Obviously, those skilled in the art should be understood that each module of the above invention or each step can be with general Computing device realize that they can be concentrated on a single computing device, or be distributed in multiple computing devices and formed Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored It is performed by computing device in the storage device, and in some cases, it can be to be different from shown in sequence execution herein Out or description the step of, perhaps they are fabricated to each integrated circuit modules or by them multiple modules or Step is fabricated to single integrated circuit module to realize.In this way, the present invention is not limited to any specific hardware and softwares to combine.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.It is all within principle of the invention, it is made it is any modification, etc. With replacement, improvement etc., should all be included in the protection scope of the present invention.

Claims (12)

1. a kind of processing method of animation information characterized by comprising
Obtain in the first moment target animation information associated with virtual objects, wherein the target animation information include by The information for the target animation that multiple first animations are merged, the target animation is for generating the virtual objects in void The corresponding targeted attitude of target action executed in quasi- scene;
It determines that the target animation is in stable state according to the target animation information, establishes in the target animation information First sub-goal animation information and the target mapping relations of targeted attitude caching;
It determines dynamic in the second moment the second sub-goal animation information associated with the virtual objects and first sub-goal Draw that information is corresponding, the posture for controlling the movement that the virtual objects executed at second moment is the targeted attitude, In, at the time of second moment is after first moment.
2. the method according to claim 1, wherein the first sub-goal animation information includes following at least one Kind: the information of object run, currently playing progress and the multiple first animation, wherein the object run is for controlling institute It states virtual objects and executes the target action, the play time and broadcasting speed that the currently playing progress passes through the target animation Rate determines.
3. the method according to claim 1, wherein first specific item established in the target animation information The step of mark animation information and the target mapping relations of targeted attitude caching, comprising:
The first sub-goal animation is determined as to the object key of target key value pair, the targeted attitude is determined as target key value Pair target value.
4. the method according to claim 1, wherein in first son established in the target animation information Before the step of target animation information and the target mapping relations of the targeted attitude cache, the method also includes:
It determines the integration percentage for merging each of described target animation first animation, keeps in the target time period not Become, determine that the target animation is in the stable state, wherein the target animation information includes each described first dynamic It draws.
5. the method according to claim 1, wherein in the first sub-goal established in the target animation information When animation information and the target mapping relations of the targeted attitude cache, the method also includes following one:
The bone matrix of each animation frame of the target animation is cached according to target frame rate;
It determines that the difference between the targeted attitude and the posture of last time caching is greater than first object threshold value, caches the target appearance State;
Target storage position associated with the currently playing progress of the target animation is determined from multiple storage locations, and will The targeted attitude of the virtual objects in the currently playing progress, caching to the target storage position, wherein every A storage location is used to cache appearance of the virtual objects in playback progress associated with each storage location State, and storage location described in each adjacent two allows the spacing between the corresponding animation frame of posture of storage to be greater than the second target threshold Value.
6. according to the method described in claim 5, it is characterized in that, the method also includes following one:
The difference between the currently playing progress and the first playback progress is determined in third targets threshold, is abandoned described virtual The targeted attitude of the object in the currently playing progress, wherein first playback progress is that the target stores position Set the playback progress of the target animation corresponding to the upper posture once stored;
The difference between the currently playing progress and the second playback progress is determined in the 4th targets threshold, is abandoned described virtual The targeted attitude of the object in the currently playing progress, wherein second playback progress is to store with the target The minimum playback progress of the target animation corresponding to the posture that the adjacent next storage location in position allows to store.
7. the method according to claim 1, wherein the target animation information includes at least one of:
The information for executing the object run of the target action for controlling the virtual objects;
The identification information of the multiple first animation;
The integration percentage of each first animation;
The length of the target animation;
The currently playing progress of the target animation;
The playback rate of the target animation.
8. method as claimed in any of claims 1 to 7, which is characterized in that described to be believed according to the target animation Breath determines that the target animation is in stable state, establishes the first sub-goal animation information and institute in the target animation information The step of stating the target mapping relations caching of targeted attitude, comprising:
It determines that the target animation is in stable state according to the target animation information, and determines that target cache position is uncached There are the first sub-goal animation information and the targeted attitude, it is dynamic to establish the target cached in the target cache position Draw the target mapping relations caching of the first sub-goal animation information and the targeted attitude in information.
9. according to the method described in claim 8, it is characterized in that, in first son established in the target animation information After the step of target animation information and the target mapping relations of the targeted attitude cache, the method also includes:
It determines that capacity shared by the data of the target cache position storage is more than target capacity, and is more than in the targeted attitude Object time is not used, and deletes the first sub-goal animation information and the targeted attitude.
10. a kind of processing unit of animation information characterized by comprising
Acquiring unit, for obtaining in the first moment target animation information associated with virtual objects, wherein the target is dynamic The information that information includes the target animation merged by multiple first animations is drawn, the target animation is described for generating The corresponding targeted attitude of the target action that virtual objects execute in virtual scene;
First processing units establish institute for determining that the target animation is in stable state according to the target animation information State the target mapping relations caching of the first sub-goal animation information and the targeted attitude in target animation information;
The second processing unit, for determining in the second moment the second sub-goal animation information associated with the virtual objects and The first sub-goal animation information is corresponding, and the posture for controlling the movement that the virtual objects executed at second moment is The targeted attitude, wherein at the time of second moment is after first moment.
11. a kind of storage medium, which is characterized in that be stored with computer program in the storage medium, wherein the computer Program is arranged to execute method described in any one of claim 1 to 9 when operation.
12. a kind of electronic device, including memory and processor, which is characterized in that be stored with computer journey in the memory Sequence, the processor are arranged to run the computer program to execute side described in any one of claim 1 to 9 Method.
CN201910549094.0A 2019-06-24 2019-06-24 Method and device for processing animation information, storage medium and electronic device Active CN110264554B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910549094.0A CN110264554B (en) 2019-06-24 2019-06-24 Method and device for processing animation information, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910549094.0A CN110264554B (en) 2019-06-24 2019-06-24 Method and device for processing animation information, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN110264554A true CN110264554A (en) 2019-09-20
CN110264554B CN110264554B (en) 2023-12-19

Family

ID=67920726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910549094.0A Active CN110264554B (en) 2019-06-24 2019-06-24 Method and device for processing animation information, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN110264554B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110879738A (en) * 2019-11-19 2020-03-13 北京云测信息技术有限公司 Method and device for displaying operation steps and electronic equipment
CN111768474A (en) * 2020-05-15 2020-10-13 完美世界(北京)软件科技发展有限公司 Animation generation method, device and equipment
CN112316422A (en) * 2020-11-27 2021-02-05 上海米哈游天命科技有限公司 Clothing change method and device, electronic equipment and storage medium
CN113318439A (en) * 2021-06-17 2021-08-31 网易(杭州)网络有限公司 Processing method and device of starting animation, processor and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103413344A (en) * 2013-07-10 2013-11-27 深圳Tcl新技术有限公司 3D frame animation realization method, device and terminal
CN107294838A (en) * 2017-05-24 2017-10-24 腾讯科技(深圳)有限公司 Animation producing method, device, system and the terminal of social networking application
US20170358118A1 (en) * 2016-06-12 2017-12-14 Apple Inc. Animation Techniques for Mobile Devices
CN108416830A (en) * 2018-02-26 2018-08-17 网易(杭州)网络有限公司 Animation display control method, device, equipment and storage medium
CN108619720A (en) * 2018-04-11 2018-10-09 腾讯科技(深圳)有限公司 Playing method and device, storage medium, the electronic device of animation
CN109806596A (en) * 2019-03-20 2019-05-28 网易(杭州)网络有限公司 Game picture display methods and device, storage medium, electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103413344A (en) * 2013-07-10 2013-11-27 深圳Tcl新技术有限公司 3D frame animation realization method, device and terminal
US20170358118A1 (en) * 2016-06-12 2017-12-14 Apple Inc. Animation Techniques for Mobile Devices
CN107294838A (en) * 2017-05-24 2017-10-24 腾讯科技(深圳)有限公司 Animation producing method, device, system and the terminal of social networking application
CN108416830A (en) * 2018-02-26 2018-08-17 网易(杭州)网络有限公司 Animation display control method, device, equipment and storage medium
CN108619720A (en) * 2018-04-11 2018-10-09 腾讯科技(深圳)有限公司 Playing method and device, storage medium, the electronic device of animation
CN109806596A (en) * 2019-03-20 2019-05-28 网易(杭州)网络有限公司 Game picture display methods and device, storage medium, electronic equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
AKEVER: "Cocos2d-x(1) 内存:缓存机制(预加载与重复使用)&&对象池机制(可回收与重复使用)&&对象池实现", pages 1 - 8, Retrieved from the Internet <URL:https://www.cnblogs.com/akever/articles/Cache_.html> *
WINCO: "Cocos2d-x 缓存机制:预加载与重复使用", 《HTTPS://WWW.CNBLOGS.COM/ATONG/P/3363056.HTML》 *
WINCO: "Cocos2d-x 缓存机制:预加载与重复使用", 《HTTPS://WWW.CNBLOGS.COM/ATONG/P/3363056.HTML》, 11 October 2013 (2013-10-11) *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110879738A (en) * 2019-11-19 2020-03-13 北京云测信息技术有限公司 Method and device for displaying operation steps and electronic equipment
CN110879738B (en) * 2019-11-19 2023-05-05 北京云测信息技术有限公司 Operation step display method and device and electronic equipment
CN111768474A (en) * 2020-05-15 2020-10-13 完美世界(北京)软件科技发展有限公司 Animation generation method, device and equipment
CN113744372A (en) * 2020-05-15 2021-12-03 完美世界(北京)软件科技发展有限公司 Animation generation method, device and equipment
CN112316422A (en) * 2020-11-27 2021-02-05 上海米哈游天命科技有限公司 Clothing change method and device, electronic equipment and storage medium
CN112316422B (en) * 2020-11-27 2023-01-13 上海米哈游天命科技有限公司 Clothing change method and device, electronic equipment and storage medium
CN113318439A (en) * 2021-06-17 2021-08-31 网易(杭州)网络有限公司 Processing method and device of starting animation, processor and electronic device
CN113318439B (en) * 2021-06-17 2024-05-28 网易(杭州)网络有限公司 Method and device for processing starting animation, processor and electronic device

Also Published As

Publication number Publication date
CN110264554B (en) 2023-12-19

Similar Documents

Publication Publication Date Title
CN110264554A (en) Processing method, device, storage medium and the electronic device of animation information
US8827812B2 (en) Game device, game device control method, program, and information storage medium
CN108463273A (en) Mobile history based on player carries out the games system etc. of the path finding of non-gaming person role
CN106385408B (en) The instruction of motion state variation, processing method and processing device
US20060003823A1 (en) Dynamic player groups for interest management in multi-character virtual environments
US9457270B2 (en) Level server system for peer-to-peer cooperative games
CN109523621A (en) Loading method and device, storage medium, the electronic device of object
CN103650001B (en) Moving image distribution server, moving image playback device and control method
CN105848743B (en) Information processing unit, information processing system, program, recording medium
US20110124386A1 (en) Game device, method for controlling game device, program, and information storage medium
CN104717573B (en) A kind of generation method of video frequency abstract
KR20130028084A (en) Rendering control apparatus, control method thereof, recording medium, rendering server, and rendering system
CN107899244A (en) A kind of construction method and system of AI models
CN105407992A (en) Image processing program, server device, image processing system, and image processing method
CN110489340A (en) A kind of map balance test method, device, equipment and storage medium
CN110124307A (en) Method of controlling operation thereof and device, storage medium and electronic device
Perez-Liebana et al. Multi-objective tree search approaches for general video game playing
Ahmed et al. A microcell oriented load balancing model for collaborative virtual environments
CN110465086B (en) Game article display method and device and storage medium
CN114344905A (en) Team interaction processing method, device, equipment, medium and program for virtual object
Xing et al. Learning with Generated Teammates to Achieve Type-Free Ad-Hoc Teamwork.
CN111282273B (en) Virtual object display method, device and storage medium
JP2023174714A (en) Program, image generation apparatus, and image generation method
CN112905013A (en) Intelligent agent control method and device, computer equipment and storage medium
CN110545363A (en) Method and system for realizing multi-terminal networking synchronization and cloud server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant