CN105184847B - The rendering intent of 3D game rendering engines - Google Patents

The rendering intent of 3D game rendering engines Download PDF

Info

Publication number
CN105184847B
CN105184847B CN201510673993.3A CN201510673993A CN105184847B CN 105184847 B CN105184847 B CN 105184847B CN 201510673993 A CN201510673993 A CN 201510673993A CN 105184847 B CN105184847 B CN 105184847B
Authority
CN
China
Prior art keywords
rendering
data
render
resource
display object
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.)
Active
Application number
CN201510673993.3A
Other languages
Chinese (zh)
Other versions
CN105184847A (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 CN201510673993.3A priority Critical patent/CN105184847B/en
Publication of CN105184847A publication Critical patent/CN105184847A/en
Application granted granted Critical
Publication of CN105184847B publication Critical patent/CN105184847B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention provides a kind of rendering intent of 3D game rendering engines, including:Display object is added in render scenes, prepares static data and initial dynamic data for each display object;Obtain rendering unit;Rendering unit is added in rendering layer, rendering node is generated, determines render tree;Static data and/or dynamic data are updated, reaches GPU or the internal memory calculated for CPU;Static data and/or dynamic data after GPU and CPU response renewals, render preposition calculating, and then the GPU is to render the result of calculating and identified render scenes, rendering layer, rendering node, render tree and rendering unit carry out rendering for each display object in each frame 3D rendering;Wherein, for each frame 3D rendering:If static data therein and/or dynamic data had been completed to render preposition calculating, calculating again is no longer carried out to it, is rendered using the result having calculated that.

Description

The rendering intent of 3D game rendering engines
Technical field
The present invention relates to 3D game rendering engines, more particularly to a kind of side of rendering of the efficient 3D game rendering engine of light weight Method.
Background technology
3D game rendering engines, are one kind in all kinds of programming systems, and relative to other most programming systems, it is needed Perform large-scale complicated calculations with wanting high-frequency, power consumption is high, it is therefore desirable to realize that 3D plays based on rational managing and control system Rendering engine.
Various 3D rendering rendering engines are many on the market, wherein, Flash Stage3D are cross-platform systems, Ke Yiyun Row is in PC, webpage, mobile terminal etc..3D graphics-rendering systems are and the 3D among these by calculating in real time come dynamic generation image Game rendering engine is that the various game pictures of different time points different visual angles are presented in real time by GPU real-time operations, so as to Game player is allowed to feel to stay wherein, therefore it is harsher for the performance requirement of system dynamic operation.
3D game rendering system requirements can be as quickly as possible calculate as far as possible abundant picture, to ensure the visual experience of player And interactive experience.After one game starts, player may continue to play for a long time, undergo different contents, therefore system Stability is an important demand.Good efficiency and stability is built upon good system architecture and operating mechanism basis On., it is necessary to which ceaselessly by code, to operate CPU, internal memory, GPU, these are related for rendering program system of playing Hardware, therefore identical task is completed, operation is fewer, and efficiency is higher.Few operation is exactly that power consumption is few, it can be said that, it is outstanding System be exactly the high system of capacity usage ratio.
The content of the invention
The technical problem to be solved in the present invention is how to be improved from the angle for rendering flow, so as to improve the profit of resource With rate.
In order to solve this technical problem, the invention provides a kind of rendering intent of 3D game rendering engines, including such as Lower step:
Before rendering:
S1:Display object is added in render scenes, prepares static data and initial dynamic data for each display object;
S2:Obtain some rendering units of the display object;
S3:The rendering unit is added in corresponding rendering layer, rendering node is generated, determines rendering for each rendering layer Tree;
In rendering:
S4:The static data and/or dynamic data are updated according to the change of instantly required logic and input, will more The static data and/or dynamic data after new reach GPU or the internal memory calculated for CPU;
The static data and/or dynamic data after GPU and CPU the response renewal, render preposition calculating, and then The GPU is to render render scenes, rendering layer, rendering node, wash with watercolours determined by the result of preposition calculating and step S1 to S3 Dye tree and rendering unit carry out rendering for each display object in each frame 3D rendering;
Wherein, for each frame 3D rendering:
If static data therein and/or dynamic data had been completed to render preposition calculating, no longer it is carried out again Once render preposition calculating, rendered using the result having calculated that;
Optionally, in the step S4, static data therein and/or dynamic data are completed to render preposition calculating Afterwards, also the result of this calculating is deposited, and labels it as the state without updating operation again;Otherwise label it as needing Mode of operation is updated again, then judges whether weight according to corresponding state mark in the subsequent treatment that the frame 3D rendering renders Newly carry out rendering preposition calculating.
Optionally, in the step S2, in addition to the process classified is done according to function to the rendering unit;
In the step S3, first same category of rendering unit is merged, is then added in corresponding rendering layer.
Optionally, the display object includes not needing the basis of matrix operation to show object and needing the height of matrix operation Level shows object, before the CPU to static data and/or dynamic data corresponding to the advanced display object to render Put calculating;The GPU to the basis showing that static data and/or dynamic data corresponding to object carry out rendering preposition meter Calculate.
Optionally, in the step S1 into S4, in addition to the process that optimization rendering resources use, the resource include data Resource and system resource so that rendering resources meet following principle when in use:
It can not be calculated or not, the principle that systemic-function is just never called can be never called.
Optionally, in the step S4, in addition to:
Memory source, video memory resource and the original static from external load come are built up during unified allocation of resources management operating Resource so that data resource therein can be cited and be used in all display objects before not destroyed.
Optionally, to the memory source, video memory resource and the original static Resource allocation and smoothing management from external load, Further such that:
When wherein some or some data resources within the default very first time it is unreferenced and in use, corresponding data Resource is put into corresponding queue to be destroyed;
Data resource in queue to be destroyed is i.e. destroyed after default second time;If within the second time again quilt Quote or use, then remove corresponding data resource from the queue to be destroyed.
Optionally, it is preferential to destroy the unshared original quiet of video memory resource data and external load when destroying data resource State resource, memory source data are taken second place, and are finally the shared original static resource datas of external load.
It is presently believed that for realizing that efficient programming system has following pervasive principle:
Code object can not create or not when i) running
Program code logic can not perform not calculating execution logic when ii) running
Code object can not destroyed or not when iii) running
So in the basic scheme of the present invention, above principle is followed first, this hair, which realizes, renders preposition result of calculation It is shared, by the optimization to rendering flow, reduce Rendering operations unnecessary during operation as far as possible, effectively increase resource profit With rate, then in specific alternative of the invention, further through resource management module to internal memory, video memory and external load The concrete scheme of the unified management of original static resource has put into practice above principle.
Brief description of the drawings
Fig. 1 is the schematic diagram that flow basic logic is rendered in an alternate embodiment of the present invention;
Fig. 2 is the rendering unit to classify in an alternate embodiment of the present invention and the signal of rendering layer corresponding to being added to Figure;
Fig. 3 is the schematic diagram that middle flow is rendered in one embodiment of the invention;
Fig. 4 and Fig. 5 is the schematic flow sheet of resource management in one embodiment of the invention;
Fig. 6 is the schematic diagram that object is shown 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 rendering intent of 3D game rendering engine in one embodiment of the invention.
Embodiment
The rendering intent for rendering engine of being played below with reference to Fig. 1 to Fig. 8 to 3D provided by the invention carries out detailed retouch State, it is optional embodiment of the present invention, it is believed that those skilled in the art are not changing the model of spirit and content of the invention Enclose and interior it is modified and polished.
Fig. 1 to Fig. 3, and Fig. 8 are refer to, the invention provides a kind of rendering intent of 3D game rendering engines, including Following steps:
Before rendering:
S1:Display object is added in render scenes, prepares static data and initial dynamic data for each display object;
S2:Obtain some rendering units of the display object;
S3:The rendering unit is added in corresponding rendering layer, rendering node is generated, determines rendering for each rendering layer Tree;
In rendering:
S4:The static data and/or dynamic data are updated according to the change of instantly required logic and input, will more The static data and/or dynamic data after new reach GPU or the internal memory calculated for CPU;
The static data and/or dynamic data after GPU and CPU the response renewal, render preposition calculating, and then The GPU is to render render scenes, rendering layer, rendering node, wash with watercolours determined by the result of preposition calculating and step S1 to S3 Dye tree and rendering unit carry out rendering for each display object in each frame 3D rendering;
Wherein, for each frame 3D rendering:
If static data therein and/or dynamic data had been completed to render preposition calculating, no longer it is carried out again Once render preposition calculating, rendered using the result having calculated that.
It is presently believed that for realizing that efficient programming system has following pervasive principle:
Code object can not create or not when i) running
Program code logic can not perform not calculating execution logic when ii) running
Code object can not destroyed or not when iii) running
So in the basic scheme of the present invention, in order to follow above principle, the present invention, which realizes, renders preposition calculating knot Sharing for fruit, by the optimization to rendering flow, reduces Rendering operations unnecessary during operation, effectively increases resource as far as possible Utilization rate.
Scheme above is further detailed below in conjunction with Fig. 1 to Fig. 3, it is clear to which its technique effect is illustrated It is clear.
For a 3D game rendering system, display object is mainly rendered by GPU to be presented on screen.Rendering Corresponding logical calculated processing is first done before, described it as above " rendering preposition calculating ", this step is to collect wash with watercolours Various needed for dye are used to render the status datas of target image, it can be understood as " static data and/or dynamic mentioned above State data ".After gathering state, then to show that object arranges the minimum unit to be actually used directly for rendering.It is whole After reason is good, each unit is done and actually renders required data preparation.Corresponding data are got out, upload GPU, GPU will It renders final result.
With reference to description above, it can further be divided into the preparation of the data before rendering, the planning of rendering unit, implement to render three The individual stage.Data in engine have gone to corresponding storage processing, that is, if state does not have change to go again Calculate and update.
Planning for rendering minimum unit, way here has just been done when showing that object adds renderer It is good, it can just be planned again unless needed for dynamic change.Some complexity are implemented although so doing, are unlikely to make Operationally the work of Dynamic Programming is ceaselessly done with the mode of full Dynamic Programming and loses performance.Some engines are exactly on the market Full Dynamic Programming, this certainly have lost unnecessary performance.
In the stage that implementation renders, GPU each API mainly how is dispatched, way here is if identical is grasped Make, if state does not change, would not go to operate it again.If static data therein i.e. mentioned above and/or dynamic Data had been completed to render preposition calculating, then no longer it is carried out again render preposition calculating, using what is had calculated that As a result rendered;
Optional scheme of the invention is in order to further reach the effect of the above, to static data therein and/or dynamic number After rendering preposition calculating according to completion, also the result of this calculating is deposited, and labels it as the state without update operation again; Otherwise label it as needing to update mode of operation again, then according to corresponding in the subsequent treatment that the frame 3D rendering renders State mark, which judges whether to re-start, renders preposition calculating.
From the above, it can be seen that in the present invention, optimization renders flow, on the one hand reduces CPU calculating pressure, separately On the one hand the number of operations to GPU is reduced, this improves render performance on the whole.
Improvement in terms of for rendering flow, one given below more specifically embodiment:
Need first clearly, it is the picture effect that present frame is showed using the data of present frame to render, whole render process Prepared in main body by data, the planning of rendering unit, implement to render three phases and form.
In data preparation stage, the data prepared include two parts:
I) basic data, i.e., static data mentioned above, including texture, summit stream, Shader etc.;
Ii) real time data, i.e., dynamic data mentioned above, including the locus obtained in real time, scale value, color, The dynamic datas such as illumination parameter;
Basic data has been prepared for completing when renderer is added, except dynamic change is needed between the inoperative period, otherwise This kind of data are to hold always.
Real time data just determines that many runtime datas need real-time dynamic calculation after behaving.Though So so say, but still some real time data only calculating can once or only calculate seldom number.So may be used To calculate caused consume by some mechanism to reduce real time data in render process is implemented.
Mode used by optional scheme of the invention:
1. during display object adds renderer, classified by function, adjusted with reducing unnecessary renewal Use number.
On this, in optional scheme of the invention, in the step S2, in addition to the rendering unit according to work( The process classified can be done;In the step S3, first same category of rendering unit is merged, is then added to corresponding rendering layer In.
2. depositing the data handled well by data record, whether needed again more by status indication to record New data.
It is as mentioned above in the optional scheme of the present invention on this, in the step S4, to static state therein Data and/or dynamic data are completed after rendering preposition calculating, are also deposited the result of this calculating, and are labeled it as without again Update the state of operation;Otherwise label it as needing to update mode of operation again, the subsequent treatment then rendered in 3D rendering The middle corresponding state mark of foundation, which judges whether to re-start, renders preposition calculating.
The planning of rendering unit, is the important work that renderer is done, and it ensure that real-world object can be correct Implementation render presentation correctly corresponding picture.If a display object is actually what is be made up of stem portion, as long as seldom one Part shows that object is just derived from an independent grid model.For the display object being made up of some, in real-time wash with watercolours Need to put in order before dye and render required rendering unit.Because the rendering effect per part is not all, it is therefore desirable to right Sort out if the stem portion of display object does arrangement, it may be possible to merge the classification before may also simply rendering.This process can not be complete Portion's Dynamic Execution renders efficiency, it is necessary to Exactly-once as far as possible to improve.
Implementation renders, and is each display object final stage for being presented out, and we can be understood as 3D with GPU Modeling rendering comes out.This process first has to corresponding basic data and a part of real time data passing to GPU, controls GPU Render preposition calculating behavior, as previously mentioned or CPU renders preposition calculating, is finally reached gamut mapping.Here The key point in face seeks to reduce the number of operations for GPU as far as possible, can not operated or not.For big data, can not on Biography does not just upload.It can be not to wait for just need not deliberately waiting for rendering result.
The specific embodiment of Fig. 2 and Fig. 3 signals is refer to, to expect that two operation mechanisms of renderer can be illustrated:
A) show that object adds renderer
Show that object passes through after this process, can just be rendered device receiving, display object just can be operationally rendered Out.Some rendering units are actually contained inside display object, in rendering for reality, the actual need of each rendering unit Perform an operation that GPU is drawn.During rendering layer is added to, function is first passed through come display object of classifying Data process method, then decide whether to merge rendering unit by showing the concrete condition of object.Pass through processing above Afterwards, it will show that actual rendering unit is classified according to the demand of rendering in object, same class, which is merged into one and rendered, to follow In ring.
Above-mentioned addition flow, demonstrate administrative mechanism of the whole renderer for real-world object.
By adding the sort operation in flow, quite a few logic is preconditioned, unnecessary CPU when avoiding running Consumption.
When b) rendering operation
This process is exactly the process rendered to the implementation of each rendering unit, and in the game of reality, this process can Many hundreds time can be performed in a frame to show whole game picture.Certainly, the number that this flow performs is fewer It is better, it is more few more save performance.Because there is complete shared mechanism in whole system, it is previously mentioned in effect of the invention description Shared mechanism can from the description above " if static data therein and/or dynamic data had been completed to render preposition calculating, Then no longer it is carried out again render preposition calculating, rendered using the result having calculated that " in understood.
So the data for rendering for much showing object are shared.If some data and work as that the last time renders Before render required identical, then in current render, avoid the need for because this current partial data goes to operate GPU.At this Under the premise of individual, renderer renders work and will utilize shared mechanism, to reduce the operation for GPU.
On the basis of the rendering intent being described above, in order to which the raising of resource utilization is better achieved, it is also necessary to full The 3rd universal principle of foot:
Code object can not create or not when i) running.
Program code logic can not perform not calculating execution logic when ii) running.
Code object can not destroyed or not when iii) running.
It is attached in the present invention, for resource management, following improvement has also been done in the optional scheme of the present invention:
In the step S1 into S4, in addition to the process that uses of optimization rendering resources, the resource include data resource and System resource so that rendering resources meet following principle when in use:
It can not be calculated or not, the principle that systemic-function is just never called can be never called.
In further specific alternative of the invention, internal memory, video memory and outside are added by resource management module The concrete scheme of the unified management of the original static resource of load, the i.e. particular content about resource management, have put into practice above principle.
Before expansion describes, first in the prior art to the processing mode of resource management under simple introduction:
In the prior art, the engine based on Flash Stage3D is existing many on the market, such as:Away3D、Flare3D、 This four engines of Minko, Alternativa3D.
Away3D engines are increased income, and its system architecture is improved but operating mechanism is lengthy and tedious, it is impossible to reaches high-performance.Produced during operation Raw bulk redundancy object and redundant computation, with game running time increase can gradually use up increasing internal memory with And cpu performance.
Flare3D engines are not increased income, and it is commercial engine, and the picture effect that can be realized is a lot of, and engine architecture is complicated, But render that performance is average for the extensive implementation in playing, resource problem when it does not have a deep consideration operation, during operation Performance is unable to reach a new height.
Minko engines are increased income, and can realize a lot of picture effect, and system architecture is reasonable, do not account for simply effectively transporting Resource management during row, and redundancy object operationally also can be produced largely, so can not be as game truly Engine.
Alternativa3D is structurally consummate, it is possible to achieve a lot of rendering effect, it is using game engine as final purpose Come what is realized.Resource management mechanism when simply engine does not have fully enclosed operation in itself, still needs user more to compare Resource management bottom work.
The improvement of flow that renders of the present invention in itself is also that one kind of resource management is optimized, and in turn, is rendered in flow Resource is managed, and to rendering the improvement of flow, in alternative of the present invention, it is specific further right to give The content that resource management optimizes in itself.
Specifically, in the step S4, in addition to:
Memory source, video memory resource and the original static from external load come are built up during unified allocation of resources management operating Resource so that data resource therein can be cited and be used in all display objects before not destroyed.
To the memory source, video memory resource and the original static Resource allocation and smoothing management from external load, further So that:
When wherein some or some data resources within the default very first time it is unreferenced and in use, corresponding data Resource is put into corresponding queue to be destroyed;Data resource in queue to be destroyed is after default second time i.e. by pin Ruin;If being cited or using again within the second time, corresponding data resource is removed from the queue to be destroyed;In pin When ruining data resource, the preferential unshared original static resource for destroying video memory resource data and external load, memory source data Take second place, be finally the shared original static resource data of external load..
In the accompanying drawing of the present invention, Fig. 4 specifically illustrates unified allocation of resources managing internal memory resource in rendering intent of the present invention, shown A kind of feasible program of resource and the original static resource from external load is deposited, Fig. 5 is further carried out with regard to allotment flow Expansion, thereon word can reality alternative of the present invention particular content.
In summary the description of the particular content of resource management, it is seen then that the management and control of resource is in 3D game engines during operation One critically important work.The convenience and safety of the high performance basis of engine and subsequent development have been established in this work.The present invention Resource management content in alternative can follow following approach to realize:
A) shared (recycling) of resource is maximumlly ensured
I) the static data resource that external load is come in is shared by way of counter
Ii) the video memory and memory object that shared system generates by way of counter.
Iii) the blob caused by the operation such as sharing matrix, bitmap data, GPU program code by way of memory pool
Iiii) whether it has been updated in place, if updated, just not come identification-state data by status indication Need to do corresponding logical process again.
B) loading is realized by the mechanism built in engine, structure, operation control, discharges and destroy object.
Resource management module has managed internal memory and the resource needed for video memory simultaneously during operation, and come in from external load Original static resource.
The particular content of resource management is further spread out into description to be:
Operationally in resource management, as long as finding in some resource certain period of time (the i.e. previously mentioned very first time) Not by anyone reference and use, then this resource will be placed to corresponding prepare in destruction queue.If destroy again Before, it is reused, then this resource will remove from preparing to destroy in queue.If destroyed in preparation in queue Time long enough (this is set by the user a time interval, i.e., previously mentioned second time), this resource will be by pin Ruin.In general, for the destruction order of resource, video memory resource is first destroyed, is finally only in destruction memory source original quiet State resource, i.e., it is preferential to destroy video memory resource data and external load when destroying data resource in optional scheme of the invention Unshared original static resource, memory source data are taken second place, and are finally the shared original static resource datas of external load.. Certainly, also there is exception:Original static resource just is destroyed at once after memory source produces, the optional scheme pair of the present invention The means of its principle are limited, it is seen then that above-described " preferential to destroy video memory number of resources when destroying data resource According to the unshared original static resource with external load, memory source data are taken second place, and are finally the shared original quiet of external load State resource data." should not machinery understanding, but be read as, one kind under the present inventive concept in the case of no special pushes away The selection recommended.Video memory resource is relative to the different place of memory source, as long as video memory resource a period of time is not used, Will be destroyed, even if quoting normal presence.Because the video memory of video card is limited, be in good time destroy need not Video memory resource, to prevent video memory from overloading, so it is higher than other two in priority.
Resource management during operation, can ceaselessly it be detected at regular intervals in each management in game logic intercycle Resource behaviour in service, so as to correctly in good time destroy and it is newly-built.This is done to be automatically performed effective internal memory and video memory Management, takes efforts for this difficult point again without user.
Above method contrast prior art be can be seen that into other most of existing engines and actually there was only external resource Loading management (static resource on remote server or local hard drive or storage card is loaded into internal memory), and this adds Carry the recycling that resource is not fully achieved in management.Actually loading management contains loading and unloading, and loading will examine Consider recycling, unloading will also handle the unloading problem of management that recycling brings, and (such as a resource is by multiple different types Object use, as long as will at this time ensure that user cannot also be unloaded in this resource).
Shared resource is not only shared static resource, in addition to the internal memory or video memory built during a greater amount of operations Resource, it is seen then that in alternative of the present invention " built up during unified allocation of resources management operating come memory source, video memory resource and From the original static resource of external load so that data resource therein can be cited and use before not destroyed all aobvious Show in object." it is important improvement of the present invention relative to prior art.
On realization rate, the reference for obtaining this kind of resource just uses this resource, releases the reference of this resource just not Use this resource.Runtime data integrates resource required during generating run, and shared mechanism ensure that resource will not be by frequently Repeatedly structure.Internal memory video memory data management module is the core of resource management when realizing operation, is that whole resource management system is total to Enjoy the support of mechanism.Internal memory video memory data management module ensure that resource is shown object and other subsystems to greatest extent It is shared to use, it also ensure that resource by good time destruction and unloading.Other very more engines of this set of mechanism are not built-in, But need the slowly completion of user's later stage.Including popular Unity3D engines now, also without perfect operation when resource Administrative mechanism.
Resource managing and control system during operation, it ensure that the 3D game rendering engine operationally stabilization of internal memory and video memory.Simultaneously Unnecessary consumption when decreasing generation internal memory or video memory resource to CPU, this is also beneficial to the stabilization of game products picture With smoothness.
Except described above rendering improves of both flow and resource management, the optional scheme of the present invention is also being shown Important improvement has been done in the management of object:
In optional scheme of the invention, the display object includes not needing the basis of matrix operation to show object and need The advanced display object of matrix operation is wanted, the CPU is to static data and/or dynamic corresponding to the advanced display object Data carry out rendering preposition calculating;The GPU is to static data and/or dynamic data corresponding to the basis display object Carry out rendering preposition calculating.
Fig. 6 is refer to, display object is the Logical presentation object of operationally viewable objects in rendering engine.User makes It is exactly show object with primary operational during engine.The content of presentation is largely calculated and rendered during 3D game rendering engine operations And from display object.
The pressure brought largely is calculated in order to mitigate CPU, GPU, such as grain have been given in the related real-time calculating of many displays Some change logics of subsystem.
Matrix operation is and the no small consumption in CPU real-time calculating, therefore can give GPU also gives GPU fortune Calculate.And when showing object classification design, basis is shown into object designs not need matrix operation also correctly to show, if A lot (such as the Billboard) of this class object in gaming on meter, 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 is done with And operation also at most only once.
In the operation logic management of display object, only corresponding state is changed, and the correlation computations such as matrix exist It can be actually carried out once before rendering.If do not changed, correlation computations will not occur.This content is more to illustrate above It is secondary, so no longer do expansion description.
Memory source and video memory resource are all based on resource management system during operation used in display object, show object Structure can refer to corresponding resource during operation, destroy and show that object then releases corresponding resource during operation.Show object in itself Resource management does not interfere with display object display logic (such as i.e. when can't influence resource management during operation, and run Make without corresponding resource, display object preferably at most be can't see, but not malfunction).
Succinct effective display Object Management group mechanism, reduces display object correlation computations as far as possible in alternative of the present invention The pressure to caused by CPU.This contributes to game products picture smooth and carries more units of display when running.
It is pointed out that the display management of object mentioned above, the management of resource and render flow optimization this The improvement of the scheme of three aspects is not each independent, but can combine two-by-two mutually, or even three are uniformly incorporated in one It is in engine, be incorporated into a method, no matter its entitled 3D game rendering engine method for managing resource or 3D play The rendering intent of rendering engine, without prejudice to these improved combinations of aspect.
Except described above, in the optional scheme of the present invention, coupling reduced between subsystems as far as possible, passes through combination Mode allow cooperation associated between each system.
Refer to Fig. 7, which show display object, animation control, light, data texturing, vertex data, material object, Relation of the Shader subsystems in this engine.
For from theory, lower coupling, be this 3D rendering engine system designs a starting point.Display object holds number Renewal is controlled to show Obj State according to relevant control object, animation, and Shader subsystems are collected and use display object most New data, renderer will show that object shows according to the control program in data and shader.Because the original of lower coupling Cause, show that the animation of object controls control object that can be using any switching laws as difference in functionality.Light, texture, summit, offal timber are verified As three and independently of each other, as long as pattern matched, it is possible to any switching laws.Before switching is completed, former correspondence Object sum shows that object has dependence.After switching is completed, former corresponding objects also only need and shown object to release Dependence, and other subsystem are unrelated.Such lower coupling, it ensure that the clear reliable of logical construction.It is more favourable Resource management when operation.
In claimed two alternatives of the present invention, also there is certain elaboration for this, i.e. unified allocation of resources management is transported Memory source, video memory resource and the original static resource from external load come are built up during row so that data money therein Source can be cited and be used in all display objects before not destroyed.
In summary, the present invention and its optional scheme have at least done the following aspects improvement:
1), by unified management of the resource management module to the original static resource of internal memory, video memory and external load, Resource mechanism of control when perfect operation is integrated in engine, allow upper strata developer do not have to reprocessing engine in such issues that;
2), by the optimization to rendering flow, Rendering operations unnecessary during operation are reduced as far as possible;
3), ensure automotive engine system light weight, go it is numerous conform to the principle of simplicity, concentrate it is compact, it is with clearly defined objective.

Claims (4)

  1. A kind of 1. rendering intent of 3D game rendering engine, it is characterised in that:Comprise the following steps:
    Before rendering:
    S1:Display object is added in render scenes, prepares static data and initial dynamic data for each display object;
    S2:Obtain some rendering units of the display object;
    S3:The rendering unit is added in corresponding rendering layer, generates rendering node, determines the render tree of each rendering layer;
    In rendering:
    S4:The static data and/or dynamic data are updated according to the change of instantly required logic and input, after renewal The static data and/or dynamic data reach GPU or for CPU calculate internal memory;
    The static data and/or dynamic data after GPU and CPU the response renewal, render preposition calculating, and then described GPU is to render render scenes, rendering layer, rendering node, render tree determined by the result of preposition calculating and step S1 to S3 And rendering unit carries out rendering for each display object in each frame 3D rendering;
    Wherein, for each frame 3D rendering:
    If static data therein and/or dynamic data had been completed to render preposition calculating, no longer it is carried out again Render preposition calculating, rendered using the result having calculated that;
    Wherein, in the step S4, static data therein and/or dynamic data are completed after rendering preposition calculating, will also This result calculated storage, and label it as the state without updating operation again;Otherwise label it as needing again more New mode of operation, then judge whether to re-start according to corresponding state mark in the subsequent treatment that the frame 3D rendering renders Render preposition calculating.
  2. 2. the rendering intent of 3D game rendering engine as claimed in claim 1, it is characterised in that:In the step S2, also Including doing the process classified according to function to the rendering unit;
    In the step S3, first same category of rendering unit is merged, is then added in corresponding rendering layer.
  3. 3. the rendering intent of 3D game rendering engine as claimed in claim 1, it is characterised in that:The display object includes being not required to Want the basis of matrix operation to show object and need the advanced display object of matrix operation, the CPU is to described advanced aobvious Show that static data corresponding to object and/or dynamic data carry out rendering preposition calculating;The GPU is to the basis display pair As corresponding static data and/or dynamic data carry out rendering preposition calculating.
  4. 4. the rendering intent of 3D game rendering engine as claimed in claim 1, it is characterised in that:In the step S1 into S4, Also include the process that optimization rendering resources use, the resource includes data resource and system resource so that rendering resources are using When meet following principle:
    It can not be calculated or not, the principle that systemic-function is just never called can be never called.
CN201510673993.3A 2015-10-16 2015-10-16 The rendering intent of 3D game rendering engines Active CN105184847B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510673993.3A CN105184847B (en) 2015-10-16 2015-10-16 The rendering intent of 3D game rendering engines

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510673993.3A CN105184847B (en) 2015-10-16 2015-10-16 The rendering intent of 3D game rendering engines

Publications (2)

Publication Number Publication Date
CN105184847A CN105184847A (en) 2015-12-23
CN105184847B true CN105184847B (en) 2017-12-12

Family

ID=54906897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510673993.3A Active CN105184847B (en) 2015-10-16 2015-10-16 The rendering intent of 3D game rendering engines

Country Status (1)

Country Link
CN (1) CN105184847B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106780686B (en) * 2015-11-20 2020-07-10 网易(杭州)网络有限公司 3D model merging and rendering system and method, and terminal
CN105701854B (en) * 2016-01-06 2018-07-03 网易(杭州)网络有限公司 A kind of 3D rendering intents, device and engine
CN107248190A (en) * 2017-05-11 2017-10-13 珠海金山网络游戏科技有限公司 The scene graph design method and system of a kind of three-dimensional game engine
CN108287718B (en) * 2017-05-27 2022-05-17 深圳市创梦天地科技有限公司 Special effect editing method and device based on game engine
CN107507262B (en) * 2017-08-31 2021-03-16 城市生活(北京)资讯有限公司 Three-dimensional rendering method and system for large scene
CN108805967B (en) * 2018-06-14 2021-05-14 珠海必要工业科技股份有限公司 Dynamic rendering method
CN109523618B (en) * 2018-11-15 2022-02-22 广东趣炫网络股份有限公司 Method, device, equipment and medium for optimizing 3D scene
CN111414150B (en) * 2019-01-04 2022-10-11 厦门雅基软件有限公司 Game engine rendering method and device, electronic equipment and computer storage medium
CN112686981B (en) 2019-10-17 2024-04-12 华为终端有限公司 Picture rendering method and device, electronic equipment and storage medium
CN110990100B (en) * 2019-11-29 2024-05-14 珠海豹趣科技有限公司 Processing method and device for node objects in game scene
CN112150592B (en) * 2020-09-28 2023-07-14 腾讯科技(深圳)有限公司 Animation file generation method and device, storage medium and electronic equipment
CN115463419A (en) * 2021-06-11 2022-12-13 荣耀终端有限公司 Image prediction method, electronic device and storage medium
CN113419806B (en) * 2021-06-30 2023-08-08 腾讯科技(上海)有限公司 Image processing method, device, computer equipment and storage medium
CN117667278A (en) * 2022-08-31 2024-03-08 华为技术有限公司 Interface display method, device and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101281654A (en) * 2008-05-20 2008-10-08 上海大学 Method for processing cosmically complex three-dimensional scene based on eight-fork tree
CN102214263A (en) * 2010-04-12 2011-10-12 无锡科利德斯科技有限公司 Game scene management method
CN102360511A (en) * 2011-10-26 2012-02-22 德讯科技股份有限公司 Application method of physical engine in 3D space object display
CN102622236A (en) * 2012-01-13 2012-08-01 深圳市妙趣工场信息科技有限公司 Geart three-dimensional (3D) game engine
US8294704B1 (en) * 2008-03-31 2012-10-23 The Mathworks, Inc. Parallel processing of object subtrees for multiprocessor systems
CN102750450A (en) * 2012-06-21 2012-10-24 北京像素软件科技股份有限公司 Scene management method and device in network game
CN103617645A (en) * 2013-12-06 2014-03-05 广州博冠信息科技有限公司 Method and device for rendering
CN104517309A (en) * 2013-10-08 2015-04-15 博雅网络游戏开发(深圳)有限公司 Method and device for processing animation in frame loop

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8294704B1 (en) * 2008-03-31 2012-10-23 The Mathworks, Inc. Parallel processing of object subtrees for multiprocessor systems
CN101281654A (en) * 2008-05-20 2008-10-08 上海大学 Method for processing cosmically complex three-dimensional scene based on eight-fork tree
CN102214263A (en) * 2010-04-12 2011-10-12 无锡科利德斯科技有限公司 Game scene management method
CN102360511A (en) * 2011-10-26 2012-02-22 德讯科技股份有限公司 Application method of physical engine in 3D space object display
CN102622236A (en) * 2012-01-13 2012-08-01 深圳市妙趣工场信息科技有限公司 Geart three-dimensional (3D) game engine
CN102750450A (en) * 2012-06-21 2012-10-24 北京像素软件科技股份有限公司 Scene management method and device in network game
CN104517309A (en) * 2013-10-08 2015-04-15 博雅网络游戏开发(深圳)有限公司 Method and device for processing animation in frame loop
CN103617645A (en) * 2013-12-06 2014-03-05 广州博冠信息科技有限公司 Method and device for rendering

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
3D游戏引擎中的室外大场景渲染技术研究与实现;李均;《中国优秀硕士学位论文全文数据库 信息科技辑》;20090115;第3章第1段,第3.1节第1段,第3.4.1节,图3.1 *
一种基于物性数据的深部三维地质建模方法;余翔宇 等;《地球科学-中国地质大学学报》;20150315;第40卷(第3期);第419-424页 *

Also Published As

Publication number Publication date
CN105184847A (en) 2015-12-23

Similar Documents

Publication Publication Date Title
CN105184847B (en) The rendering intent of 3D game rendering engines
CN105183566B (en) The method for managing resource of 3D game rendering engine
WO2022116759A1 (en) Image rendering method and apparatus, and computer device and storage medium
US11593909B2 (en) Apparatus and method for real time graphics processing using local and cloud-based graphics processing resources
CN101802874B (en) Fragment shader bypass in a graphics processing unit, and apparatus and method thereof
CN106233326B (en) In graphics process based on show target flexibly show
CN106462393B (en) System and method for unified Application Programming Interface and model
CN106575228A (en) Render target command reordering in graphics processing
CN104823215A (en) Sprite graphics rendering system
CN103999128A (en) Graphics processing unit with command processor
WO2014113189A1 (en) Rendering graphics data using visibility information
KR101609079B1 (en) Instruction culling in graphics processing unit
CN105518742A (en) Fault-tolerant preemption mechanism at arbitrary control points for graphics processing
US20180005427A1 (en) Devices and methods for generating elementary geometries
CN106484394A (en) A kind of fast software development system with double engines
CN105518746A (en) Mixed request type graphics transformation table shadowing method
CN106030663A (en) Shader pipeline with shared data channels
US9396564B2 (en) Atlas generation based on client video configuration
JP2021149932A (en) Apparatus and method for asynchronous ray tracing
Steinberger et al. Parallel generation of architecture on the GPU
US11789846B2 (en) Method and system for using stacktrace signatures for bug triaging in a microservice architecture
DE102020131901A1 (en) APPARATUS AND METHOD FOR PERFORMING NON-LOCAL AVERAGE FILTERING USING A GRAPHICS PROCESSOR MOTION ESTIMATE CIRCUIT
CN104823220A (en) Graphics memory load mask for graphics processing
CN107077375A (en) For the display methods of multiple operating system, device and electronic equipment
DE102020115578A1 (en) MANAGEMENT OF PARTIAL WRITING IN A GRAPHICS ENGINE WITH MULTIPLE TILES

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

Effective date of registration: 20210305

Granted publication date: 20171212

PP01 Preservation of patent right