CN104408761A - Computer mapping method based on automatic batch rendering and the like technology - Google Patents
Computer mapping method based on automatic batch rendering and the like technology Download PDFInfo
- Publication number
- CN104408761A CN104408761A CN201410637441.2A CN201410637441A CN104408761A CN 104408761 A CN104408761 A CN 104408761A CN 201410637441 A CN201410637441 A CN 201410637441A CN 104408761 A CN104408761 A CN 104408761A
- Authority
- CN
- China
- Prior art keywords
- information
- data
- animation
- slot
- texture
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
- G06T13/80—2D [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 computer mapping method based on automatic batch rendering and the like technology and belongs to the computer animation mapping field. The computer mapping method based on the automatic batch rendering and the like technology includes steps that S1, loading in resource, wherein the resource comprises at least one suit of animation data and bound frame skeleton data; S2, carrying out automatic minimum batch rendering treatment on the at least one suit of animation data; S3, carrying out minimum information calculation on the data processed by the step 2 and automatically deleting redundant information; S4, rending the data processed by the step 3 and bound frame skeleton data and drawing. The computer mapping method based on the automatic batch rendering and the like technology has beneficial effects that a lot of functions are added, such as skeleton connection, simultaneously playing several suits of animations, simultaneously loading in several suits of skin, pre-loading and the like; the algorithm efficiency is improved, such as counting minimum batch rendering, automatically deleting useless skeletons, doing not display redundancy information of the image, and the like.
Description
Technical field
The invention belongs to computer animation field of drawing, be specifically related to a kind of methodology in computer graphics playing up etc. technology based on automatic batch.
Background technology
The Runtime that Spine (2D bone editing machine) official provides, as shown in Figure 1, the defect of prior art is as follows as we know from the figure for its framed structure schematic diagram:
1. lack a large amount of common function, prior art only supports a set of animation, and does not support that many cover animations come into force simultaneously;
2. efficiency is not high, texture information and accessory information strong coupling, causes drafting part to be difficult to be optimized;
3. pictures form does not meet the style of cocos2d-x (the mobile 2D game frame of increasing income) engine;
4. code is jerky hard to understand, and extensibility is low;
5. from framework, Information Level and the texture layer degree of coupling too high, need be separated.
Therefore, market is badly in need of a kind ofly can solve function shortage, inefficiency, not meet the new technical scheme of the problems such as engine style.
Summary of the invention
The present invention is directed to the deficiencies in the prior art, provide a kind of methodology in computer graphics playing up etc. technology based on automatic batch, effectively can solve function shortage, inefficiency, not meet the problems such as engine style.
For overcoming the above problems, the technical solution used in the present invention is as follows: a kind of methodology in computer graphics playing up etc. technology based on automatic batch, comprises the following steps:
S1. be loaded into resource, comprise the frame skeleton data of at least a set of animation data and binding;
S2. at least a set of animation data is carried out automatically minimum batch play up process;
S3. the data after S2 process are carried out minimal information calculate and automatically delete redundant information;
S4. the frame skeleton data of the data after S3 process and binding is carried out playing up and drawing.
As preferably: the step of binding frame skeleton data is as follows:
1.1. the state of bone and slot is reset to binding frame;
1.2. travel through all activated animation, the increment that the state of all bones and slot changes is added in corresponding information state machine;
1.3. travel through all bones, upgrade the state matrix of oneself according to information state machine, and need the current matrix calculating oneself from the matrix condition of father node;
1.4. travel through all slots, upgrade accessory information and the colouring information set of oneself binding according to information state machine.
As preferably: at least a set of animation data described in S1 comprises texture ID, accessory information and bone information, if texture ID is consistent, then carry out automatically minimum batch play up process.
As preferably: described texture ID comprises its texture, tinter used, also has its mixed function.
As preferably: described automatically minimum batch rendering step is as follows:
2.1. render-ahead queue is put in all requests of playing up, and postpones to play up and non-immediate performs;
2.2. traveling through render-ahead queue, carrying out disposable playing up meeting with batch animation data played up, from queue, empty these requests simultaneously;
If 2.3. queue not empty, continue execution 2.2, otherwise perform 2.4;
2.4. empty all rendering state after traversal, play up end.
As preferably: the minimal information described in S3 calculates and automatically deletes redundant information and comprises following steps:
3.1. from the configuration file of skeleton cartoon, raw data is read in;
3.2. travel through all slots, judge whether the texture of slot at least shows once, if all binded texture of slot were not all shown, perform the operation of deleting slot;
3.3. travel through all bones, judge whether bone has at least bound a slot, if do not bind any slot, perform the operation of deleting bone;
3.4. check all skin information and animation information, recurrence is deleted and is destroyed all relevant informations of bone and slot;
3.5. travel through all key frames of all animations, for key frame A and key frame B, if delete wherein any one, animation can not be affected, and namely A and B is identical, and the transient mode of B is great-jump-forward, then execution deletes keys the operation of B;
Data after redundancy cutting derive by 3.6 automatically, replace raw data file.
As preferably: the concrete grammar described in S4 is as follows: when playing up, and travels through all slots, according to the information matrix of bone, position, rotation, scalability information is tied to vertical array; Again according to colouring information, binding vertex color; The texture ID corresponding according to accessory information binding, finally performs rendering command.
Beneficial effect of the present invention is as follows:
1. add a large amount of function: as bone connects, supports that many cover animations are play arbitrarily, supports that many cover skin is loaded into, supports prestrain etc. simultaneously simultaneously;
2. improve efficiency of algorithm: as minimum batch is played up counting, other optimizations such as deletion useless bone, the redundant information that do not Show Picture etc. automatically;
3. allow the further linking of code and game engine, without exception use meet the implementations such as the pictures of engine style.
Accompanying drawing explanation
Fig. 1 is the configuration diagram of prior art;
Fig. 2 is configuration diagram of the present invention.
Embodiment
For making object of the present invention, technical scheme and advantage clearly understand, to develop simultaneously embodiment referring to accompanying drawing, the present invention is described in further details.
To play up etc. a methodology in computer graphics for technology based on automatic batch, comprise the following steps:
S1. be loaded into resource, comprise the frame skeleton data of at least a set of animation data and binding;
S2. at least a set of animation data is carried out automatically minimum batch play up process;
S3. the data after S2 process are carried out minimal information calculate and automatically delete redundant information;
S4. the frame skeleton data of the data after S3 process and binding is carried out playing up and drawing.
The step of binding frame skeleton data is as follows:
1.1. the state of bone and slot is reset to binding frame;
1.2. travel through all activated animation, the increment that the state of all bones and slot changes is added in corresponding information state machine;
1.3. travel through all bones, upgrade the state matrix of oneself according to information state machine, and need the current matrix calculating oneself from the matrix condition of father node;
[m_m00,m_m01,m_worldX]/*a b x*/;
[m_m10,m_m11,m_worldY]/*c d y*/;
1.4. travel through all slots, upgrade attachment accessory information and the colouring information set of oneself binding according to information state machine: { m_attachment, m_r, m_g, m_b, m_a}.
At least a set of animation data described in S1 comprises texture ID, accessory information and bone information, if texture ID is consistent, then carry out automatically minimum batch play up process.
Described texture ID comprises its texture, tinter used, also has its mixed function.
Described automatically minimum batch rendering step is as follows:
2.1. render-ahead queue is put in all requests of playing up, and postpones to play up and non-immediate performs;
2.2. traveling through render-ahead queue, carrying out disposable playing up meeting with batch animation data played up, from queue, empty these requests simultaneously;
If 2.3. queue not empty, continue execution 2.2, otherwise perform 2.4;
2.4. empty all rendering state after traversal, play up end.
Minimal information described in S3 calculates and automatically deletes redundant information and comprises following steps:
3.1. from the configuration file of skeleton cartoon, raw data is read in;
3.2. travel through all slots, judge whether the texture of slot at least shows once, if all binded texture of slot were not all shown, perform the operation of deleting slot;
3.3. travel through all bones, judge whether bone has at least bound a slot, if do not bind any slot, perform the operation of deleting bone;
3.4. check all skin information and animation information, recurrence is deleted and is destroyed all relevant informations of bone and slot;
3.5. travel through all key frames of all animations, for key frame A and key frame B, if delete wherein any one, animation can not be affected, and namely A and B is identical, and the transient mode of B is great-jump-forward, then execution deletes keys the operation of B;
Data after redundancy cutting derive by 3.6 automatically, replace raw data file.
Concrete grammar described in S4 is as follows: when playing up, and travels through all slots, according to the information matrix of bone, position, rotation, scalability information is tied to vertical array; Again according to colouring information, binding vertex color; The texture ID corresponding according to accessory information binding, finally performs rendering command.
Optimized algorithm core technology:
1. automatic batch of Rendering: all requests of playing up have a texture ID, a texture ID comprises its texture, tinter used, also has its mixed function, if these three is the same, this illustrates that video card does not need state of doing to switch and just can play up it, if texture ID is consistent, automatically will carry out batch rendering, this technology belongs to prior art.
2. animation merges and overlaps animation binding technology more: all quantity of information all adopt incremental form to describe, so, each animation request is a series of incremental re-quest, no matter be merge or the broadcasting of many cover animations, the current state of bone can be changed according to increment and corresponding alpha value.
3. no matter minimal information amount: algorithm can delete redundant information automatically, be can reach minimal information amount from time efficiency or space efficiency, thus greatly improve spatiotemporal efficiency.
Algorithm steps:
3.1 read in raw data from the configuration file of skeleton cartoon.
The slot that 3.2 traversals are all, judges whether the texture of slot at least shows once, if all binded texture of slot were not all shown, illustrates that this slot is redundancy, perform the operation of deleting slot.
The bone that 3.3 traversals are all, judges whether bone has at least bound a slot, if do not bind any slot, illustrates that this bone is redundancy, perform the operation of deleting bone.
3.4 check all skin information and animation information, and recurrence is deleted and destroyed all relevant informations of bone and slot.
All key frames of all animations of 3.5 traversal (comprise displacement, convergent-divergent, rotate, attachment conversion, color), for key frame A and key frame B, if delete wherein any one, animation can not be affected (namely A and B is identical, and the transient mode of B is great-jump-forward), then illustrate that key frame B is redundancy, performs the operation of the B that deletes keys.
Data after redundancy cutting derive by 3.6 automatically, replace raw data file.
Specific embodiment:
Sharpest edges of the present invention are the optimization of algorithm, and optimized algorithm is then have employed three above-mentioned core technologies.
The framework of optimized algorithm is as shown in Figure 2:
In efficiency:
The information (texture, mixed function, tinter etc.) of each image of 1.1 optimized algorithms meeting Intelligent Recognition, carries out unifying to play up for the image can played up at same batch, reaches the object of minimum render times.
1.2 optimized algorithms can all Dependency Specifications of prestrain, greatly reduce the time loss that skeleton cartoon creates like this.
1.3 optimized algorithms delete garbage automatically: such as not motion-affecting bone, does not affect the slot of picture, does not have the redundant informations such as used annex attachment all can be deleted by intelligence.This optimization not only makes skeleton cartoon computation amount, decreases the size of json file simultaneously, decreases file size.
In expansion:
2.1 optimized algorithms can play any number of animation simultaneously: be such as attack above the waist, the lower part of the body is jump action, and two actions can be play simultaneously, have an impact to animation body simultaneously.Utilize this feature, program can synthesize various new animations.
2.2 optimized algorithms can use simultaneously overlap skin more: such as head portrait is A skin, and health is B skin, and weapon is C skin, use three cover skins simultaneously, easily can complete the object of the display that changes the outfit.
2.3 optimized algorithms can use bone connected system, can reserved empty position on a skeleton cartoon, be used for placing other skeleton cartoons (or arbitrarily other nodes), sub-skeletal system can become a part for paternal system, comprise drawing order, position, convergent-divergent, the information such as rotation are all controlled in paternal line system: such as, the weapon of a role, role itself has animation, and weapon, also with animation, so utilizes bone connected system just easily can reach this specific demand that role carries animation weapon.Utilize this system, also can introduce other animation effect systems such as particIe system easily.
Effectiveness test result:
Space optimization is tested: reduce the space hold of about 40 to 50%;
Efficiency optimization is tested: can keep the highest frame per second on most of test machine, when playing up in a large number, most of machine can keep the frame per second of more than 30 frames, ensure that the smoothness of picture;
Functional test: all functions all can normally be run.
Those of ordinary skill in the art will appreciate that, embodiment described here is to help reader understanding's implementation method of the present invention, should be understood to that protection scope of the present invention is not limited to so special statement and embodiment.Those of ordinary skill in the art can make various other various concrete distortion and combination of not departing from essence of the present invention according to these technology enlightenment disclosed by the invention, and these distortion and combination are still in protection scope of the present invention.
Claims (7)
1. to play up etc. a methodology in computer graphics for technology based on automatic batch, it is characterized in that, comprise the following steps:
S1. be loaded into resource, comprise the frame skeleton data of at least a set of animation data and binding;
S2. at least a set of animation data is carried out automatically minimum batch play up process;
S3. the data after S2 process are carried out minimal information calculate and automatically delete redundant information;
S4. the frame skeleton data of the data after S3 process and binding is carried out playing up and drawing.
2. method according to claim 1, is characterized in that, the step of binding frame skeleton data is as follows:
1.1. the state of bone and slot is reset to binding frame;
1.2. travel through all activated animation, the increment that the state of all bones and slot changes is added in corresponding information state machine;
1.3. travel through all bones, upgrade the state matrix of oneself according to information state machine, and need the current matrix calculating oneself from the matrix condition of father node;
1.4. travel through all slots, upgrade accessory information and the colouring information set of oneself binding according to information state machine.
3. method according to claim 1, is characterized in that, at least a set of animation data described in S1 comprises texture ID, accessory information and bone information, if texture ID is consistent, then carry out automatically minimum batch play up process.
4. method according to claim 3, is characterized in that, described texture ID comprises its texture, tinter used, also has its mixed function.
5. the method according to claim 1 or 3 or 4, is characterized in that, described automatically minimum batch rendering step is as follows:
2.1. render-ahead queue is put in all requests of playing up, and postpones to play up and non-immediate performs;
2.2. traveling through render-ahead queue, carrying out disposable playing up meeting with batch animation data played up, from queue, empty these requests simultaneously;
If 2.3. queue not empty, continue execution 2.2, otherwise perform 2.4;
2.4. empty all rendering state after traversal, play up end.
6. method according to claim 1, is characterized in that, the minimal information described in S3 calculates and automatically deletes redundant information and comprises following steps:
3.1. from the configuration file of skeleton cartoon, raw data is read in;
3.2. travel through all slots, judge whether the texture of slot at least shows once, if all binded texture of slot were not all shown, perform the operation of deleting slot;
3.3. travel through all bones, judge whether bone has at least bound a slot, if do not bind any slot, perform the operation of deleting bone;
3.4. check all skin information and animation information, recurrence is deleted and is destroyed all relevant informations of bone and slot;
3.5. travel through all key frames of all animations, for key frame A and key frame B, if delete wherein any one, animation can not be affected, and namely A and B is identical, and the transient mode of B is great-jump-forward, then execution deletes keys the operation of B;
Data after redundancy cutting derive by 3.6 automatically, replace raw data file.
7. method according to claim 1, is characterized in that, the concrete grammar described in S4 is as follows: when playing up, and travels through all slots, according to the information matrix of bone, position, rotation, scalability information is tied to vertical array; Again according to colouring information, binding vertex color; The texture ID corresponding according to accessory information binding, finally performs rendering command.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410637441.2A CN104408761B (en) | 2014-11-12 | 2014-11-12 | A kind of methodology in computer graphics based on automatic batch Rendering |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410637441.2A CN104408761B (en) | 2014-11-12 | 2014-11-12 | A kind of methodology in computer graphics based on automatic batch Rendering |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104408761A true CN104408761A (en) | 2015-03-11 |
CN104408761B CN104408761B (en) | 2018-03-09 |
Family
ID=52646389
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410637441.2A Active CN104408761B (en) | 2014-11-12 | 2014-11-12 | A kind of methodology in computer graphics based on automatic batch Rendering |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104408761B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107193599A (en) * | 2017-05-23 | 2017-09-22 | 郑州云海信息技术有限公司 | A kind of method that dynamic updates system slot information in SMBIOS |
CN108055479A (en) * | 2017-12-28 | 2018-05-18 | 暨南大学 | A kind of production method of animal behavior video |
CN108122266A (en) * | 2017-12-20 | 2018-06-05 | 成都卓杭网络科技股份有限公司 | A kind of method, apparatus and storage medium for caching skeleton cartoon and rendering texture |
CN110507986A (en) * | 2019-08-30 | 2019-11-29 | 网易(杭州)网络有限公司 | The treating method and apparatus of animation information |
CN111145074A (en) * | 2019-11-30 | 2020-05-12 | 航天科技控股集团股份有限公司 | Full liquid crystal instrument image rendering method |
CN111462283A (en) * | 2020-03-27 | 2020-07-28 | 厦门梦加网络科技股份有限公司 | Method, medium, device and apparatus for playing a large number of animations of the same character |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1444185A (en) * | 2002-03-13 | 2003-09-24 | 松下电器产业株式会社 | Computer image animation device and method |
CN101655859A (en) * | 2009-07-10 | 2010-02-24 | 北京大学 | Method for fast removing redundancy key frames and device thereof |
EP2779100A1 (en) * | 2013-03-11 | 2014-09-17 | Thomson Licensing | Method for processing a computer-animated scene and corresponding device |
-
2014
- 2014-11-12 CN CN201410637441.2A patent/CN104408761B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1444185A (en) * | 2002-03-13 | 2003-09-24 | 松下电器产业株式会社 | Computer image animation device and method |
CN101655859A (en) * | 2009-07-10 | 2010-02-24 | 北京大学 | Method for fast removing redundancy key frames and device thereof |
EP2779100A1 (en) * | 2013-03-11 | 2014-09-17 | Thomson Licensing | Method for processing a computer-animated scene and corresponding device |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107193599A (en) * | 2017-05-23 | 2017-09-22 | 郑州云海信息技术有限公司 | A kind of method that dynamic updates system slot information in SMBIOS |
CN107193599B (en) * | 2017-05-23 | 2020-11-27 | 苏州浪潮智能科技有限公司 | Method for dynamically updating system slot information in SMBIOS |
CN108122266A (en) * | 2017-12-20 | 2018-06-05 | 成都卓杭网络科技股份有限公司 | A kind of method, apparatus and storage medium for caching skeleton cartoon and rendering texture |
CN108122266B (en) * | 2017-12-20 | 2021-07-27 | 成都卓杭网络科技股份有限公司 | Method, device and storage medium for caching rendering textures of skeleton animation |
CN108055479A (en) * | 2017-12-28 | 2018-05-18 | 暨南大学 | A kind of production method of animal behavior video |
CN110507986A (en) * | 2019-08-30 | 2019-11-29 | 网易(杭州)网络有限公司 | The treating method and apparatus of animation information |
CN110507986B (en) * | 2019-08-30 | 2023-08-22 | 网易(杭州)网络有限公司 | Animation information processing method and device |
CN111145074A (en) * | 2019-11-30 | 2020-05-12 | 航天科技控股集团股份有限公司 | Full liquid crystal instrument image rendering method |
CN111145074B (en) * | 2019-11-30 | 2023-11-28 | 航天科技控股集团股份有限公司 | Full liquid crystal instrument image rendering method |
CN111462283A (en) * | 2020-03-27 | 2020-07-28 | 厦门梦加网络科技股份有限公司 | Method, medium, device and apparatus for playing a large number of animations of the same character |
CN111462283B (en) * | 2020-03-27 | 2023-03-03 | 厦门梦加网络科技股份有限公司 | Method, medium, device and apparatus for playing large number of same character animations |
Also Published As
Publication number | Publication date |
---|---|
CN104408761B (en) | 2018-03-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104408761A (en) | Computer mapping method based on automatic batch rendering and the like technology | |
US11615570B2 (en) | Virtual object display method and apparatus, electronic device, and storage medium | |
CN105635712B (en) | Video real time recording method and recording arrangement based on augmented reality | |
CN105354872B (en) | A kind of rendering engine based on 3D web games, implementation method and tools | |
CN106075909B (en) | Game reloading system and method | |
CN102157008B (en) | Large-scale virtual crowd real-time rendering method | |
CN102254297B (en) | Multiple shader system and processing method thereof | |
CN100428279C (en) | Cartoon realizing method and cartoon drawing system thereof | |
CN110309458B (en) | BIM model display and rendering method based on WebGL | |
CN104391683B (en) | A kind of method and device that model animation in three-dimensional software is exported based on 3Dmax scripts | |
CN109840931A (en) | Conjunction batch render method, apparatus, system and the storage medium of skeleton cartoon | |
CN111966354A (en) | Page display method and device and computer readable storage medium | |
CN111462283B (en) | Method, medium, device and apparatus for playing large number of same character animations | |
CN103198505B (en) | A kind ofly play up based on GPU the method and apparatus that game role and role change the outfit | |
CN110516817A (en) | A kind of model training data load method and device | |
US20220036632A1 (en) | Post-processing in a memory-system efficient manner | |
CN103257876B (en) | The method of C3 map dynamic load | |
US20180357166A1 (en) | Method and apparatus for system resource management | |
CN111738935A (en) | Ghost rendering method and device, storage medium and electronic device | |
CN104461662A (en) | Unity3d bone animation plugin SmoothMoves loading optimizing method | |
CN107767486A (en) | A kind of storage method and device of the end-to-end automatic Pilot data based on video format | |
CN110544315A (en) | control method of virtual object and related equipment | |
CN112669419A (en) | Method for rendering, central processing unit, image processor, system, and storage medium | |
CN107564084A (en) | A kind of cardon synthetic method, device and storage device | |
CN116993617A (en) | Damaged mural image restoration method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C53 | Correction of patent of invention or patent application | ||
CB02 | Change of applicant information |
Address after: 610041, software incubator Park No. 1480, north section of Tianfu Road, Chengdu hi tech Zone, Sichuan, 5, 405 Applicant after: Chengdu Zhuo hang network Polytron Technologies Inc Address before: 610041, software incubator Park No. 1480, north section of Tianfu Road, Chengdu hi tech Zone, Sichuan, 5, 405 Applicant before: CHENGDU ZHUOHANG INFORMATION TECHNOLOGY CO., LTD. |
|
COR | Change of bibliographic data |
Free format text: CORRECT: APPLICANT; FROM: CHENGDU ZHUOHANG INFORMATION TECHNOLOGY CO., LTD. TO: CHENGDU ZHUOHANG NETWORKING TECHNOLOGY CO., LTD. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |