CN105183566A - Resource management method for 3D game rendering engine - Google Patents

Resource management method for 3D game rendering engine Download PDF

Info

Publication number
CN105183566A
CN105183566A CN201510675944.3A CN201510675944A CN105183566A CN 105183566 A CN105183566 A CN 105183566A CN 201510675944 A CN201510675944 A CN 201510675944A CN 105183566 A CN105183566 A CN 105183566A
Authority
CN
China
Prior art keywords
resource
data
display object
rendering
playing
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
CN201510675944.3A
Other languages
Chinese (zh)
Other versions
CN105183566B (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.)
SHANGHAI KAIYING NETWORK TECHNOLOGY Co Ltd
Original Assignee
SHANGHAI KAIYING NETWORK TECHNOLOGY 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 SHANGHAI KAIYING NETWORK TECHNOLOGY Co Ltd filed Critical SHANGHAI KAIYING NETWORK TECHNOLOGY Co Ltd
Priority to CN201510675944.3A priority Critical patent/CN105183566B/en
Publication of CN105183566A publication Critical patent/CN105183566A/en
Application granted granted Critical
Publication of CN105183566B publication Critical patent/CN105183566B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention provides a resource management method for a 3D game rendering engine. The resource management method comprises the following steps: uniformly allocating and managing memory resources, video memory resources and externally-loaded original static resources which are constructed during running when rendering computing and rendering are performed to enable data resources in all the resources to be referenced and used into all display objects before being destroyed, and further to enable corresponding data corresponding to be put into corresponding to-be-destroyed queues if one or more of the data resources are not referenced and used in a preset first period of time; instantly destroying the data resources in the to-be-destroyed queues after a preset second period of time; separating the corresponding data resources from the corresponding to-be-destroyed queues if the corresponding data resources are referenced and used in the second period of time.

Description

The method for managing resource of 3D game render engine
Technical field
The present invention relates to 3D game render engine, particularly relate to the method for managing resource of a kind of light weight efficient 3D game render engine.
Background technology
3D plays render engine, is the class in all kinds of programming system, and relative to other programming systems of the overwhelming majority, it performs large-scale complicated calculations with needing high-frequency, consumes energy high, therefore needs to realize 3D based on rational managing and control system and to play render engine.
Various 3D rendering render engine is a lot of on the market, and wherein, FlashStage3D is cross-platform system, may operate in PC, webpage, mobile terminal etc.3D graphics-rendering system is by calculating dynamic synthetic image in real time, and this 3D wherein render engine of playing is the various game pictures being presented different time points different visual angles by GPU real-time operation in real time, to allow game player feel to stay wherein, therefore it is harsher for the performance requirement of system dynamic operation.
3D game rendering system requires to calculate as far as possible abundant picture as quickly as possible, to ensure visual experience and the interactive experience of player.After a game starts, player may continue to play for a long time, experiences different contents, and therefore system stability is an important demand.Good usefulness and stability are based upon on good system architecture and operating mechanism basis.For game rendering program system, need ceaselessly to operate CPU, internal memory, these relevant hardware of GPU by code, therefore complete identical task, operate fewer, usefulness is higher.Operation is few is exactly that power consumption is few, and it can be said that, outstanding system is exactly the high system of capacity usage ratio.
In prior art, the engine based on FlashStage3D is much existing on the market, such as: these four engines of Away3D, Flare3D, Minko, Alternativa3D.
Away3D engine is increased income, and its system architecture is improved but operating mechanism is lengthy and tedious, can not reach high-performance.The bulk redundancy object produced during operation and redundant computation, along with the time increase of game running can consume increasing internal memory and cpu performance gradually.
Flare3D engine is not increased income, and it is commercial engine, and the picture effect that can realize is a lot of, engine architecture is complicated, but it is average to play up performance for the extensive enforcement in playing, and resource problem when its not deep consideration runs, run time behaviour cannot reach a new height.
Minko engine is increased income, and can realize a lot of picture effect, and system architecture is reasonable, resource management when just not considering effectively to run, and redundancy object can operationally also can produce in a large number, so cannot as game engine truly.
Alternativa3D structure improvement, can realize a lot of rendering effect, and it is that final purpose realizes with game engine.Just engine itself does not encapsulate resource management mechanism when running completely, still needs user to compare the bottom work of many resource managements.
Summary of the invention
The technical problem to be solved in the present invention how to improve resource utilization.
In order to solve this technical matters, the invention provides the method for managing resource of a kind of 3D game render engine, comprising:
When carrying out playing up calculating and playing up, construction memory source out, video memory resource and the original static resource from external load during unified allocation of resources management operating, make data resource wherein can be cited and use in all display object before not destroyed; And make:
When wherein certain or some data resources are not cited and use within the very first time of presetting, corresponding data resource is put in corresponding queue to be destroyed;
Namely data resource in queue to be destroyed is destroyed after second time of presetting; If be cited again within the second time or use, then corresponding data resource is removed from described queue to be destroyed.
Optionally, when destroying data resource, preferential unshared original static resource of destroying video memory resource data and external load, memory source data are taken second place, and are finally the shared original static resource datas of external load.
Optionally, in playing up, also comprise:
The change of the logic that foundation is instantly required and input upgrades static data and/or the dynamic data of each display object, and the described static data after renewal and/or dynamic data are reached GPU or be used for the internal memory of CPU calculating;
Described static data after described GPU and CPU response upgrades and/or dynamic data, play up preposition calculating, and then described GPU carries out playing up of each display object in each frame 3D rendering with the result and fixed render scenes, rendering layer, rendering node, render tree and rendering unit of playing up preposition calculating.
Optionally, before playing up, also comprise:
Display object is added in render scenes, for each display object prepares static data and initial dynamic data;
Obtain some rendering unit of described display object;
Described rendering unit is joined in corresponding rendering layer, generate rendering node, determine the render tree of each rendering layer.
Optionally, after obtaining some rendering unit of described display object, also comprise and according to function, the process of classifying is done to described rendering unit; Other rendering unit of same class is merged, then joins in corresponding rendering layer.
Optionally, described display object comprises the basic display object not needing matrix operation and the senior display object needing matrix operation, and described CPU is in order to play up preposition calculating to static data corresponding to described senior display object and/or dynamic data; Described GPU is in order to play up preposition calculating to static data corresponding to described basic display object and/or dynamic data.
Optionally, when carrying out playing up calculating and playing up, for each frame 3D rendering:
If static data wherein and/or dynamic data had completed play up preposition calculating, then no longer to its carry out again play up preposition calculating, adopt the result that calculated to play up.
Optionally, after static data wherein and/or dynamic data are completed and play up preposition calculating, also this result calculated is deposited, and be labeled as the state without the need to renewal rewards theory again; Otherwise be labeled as and needed renewal rewards theory state again, judge whether to carry out playing up preposition calculating according to corresponding state mark in the subsequent treatment then played up at this frame 3D rendering.
It is considered herein that there is following pervasive principle for realizing efficient programming system:
When i) running, code object can not create and just not create.
When ii) running, program code logic can not just not perform in actuating logic calculating.
When iii) running, code object can not be destroyed and just not destroy.
By this pervasive principle, realize reusing existing result to greatest extent, to reduce redundant operation.Reach resource management mechanism when this object just needs there is strict operation in engine program system.Play in render engine system at 3D, during operation, this concept of resource contains object logic, data object, the external resource be loaded in internal memory, the video memory resource uploaded in video card, and the logical calculated etc. be performed.
Manage resource when running, above-mentioned three principles could be realized.Therefore 3D game render engine is realized, system architecture and the machine-processed good management and control will paying the utmost attention to resource when running.There is this basis, realized concrete game function just convenient a lot.
Based on this understanding, the present invention has at least done following improvement:
By the unified management of resource management module to the original static resource of internal memory, video memory and external load, when integrating perfect operation in engine, resource mechanism of control, allows upper strata developer without this kind of problem in reprocessing engine;
Further in the optional scheme of the present invention, also by the optimization of playing up flow process, Rendering operations unnecessary when as far as possible decreasing operation, to improve the utilization factor of resource.
Accompanying drawing explanation
Fig. 1 and Fig. 2 is the schematic flow sheet of resource management in one embodiment of the invention;
Fig. 3 is the schematic diagram playing up flow process basic logic in an alternate embodiment of the present invention;
Described rendering unit is classified in an alternate embodiment of the present invention and joins the schematic diagram of corresponding rendering layer by Fig. 4;
Fig. 5 is the schematic diagram playing up middle flow process in one embodiment of the invention;
Fig. 6 is the schematic diagram of display object in one embodiment of the invention;
Fig. 7 is cooperation relation schematic diagram in one embodiment of the invention;
Fig. 8 is the schematic flow sheet of the method for managing resource of 3D game render engine in one embodiment of the invention.
Embodiment
Below with reference to Fig. 1 to Fig. 8, the method for managing resource of 3D game render engine provided by the invention is described in detail, it is optional embodiment of the present invention, can think, those skilled in the art modify to it and polish in the scope not changing the present invention's spirit and content.
Please refer to Fig. 1 and Fig. 2, and Fig. 8, the invention provides the method for managing resource of a kind of 3D game render engine, comprising:
When carrying out playing up calculating and playing up, construction memory source out, video memory resource and the original static resource from external load during unified allocation of resources management operating, make data resource wherein can be cited and use in all display object before not destroyed; And make:
When wherein certain or some data resources are not cited and use within the very first time of presetting, corresponding data resource is put in corresponding queue to be destroyed;
Namely data resource in queue to be destroyed is destroyed after second time of presetting; If be cited again within the second time or use, then corresponding data resource is removed from described queue to be destroyed.
In accompanying drawing of the present invention, Fig. 1 specifically illustrates a kind of feasible program of unified allocation of resources managing internal memory resource of the present invention, video memory resource and the original static resource from external load, Fig. 2 further launches with regard to allotment flow process, and on it, word all can the particular content of real possibility of the present invention.
The description of comprehensive above method for managing resource, visible, during operation, the management and control of resource is a very important job in 3D game engine.Convenience and the safety of the high performance basis of engine and subsequent development have been established in this work.Method for managing resource of the present invention can be followed following approach to realize:
A) maximized guarantee resource share (recycling)
I) share by the mode of counter the static data resource that external load comes in
Ii) video memory generated by the mode shared system of counter and memory object.
The large objects produced when iii) being run by the mode sharing matrix, data bitmap, GPU program code etc. of memory pool
Iiii) carry out identification-state data by status indication whether to have upgraded and put in place, if updated, just do not need again to do corresponding logical process.
B) realize loading by the mechanism that engine is built-in, build, run and control, release destroy objects.
During operation, resource management module has managed the resource needed for internal memory and video memory simultaneously, and from the original static resource that external load is come in.
Method for managing resource being launched further description can be:
Operationally in resource management, as long as find not quoted by anyone in certain resource certain hour section (i.e. the previously mentioned very first time) and use, so this resource will be placed to corresponding preparation in destruction queue.If before destroying, it has been reused again, so this resource will have been destroyed queue from preparation and removed.Prepare to destroy the time long enough (this is set by the user a time interval, i.e. previously mentioned second time) in queue if be in, this resource will be destroyed.In general, from the destruction order of resource, first destroy video memory resource, original static resource is finally only at destruction memory source, namely in the optional scheme of the present invention, when destroying data resource, preferential unshared original static resource of destroying video memory resource and external load, memory source takes second place, and is finally the shared original static resource of external load.Certainly, also exception is had: original static resource is just destroyed at once after memory source produces, the means of the optional scheme of the present invention to its principle limit, visible, above-described " preferential unshared original static resource of destroying video memory resource data and external load, memory source data are taken second place, and are finally the shared original static resource datas of external load " should the understanding of machinery, but be read as, the selection of a kind of recommendation under the present invention's design in no special situation.The place that video memory resource is different relative to memory source is, as long as video memory resource a period of time is not used, will be destroyed, even if quote normal presence.This is because the video memory of video card is limited, the video memory resource that do not need of in good time destruction, to prevent video memory from overloading, so its in priority higher than other two.
Resource management during operation, ceaselessly can detect the resource behaviour in service in each management, at regular intervals so that correct in good time destruction and newly-built at game logic intercycle.This is done to automatically to complete effective internal memory and video memory management, and not need user be again this difficult point and taking efforts.
Above method contrast prior art can be found out, in fact major part other engines existing only have external resource to load management (being loaded in internal memory by the static resource on remote server or local hard drive or storage card), and this loads the recycling not realizing resource in management completely.In fact load management and contain compression and decompression, loading will consider recycling, unloading also will process the unloading problem of management (such as a resource is used by multiple dissimilar object, as long as at this time will ensure that user also just can not be unloaded in this resource) reusing and bring.
Shared resource is not only shared static resource, the internal memory built when also comprising more substantial operation or video memory resource, visible, in the present invention, " during unified allocation of resources management operating, construction memory source out, video memory resource and the original static resource from external load, make data resource wherein can be cited and use in all display object before not destroyed." be the important improvement of the present invention relative to prior art.
On realization rate, obtain quoting of this kind of resource and just use this resource, remove quoting of this resource and just do not use this resource.Resource required during runtime data integration generating run, shared mechanism ensure that resource can not repeatedly be built frequently.Internal memory video memory data management module is the core of resource management when realizing operation, is the support of whole resource management system shared mechanism.Internal memory video memory data management module ensure that resource is shown object and other subsystems share use to greatest extent, also ensure that resource is by good time destruction and unloading.Other engines that this set of mechanism is very many are not built-in, but need the slowly completion of user's later stage.Comprise now popular Unity3D engine, resource management mechanism during his also imperfect operation.
Resource managing and control system during operation, ensure that 3D plays the stable of render engine operationally internal memory and video memory.Decrease the unnecessary consumption to CPU when generating internal memory or video memory resource, this is also conducive to the stable and smooth of game products picture simultaneously.
Except describing above, please refer to Fig. 3 to Fig. 5, the present invention also improves playing up flow process, also can be optimized the management and control of resource by the improvement in flow process further, improves resource utilization.
Before playing up, comprising:
Display object is added in render scenes, for each display object prepares static data and initial dynamic data;
Obtain some rendering unit of described display object;
Described rendering unit is joined in corresponding rendering layer, generate rendering node, determine the render tree of each rendering layer.
After obtaining some rendering unit of described display object, also comprise and according to function, the process of classifying is done to described rendering unit; Other rendering unit of same class is merged, then joins in corresponding rendering layer.
In playing up, also comprise:
The change of the logic that foundation is instantly required and input upgrades static data and/or the dynamic data of each display object, and the described static data after renewal and/or dynamic data are reached GPU or be used for the internal memory of CPU calculating;
Described static data after described GPU and CPU response upgrades and/or dynamic data, play up preposition calculating, and then described GPU carries out playing up of each display object in each frame 3D rendering with the result and fixed render scenes, rendering layer, rendering node, render tree and rendering unit of playing up preposition calculating.
When carrying out playing up calculating and playing up, for each frame 3D rendering:
If static data wherein and/or dynamic data had completed play up preposition calculating, then no longer to its carry out again play up preposition calculating, adopt the result that calculated to play up.
Below in conjunction with Fig. 3 to Fig. 5, scheme is above further detailed, clear to its technique effect is set forth.
For a 3D game rendering system, display object is played up out mainly through GPU and is presented on screen.First to do corresponding logical calculated process before rendering, describe it as above " playing up preposition calculating ", this step plays up the required various status datas for rendering target image to collect, and can be understood as " static data and/or dynamic data " mentioned above.After gathering state, then want display object to arrange and can be directly used in for actual the minimum unit played up.After putting in order, each unit is done and actually plays up required data encasement.Get out corresponding data, upload GPU, GPU is rendered net result.
In conjunction with description above, the planning of the data encasement before playing up, rendering unit can be divided into further, implement to play up three phases.Data encasement in engine has done corresponding stores processor, if namely state does not change and would not go to recalculate and upgrade.
For the planning of playing up minimum unit, way here has just carried out when display object adds renderer, just can again plan except non-required changes dynamically.Implement some complexity although do like this, be unlikely to use the mode of full dynamic programming operationally ceaselessly do the work of dynamic programming and lose performance.Some engine is exactly full dynamic programming on the market, and this certainly have lost unnecessary performance.
In the stage of implementing to play up, mainly how to dispatch each API of GPU, way is here if identical operation, if state does not change, would not go to operate it again.If namely static data wherein mentioned above and/or dynamic data had completed and had played up calculating, then no longer to its carry out again play up calculating, adopt and played up calculated result and play up;
The optional scheme of the present invention is in order to reach above effect further, and after completing play up preposition calculating to static data wherein and/or dynamic data, also this result calculated is deposited, and is labeled as the state without the need to renewal rewards theory again; Otherwise be labeled as and needed renewal rewards theory state again, judge whether to carry out playing up preposition calculating according to corresponding state mark in the subsequent treatment then played up at 3D rendering.
As can be seen from the above description, in the present invention, optimize and play up flow process, reduce the calculating pressure of CPU on the one hand, decrease the number of operations to GPU on the other hand, this improves on the whole and plays up performance.
For the improvement of playing up flow process aspect, below provide an embodiment more specifically:
First need clear and definite, playing up is the picture effect using the data of present frame to present present frame, and whole render process main body is played up three phases formed by the planning of data encasement, rendering unit, enforcement.
At data preparation stage, the data prepared comprise two parts:
I) basic data, namely static data mentioned above, comprises texture, and summit is flowed, Shader etc.;
Ii) real time data, i.e. dynamic data mentioned above, comprise the locus obtained in real time, scale value, color, the dynamic datas such as illumination parameter;
Basic data is ready to complete when adding renderer, unless run duration needs dynamic change, otherwise always this kind of data hold.
Real time data is just determined after operation is got up, and a lot of runtime data needs real-time dynamic calculation.Although so say, still some real time data can only calculate once or only have and calculate little number of times.So in enforcement render process, real time data can be reduced by some mechanism and calculate the consumption brought.
The mode that the optional scheme of the present invention adopts:
1. add in the process of renderer in display object, classified by function, to reduce unnecessary renewal call number.
About this, in the optional scheme of the present invention, before starting to play up, also comprise and according to function, the process of classifying is done to described rendering unit; Then other rendering unit of same class is merged, then join in corresponding rendering layer.
2. deposited the data handled well by data record, recorded the need of more new data again by status indication.
About this, in the optional scheme of the present invention, as mentioned above, after static data wherein and/or dynamic data are completed and play up preposition calculating, also this result calculated is deposited, and be labeled as the state without the need to renewal rewards theory again; Otherwise be labeled as and needed renewal rewards theory state again, judge whether to carry out playing up preposition calculating according to corresponding state mark in the subsequent treatment then played up at this frame 3D rendering.
The planning of rendering unit is the important work of renderer one of doing, and which ensures real-world object and can be played up by correct enforcement and present correct corresponding picture.Display object is actually and is made up of some parts, as long as little a part of display object is derived from an independently grid model exactly.For the display object be made up of multiple part, needed to put in order before real-time rendering and play up required rendering unit.Because the rendering effect of every part is not all the same, therefore needing to do to arrange to some parts of display object to sort out, may be merge the classification before also may just playing up.This process can not whole Dynamic Executions, need Exactly-once as much as possible, play up usefulness to improve.
Enforcement is played up, and is the final stage that each display object is presented out, we can be understood as with GPU by 3D modeling rendering out.First the basic data of correspondence and a part of real time data will be passed to GPU by this process, and control GPU plays up preposition calculating behavior, as mentioning above, also can be that CPU plays up preposition calculating, finally reaching gamut mapping.Here key point is exactly to reduce the number of operations for GPU as far as possible, and energy inoperation is with regard to inoperation.For large data, can not upload and just not upload.Can not wait for for rendering result and just need not deliberately wait for.
Please refer to the specific embodiment of Fig. 2 and Fig. 3 signal, to expect two operation mechanisms that renderer can be described:
A) display object adds renderer
Display object is after this process, and just can be accepted by renderer, display object just can operationally be played up out.Actually inside display object contain some rendering unit, in the playing up of reality, each rendering unit actual needs performs an operation that GPU draws.In the process of adding rendering layer to, the data process method of display object of first being classified by function, then determines whether merging rendering unit by the concrete condition of display object.After process above, rendering unit actual in display object be classified according to the demand of playing up, same class is merged into one and plays up in circulation.
Above-mentionedly add flow process, demonstrate the administrative mechanism of whole renderer for real-world object.
By adding the sort operation in flow process, quite a few logic of pre-service, CPU unnecessary when avoiding running consumes.
When b) playing up operation
This process is exactly implement to each rendering unit the process played up, and in the game of reality, this process may perform hundreds of in a frame all over whole game picture being presented.Certainly, the number of times of this flow performing is more few better, more saves performance more less.Because there is shared mechanism completely in whole system, the shared mechanism mentioned in describing of effect of the present invention can from above description " if static data wherein and/or dynamic data had completed play up calculating; then no longer to its carry out again play up calculating, adopt and played up calculated result and play up " in understand.
So a lot of display object is shared for the data played up.Play up required identical if the last time plays up partial data with current, then, in current playing up, just do not need because this part current data go to operate GPU.Under this prerequisite, the work of playing up of renderer will utilize shared mechanism, reduce the operation for GPU.
Except the improvement of playing up flow process and resource management two aspect of setting forth above, the optional scheme of the present invention has also done important improvement in the management of display object:
In the optional scheme of the present invention, described display object comprises the basic display object not needing matrix operation and the senior display object needing matrix operation, and described CPU is in order to play up preposition calculating to static data corresponding to described senior display object and/or dynamic data; Described GPU is in order to play up preposition calculating to static data corresponding to described basic display object and/or dynamic data.
Please refer to Fig. 6, display object is the Logical presentation object of operationally viewable objects in render engine.What user mainly operated when using engine is exactly display object.3D plays render engine a large amount of calculating and to play up the content presented also be from display object when running.
Calculate to alleviate CPU the pressure brought in a large number, GPU has been given in the real-time calculating that a lot of display is relevant, some change logics of such as particIe system.
Matrix operation is in the real-time calculating of CPU, is also no small consumption, and that therefore can give GPU also gives GPU computing.And when display object classification design, basic display object is designed to do not need matrix operation also can correctly show, in design, this class object a lot (such as Billboard) in gaming, this reduces corresponding matrix operation.
This kind of special object of video camera, each frame in gaming, the correlation matrix computing that each video camera does and operation are also at most for once.
In the operation logic management of display object, only have corresponding state to there occurs change, the correlation computations such as matrix can be actually carried out once before playing up.If not change, correlation computations can not occur.This content, above to set forth repeatedly, is launched to describe so no longer do.
The memory source that display object uses and video memory resource are all based on resource management system during operation, and resource corresponding when the structure of display object can refer to operation, destroys resource corresponding when display object then removes operation.Resource management when display object itself can't affect operation, and when running, resource management can not have influence on display object display logic (such as even without the resource of correspondence, display object be can't see at most, but can not make mistakes).
In possibility of the present invention, succinct effective display object administrative mechanism, reduces the pressure that display object correlation computations causes CPU as far as possible.This contributes to, and game products picture is smooth carries the more unit of display with when running.
It is to be noted, the management of display object mentioned above, the management of resource and play up flow process this three aspect of optimization scheme improvement not separately independently, but can combine between two mutually, even three unifications be combined in an engine, be incorporated in a method, no matter it is called the method for managing resource of 3D game render engine or the rendering intent of 3D game render engine, does not all hinder the combination that these aspects are improved.
Except described above, in the optional scheme of the present invention, between subsystems, reduce coupling as far as possible, allow association between each system cooperate by the mode of combination.
Please refer to Fig. 7, which show display object, animation control, light, data texturing, vertex data, material object, the relation of Shader subsystem in this engine.
From theory, low coupling is a starting point of this 3D render engine system.Display object holds data and relevant control object, and animation controls to upgrade display object state, and Shader subsystem is collected and the data using display object up-to-date, and display object presents according to the control program in data and shader by renderer.Because the reason of low coupling, the animation of display object controls any switching laws to be the control object of difference in functionality.Light, texture, summit, offal timber is verified, and to resemble three be also separate, as long as pattern matched, and just can any switching laws.Before having switched, former corresponding objects sum display object has dependence.After having switched, former corresponding objects also only needs and display object removes dependence, and other subsystem has nothing to do.Low coupling like this, ensure that the reliably clear of logical organization.Resource management when being more conducive to running.
In the scheme of request protection of the present invention; also certain elaboration is had for this; namely construction memory source out, video memory resource and the original static resource from external load during unified allocation of resources management operating, make data resource wherein can be cited and use in all display object before not destroyed.
In sum, the present invention and optional scheme thereof have at least done the following aspects improvement:
1), by the unified management of resource management module to the original static resource of internal memory, video memory and external load, when integrating perfect operation in engine, resource mechanism of control, allows upper strata developer without this kind of problem in reprocessing engine;
2), by the optimization of playing up flow process, Rendering operations unnecessary when as far as possible decreasing operation;
3), ensure the light weight of automotive engine system, go numerous conforming to the principle of simplicity, concentrate compact, with clearly defined objective.

Claims (8)

1. a method for managing resource for 3D game render engine, is characterized in that: comprising:
When carrying out playing up calculating and playing up, construction memory source out, video memory resource and the original static resource from external load during unified allocation of resources management operating, make data resource wherein can be cited and use in all display object before not destroyed; And make:
When wherein certain or some data resources are not cited and use within the very first time of presetting, corresponding data resource is put in corresponding queue to be destroyed;
Namely data resource in queue to be destroyed is destroyed after second time of presetting; If be cited again within the second time or use, then corresponding data resource is removed from described queue to be destroyed.
2. the method for managing resource of 3D game render engine as claimed in claim 1, it is characterized in that: when destroying data resource, the unshared original static resource of preferential destruction video memory resource data and external load, memory source data are taken second place, and are finally the shared original static resource datas of external load.
3. the method for managing resource of 3D game render engine as claimed in claim 1, is characterized in that: in playing up, also comprises:
The change of the logic that foundation is instantly required and input upgrades static data and/or the dynamic data of each display object, and the described static data after renewal and/or dynamic data are reached GPU or be used for the internal memory of CPU calculating;
Described static data after described GPU and CPU response upgrades and/or dynamic data, play up preposition calculating, and then described GPU carries out playing up of each display object in each frame 3D rendering with the result and fixed render scenes, rendering layer, rendering node, render tree and rendering unit of playing up preposition calculating.
4. the method for managing resource of the 3D game render engine as described in claim 1 or 3, is characterized in that: before playing up, also comprises:
Display object is added in render scenes, for each display object prepares static data and initial dynamic data;
Obtain some rendering unit of described display object;
Described rendering unit is joined in corresponding rendering layer, generate rendering node, determine the render tree of each rendering layer.
5. the method for managing resource of 3D game render engine as claimed in claim 4, is characterized in that: after obtaining some rendering unit of described display object, also comprises and do the process of classifying to described rendering unit according to function; Other rendering unit of same class is merged, then joins in corresponding rendering layer.
6. the method for managing resource of the 3D game render engine as described in claim 1 or 3, it is characterized in that: described display object comprises the basic display object not needing matrix operation and the senior display object needing matrix operation, described CPU is in order to play up preposition calculating to static data corresponding to described senior display object and/or dynamic data; Described GPU is in order to play up preposition calculating to static data corresponding to described basic display object and/or dynamic data.
7. the method for managing resource of the 3D game render engine as described in claim 1 or 3, is characterized in that: when carrying out playing up calculating and playing up, for each frame 3D rendering:
If static data wherein and/or dynamic data had completed play up preposition calculating, then no longer to its carry out again play up preposition calculating, adopt the result that calculated to play up.
8. the method for managing resource of 3D game render engine as claimed in claim 7, it is characterized in that: after static data wherein and/or dynamic data are completed and play up preposition calculating, also this result calculated is deposited, and be labeled as the state without the need to renewal rewards theory again; Otherwise be labeled as and needed renewal rewards theory state again, judge whether to carry out playing up preposition calculating according to corresponding state mark in the subsequent treatment then played up at this frame 3D rendering.
CN201510675944.3A 2015-10-16 2015-10-16 The method for managing resource of 3D game rendering engine Active CN105183566B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510675944.3A CN105183566B (en) 2015-10-16 2015-10-16 The method for managing resource of 3D game rendering engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510675944.3A CN105183566B (en) 2015-10-16 2015-10-16 The method for managing resource of 3D game rendering engine

Publications (2)

Publication Number Publication Date
CN105183566A true CN105183566A (en) 2015-12-23
CN105183566B CN105183566B (en) 2019-01-29

Family

ID=54905661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510675944.3A Active CN105183566B (en) 2015-10-16 2015-10-16 The method for managing resource of 3D game rendering engine

Country Status (1)

Country Link
CN (1) CN105183566B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105701854A (en) * 2016-01-06 2016-06-22 网易(杭州)网络有限公司 3D rendering method and device and engine
CN106708623A (en) * 2016-11-23 2017-05-24 腾讯科技(深圳)有限公司 Object resource processing method, apparatus and system
CN107885597A (en) * 2017-09-19 2018-04-06 浙江科澜信息技术有限公司 A kind of management method of graphics rendering resources
CN108009008A (en) * 2016-10-28 2018-05-08 北京市商汤科技开发有限公司 Data processing method and system, electronic equipment
CN109961498A (en) * 2019-03-28 2019-07-02 腾讯科技(深圳)有限公司 Image rendering method, device, terminal and storage medium
CN113797530A (en) * 2021-06-11 2021-12-17 荣耀终端有限公司 Image prediction method, electronic device and storage medium
CN116931986A (en) * 2023-07-06 2023-10-24 红石阳光(深圳)科技有限公司 3D model scene resource management and control system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1512352A (en) * 2002-10-10 2004-07-14 国际商业机器公司 Managing method for virtual storage and analysis cache
CN1648879A (en) * 2004-01-28 2005-08-03 三星电子株式会社 Method and apparatus for adaptive garbage collection
US7600008B1 (en) * 2002-10-16 2009-10-06 Juniper Networks, Inc. Systems and methods for harvesting expired sessions
US20130215141A1 (en) * 2012-02-17 2013-08-22 Apple Inc. Using Render-Graph Characteristics to Optimize the Rendering of an Adjusted Image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1512352A (en) * 2002-10-10 2004-07-14 国际商业机器公司 Managing method for virtual storage and analysis cache
US7600008B1 (en) * 2002-10-16 2009-10-06 Juniper Networks, Inc. Systems and methods for harvesting expired sessions
CN1648879A (en) * 2004-01-28 2005-08-03 三星电子株式会社 Method and apparatus for adaptive garbage collection
US20130215141A1 (en) * 2012-02-17 2013-08-22 Apple Inc. Using Render-Graph Characteristics to Optimize the Rendering of an Adjusted Image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈路: "3D游戏引擎技术—大规模场景实时图形渲染的研究与实现", 《中国优秀博硕士学位论文全文数据库 信息科技辑》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105701854B (en) * 2016-01-06 2018-07-03 网易(杭州)网络有限公司 A kind of 3D rendering intents, device and engine
CN105701854A (en) * 2016-01-06 2016-06-22 网易(杭州)网络有限公司 3D rendering method and device and engine
CN108009008B (en) * 2016-10-28 2022-08-09 北京市商汤科技开发有限公司 Data processing method and system and electronic equipment
CN108009008A (en) * 2016-10-28 2018-05-08 北京市商汤科技开发有限公司 Data processing method and system, electronic equipment
CN106708623A (en) * 2016-11-23 2017-05-24 腾讯科技(深圳)有限公司 Object resource processing method, apparatus and system
CN107885597A (en) * 2017-09-19 2018-04-06 浙江科澜信息技术有限公司 A kind of management method of graphics rendering resources
CN107885597B (en) * 2017-09-19 2020-12-15 浙江科澜信息技术有限公司 Method for managing graphics rendering resources
CN109961498A (en) * 2019-03-28 2019-07-02 腾讯科技(深圳)有限公司 Image rendering method, device, terminal and storage medium
CN109961498B (en) * 2019-03-28 2022-12-13 腾讯科技(深圳)有限公司 Image rendering method, device, terminal and storage medium
CN113797530A (en) * 2021-06-11 2021-12-17 荣耀终端有限公司 Image prediction method, electronic device and storage medium
CN113797530B (en) * 2021-06-11 2022-07-12 荣耀终端有限公司 Image prediction method, electronic device and storage medium
CN116931986A (en) * 2023-07-06 2023-10-24 红石阳光(深圳)科技有限公司 3D model scene resource management and control system and method
CN116931986B (en) * 2023-07-06 2024-04-12 红石阳光(深圳)科技有限公司 3D model scene resource management and control system and method

Also Published As

Publication number Publication date
CN105183566B (en) 2019-01-29

Similar Documents

Publication Publication Date Title
CN105184847A (en) 3D game rendering engine rendering method
CN105183566A (en) Resource management method for 3D game rendering engine
Warneke et al. Exploiting dynamic resource allocation for efficient parallel data processing in the cloud
US20200234211A1 (en) Methods and systems to optimize operating system license costs in a virtual data center
CN104737133B (en) Optimized using the Distributed Application of service group
CN103999128B (en) There is the Graphics Processing Unit of command processor
CN111258744A (en) Task processing method based on heterogeneous computation and software and hardware framework system
US10908938B2 (en) Methods and systems to determine application license costs in a virtualized data center for use in virtual machine consolidation
CN107066242A (en) Determine the method and system of the mark of software in software container
US10243815B2 (en) Methods and systems to evaluate data center resource allocation costs
CN102291445A (en) Cloud computing management system based on virtual resources
CN103460192A (en) Resource consumption with enhanced requirement-capability definitions
TWI718563B (en) Computer program product, computer system and computer-implemented method for saving and restoring machine state between multiple executions of an instruction
CN113849503B (en) Open big data processing system, method and medium
CN112418447B (en) System, method, medium, and apparatus for providing machine learning service
CN109981792A (en) A kind of method and device for business processing based on cloud platform
CN114237916B (en) Data processing method and related equipment
CN116795524A (en) Task processing method, device, computer equipment, storage medium and program product
US10585736B2 (en) Incremental dump with fast reboot
US11625229B1 (en) Context for components in an application
CN117331690A (en) Method for efficiently utilizing computing resources based on cloud computing
CN113138698B (en) Game resource processing method and device, storage medium and electronic equipment
US20240193719A1 (en) Graphics processing
US20230072553A1 (en) Intelligent container configuring using augmented reality
CN103562869B (en) Audio-frequency processing method under virtualized environment and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PP01 Preservation of patent right
PP01 Preservation of patent right

Effective date of registration: 20210305

Granted publication date: 20190129