The content of the invention
The present invention provides a kind of animation multiplexing method and system for improving animation development efficiency.
The purpose of the present invention is achieved through the following technical solutions:
A kind of method of animation multiplexing, including:
The pending animation file that user selectes is obtained, the first file is designated as;
Formerly processed attribute and the first file identical animation file is obtained, the second file is designated as;
The time shaft of the second file is applied to the first file.
Further, the .csd files that first file and the second file are write for xml.
Further, the .csd files include object data and the time shaft;The object data at least corresponds to one
The individual attribute.
Further, the time shaft includes frame data, time data and animation list;The animation list includes object
Action, the operation of frame data correspondence animation.
Further, the time shaft includes many sub- axles, and every sub- axle all includes the frame data and time data;
The animation list includes multiple action;Each attribute and a sub- axle correspondence;The time shaft application by the second file
Include in the method for the first file:According to attribute and the mapping relations of sub- axle, the first file acquisition and using corresponding with attribute
The time shaft of the second file.
Further, the animation file includes structure tree, and the structure tree and time shaft share same structure tree mould
Type;The animation file maps with the structure tree.
Further, the structure tree includes being carried out for the head of the play operation to animation file and to the attribute
The node of setting.
Further, the time shaft by the second file is applied to the method for the first file includes:
Select to need to be applied to the corresponding node of attribute of the first file in the second file;
The node of selection is synchronized to and renders area;
Second file from render area obtain can be synchronous node;
Mapping relations are set up with the corresponding time shaft of the first file according to synchronous node.
Further, the frame data include the node frame data of attribute frame data and controlled attribute frame data.
A kind of system of animation multiplexing, including:
First acquisition device:For obtaining the pending animation file that user selectes, the first file is designated as;
Second acquisition device:For obtaining formerly processed attribute and the first file identical animation file, the second text is designated as
Part;
Application apparatus:For the time shaft of the second file to be applied into the first file.
The present invention carries out the synchronization of different animation files based on attribute, as long as attribute is identical, different cartoon roles it is dynamic
Drawing file can share, and which reduces the substantial amounts of duplication of labour, can simply, easily realize that animation is multiplexed.
Specific embodiment
As shown in figure 1, the invention discloses a kind of method of animation multiplexing, including:
The pending animation file that S11, acquisition user select, is designated as the first file;
S12, acquisition formerly processed attribute and the first file identical animation file, are designated as the second file;
S13, the time shaft of the second file is applied to the first file.
As shown in Fig. 2 the invention also discloses a kind of system of animation multiplexing, including:
First acquisition device 1:For obtaining the pending animation file that user selectes, the first file is designated as;
Second acquisition device 2:For obtaining formerly processed attribute and the first file identical animation file, the second text is designated as
Part;
Application apparatus 3:For the time shaft of the second file to be applied into the first file.
The present invention carries out the synchronization of different animation files based on attribute, as long as attribute is identical, different cartoon roles it is dynamic
Drawing file can share, and which reduces the substantial amounts of duplication of labour, can simply, easily realize that animation is multiplexed.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail
The treatment described as flow chart or method.Although operations to be described as flow chart the treatment of order, therein to be permitted
Multioperation can be implemented concurrently, concomitantly or simultaneously.Additionally, the order of operations can be rearranged.When it
The treatment can be terminated when operation is completed, it is also possible to have the additional step being not included in accompanying drawing.The treatment
Can correspond to method, function, code, subroutine, subprogram etc..
Alleged within a context " computer equipment ", also referred to as " computer ", referring to can be by running preset program or referring to
Make performing the intelligent electronic device of the predetermined process process such as numerical computations and/or logical calculated, its can include processor with
Memory, the survival instruction prestored in memory by computing device performs predetermined process process, or by ASIC,
The hardware such as FPGA, DSP perform predetermined process process, or are combined by said two devices and to realize.Computer equipment includes but does not limit
In server, PC, notebook computer, panel computer, smart mobile phone etc..
The computer equipment includes user equipment and the network equipment.Wherein, the user equipment includes but is not limited to electricity
Brain, smart mobile phone, PDA etc.;The network equipment includes but is not limited to single network server, multiple webservers and constitutes
Server group or based on cloud computing(Cloud Computing)The cloud being made up of a large amount of computers or the webserver, wherein,
Cloud computing is one kind of Distributed Calculation, a super virtual computer being made up of the computer collection of a group loose couplings.Its
In, the computer equipment can isolated operation realize the present invention, also can access network and by with network in other calculate
The present invention is realized in the interactive operation of machine equipment.Wherein, the network residing for the computer equipment include but is not limited to internet,
Wide area network, Metropolitan Area Network (MAN), LAN, VPN etc..
It should be noted that the user equipment, the network equipment and network etc. are only for example, other are existing or from now on may be used
The computer equipment or network that can occur such as are applicable to the present invention, should also be included within the scope of the present invention, and to draw
It is incorporated herein with mode.
Method discussed hereafter(Some of them are illustrated by flow)Can be by hardware, software, firmware, centre
Part, microcode, hardware description language or its any combination are implemented.Implement when with software, firmware, middleware or microcode
When, the program code or code segment for being used to implement necessary task can be stored in machine or computer-readable medium(Such as deposit
Storage media)In.(One or more)Processor can implement necessary task.
Concrete structure disclosed herein and function detail are only representational, and are for describing of the invention showing
The purpose of example property embodiment.But the present invention can be implemented by many alternative forms, and be not interpreted as
It is limited only by the embodiments set forth herein.
Term used herein above is not intended to limit exemplary embodiment just for the sake of description specific embodiment.Unless
Context clearly refers else, and singulative " one " otherwise used herein above, " one " also attempt to include plural number.Should also
When understanding, term used herein above " including " and/or "comprising" specify stated feature, integer, step, operation,
The presence of unit and/or component, and do not preclude the presence or addition of one or more other features, integer, step, operation, unit,
Component and/or its combination.
It should further be mentioned that in some replaces realization modes, the function/action being previously mentioned can be according to different from attached
The order indicated in figure occurs.For example, depending on involved function/action, the two width figures for showing in succession actually may be used
Substantially simultaneously to perform or can perform in a reverse order sometimes.
Key-frame animation (KeyFrame Animation)
So-called key-frame animation (KeyFrame Animation), exactly to the attribute for needing animation effect, prepare one group and when
Between related value, these values are all to compare extract in crucial frame in animation sequence, and the value in other times frame,
These key values can be used, is calculated using specific interpolation method, so as to reach than smoother animation effect.
Frame-by-frame cartoons
Frame-by-frame cartoons are a kind of common animation forms(Frame By Frame), its principle is divided in " continuous key frame "
Solution animated actions, that is, different contents are drawn frame by frame on every frame of time shaft, its continuous broadcasting is formed animation.Cause
It is not only also very big to the file amount that increased burden but also final output is made for the frame sequence content of frame-by-frame cartoons is different,
But its advantage is also apparent from:Frame-by-frame cartoons have very big flexibility, can almost show any content for thinking performance, and
Its similar play mode with film, is well suited for the fine and smooth animation of performance.For example:Personage or animal are drastically turned round, hair and
Clothes wave, walk, speaking and exquisiteness 3D effect etc..
The invention will be further described with preferred embodiment below in conjunction with the accompanying drawings.
A kind of method of animation multiplexing, including:
The pending animation file that user selectes is obtained, the first file is designated as;
Formerly processed attribute and the first file identical animation file is obtained, the second file is designated as;
The time shaft of the second file is applied to the first file.
The file of each animation is the .csd files write by xml..csd file includes object data and time shaft(Also may be used
To be referred to as animation data);Wherein, at least one attribute of object correspondence(For example scale);Time shaft includes frame, time data and moves
The operations such as list, the broadcasting or stopping of frame correspondence animation are drawn, animation list can characterize the action of object(Run, jump etc.).It is described
Object data at least corresponds to an attribute.
Time shaft includes many sub- axles, and every sub- axle all includes the frame data and time data;The animation list
Acted including multiple;Each attribute and a sub- axle correspondence;The time shaft by the second file is applied to the first file
Method includes:According to attribute and the mapping relations of sub- axle, the first file acquisition and application the second file corresponding with attribute when
Countershaft.The frame data include the node frame data of attribute frame data and controlled attribute frame data.
Animation file includes structure tree, and the structure tree and time shaft share same structure tree-model;The animation text
Part maps with the structure tree.
The data type of structure tree is divided into two kinds, node type and attribute type.
Whether StructTreeModel provides to delete and selects the data should be in the function of interface display, when expanding node attribute
During value, node attribute values show, when node attribute values are shunk, nodal community is hidden.
StructTreeModel has cached the mapping of node and TreeIter, for corresponding quickly through node checks
Structure tree path.
StructTreeModel represents structure tree-model, is responsible for operation model and is mapped with cache node
Structure tree shows the structure of node tree, and there is provided the method to node tree operations.
The structure tree includes the section being configured for the head of the play operation to animation file and to the attribute
Point.
Structure tree is divided into upper and lower two parts, and part above is structure tree head, and part below shows node tree
Structure.Structure tree head is used to operate the broadcasting of animation, such as start/stop to play, and jumps to first/last frame etc.,
By head(TreeHeader)Class is controlled.Node tree part provides the operation to node, such as hide/display node, locking/solution
Lock node, shows nodal community, pulls concept transfer parent-child structure etc..
The main class and its function of structure tree are as shown in the table:
The present invention establishes various mapping relations by structure tree-model, structure tree, without programming, can be achieved with different animation texts
The time shaft of same alike result is shared in part.Specifically, comprise the following steps:
The method that the time shaft of the second file is applied to the first file is included:
Select to need to be applied to the corresponding node of attribute of the first file in the second file;
The node of selection is synchronized to and renders area;
Second file from render area obtain can be synchronous node;
Mapping relations are set up with the corresponding time shaft of the first file according to synchronous node.
Structure tree needs choice synchronous with area is rendered, i.e., the synchronous node currently chosen.When choosing node in structure tree
When, it is necessary to send message informing render area refresh choice;When rendering area's choice and changing, it is also desirable to send message and lead to
Know that structure tree refreshes choice.Herein for the situation for avoiding cycling through message, it is necessary to determine whether that itself sends
Message judge whether to need to process message.
Present embodiment also provides a kind of editor's panel of time shaft.
Time shaft panel provides frame data editting function, including deletes frame data, adds frame data, and mobile frame data are multiple
System/paste the functions such as frame data.Frame data have two types:Node frame data and attribute frame data.
Node frame data are empty types, and its effect is to facilitate controlled attribute frame data, and a node frame data the inside can
With comprising many attribute frame data.Node frame data are operated, is then operated equivalent to its all of attribute frame data.
Node frame data are that dynamic is created out.When an attribute frame data are created, node frame data can be by certainly
Dynamic being created that is come;When one node frame data of manual creation, then all frame data of display properties of the node can all create one
Frame data.Because simulating what is come during node frame data, it will not be exported in the middle of data.
Attribute frame data are real types, and it has corresponded to the numerical value of node this attribute in the middle of this frame data.Attribute frame
Data can be exported in the middle of data.Node has multiple attributes, only there is the attribute frame data time on a timeline
Point can just show animation.
As another embodiment of the present invention, there is provided a kind of system of the animation multiplexing of achievable appeal method.This is
System includes:
First acquisition device:For obtaining the pending animation file that user selectes, the first file is designated as;
Second acquisition device:For obtaining formerly processed attribute and the first file identical animation file, the second text is designated as
Part;
Application apparatus:For the time shaft of the second file to be applied into the first file.
Above content is to combine specific preferred embodiment further description made for the present invention, it is impossible to assert
Specific implementation of the invention is confined to these explanations.For general technical staff of the technical field of the invention,
On the premise of not departing from present inventive concept, some simple deduction or replace can also be made, should be all considered as belonging to of the invention
Protection domain.