CN106952328A - The method for drafting and system of a kind of Large-scale Macro virtual scene - Google Patents
The method for drafting and system of a kind of Large-scale Macro virtual scene Download PDFInfo
- Publication number
- CN106952328A CN106952328A CN201710086784.8A CN201710086784A CN106952328A CN 106952328 A CN106952328 A CN 106952328A CN 201710086784 A CN201710086784 A CN 201710086784A CN 106952328 A CN106952328 A CN 106952328A
- Authority
- CN
- China
- Prior art keywords
- multiple sampling
- pixel
- sampling
- buffer area
- area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/50—Lighting effects
- G06T15/506—Illumination models
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/05—Geographic models
Abstract
The invention discloses a kind of method for drafting of Large-scale Macro virtual scene and system.This method is:1) multiple sampling geometry buffer area is created;2) the various solid threedimensional models in virtual scene are drawn and are stored into the multiple sampling geometry buffer area;3) perform down-sampled and multiple sampling to all data in the multiple sampling geometry buffer area to detect, obtained single sampled data is stored in a single sampling geometry buffer area, the result of multiple sampling detection is stored into multiple sampling mark buffer;4) illumination calculation and coloring are carried out to the pixel in virtual scene;Wherein, if location of pixels multiple sampling mark buffer is labeled, then the data in the multiple sampling geometry buffer area perform multiple sampling illumination calculation to the pixel, and otherwise the data in single sampling geometry buffer area perform single sampling illumination calculation to pixel.The present invention can produce preferable photorealistic effect, and phenomenon of losing shape can be overcome again.
Description
Technical field
The present invention relates to a kind of delay Rendering method and system of Large-scale Macro virtual scene, belong to computer soft
Part technology, computer graphics, technical field of virtual reality.
Background technology
The drafting of Large-scale Macro virtual reality scenario is a major issue in real-time rendering field, extensive grand three dimensional field
The drafting demand of scape is present in a variety of application systems.Such as three-dimensional geographic information system (3D GIS) is in order to basic in expression
Be the expressive force of further strengthening system outside three-dimensional earth's surface information, it is often necessary to realized under larger space scale air,
The bandwagon effect of the natural environments such as ocean, cloud layer, to strengthen the sense of reality of visualization system.The requirement of flight simulation visual system exists
The scenery picture of high presence is generated under the conditions of the broad view of high-altitude, also be unable to do without large-scale macroscopical virtual reality scenario and
The Realistic Rendering technology of natural environment true to nature.
Often it is made up of greatly various abundant drafting situation elements in a complicated Large-scale Macro reality environment
Yardstick, large-scale three-dimensional scenic, wherein both comprising the geographic object such as large-scale dimensional topography, earth's surface, while comprising road,
The various man-made objects such as building, aircraft, automobile, aircraft, and trees, meadow, vegetation, river, ocean, the water surface, water body,
The natural objects such as personage, animal, also comprising sky air, cloud, rain, mist, the natural phenomena such as flame, reflection, scattering.
For the extensive outdoor reality environment macroscopical to one, outdoor illumination calculation is its Realistic Rendering
Key.In huge outdoor three-dimensional environment, as the lighting effect produced by the sun and air and its illumination calculation method
Need to reach real-time efficiency, while to have at a relatively high true sensitivity.Based on above-mentioned consideration, the illumination algorithm often used
It is atmospherical scattering model (the Eric Bruneton and Fabrice Neyret. based on pre-computed lookup table
“Precomputed atmospheric scattering”.In:Computer Graphics Forum, 2008:1079–
1086.), the model can relatively accurately simulated atmosphere layer in following lighting effect:
What direct light of some daylight take up an official post after atmospheric scattering to earth's surface.
The skylight for being irradiated to any point in earth's surface produced by the multiple scattering of endoatmosphere.
The scatter attenuation that reflected light at earth's surface is injected by atmosphere during viewpoint.
The daylight for entering viewpoint is scattered in endoatmosphere.This is again including two kinds of effects:
- when sight is towards day space-time, this is presented as sky light effect.
- when sight is towards ground, this is presented as that distant objects color becomes the effect of blue (daytime)/redden (dusk)
Really.
The atmospherical scattering model is proposed to calculate the lighting effect of earth's surface in real time.In virtual reality system, including
The light of all three dimensional objects including the nature objects such as the man-made objects such as the geographic objects such as landform, building construction, trees vegetation
It is both needed to calculate using this method according to effect.
When scene complicated virtual reality system in large scale needs to carry out complicated outdoor illumination calculation, speed and effect
The elimination of rate bottleneck is most important.Therefore, the present invention first has to solve the drafting efficiency of complicated large scale scene.The present invention
It was found that the drafting for carrying out complex scene in large scale using delay color mode can significantly improve the efficiency of drafting.Delay coloring
Technology is the rendering technique that developed to solve substantial amounts of repetition pixel calculating in positive method for drafting, its core
Thought thinks it is by the rasterization operation of three-dimensional pel and illumination calculation separation.The method for drafting is divided into two stages, is respectively:It is several
What draws stage and illumination calculation stage.Therefore, the drafting towards large-scale virtual reality scene is, it is necessary to which finding one kind rationally has
The delay Rendering framework of effect includes into the drafting of the various three dimensional objects in large-scale and complex scenes, handles well simultaneously
The calculating of the illumination of various objects, and generate the imaging with the preferable sense of reality.
Secondly, the invention solves the problems that the rendering quality problem of complicated large scale scene.Due in scene three dimensional object it is various,
Geometry and texture is ever-changing, the three-dimensional level of scene is intensive, in roaming (camera or the consecutive variations of viewpoint) mistake of scene
Various forms of phenomenons of losing shape easily are produced in journey.(aliasing) phenomenon of losing shape refers to all because sample rate is less than signal
Display effect distortion phenomenon caused by resolution ratio.What multi-sampling techniques were mainly solved is in the pixel point due to display device
Polygon edge produces the problem of losing shape of sawtooth, therefore also referred to as multiple sampling antialiasing technology caused by resolution is not enough.The skill
Art can not only handle the edge sawtooth that single polygon (containing polygons such as triangle, quadrangles) rasterisation is produced, can also
Handle the sawtooth produced when multiple polygons intersect each other at intersection.It is how that antialiasing method and large-scale complex is virtually existing
The drawing system flow of real field scape combines, the problem of quality of raising scene drawing generation image is one most important.
The content of the invention
There is anti-aliasing function the invention provides one and the large-scale virtual of delay coloring illumination calculation can be carried out
The method for drafting and system of reality scene.The advantage of this method is that can either produce in preferably processing large-scale outdoor scene
The photorealistic effect of various three dimensional objects (containing geographic object, nature object and man-made objects);Big rule can be overcome again
Issuable phenomenon of the losing shape during movement of viewpoint of mould virtual scene;This method has with high efficiency simultaneously, can be for big rule
Mould complexity virtual scene is drawn in real time, can reach very high frame rate.
The technical scheme is that:
A kind of method for drafting of Large-scale Macro virtual scene, its step is:
1) multiple sampling geometry buffer area is created;
2) the various solid threedimensional models in virtual scene are drawn, and the multiple sampling geometry is arrived into the result storage of drafting
In buffering area;
3) perform down-sampled and multiple sampling to all data in the multiple sampling geometry buffer area to detect, pass through drop
Obtained single sampled data of sampling is stored in a single sampling geometry buffer area, and multiple sampling is arrived in the result storage of multiple sampling detection
In mark buffer;Wherein, multiple sampling mark buffer is used for needing to carry out multiple sampling processing when identifying delay coloring
Pixel;
4) illumination calculation and coloring are carried out to the pixel in the virtual scene;Wherein, if location of pixels is described multiple
It is labeled in sampling designations buffering area, then the data in the multiple sampling geometry buffer area perform multiple sampling to the pixel
Illumination calculation, otherwise the data in single sampling geometry buffer area are to the single sampling illumination calculation of pixel execution.
Further, the multiple sampling geometry buffer area includes diffusing reflection rate buffering area, normal direction buffering area, spontaneous light intensity
Spend buffering area, material buffering area, depth buffer and multiple sampling mark buffer.
Further, step 2) in, draw after solid threedimensional model, drawing its illumination in the virtual scene has refraction
The three dimensional object of effect, and drawing result is saved in the multiple sampling geometry buffer area;Step 3) starry sky is carried out afterwards
Or sky is as the drafting of the object of the background of virtual scene, the color and depth information of starry sky or sky are output to screen and delayed
Area is rushed, then by step 4) calculate pixel colouring information and depth information be output to the screen buffer, for final
Display output;Step 4) after, the non-physical in the virtual scene is drawn, its color and depth information are also output to
Screen buffer.
Further, the resolution ratio in the multiple sampling geometry buffer area is n times of screen resolution, and n is multiple sampling
Multiple.
Further, the down-sampled method is:The data of multiple sampling are reduced to by average weighted method and singly adopted
Sample data.
Further, the step 3), pixel color is calculated first with geological information in multiple sampling detection process, then
Color is weighted average.
Further, the multiple sampling mark buffer is a texture image big with screen etc., the texture image
The form of each pixel is 8 signless integers, and low three of each of which pixel represent that the pixel is entered according to 3 rules respectively
The result of determination of row multiple sampling detection.
Further, the step 3), carrying out the decision rule of multiple sampling detection includes:
A) normal direction mutation rule;If the normal direction recorded in multiple sampled points inside i.e. one pixel is different, then it is assumed that
The pixel has passed through multiple sampling detection, and the pixel needs to perform multiple sampling illumination calculation;
B) material mutation rule;If the material numbering recorded in multiple sampled points inside i.e. one pixel is different,
The pixel needs to perform multiple sampling illumination calculation;
C) depth mutation rule;If the deep minimum and maximum that are recorded in multiple sampled points inside i.e. one pixel
Value difference is different to be more than given threshold, then it is assumed that the pixel needs to perform multiple sampling illumination calculation.
Further, single sampling geometry buffer area includes diffusing reflection rate buffering area, normal direction buffering area, spontaneous luminous intensity
Buffering area, material buffering area, depth buffer, the resolution ratio in single sampling geometry buffer area are consistent with screen resolution.
A kind of drawing system of Large-scale Macro virtual scene, it is characterised in that including multiple sampling geometry buffer area, list
Geometry buffer of sampling area, solid threedimensional modeling rendering module, multiple sampling detection module and illumination calculation and staining module;Its
In,
Solid threedimensional modeling rendering module, for drawing the solid threedimensional model in virtual scene, and by the result of drafting
Store in the multiple sampling geometry buffer area;
Down-sampled and multiple sampling detection module, is adopted for performing drop to the data in the multiple sampling geometry buffer area
Sample, while carrying out multiple sampling detection to the multiple sampling geometry buffer area, and is stored in a list by obtained single sampled data
Geometry buffer of sampling area, multiple sampling testing result is saved in a multiple sampling mark buffer;Wherein, multiple sampling mark
Note buffering area is used for needing to carry out the pixel of multiple sampling processing when storing mark delay coloring;
Illumination calculation and staining module, for carrying out illumination calculation and coloring to the pixel in the virtual scene;Wherein, such as
Fruit location of pixels is labeled in the multiple sampling mark buffer, then the data in the multiple sampling geometry buffer area
Multiple sampling illumination calculation is performed to the pixel, otherwise the data in single sampling geometry buffer area perform single sampling to pixel
Illumination calculation.
Compared with prior art, the positive effect of the present invention is:
It is different from traditional positive pattern drawn, under delay color mode, except directly carrying out illumination calculation
Outside module, other modules need not add the related code of any illumination calculation.This contributes to the function of system to separate, and makes
Obtain illumination algorithm and other algorithms independent can be developed toward each other, can effectively reduce the exploitation of system and safeguard into
This.
For the old functional module that rendering pipeline exploitation is fixed towards GPU, it is only necessary to add one it is simple
Color device program can be achieved with the function of the output data into geometry buffer area.Therefore this method is preferable to the compatibility of old code.
Using illumination model (the Eric Bruneton and Fabrice Neyret. with atmospheric scattering
“Precomputed atmospheric scattering”.In:Computer Graphics Forum, 2008:1079–
1086.) as main illumination model, the amount of calculation and texture visit capacity of the illumination model are all larger, and mould is coloured using delay
Formula can effectively reduce the task amount of illumination calculation, help to realize higher rendering performance.
Brief description of the drawings
Fig. 1 is flow chart of the method for the present invention;
The content that Fig. 2 is included by geometry buffer area;
(a) diffusing reflection rate, (b) normal direction, (c) spontaneous luminous intensity, (d) material, (e) depth;
Fig. 3 is the discontinuous caused illumination calculation mistake schematic diagram of normal direction;
Fig. 4 is the discontinuous caused illumination calculation mistake schematic diagram of depth;
Fig. 5 is multiple sampling mark result figure (only detection depth mutation);
Fig. 6 is multiple sampling mark result figure (all mutation of detection);
Fig. 7 is multiple sampling schematic diagram;
(a) not cover sampled point so failing triggering one pixel coloring device of generation,
(b) two sampled points are covered for polygon, but still triggering generates only one pixel coloring device.
Embodiment
The system basic procedure of the present invention is as shown in figure 1, round rectangle represents drafting operation in figure, and orthogonal rectangle represents number
According to buffering area, solid arrow represents data flow, and dotted arrow represents to draw the execution sequence of operation.The flow will be needed in system
The object to be drawn is divided into four classes:Solid threedimensional model, the grid with refraction effect, starry sky and non-physical effect.
The present invention draws flow and its step:
Step 1:Solid threedimensional modeling rendering
The geological information of large scale scene is plotted in multiple sampling geometry buffer area first, that is, realizes that geometry is painted
Step processed.
Multiple sampling geometry buffer area is wherein created first, then performs the solid threedimensional modeling rendering (ground such as including landform
Manage object, the man-made objects such as model, the natural objects such as vegetation), such threedimensional model all has opaque attribute, that is, institute
These threedimensional models for having drafting are all opaque, and the result of drafting is all output in the geometry buffer area of multiple sampling.Institute
Multiple sampling geometry buffer area is called, just refers to that a series of buffering area of attribute informations can be stored, while the resolution of the buffering area
Rate is the screen resolution of n times of size, and n is the multiple for carrying out multiple sampling.
● geometry buffer plot structure is designed
Table 1. illustrates the content towards geometry buffer area in delay coloring flow, and geometry buffer area of the invention is tied institute
The every buffer contents having all have made the form of texture, while with the addition of multiple sampling mark texture.Diffusing reflection rate is buffered
Area uses common sRGB forms.Normal direction has used 16 precision rather than 8 common precision, allows for realization screen
Curtain space reflection effect (Morgan McGuire and Michael Mara. " Efficient GPU screen-space
Ray tracing " .Journal of Computer Graphics Techniques, 2014.) requirement to normal direction precision compared with
Height, can be produced using 8 precision and be evident that noise.Spontaneous luminous intensity has used floating-point format, for realizing high dynamic range
The halation result enclosed.Material information numbers to represent using integer, the different illumination algorithm of different numbering expressions and parameter.Remove
More than outside several relatively conventional buffering areas, further comprises a multiple sampling mark buffer in geometry buffer area, this
Buffering area is used for needing to carry out the pixel of multiple sampling processing when storing mark delay coloring, and the buffering area can both be used as geometry
One part of buffering area, can also create and use as a single buffering area.
The modules that the geometry buffer area of present invention delay coloring is designed as participating in drawing provide a consistent number
According to output format, connect equivalent between the module and other each modules to perform illumination calculation there is provided consistent data exchange
Mouthful, contribute under originally loose modules tissue to unified drafting flow.
The structure in the geometry buffer area of table 1.
● solid threedimensional modeling rendering
Refer mainly to the natures such as man-made objects, the vegetation models such as geographic object, the BUILDINGS MODELSs such as landform in three-dimensional scenic
Object.What these objects were made up of triangle gridding has the object for determining physical form.Because triangle is polygonal most allusion quotation
The form of type, and most of discrete threedimensional models or the representation of scene also use triangular mesh, in the present invention
It is all equally all to occur on polygon the problem of be directed to triangle, therefore in follow-up discussion, the present invention is with triangle
For target, but the equally applicable shape changeable for going other forms of the method for the invention.These objects represent by triangular mesh,
Its hiding relation can be solved using depth test.This class object is drawn on the display device of low resolution and is commonly encountered three often
The aliasing problems of angled edge and intersection, are generally required using the calculation of the antialiasing such as multiple sampling to eliminate these crenellated phenomenas
Method.
This drawing process is without illumination calculation, without texture mapping.The result for drawing generation all writes multiple adopt
In sample geometry buffer area, these buffering areas contain reflectivity (because outdoor illumination is based on diffusing reflection, therefore in the present invention
In, reflectivity and diffusing reflection rate can equivalence use), normal direction, material, the information such as luminous, depth.One scene is carried out above-mentioned
The result that geometry draws resulting several buffering areas is as shown in Figure 2.
Step 2:Grid drawing with refraction effect
The step is also the step during geometry is drawn, and referring mainly to river surface, sea etc. both has physical form, again can be to thereafter
Object (river bed, seabed, immersed body etc.) produce refraction effect transparent or semitransparent object, these objects need carry out
The illumination calculation of special refraction.The step for be option, can both perform, can also skip (if in virtual scene
And in the absence of the object with transparent or translucent attribute).In the application scenarios higher to efficiency requirements such as real-time rendering,
This kind of refraction effect is typically using the method for screen space image disturbances come approximation behavior, therefore the drawing order of this class object must
After must coming solid threedimensional model.In this step, depth and reflection are obtained first from the geometry buffer area of multiple sampling
Rate information, then by the drafting to water surface grid simultaneously generated using screen space image disturbances method these it is transparent or
The reflectivity of semitransparent object, depth, material information, and by the geometry buffer area of these information updatings to multiple sampling.
This class object is generally also modeled and drawn with triangular mesh, equally has saw in triangular rim and intersection
Tooth problem, therefore be also required to use multiple sampling antialiasing algorithm.
Step 3:The detection of down-sampled and multiple sampling
All data in multiple sampling geometry buffer area are performed into down-sampled and multiple sampling detecting step.It is down-sampled can
It is single so that the data of multiple sampling are reduced into the data of single sampling by average weighted method and single sampling geometry buffer area is write
The data in sampling geometry buffer area equally contain reflectivity, normal direction, material, luminous, depth information, but point of its buffering area
Resolution is consistent with screen resolution.It is of the invention specially propose multiple sampling detection method towards delay color mode, it is multiple to adopt
Sample detection is then that three important inspections (carrying out detailed discussion below) are performed during down-sampled, and inspection result is remembered
Record is in extra multiple sampling mark buffer.Multiple sampling mark buffer is a texture maps identical with screen resolution
The form of each pixel is 8 signless integers in picture, texture image, its low three represent whether the pixel has passed through respectively on
Three inspections stated, if certain inspection shows that the pixel needs to perform multiple sampling illumination, its corresponding position is designated as 1.This
The benefit of sample design is can neatly to give up the result of some inspections according to the feature of illumination algorithm in the illumination calculation stage, for example
The result of calculation of some illumination algorithm is unrelated with the locus of pixel, only relevant with normal direction and material, then use this light
During according to algorithm, it is possible to only check normal direction and the corresponding decision bits of material, give up the decision bits of depth.It can be entered using the strategy
One step reduces the pixel count for needing to perform multiple sampling illumination, improves performance.
● towards the multiple sampling and its detection method of delay coloring
(1) towards the multiple sampling strategy of delay coloring
Multi-sampling techniques are needed to use to eliminate triangle borderline sawtooth effect during drawing three-dimensional scene.Multiple sampling
Technology is initially to draw design for positive, and some problems can be brought using multi-sampling techniques under delay coloring environment.
One basic assumption of multiple sampling is that the data of multiple sampled points in same pixel can be obtained by weighted average
The data finally presented in this pixel.Under positive drawing mode, pixel data is the color that will be shown on screen, weighting
Averaging process Approximate Equivalent can eliminate most sawtooth effect really in carrying out LPF to high-resolution color data
Really.And under delay color mode, pixel internal storage storage is all not colouring information, also including geological information (depth, normal direction
Deng) and material information.The present invention is proposed to calculate pixel color first with geological information, then color is weighted averagely, and
First geological information is weighted averagely in traditional process, the geological information after weighted average is reused and calculates color, antialiasing
Effect can differ widely.
As shown in figure 3, provided with s1、s2Two planes, its normal vector is n1、n2, light source direction is L.s1Illuminated by light source, s2
It is not illuminated back to light source.Assuming that there is a pixel to cross over s1、s2Two planes, then it is highlighted that this pixel, which should have half,
Degree, second half is black, and the two weighted average obtains intermediate color, and that realizes Polygonal Boundary seamlessly transits effect.And if first
Calculate average normal direction nt, then with average normal direction calculating illumination, n can be obtainedtIt is more than 90 ° with light source angle, the color of whole pixel is
Black, it is impossible to which realization is seamlessly transitted, and sawtooth effect is still had on the intersection of two planes.
Same the problem of, is also occurred on depth information.As shown in figure 4, E is viewpoint, L is the circle around spot light, L
Represent the scope that it illuminates.A, B, E three point on a straight line, 2 points of A, B are fallen on after projective transformation in same pixel, in this picture
It is discontinuous that plain inside generates depth.B is illuminated in the range of the illuminating of L, and A is not in the range of the illuminating of L, therefore not
It is illuminated.To realize seamlessly transitting for pixel color in this boundary, the pixel should be filled with to be illuminated and completely or not
Transition value between illuminating.If first calculating the mean depth inside pixel, M points are obtained, then illumination is calculated at M points, can be obtained
Go out the error result that the pixel is not illuminated completely.
(2) towards the multiple sampling detection method of delay coloring
Multiple sampling algorithm is correctly realized under delay color mode, just color first must be calculated to each sampled point,
Color is weighted again average.If the pixel to full screen all does such processing, then need the illumination calculation performed
Task quantity will be greatly increased.Assuming that the geometry buffer area of system uses 8 times of multiple samplings, then each pixel must just be held
8 illumination calculations of row.This is actually to abandon the performance advantage that each pixel of multiple sampling only calculates a color, actual property
Super-sampling approach can be equal to.If illumination algorithm is more complicated, then the drafting efficiency of system will drastically decline.Obviously this
The strategy of sample is worthless.
The efficient method that the present invention is taken is the detection by carrying out multiple sampling so that only at the edge of triangle
Or intersection carries out the illumination calculation by sampled point.If some pixel is fully located at triangle interior, according to multiple sampling light
The rule of gated understands that multiple sampled points inside the pixel are all identical in addition to depth data.For these three
The pixel of angular inside, manifest error can't be brought by carrying out illumination calculation using the data after weighted average.Normal conditions
Lower triangle density, which is not more than on the density (i.e. the resolution ratio of pixel) of pixel, screen, is located at triangular rim or intersection
Pixel is always a small number of.Multiple sampling illumination calculation, compared with without using multiple sampling, increased meter are only performed in these pixels
Calculation amount is not a lot, can play good anti-aliasing effect yet.
The key problem of the program is to judge that some pixel is to be located at triangle interior, or positioned at boundary and edge.
This can be realized by analyzing the data of each sampled point inside pixel.The decision rule bag of multiple sampling detection proposed by the present invention
Include:
1) normal direction mutation rule
If the normal direction recorded in multiple sampled points inside a pixel is different, then it is assumed that passed through multiple sampling inspection
Survey, then this pixel needs to perform multiple sampling illumination calculation.
2) material mutation rule
If the material numbering recorded in multiple sampled points inside a pixel is different, then think this pixel needs
Perform multiple sampling illumination calculation.
3) depth mutation rule
If the deep minimum and maximum difference that are recorded in multiple sampled points inside a pixel are more than setting threshold
Value, then think that this pixel needs to perform multiple sampling illumination calculation.
Above-mentioned rule can not strictly judge whether some pixel is fully located at triangle interior.If some pixel is crossed over
Two triangulation methods it is all identical to, material, distance is also nearer in space, it is possible to leak through three inspections above, quilt
It is determined as in same triangle.But calculate illumination using the data after weighted average in this case and cause the general of mistake
Rate is relatively low, influences little to final picture effect.White point in the result that Fig. 5 is obtained for execution depth abrupt climatic change, figure
There is the pixel of depth mutation in the inside as detected, and Fig. 6 is by the result that is obtained after all detections of execution, wherein
White point is that the inside detected has the pixel of mutation.
Step 4:Starry sky (or sky) is drawn
The step is directed under conditions of extensive outdoor macroscopical scene, the back of the body of the skylight of the extensive macroscopical scene in outdoor
Scape needs to be simulated and drawn, and is the background of macroscopical extensive three-dimensional scenic.The step for be option, can both perform,
Can also skip (if sky background for whole three-dimensional scenic it is unimportant when).Starry sky in three-dimensional scenic typically uses environment
The bright spot of texture or infinite point is showed, and effective depth information is not written into during drafting, but needs to perform depth test
To ensure that starry sky will not block other objects in scene.Starry sky belongs to self-luminous object in itself, can both be plotted to geometry and delay
In the self-luminous buffering area for rushing area, the geometry that delay coloring flow can also be inserted into as a single plot step is drawn
Between operation and shading operations, the luminous intensity of Celestial Background is directly write into color buffer, the system is done using latter
Method.The color and depth information of final starry sky or sky are respectively outputted in the screen buffer for display, screen buffer
Area includes color buffer and depth buffered respectively.
Step 5:Atmospheric scattering and sky optical oomputing
The corresponding step is exactly the second stage in delay color mode, i.e., real illumination calculation and color range
Section.The data in the existing multiple sampling geometry buffer area of input data of this step, there is the data in single sampling geometry buffer area again,
The illumination calculation and tinting stage for being referred to as compound multiple sampling are performed, so-called compound multiple sampling refers to locate in tinter
The pixel of reason, existing use multiple sampling mode carries out the pixel of illumination calculation, also has and carries out illumination meter using single sample mode
The pixel of calculation.
The principle of multiple sampling is as shown in fig. 7, when a part for pel covers the sub-sampling point in pixel, then can hold
Row piece member tinter (Fragment shader or pixel coloring device Pixel Shader), the execution of piece member tinter is not
In units of sub-sampling point, that is to say, that no matter there are multiple sub-sampling points, for each pel, this pixel Exactly-once piece
First tinter.When the sub-sampling of these in color buffer point, during the color for the pel for being filled with all draftings, will average meter
The color of this final pixel is calculated, this color will be unique value.
The present invention's is characterized in that, the present invention has carried out multiple sampling detection in step 3 before this, and thus obtains
Obtained multiple sampling mark buffer, in this step, the present invention read mark buffer in content, and in this, as whether
Perform the foundation of multiple sampling illumination calculation.Namely in this illumination calculation and tinting stage, each polygon of drafting is covered
The each location of pixels covered only produces the color data (or referred to as color data of piece member) of a pixel, and only depth is believed
Breath and coverage rate information need to calculate each sampled point (can include multiple sampled points in a pixel) respectively.Adopted due to multiple
Low three of sample represent that the pixel needs to perform multiple sampling illumination respectively.This illumination calculation stage can be neatly according to illumination
The feature of algorithm gives up the result of some inspections, and the result of calculation of such as some illumination algorithm is unrelated with the locus of pixel,
It is only relevant with normal direction and material, then during using this illumination algorithm, it is possible to only to check normal direction and the corresponding decision bits of material,
Give up the decision bits of depth.The pixel count for needing to perform multiple sampling illumination can be further reduced using the strategy, raising property
Energy.For need perform multiple sampling illumination pixel, then its using from the data in multiple sampling geometry buffer area to multiple
Sampled point calculate illumination, in pixel coloring device perform illumination calculation model use carry atmospheric scattering illumination model for
(Eric Bruneton and Fabrice Neyret.“Precomputed atmospheric scattering”.In:
Computer Graphics Forum, 2008:1079-1086.) illumination that, most multiple sampled points are calculated at last is weighted
Average or other average or filtering mode processing, obtain the color and depth information of the pixel.Singly adopted for needing to perform
The pixel of sample illumination, then it is used calculates illumination from the data in single sampling geometry buffer area to single pixel, in pixel shader
The model that illumination calculation is performed in device is used with many sampling identical models, and the color and depth for finally calculating the pixel are believed
Breath.The color and depth information for all pixels that both calculate are output in color and depth buffer, for final
Display output.
Step 6:Non-physical effect
Refer to all be not included in it is among other three classes, not with object of the three-dimensional grid as the form of expression.Such as grain
Sub- effect (rainfall, snowfall, particle cloud), post processing effect etc..The step for be option, can both perform, can also skip
If (in whole three-dimensional scenic and when the natural phenomenas such as cloud, rain, snow and correspondence effect is not present).This class object is typically no really
Fixed border, and itself is also more with the presence of translucent form, often in the absence of aliasing problems, can be adopted without using multiple
Sample loading mode draws to improve drafting efficiency.Post processing effect directly operates the image completed, and particle effect is then present
The mixed problem of translucent particle.Therefore after the drawing order of the two should all come above-mentioned three kinds of objects.In general grain
Although sub- effect is without specific 3D shape, particle is still present among some position of three-dimensional scenic in itself.Cause
The drafting of this particle effect should be placed on before post processing effect.The object of these final non-physical draw obtained color with
Depth information is respectively outputted in color and depth buffer for display.
Claims (10)
1. a kind of method for drafting of Large-scale Macro virtual scene, its step is:
1) multiple sampling geometry buffer area is created;
2) the various solid threedimensional models in virtual scene are drawn, and the multiple sampling geometry buffer is arrived into the result storage of drafting
Qu Zhong;
3) perform down-sampled and multiple sampling to all data in the multiple sampling geometry buffer area to detect, by down-sampled
Obtained single sampled data is stored in a single sampling geometry buffer area, and multiple sampling mark is arrived in the result storage of multiple sampling detection
In buffering area;Wherein, multiple sampling mark buffer is used for needing to carry out the pixel of multiple sampling processing when identifying delay coloring;
4) illumination calculation and coloring are carried out to the pixel in the virtual scene;Wherein, if location of pixels is in the multiple sampling
It is labeled in mark buffer, then the data in the multiple sampling geometry buffer area perform multiple sampling illumination to the pixel
Calculate, otherwise the data in single sampling geometry buffer area perform single sampling illumination calculation to pixel.
2. the method as described in claim 1, it is characterised in that the multiple sampling geometry buffer area is buffered including diffusing reflection rate
Area, normal direction buffering area, spontaneous luminous intensity buffering area, material buffering area, depth buffer and multiple sampling mark buffer.
3. method as claimed in claim 1 or 2, it is characterised in that step 2) in, draw after solid threedimensional model, drawn
Its illumination has the three dimensional object of refraction effect in the virtual scene, and drawing result is saved in into the multiple sampling geometry delayed
Rush in area;Step 3) after carry out the drafting of starry sky or sky as the object of the background of virtual scene, by starry sky or sky
Color and depth information are output to screen buffer, then by step 4) calculate pixel colouring information and depth information output
To the screen buffer, for final display output;Step 4) after, the non-physical in the virtual scene is painted
System, its color and depth information are also output to screen buffer.
4. method as claimed in claim 1 or 2, it is characterised in that the resolution ratio in the multiple sampling geometry buffer area is screen
N times of curtain resolution ratio, n is the multiple of multiple sampling.
5. the method as described in claim 1, it is characterised in that the down-sampled method is:The data of multiple sampling are passed through
Average weighted method is reduced to single sampled data.
6. the method as described in claim 1 or 5, it is characterised in that the step 3), in multiple sampling detection process first with
Geological information calculates pixel color, then color is weighted averagely.
7. method as claimed in claim 1 or 2, it is characterised in that the multiple sampling mark buffer is one and screen
Etc. big texture image, the form of each pixel of the texture image is 8 signless integers, each of which pixel it is low three points
Do not represent that the pixel carries out the result of determination of multiple sampling detection according to 3 rules.
8. the method as described in claim 1, it is characterised in that the step 3), carry out the decision rule of multiple sampling detection
Including:
A) normal direction mutation rule;If the normal direction recorded in multiple sampled points inside i.e. one pixel is different, then it is assumed that the picture
Element has passed through multiple sampling detection, and the pixel needs to perform multiple sampling illumination calculation;
B) material mutation rule;If the material numbering recorded in multiple sampled points inside i.e. one pixel is different, the picture
Element needs to perform multiple sampling illumination calculation;
C) depth mutation rule;If the deep minimum recorded in multiple sampled points inside i.e. one pixel and maximum value difference
It is different to be more than given threshold, then it is assumed that the pixel needs to perform multiple sampling illumination calculation.
9. the method as described in claim 1, it is characterised in that single sampling geometry buffer area is buffered including diffusing reflection rate
Area, normal direction buffering area, spontaneous luminous intensity buffering area, material buffering area, depth buffer, point in single sampling geometry buffer area
Resolution is consistent with screen resolution.
10. a kind of drawing system of Large-scale Macro virtual scene, it is characterised in that including multiple sampling geometry buffer area, list
Geometry buffer of sampling area, solid threedimensional modeling rendering module, multiple sampling detection module and illumination calculation and staining module;Its
In,
Solid threedimensional modeling rendering module, is stored for drawing the solid threedimensional model in virtual scene, and by the result of drafting
Into the multiple sampling geometry buffer area;
Down-sampled and multiple sampling detection module, it is down-sampled for being performed to the data in the multiple sampling geometry buffer area, together
When multiple sampling detection is carried out to the multiple sampling geometry buffer area, and it is several that obtained single sampled data is stored in into a single sampling
What buffering area, multiple sampling testing result is saved in a multiple sampling mark buffer;Wherein, multiple sampling mark buffering
Area is used for needing to carry out the pixel of multiple sampling processing when storing mark delay coloring;
Illumination calculation and staining module, for carrying out illumination calculation and coloring to the pixel in the virtual scene;Wherein, if picture
Plain position is labeled in the multiple sampling mark buffer, then the data in the multiple sampling geometry buffer area are to this
Pixel performs multiple sampling illumination calculation, and otherwise the data in single sampling geometry buffer area perform single sampled light to pixel and shone
Calculate.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2016112341129 | 2016-12-28 | ||
CN201611234112 | 2016-12-28 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106952328A true CN106952328A (en) | 2017-07-14 |
CN106952328B CN106952328B (en) | 2019-11-19 |
Family
ID=59466932
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710086784.8A Active CN106952328B (en) | 2016-12-28 | 2017-02-17 | A kind of method for drafting and system of Large-scale Macro virtual scene |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106952328B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108022283A (en) * | 2017-12-06 | 2018-05-11 | 北京像素软件科技股份有限公司 | Rainwater analogy method, device and readable storage medium storing program for executing |
CN109887078A (en) * | 2019-03-12 | 2019-06-14 | 百度在线网络技术(北京)有限公司 | Sky method for drafting, device, equipment and medium |
CN110908510A (en) * | 2019-11-08 | 2020-03-24 | 四川大学 | Application method of oblique photography modeling data in immersive display equipment |
CN111798365A (en) * | 2020-06-12 | 2020-10-20 | 完美世界(北京)软件科技发展有限公司 | Deep anti-saw data reading method, device, equipment and storage medium |
CN112052864A (en) * | 2020-10-20 | 2020-12-08 | 网易(杭州)网络有限公司 | Image drawing method and device, electronic equipment and readable storage medium |
CN113223132A (en) * | 2021-04-21 | 2021-08-06 | 浙江大学 | Indoor scene virtual roaming method based on reflection decomposition |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103500463A (en) * | 2013-10-17 | 2014-01-08 | 北京大学 | Visualization method for multilayer shape feature fusion on GPU (Graphics Processing Unit) |
US20140085314A1 (en) * | 2011-05-20 | 2014-03-27 | Dream Chip Technologies Gmbh | Method for transmitting digital scene description data and transmitter and receiver scene processing device |
CN104183023A (en) * | 2014-07-25 | 2014-12-03 | 天津多微信息技术有限公司 | Multi-scene graph construction method in distributed virtual environment |
CN104680581A (en) * | 2015-03-05 | 2015-06-03 | 西安电子科技大学 | Architecture object selection method in three-dimensional environment |
CN105957132A (en) * | 2016-04-21 | 2016-09-21 | 北京大学 | Three dimensional scene high-performance drawing optimization method containing height complex drawing elements |
-
2017
- 2017-02-17 CN CN201710086784.8A patent/CN106952328B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140085314A1 (en) * | 2011-05-20 | 2014-03-27 | Dream Chip Technologies Gmbh | Method for transmitting digital scene description data and transmitter and receiver scene processing device |
CN103500463A (en) * | 2013-10-17 | 2014-01-08 | 北京大学 | Visualization method for multilayer shape feature fusion on GPU (Graphics Processing Unit) |
CN104183023A (en) * | 2014-07-25 | 2014-12-03 | 天津多微信息技术有限公司 | Multi-scene graph construction method in distributed virtual environment |
CN104680581A (en) * | 2015-03-05 | 2015-06-03 | 西安电子科技大学 | Architecture object selection method in three-dimensional environment |
CN105957132A (en) * | 2016-04-21 | 2016-09-21 | 北京大学 | Three dimensional scene high-performance drawing optimization method containing height complex drawing elements |
Non-Patent Citations (2)
Title |
---|
ZHAOLIN CHEN 等: ""3D Texture Mapping in Multi-view Reconstruction"", 《ISVC 2012》 * |
徐泽骅 等: ""基于OpenGL的地图渲染引擎设计与实现"", 《地理信息世界》 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108022283A (en) * | 2017-12-06 | 2018-05-11 | 北京像素软件科技股份有限公司 | Rainwater analogy method, device and readable storage medium storing program for executing |
CN109887078A (en) * | 2019-03-12 | 2019-06-14 | 百度在线网络技术(北京)有限公司 | Sky method for drafting, device, equipment and medium |
CN110908510A (en) * | 2019-11-08 | 2020-03-24 | 四川大学 | Application method of oblique photography modeling data in immersive display equipment |
CN110908510B (en) * | 2019-11-08 | 2022-09-02 | 四川大学 | Application method of oblique photography modeling data in immersive display equipment |
CN111798365A (en) * | 2020-06-12 | 2020-10-20 | 完美世界(北京)软件科技发展有限公司 | Deep anti-saw data reading method, device, equipment and storage medium |
CN111798365B (en) * | 2020-06-12 | 2023-09-01 | 完美世界(北京)软件科技发展有限公司 | Deep antialiasing data reading method, device, equipment and storage medium |
CN112052864A (en) * | 2020-10-20 | 2020-12-08 | 网易(杭州)网络有限公司 | Image drawing method and device, electronic equipment and readable storage medium |
CN113223132A (en) * | 2021-04-21 | 2021-08-06 | 浙江大学 | Indoor scene virtual roaming method based on reflection decomposition |
CN113223132B (en) * | 2021-04-21 | 2022-05-17 | 浙江大学 | Indoor scene virtual roaming method based on reflection decomposition |
Also Published As
Publication number | Publication date |
---|---|
CN106952328B (en) | 2019-11-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106952328B (en) | A kind of method for drafting and system of Large-scale Macro virtual scene | |
CN111968216B (en) | Volume cloud shadow rendering method and device, electronic equipment and storage medium | |
Kaufman et al. | Volume graphics | |
CN111508052B (en) | Rendering method and device of three-dimensional grid body | |
CN106485776A (en) | A kind of method and system of 3D game real-time rendering large scale scene | |
CN106127853B (en) | A kind of unmanned plane Analysis of detectable region method | |
CN107452048A (en) | The computational methods and device of global illumination | |
CN111784833A (en) | WebGL-based flood evolution situation three-dimensional dynamic visualization display method | |
CN113674389B (en) | Scene rendering method and device, electronic equipment and storage medium | |
JPH04502368A (en) | image generator | |
McLaren et al. | Visualisation of digital terrain models: techniques and applications | |
US20140354672A1 (en) | Dynamic skydome system | |
CN106056670B (en) | The radiant energy dfensity analogy method blocked is rejected in tower-type solar thermal power generating system | |
CN104318605B (en) | Parallel lamination rendering method of vector solid line and three-dimensional terrain | |
US20190035147A1 (en) | Graphics processing systems | |
CN102592306B (en) | The method of estimation blocked in virtual environment | |
Döllner | Non-photorealistic 3D geovisualization | |
Wenzel | Real-time atmospheric effects in games | |
Nakamae et al. | Compositing 3D images with antialiasing and various shading effects | |
Kennie et al. | Modelling for digital terrain and landscape visualisation | |
CN113806654A (en) | Virtual space system based on geographic information | |
CN117173369B (en) | WebGL-based three-dimensional flood evolution simulation method and system | |
Nilsson | 3D Cloud Visualization In Real-Time | |
Kol | Real-time Cloud Rendering on the GPU | |
CN117611754A (en) | Global ocean current visualization method and system for virtual battlefield |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |