CN105957132B - Optimization method is drawn comprising the highly complex three-dimensional scenic high-performance for drawing element - Google Patents

Optimization method is drawn comprising the highly complex three-dimensional scenic high-performance for drawing element Download PDF

Info

Publication number
CN105957132B
CN105957132B CN201610252206.2A CN201610252206A CN105957132B CN 105957132 B CN105957132 B CN 105957132B CN 201610252206 A CN201610252206 A CN 201610252206A CN 105957132 B CN105957132 B CN 105957132B
Authority
CN
China
Prior art keywords
state
drawing unit
gray code
value
drafting
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
CN201610252206.2A
Other languages
Chinese (zh)
Other versions
CN105957132A (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.)
Peking University
Original Assignee
Peking University
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 Peking University filed Critical Peking University
Priority to CN201610252206.2A priority Critical patent/CN105957132B/en
Publication of CN105957132A publication Critical patent/CN105957132A/en
Application granted granted Critical
Publication of CN105957132B publication Critical patent/CN105957132B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures

Landscapes

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

Abstract

Optimization method is drawn comprising the highly complex three-dimensional scenic high-performance for drawing element the present invention relates to a kind of.This method comprises: all drawing units in traversal three-dimensional scenic drawing system, collect each drawing unit state relevant to drafting, and enumerate to obtain the state set being made of several states;The state parameter of element in all state sets is arranged and is respectively indicated with two values, is arranged to obtain state encoding according to the drafting state parameter of each drawing unit;Using the state encoding being made of all state parameters as binary gray code, drawing unit is sorted according to Gray code, the identical drawing unit of the value of gray encoding forms list structure;The corresponding drawing unit of Gray code is successively collected, the queue of drawing unit is established;The identical state parameter of all drawing units is set;The drafting of three-dimensional scenic is carried out according to the sequence of drawing unit queue.The drawing order of a variety of drawing units in drawing system can be adjusted in the present invention, improve and draw efficiency.

Description

Optimization method is drawn comprising the highly complex three-dimensional scenic high-performance for drawing element
Technical field
The invention belongs to information technology, computer graphical and technical field of virtual reality, and in particular to it is a kind of towards comprising The high-performance of the highly complex three-dimensional scenic for drawing element draws optimization method.
Background technique
One complicated reality environment is often made of various drafting situation elements, such as both includes landform, tree Wood, meadow, road, building, window (transparent), cloud, automobile vehicles (metal material), the water surface (deep water, shallow water), spray Spring, personage's (bone, Skinned Animation), various three-dimension objects such as aircraft, and include flame, sky atmosphere, rain, snow, mist are dazzled Light, shade, reflection, the natural phenomenas such as scattering.The drafting designed individually for above-mentioned one of three-dimension object or phenomenon For unit when being drawn, efficiency may be efficient.One drawing unit refers to by certain drawing data and draws calculation Method composition, and drafting state, parameter and material parametric texture etc. with some determinations, each rendering algorithm are executed one time and are drawn The process of tubulation line.
The drafting of any three-dimensional scenic is carried out using OpenGL graphics standard, the implementation procedure of drawing unit will follow Draw (rendering) assembly line.The implementation procedure of one drawing unit is exactly the api interface first with OpenGL offer to GPU Drafting state is configured, or sends some special rendering parameters (such as every ginseng in the shader of GLSL to GPU Number), or the certain materials of setting and parametric texture etc., geometry (vertex) data then are submitted to rendering pipeline, finally by GPU Execute the process for drawing instruction.In this way by the interface of OpenGL, user is that GPU is provided with corresponding rendering parameter and state, And GPU is finally made to draw out correct rendering result in such a way that user needs.The code of transmission drawing data has and shape State setting the identical life cycle of code, but due to the setting of state be in order to realize draw effect provide draw ginseng Number specifies and draws function, and transmitting drafting is to provide the scene data object drawn to GPU.When carrying out scene drawing, It usually drafting state having the same but needs to set different vertex data sources to different scenes, and there are same vertices The scene of data may but need to form different drafting effects.
In the drawing process comprising the highly complex three-dimensional scenic for drawing element, when multiple drawing units are drawn together When, since the mode respectively drawn is different, there may be conflict on executing the operating process drawn, a such as drawing unit is needed Certain drafting state is opened, and another drafting needs to close the drafting state.When the conflict occurs repeatedly, hold repeatedly These mutual conflicting operations of row can expend certain CPU and GPU time.Drawing of completely contradicting can be arranged in different drawing units State processed, such as be to open using the depth buffered state for carrying out depth test when executing the drawing unit for drawing transparent substance , depth buffered state forbid write-in;And when carrying out opaque materials volume drawing, the state of depth test is still It is so to enable, but state depth buffered simultaneously should be positioned to allow for being written.
The highly complex three-dimensional scenic for drawing element be related to when drawing a variety of three-dimension objects and a variety of natural phenomenas and Its corresponding multiple drawing unit.The realization of each drawing unit follows the video memory managed to GPU and sends data, setting This process such as GPU operating status, parameter and material and texture.And operate that require to expend CPU and GPU certain each time Time can especially consume the time of CPU, because operating the physical layer interface that can all call a 3D graphic plotting each time.But If two neighboring drawing process operation having the same, it will be able to save primary duplicate operation, improve and draw efficiency.
By taking the drawing process of each element in a following graphics system as an example:
1. drafting state, parameter and material 1 are set, rendering model A,
2. drafting state, parameter and material 2 are set, rendering model B,
3. drafting state, parameter and material 1, rendering model C is arranged.
The above process contains three drawing units, and the information such as drafting state, parameter and the material of model A and C are phases With, but together with model A with draftings of C is not, but interrupted by the drafting of Model B, it causes drafting state, join Several and material 1 is provided with twice.If it is as follows to adjust its drawing order:
1. drafting state, parameter and material 2 are set, rendering model B,
2. drafting state, parameter and material 1, rendering model A, C is arranged.
The efficiency then drawn in the order described above will be promoted.Therefore drawing unit is drawn in reasonable arrangement scene System sequence is played an important role to drafting efficiency is improved.But in practical drawing system, the operation of each drawing unit is more Kind multiplicity, how this arranges the execution sequence of drawing unit that could obtain the pass that optimal performance is entire drawing system design Key.
Assuming that a drawing unit comprising a series of various operations including mode set command by constituting, it is assumed that i-th The Executing Cost of operation is fi, then the cost F that the drawing process of drawing unit k is spentkAre as follows:
Assuming that two drawing unit K adjacent in a drawing process among the drawing system for drawing entire scene1 And K2With identical some operations, and these identical operations can be shared by two drawing units (as setting is drawn State processed, parameter etc.), then can be only carried out when executing the two drawing units one time these identical operate without repetition and hold Row, to save regular hour cost, it is assumed that the Executing Cost of these operations that can be omitted because repeating is Fk1k2, that For the drafting process for the N number of drawing unit successively drawn in sequence, the cost total value W that all operations are spent is executed Are as follows:
By formula (2) it can be seen that for the drafting process of N number of drawing unit, their drawing order how to be arranged to make ?It is maximum to draw efficiency to which W minimum is the key that acquisition is best.
The problem is the np hard problem of travelling salesman, and the purpose for solving the problems, such as this is exactly to reduce drawing system and execute It draws the time of process, therefore cannot be to spend additional high time overhead to be ranked up as cost to obtain preferable rendering Ranking results.Ogre system (Open Source 3D Graphics Engine, http://www.ogre3d.org/) and Irrlicht engine (http://irrlicht.sourceforge.net/) is used to be made with some parameter in material information For the foundation of sequence, actually in most cases the parameter be first texture that material has title.It is this with draw Some data in unit rapid can be obtained with similar material as the algorithm of the greed of the more excellent ordering structure of reference Scene be put into and draw adjacent position in queue.Its algorithm complexity is identical as the complexity of sort algorithm.Addition rendering row Sequence module renders the management operation that sorting module itself executes each drawing unit exactly in order to improve drafting efficiency simultaneously It will increase the time of CPU, had to efficiently so rendering sorting module itself executes operation.
Summary of the invention
Core of the invention thought is exactly to pass through one drafting (rendering) sorting module (method) of addition to answer a height The drawing order of a variety of drawing units in miscellaneous drawing system is adjusted, by the state of drafting, rendering parameter and material etc. Identical drawing unit puts together drafting, and some drafting operations identical so only execute one time.Simultaneously by state, The lesser drawing unit sequence of the parameter value variations such as parameter and material is as adjacent drawing unit, to reduce two neighboring The cost F of state handover operation is carried out between drawing unitk1k2, it is possible to reduce the setting of the state parameter of redundancy and material etc. Operation, to improve drafting efficiency.
The technical solution adopted by the invention is as follows:
It is a kind of to draw optimization method, including following step towards the high-performance comprising the highly complex three-dimensional scenic for drawing element It is rapid:
1) all drawing units in three-dimensional scenic drawing system are traversed, each drawing unit shape relevant to drafting is collected State, and enumerate to obtain the state set being made of several states;The state includes drafting state, rendering parameter and material The information such as texture, it is unified to be indicated with state parameter;
2) respectively indicate the state parameter setting of element in all state sets with two values (such as some state parameter Enabling be arranged its parameter value be 1, the disabling of the state is then 0;In another example the setting of some parameter value can be expressed as 1, and It is unrelated with the parameter, 0 can be expressed as;If can not be examined in the present invention with state, parameter and material that two-value indicates etc. Within the scope of worry), it is arranged to obtain state encoding according to the drafting state parameter of each drawing unit, each state parameter is corresponding Bit;
3) using the state encoding being made of all state parameters as binary gray code, by corresponding drawing unit according to Gray code sequence, the identical drawing unit of the value of gray encoding form list structure;
4) the corresponding drawing unit of Gray code is successively collected, establishes the queue of drawing unit, the queue is by chain sheet form table Show and stores;
5) the identical state parameter of all drawing units is set, that is, the state parameter occurred in set of not being at state;
6) drafting of three-dimensional scenic is carried out according to the sequence of drawing unit queue.
Further, step 6) carries out the update of drafting state when executing each drawing unit first;Drawing result is A frame image is generated, jth frame is labeled as;If the drafting shape of the number of drawing unit and each drawing unit in drawing system State parameter setting does not change, then continues to draw+1 frame of jth, and so circulation executes, until drawing system operation is terminated.
Further, in step 6), if the number of drawing unit changes, following processing is done:
If a > to drawing system is added to a drawing unit kN+1, then first check for and determine whether to introduce new shape Whether all drafting state parameters of state, the i.e. drawing unit are included in state set:
If a1 > be not introduced into new mode bit, n mode bit before illustrating is completely covered involved by new drawing unit And state, draw queue do not need to do any change;
A2 > otherwise need to introduce new mode bit then adds (n+1)th binary digit as new mode bit, and energy Enough conclude: the kN+1The value of (n+1)th mode bit of drawing unit is different from (n+1)th of other N number of drawing units value;
If b > eliminate a drawing unit k, inspection judges whether to need to delete certain shapes from state set I State, inspection method are compared one by one for the value of mode bit corresponding to the n state to remaining N-1 drawing unit.
Further, in step 6), if the state parameter i of some drawing unit kqCorresponding state changes Become, then modifies its Gray code, the value of corresponding states position is by 0 → 1 or by 1 → 0;Specific method is: first checking for N number of drafting Whether the value of the mode bit of unit is all identical, i.e., is all 1 or 0;If identical, state iqIt is deleted from state set I It removes;And make the operation of following steps: i in the Gray code of all N number of drawing unitsqThe value of corresponding position is set as 0, and will All numerical digits in this left side uniformly move to right one, and the digit of Gray code, which subtracts 1, becomes n-1.
Beneficial effects of the present invention are as follows:
The present invention proposes a kind of drawing unit optimization sequencing method based on gray code format, the sequence of N number of drawing unit Complexity is O (N), and the benefit obtained after sequence is drawing drafting state, parameter and material having the same etc. first Unit processed forms one group and draws together, and the value of state parameter is only needed to be arranged and can once be come into force to the drawing unit group;Its The difference of the drafting state parameter for the drawing unit that the value of secondary two neighboring state parameter has differences ideally is 1 (work as N=2nWhen -1, n be Gray code digit, and each drawing unit state encoding it is just different from each other when), i.e., each draw Unit processed only execute every time state parameter setting operation (because other than the state parameter, other state parameters etc. It is all identical as a upper drawing unit, without resetting).Optimal scheduling algorithm of the invention in this way can greatly save each The time overhead of drawing unit setting state parameter.It is to have executed a drafting that one frame of the real-time rendering of three-dimensional scenic is corresponding All drawing units being arranged in order corresponding to task, next frame will repeat these drafting lists being arranged in order The drawing system circulation of member, i.e. three-dimensional scenic executes the task of drawing unit.Since Gray code is a kind of coding of cycle format, Therefore another advantage of this method is exactly drafting state when the drafting state to next frame when a frame end, Its difference is usually 1, i.e., it is only necessary to by executing a state parameter setting operation for drafting state.So again into one Step reduces the time cost of drawing system.
Detailed description of the invention
Fig. 1 is the overall flow figure of the method for the present invention.
Fig. 2 is the schematic diagram according to all drawing units of Gray code tissue (by taking four Gray codes as an example).
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, below by specific embodiment and Attached drawing, the present invention will be further described.
Of the invention draws optimization method, bulk flow towards the three-dimensional scenic high-performance for including highly complex drafting element Journey as shown in Figure 1, specifically includes the following steps:
1. three-dimensional scenic drawing system starts;
2. traversing all N number of drawing unit K={ k1,k2,…kN, collect the state of each drawing unit, the state packet The information such as drafting state, rendering parameter and material texture are included, state parameter is referred to as, and enumerates to obtain n state and be constituted State set I={ i1,i2,i3,…in, illustrate other than this n state parameter, remaining drafting state draws ginseng Number, material texture, all N number of drawing units are all consistent;
3. the state parameter setting of element is respectively indicated by two values in all state sets: opening (enabling), close and (prohibit With), be separately encoded as 1 and 0, as long as other state parameters be arranged its value can be indicated with two different values can also (such as The mode for drawing polygon is divided into two kinds of wire frame mode and fill pattern);The drafting of each drawing unit k is calculated according to the condition State parameter setting, obtains state encoding, each state corresponds to bit;
4. regarding the coding as binary gray code, corresponding drawing unit is sorted according to Gray code, gray encoding The identical drawing unit of value form list structure;If two drawing units A and B correspond to duplicate Gray code, two The sequencing of a drawing unit is unimportant.The step is implemented as follows (as shown in Figure 2):
4.1 establish the array that array element number is N;
The 4.2 each drawing unit k of traversal, obtain its Gray code Gk, and be natural code A by Gray code conversionk;After can refer to The table of comparisons of four Gray codes and natural code of literary table 1;
If the A of 4.3 arrayskValue in a element is sky, then the pointer of drawing unit k is put into the A of arraykIt is a Value in element, as the array element;
If the A of 4.4 arrayskValue in a element is not sky, then the end of the chained list according to pointed by the array element Tail traverses, and the pointer of drawing unit k is put into the end of the chained list.
5. successively collecting the corresponding drawing unit of Gray code since first element of array, establishing final high efficiency Drawing unit queue Q, queue Q indicates and stored by chain sheet form;
6. value (the state ginseng occurred in set of not being at state I of the identical state parameter of all drawing units is arranged Number, for all drawing units, these state parameters are all the same);
It is drawn 7. then drawing system is successively executed according to the sequence of drawing unit queue Q, is executing each drafting When the rendering algorithm of unit, the update (often only one switching for drawing state) of drafting state is carried out first;Drawing result To generate a frame image, it is labeled as jth frame;
8. if the setting of the drafting state parameter of the number of drawing unit and each drawing unit is not sent out in drawing system It is raw to change, then it will continue to draw+1 frame of jth (the beginning state of+1 frame of jth compared with the end state of jth frame, due to+1 frame of jth The 1st drawing unit to differ position with the value of the drafting state parameter of the n-th drawing unit of jth frame be only 1 (ideal shape Under state), i.e., the difference of state only only has one, then it is only necessary to update a kind of state to can be carried out correctly depicting), Circulation executes step 7;
9. if the number of drawing unit changes:
If 9.1 are added to a drawing unit k to drawing systemN+1, then first check for and determine whether to introduce new shape Whether all drafting state parameters of state, the i.e. drawing unit are included in state set I (containing representated by n set element State parameter).
9.1.1 if being not introduced into new mode bit, n mode bit before illustrating completely covers new drawing unit institute The state parameter being related to draws queue Q and does not need to do any change;
9.1.2 otherwise needing to add the state parameter as element, (set element number is changed to n+ into state set I 1), while new mode bit is introduced, then adds (n+1)th binary digit as new mode bit, and may conclude that the kN+1 The value of (n+1)th mode bit of drawing unit is different from (n+1)th of other N number of drawing units value.Because if other N number of For (n+1)th of drawing unit if there is difference, that should just have n+1 mode bit originally to indicate that this N number of drafting is single Member thus generates contradiction.Such as: if drawing unit kN+1The (n+1)th status bit value be 0, i.e. disabled status, then other N The value one of this of a drawing unit is set to 1;
If 1) drawing unit kN+1The (n+1)th status bit value be 0, then the bits of coded is placed in its gray encoding Highest order, i.e. 0****** (* represents the value of original other bits of coded, and the number of * is n), and by other N number of drawing units Gray code position extreme higher position be 1;It only needs drawing unit k simultaneouslyN+1The head of queue Q is drawn in insertion, i.e., as the One unit is drawn.Because according to Gray code principle, the coding of other N number of drawing units both greater than current this is drawn single First kN+1Coding, while the drafting sequencing of this N number of drawing unit remains unchanged;
If 2) drawing unit kN+1The (n+1)th status bit value be 1, then the coding is placed in the highest of Gray code Position, i.e. 1***** (* represents the value of other bits of coded, and the number of * is n), and by the Gray code position of other N number of drawing units Extreme higher position be 0.Simultaneously by drawing unit kN+1The tail portion of queue Q is drawn in insertion, i.e., is drawn as the last one unit System.Because according to Gray code principle, both less than current this drawing unit k of the coding of other N number of drawing unitsN+1Coding, together When this N number of drawing unit drafting sequencing remain unchanged;
9.1.3 return step 6;
If some drawing unit k is removed in 9.2 drawing systems, first check for judging whether to need from state set It closes and deletes certain state parameters in I, inspection method is state corresponding to the n state parameter to remaining N-1 drawing unit The value of position is compared (need to carry out n times) one by one;
9.2.1 if there is some state parameter ipAnd its corresponding gray state position, N-1 drawing unit should The value of mode bit is all identical (be all 1 or be all 0, actual implementation can be calculated by bit arithmetic), then the state parameter ipIt can be deleted from state set I;And make the operation of following steps:
1) i in the Gray code of all N-1 drawing unitspCorresponding position is set as 0, and by all numbers in this left side The primary system one of position moves to right one, and the digit of Gray code, which subtracts one, becomes n-1;
2) corresponding drawing unit is deleted from queue Q, can be realized by chained list node deletion, other drawing units Sequence without making any adjustments, this is also the very big advantage of Gray code;
9.2.2 9.2.1 is continued to execute, is finished until all n state parameters all check;
9.2.3 the state parameter deleted if there is no needs, then directly find position of the drawing unit k in Q queue, And it is deleted from list structure.
9.2.4 return step 6;
10. if the state parameter i of some drawing unit kqCorresponding state changes, then modifies its Gray Code, the value of corresponding states position is by 0 → 1 or by 1 → 0;
Whether 10.1 values for first checking for the mode bit of N number of drawing unit all identical (be all 1 or 0, can pass through Bit arithmetic calculates);
If 10.2 is identical, state iqIt can be deleted from state set I;And make the operation of following steps: institute There is i in the Gray code of N number of drawing unitqCorresponding position is set as 0, and all numerical digits in this left side are uniformly moved to right one, The digit of Gray code, which subtracts one, becomes n-1;Return step 6;
10.3 regardless of whether identical, and the sequence of drawing unit is all not necessarily to make any adjustments, this is also the very big of Gray code The advantages of (because Gray code ensures the variation of only one binary digit between two neighboring coding, current drawing unit state Encode Gk→Gk' change only occur in a binary digit, then the coding G after the modification of current drawing unitk' or Equal to Gk- 1 or be equal to Gk+1);
10.4 if different direct return step 7;
11. drawing system terminates.
The realization details of embodiment is further illustrated below.
The standard program API OpenGL of 3D figure uses a kind of state machine mechanism.Can be set it various states (or Mode), then allow these states to come into force always, until modifying their value again.Such as current color is exactly that a state becomes It measures (being equivalent to the state parameter in above content), current color can be set as white, red or other any colors, The all objects drawn after this will all use this color, until current color is set as other colors again.Current face Color is one of many state variables that OpenGL is safeguarded.Other state variables have respective use there are also very much On the way, such as active view and projective transformation, straight line and polygon stipple pattern, polygon Graphics Mode, pixel packaging are controlled about The fixed, position of illumination and feature and the material properties of drawn object etc..The state variable of many intermediate schemes can be used GlEnable () and glDisable () function are enabled and are disabled.
If using programmable tinter, according to the difference of OpenGL version used, shape that tinter can identify The quantity of state is also different.Each state variable (or mode) or parameter have a default value.At any time may be used With to the current value of each state variable of system queries.Under normal circumstances, one of this following 6 functions can be used to complete this A task: glGetBooleanv (), glGetDoublev (), glGetIntegerv (), glGetfloatv (), GlGetPointerv () or glIsEnabled ().The function of specific choice depends on the data type of the result wished to return to. Some state variables there are also more specific query function (such as glGetLight* (), glGetError () or GlGetPolygonStipple () etc.).Furthermore it is also possible to use glPushAttrib (), glPushClientAttrib () Function is saved in the set of state variable in one attribute stack, they are carried out with interim modification, is used again later GlPopAttrirb () or glPopClientAttrib () restore these values.If necessary to temporarily be repaired to state variable Change, should just use these functions, rather than use any query function, because the former is more efficient.
After being called every time to the code of OpenGL state setting, if run without the code of other states setting, that It can come into force always with regard to its effect, not have to each frame and all repeat to call.
1. 4 Gray codes of table and the natural code table of comparisons
The above embodiments are merely illustrative of the technical solutions of the present invention rather than is limited, the ordinary skill of this field Personnel can be with modification or equivalent replacement of the technical solution of the present invention are made, without departing from the spirit and scope of the present invention, this The protection scope of invention should be subject to described in claims.

Claims (7)

1. a kind of draw optimization method towards the high-performance comprising the highly complex three-dimensional scenic for drawing element, which is characterized in that The following steps are included:
1) all drawing units in three-dimensional scenic drawing system are traversed, each drawing unit state relevant to drafting is collected, and It enumerates to obtain the state set being made of several states;
2) state parameter of element in all state sets is arranged and is respectively indicated with two values, according to drawing for each drawing unit State parameter processed is arranged to obtain state encoding, each state parameter corresponds to bit;
3) using the state encoding being made of all state parameters as binary gray code, by corresponding drawing unit according to Gray Code sequence, the identical drawing unit of the value of gray encoding form list structure;
4) successively collect the corresponding drawing unit of Gray code, establish the queue of drawing unit, the queue indicated by chain sheet form and Storage;
5) the identical state parameter of all drawing units is set, that is, the state parameter occurred in set of not being at state;
6) drafting of three-dimensional scenic is carried out according to the sequence of drawing unit queue.
2. the method as described in claim 1, which is characterized in that step 6) is drawn first when executing each drawing unit The update of state processed;Drawing result is to generate a frame image, is labeled as jth frame;If the number of drawing unit in drawing system And the drafting state parameter setting of each drawing unit does not change, then continues to draw+1 frame of jth, so circulation executes, Until drawing system operation is terminated.
3. method according to claim 1 or 2, which is characterized in that the concrete methods of realizing of step 3) is as follows:
A) array that array element number is N is established;
B) each drawing unit k is traversed, its Gray code G is obtainedk, and be natural code A by Gray code conversionk
If c) the A of arraykValue in a element is sky, then the pointer of drawing unit k is put into the A of arraykA element In, the value as the array element;
If d) the A of arraykValue in a element is not sky, then the end traversal of the chained list according to pointed by the array element, And the pointer of drawing unit k is put into the end of the chained list.
4. method according to claim 2, which is characterized in that in step 6), if the number of drawing unit changes, Do following processing:
If a > to drawing system is added to a drawing unit kN+1, then first check for and determine whether to introduce new state, i.e., Whether all drafting state parameters of the drawing unit are included in state set:
If a1 > be not introduced into new mode bit, n mode bit before illustrating is completely covered involved in new drawing unit State draws queue Q and does not need to do any change;
A2 > otherwise need to introduce new mode bit then adds (n+1)th binary digit as new mode bit, and can break It is fixed: the kN+1The value of (n+1)th mode bit of drawing unit is different from (n+1)th of other N number of drawing units value;
If b > eliminate a drawing unit k, inspection judges whether to need to delete certain states from state set I, examine Checking method is compared one by one for the value of mode bit corresponding to the n state to remaining N-1 drawing unit.
5. method as claimed in claim 4, which is characterized in that step a2 > in:
If drawing unit kN+1The (n+1)th status bit value be 0, then the mode bit is placed in the highest order of its gray encoding, And by the extreme higher position of the Gray code position of other N number of drawing units be 1;Simultaneously by drawing unit kN+1Insertion draws queue Q's Head is drawn as first unit;
If drawing unit kN+1The (n+1)th status bit value be 1, then the mode bit is placed in the highest order of Gray code, and will The extreme higher position of the Gray code position of other N number of drawing units is 0;Simultaneously by drawing unit kN+1The tail of queue Q is drawn in insertion Portion is drawn as the last one unit.
6. method as claimed in claim 4, which is characterized in that step b > include following sub-step:
B1 > if there is some state parameter ipAnd its corresponding gray state position, in the shape of N-1 drawing unit The value of state position is all identical, then state parameter ipIt is deleted from state set I;And make the operation of following steps:
1 > i in the Gray code of all N-1 drawing unitspCorresponding position is set as 0, and by all numerical digits in this left side Primary system one moves to right one, and the digit of Gray code, which subtracts one, becomes n-1;
2 > delete corresponding drawing unit from queue Q, the sequence of other drawing units is without making any adjustments;
B2 > continue to execute b1 >, until all inspections finish all n state parameters;
B3 > if there is no the state parameter deleted of needs, then directly find position of the drawing unit k in Q queue, and by its It is deleted from list structure.
7. the method as described in any one of claim 4 to 6, which is characterized in that in step 6), if some drawing unit The state parameter i of kqCorresponding state changes, then modifies its Gray code, the value of corresponding states position by 0 → 1 or by 1→0;Specific method is: whether the value for first checking for the mode bit of N number of drawing unit is all identical, i.e., is all 1 or 0;If It is identical, then state iqIt is deleted from state set I;And make the operation of following steps: the Gray code of all N number of drawing units Middle iqThe value of corresponding position is set as 0, and all numerical digits in this left side are uniformly moved to right one, change that the digit of Gray code subtracts 1 For n-1.
CN201610252206.2A 2016-04-21 2016-04-21 Optimization method is drawn comprising the highly complex three-dimensional scenic high-performance for drawing element Active CN105957132B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610252206.2A CN105957132B (en) 2016-04-21 2016-04-21 Optimization method is drawn comprising the highly complex three-dimensional scenic high-performance for drawing element

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610252206.2A CN105957132B (en) 2016-04-21 2016-04-21 Optimization method is drawn comprising the highly complex three-dimensional scenic high-performance for drawing element

Publications (2)

Publication Number Publication Date
CN105957132A CN105957132A (en) 2016-09-21
CN105957132B true CN105957132B (en) 2019-03-08

Family

ID=56914746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610252206.2A Active CN105957132B (en) 2016-04-21 2016-04-21 Optimization method is drawn comprising the highly complex three-dimensional scenic high-performance for drawing element

Country Status (1)

Country Link
CN (1) CN105957132B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106952328B (en) * 2016-12-28 2019-11-19 北京大学 A kind of method for drafting and system of Large-scale Macro virtual scene

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103177473A (en) * 2013-03-11 2013-06-26 南京大学 Instance-based large-scale scene composition method
CN103714574A (en) * 2013-12-19 2014-04-09 浙江大学 GPU acceleration-based sea scene modeling and real-time interactive rendering method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012159640A1 (en) * 2011-05-20 2012-11-29 Dream Chip Technologies Gmbh Method for transmitting digital scene description data and transmitter and receiver scene processing device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103177473A (en) * 2013-03-11 2013-06-26 南京大学 Instance-based large-scale scene composition method
CN103714574A (en) * 2013-12-19 2014-04-09 浙江大学 GPU acceleration-based sea scene modeling and real-time interactive rendering method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
H.Wang 等.GPU-based fast rendering of large-scale forest scenes for 3D games.《Journal of Computational Information Systems》.2015,第11卷(第2期),743-749.
田丰林.海量三维模型的交互绘制.《中国博士学位论文全文数据库 信息科技辑》.2011,(第08期),I138-75.
肖刚.三维场景网上漫游的实时渲染技术研究与应用.《中国优秀硕士学位论文全文数据库 信息科技辑》.2011,(第08期),I138-479.

Also Published As

Publication number Publication date
CN105957132A (en) 2016-09-21

Similar Documents

Publication Publication Date Title
CN106575228B (en) Post-processing object order rearrangement in graphics process
CN101371247B (en) Parallel array architecture for a graphics processor
DE102020124932A1 (en) Apparatus and method for real-time graphics processing using local and cloud-based graphics processing resources
US8570322B2 (en) Method, system, and computer program product for efficient ray tracing of micropolygon geometry
KR100233972B1 (en) Compression of simple geotric models using spanning trees
US8725466B2 (en) System and method for hybrid solid and surface modeling for computer-aided design environments
CN105354872A (en) Rendering engine, implementation method and producing tools for 3D web game
DE102019103326A1 (en) ROBUST, EFFICIENT MULTIPROCESSOR-COPROCESSOR INTERFACE
DE102019103058A1 (en) METHOD FOR CONTINUOUS LIMITATION VOLUME HIERARCHIRA TRAVERSION TO CUTTING POINTS WITHOUT SHADER INTERVENTION
US20080192054A1 (en) Combined Spatial Index for Static and Dynamic Objects Within a Three-Dimensional Scene
DE102018114286A1 (en) Perform a traversal stack compression
CN106504181A (en) For processing graphic processing method and the system of subgraph unit
CN110262907A (en) System and method for unified Application Programming Interface and model
DE102019103310A1 (en) ESTIMATE FOR AN OPTIMAL OPERATING POINT FOR HARDWARE WORKING WITH A RESTRICTION ON THE SHARED PERFORMANCE / HEAT
US20170330372A1 (en) Graphics processing systems
DE102019135639A1 (en) Real-time ray tracing (RTRT) based adaptive multi-frequency shading (AMFS)
DE112022004435T5 (en) Accelerating triangle visibility tests for real-time ray tracing
CN105631925A (en) Three-dimensional scene generation method based on OSG three-dimensional rendering engine preprocessing and device thereof
CN104167015B (en) Shader simplifying method and device and image rendering method based on surface signal fitting
CN107077833B (en) The device and method that efficient frame for the framework that finally sorts is utilized to frame coherence
CN106504184A (en) For processing graphic processing method and the system of subgraph unit
CN104751507A (en) Method and device for rendering pattern contents
CN108460056A (en) Method for converting effective graphic elements of DXF file into JSON data
CN104392479A (en) Method of carrying out illumination coloring on pixel by using light index number
CN109979000A (en) Multiple view pel block

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