CN103714570A - Algorithm for accelerating particle rendering based on coarse sampling depth value - Google Patents
Algorithm for accelerating particle rendering based on coarse sampling depth value Download PDFInfo
- Publication number
- CN103714570A CN103714570A CN201310740915.1A CN201310740915A CN103714570A CN 103714570 A CN103714570 A CN 103714570A CN 201310740915 A CN201310740915 A CN 201310740915A CN 103714570 A CN103714570 A CN 103714570A
- Authority
- CN
- China
- Prior art keywords
- depth
- color
- screen
- sampling
- value
- 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.)
- Pending
Links
Images
Landscapes
- Image Generation (AREA)
Abstract
The invention discloses an algorithm for accelerating particle rendering based on a coarse sampling depth value, relates to the technology of three-dimensional computer rendering, and aims at providing an algorithm for accelerating the particle rendering based on the coarse sampling depth technology. The algorithm is characterized by comprising the following steps that firstly, a fixed entity and a particle swarm are divided and separated from a scene; secondly, color values and depth values of all pixels of the fixed entity are drawn to a color cache region and a depth cache region respectively; thirdly, color values and depth values of the particle swarm are drawn to a screen-off color surface and a screen-off depth surface respectively; fourthly, downward sampling is carried out on the depth cache region according to the sampling coefficient x, and the sampling result is stored into the screen-off depth cache region; fifthly, depth measuring is carried out on the screen-off depth surface and the screen-off depth cache region to obtain the modified screen-off color surface; sixthly, upward sampling is carried out on the modified screen-off color surface according to the sampling coefficient x so that the size of the color cache region can be sampled on the screen-off color surface, and the corresponding color cache region is covered.
Description
Technical field
The present invention relates to three-dimensional computer Rendering.
Background technology
In large-scale distributed analogue system, for the sense of reality and the shock sense of enhanced scene, the particle special efficacy that often need to place ten hundreds of motion models and the order of magnitude that is multiplied in camera lens, these special efficacys comprise battlefield pyrotechnics, water wave etc.For the particle special efficacy of moulding more complicated, similar mushroom cloud, ship wave etc., not only need a plurality of population moulding, also needs to superpose on this basis many levels, produces more three-dimensional simulated effect.What the true effect of high-quality brought is heavy system loading, therefore easily causes the phenomenon of picture clamping stagnation.
In prior art, for the optimized algorithm of model comparative maturity, and population accelerates to play up not progress of algorithm, and it is to reduce number of particles that the population adopting is at present accelerated rendering intent, thereby reduces the load that it causes system.
The problem that significantly minimizing brings of number of particles is apparent: special efficacy produces position and presents stronger particle granular sensation, and the whole sense of reality of special efficacy is had a greatly reduced quality.
Summary of the invention
According to observations, compare meticulous model, what the particle special efficacys such as the cigarette of agglomerate, mist and water wave were mostly set up is a kind of fuzzy effect, and they do not need profile and border clearly.Therefore can consider to reduce the sampling rate of particle special efficacy, reduce the system loading that it causes.
The present invention proposes a kind of configurable particle display resolution, the algorithm that comes accelerated particle to play up by thick sampling depth technology.
The technical solution used in the present invention is as follows: comprise the following steps:
Step 1: divide from scene and separate permanent entity and population, play up respectively processing for the later stage;
Step 2: for described permanent entity creates color buffer area and depth buffer district; And the color value of each pixel of permanent entity is plotted in described color buffer area, the depth value of each pixel of permanent entity is plotted in described depth buffer district;
Step 3: for described population creates from screen color surface with from two regions, screen degree of depth surface; And the color value of population is plotted in screen color surface, the depth value of population is plotted in screen degree of depth surface;
Step 4: x carries out down sample to depth buffer district and sampled result is stored in Li Ping depth buffer district according to sampling coefficient, described Li Ping depth buffer district, surperficial and identical from screen degree of depth surface size from screen color;
Step 5: obtain amended from screen color surface to carry out depth detection from Ji Liping depth buffer district, screen degree of depth surface: the depth value of pixel corresponding to the address in the depth value Yu Liping depth buffer district of the pixel in screen degree of depth surface is compared, if larger from the depth value that shields the pixel in degree of depth surface, this pixel is abandoned in color corresponding in screen color surface, otherwise retain this pixel in color corresponding in screen color surface;
Step 6: according to sampling coefficient x by described amended carrying out from screen color surface to being upsampled to color buffer size, use the color value that covers address respective pixel in color buffer area from the color value of the pixel of the retaining color in screen color surface, constant with the color value of the pixel address respective pixel that abandons color in screen color surface in color buffer area.
Preferably, point sampling algorithm centered by the method for described down sample: use x
2the sampling template traversal depth buffer district of size, by each x
2the central point of the depth buffer district regional area of size extracts in Li Ping depth buffer district.
Accordingly, the described method to up-sampling is: amended each point in screen color surface is reduced to x by address mapping calculation
2the regional area of size, in this region the color value of each pixel for after revising from the color value of this point in screen color surface, thereby will be upsampled to from screen color surface color buffer size.
Preferably, the method for described down sample is for putting maximal value Algorithms of Selecting around: use x
2the sampling template traversal depth buffer district of size, by each x
2the maximum of points of the depth buffer district regional area of size is extracted in Li Ping depth buffer district.
Accordingly, the described method to up-sampling is: amended each point in screen color surface is reduced to x by address mapping calculation
2the regional area of size, in this region the color value of each pixel for after revising from the color value of this point in screen color surface, thereby will be upsampled to from screen color surface color buffer size.
Preferably, described color buffer area and depth buffer district are arranged in video memory.
Preferably, describedly from screen color surface and from screen degree of depth surface, be arranged in video memory.
In sum, owing to having adopted technique scheme, the invention has the beneficial effects as follows:
Do not need to reduce total number of particles, utilize the feature of the obscurity boundary of particle own to reduce the resolution of single particle, thereby improve particle rendering speed.
One embodiment of the invention is put maximal value Algorithms of Selecting around adopting and is carried out down sample, can effectively eliminate the permanent entity profile ring of light that thick sampling depth value method causes.
Accompanying drawing explanation
Examples of the present invention will be described by way of reference to the accompanying drawings, wherein:
Fig. 1 is method flow diagram of the present invention.
Embodiment
Disclosed all features in this instructions, or the step in disclosed all methods or process, except mutually exclusive feature and/or step, all can combine by any way.
Disclosed arbitrary feature in this instructions, unless narration especially all can be replaced by other equivalences or the alternative features with similar object.That is,, unless narration especially, each feature is an example in a series of equivalences or similar characteristics.
As Fig. 1, the present invention includes following steps:
Step 1: divide from scene and separate permanent entity and population, play up respectively processing for the later stage; This step is easy to realize in computer graphics process, is that permanent entity and population are stored respectively.
Step 2: for described permanent entity creates color buffer area and depth buffer district; And the color value of each pixel of permanent entity is plotted in described color buffer area, the depth value of each pixel of permanent entity is plotted in described depth buffer district; In another embodiment, color buffer area and depth buffer district can be arranged in video memory, to improve the real-time of demonstration.
Step 3: for described population creates from screen color surface with from two regions, screen degree of depth surface; And the color value of population is plotted in screen color surface, the depth value of population is plotted in screen degree of depth surface; In another embodiment, from screen color surface and from screen degree of depth surface, be arranged in video memory.
Step 4: x carries out down sample to depth buffer district and sampled result is stored in Li Ping depth buffer district according to sampling coefficient, described Li Ping depth buffer district, surperficial and identical from screen degree of depth surface size from screen color.
Described sampling coefficient x can be configured according to the minimum resolution of population, preferably, color buffer area and depth buffer district are logically the square of homalographic, and sampling coefficient x is for square, the approximate number of number of pixels and sampling coefficient x are not equal to 1 and described number of pixels on one side arbitrarily.For example square number of pixels is on one side 25, and sampling coefficient x is set to 5.
Here saidly according to sampling coefficient x, depth buffer district is carried out to down sample and sampled result is stored into and in Li Ping depth buffer district, refers to that Li Ping depth buffer district can just store down according to sampling coefficient x and depth buffer district is carried out to the sampled result of down sample.
Step 5: obtain amended from screen color surface to carry out depth detection from Ji Liping depth buffer district, screen degree of depth surface: the depth value of pixel corresponding to the address in the depth value Yu Liping depth buffer district of the pixel in screen degree of depth surface is compared, if larger from the depth value that shields the pixel in degree of depth surface, this pixel is abandoned in color corresponding in screen color surface, otherwise retain this pixel in color corresponding in screen color surface.
Step 6: according to sampling coefficient x by described amended carrying out from screen color surface to being upsampled to color buffer size, use the color value that covers address respective pixel in color buffer area from the color value of the pixel of the retaining color in screen color surface, constant with the color value of the pixel address respective pixel that abandons color in screen color surface in color buffer area.
In one embodiment, centered by the method for described down sample, point sampling algorithm is such: use x
2the sampling template traversal depth buffer district of size, by each x
2the central point of the depth buffer district regional area of size extracts in Li Ping depth buffer district.This kind of method of sampling is faster, is easy to use, but may makes permanent entity profile occur the ring of light.
In another embodiment, the method for described down sample is for putting maximal value Algorithms of Selecting around: use x
2the sampling template of size travels through interim depth buffer district, by each x
2the maximum of points of the depth buffer district regional area of size is extracted in Li Ping depth buffer district.This kind of method of sampling can effectively be eliminated the permanent entity profile ring of light, but due to the maximal value that need to choose in each regional area, arithmetic speed is slower.
Corresponding above-mentioned two kinds of down samples, to the method for up-sampling are: amended each point in screen color surface is reduced to x by address mapping calculation
2the regional area of size, in this region the color value of each pixel for after revising from the color value of this point in screen color surface, thereby will be upsampled to from screen color surface color buffer size.Because the point having from screen color surface through revising is owing to not passing through depth detection, and its color value is abandoned, therefore the pixel from the point having in screen color surface obtaining to up-sampling like this may not have color value, and those skilled in the art are to be understood that not having a color value of point of color value is 0.
The present invention is not limited to aforesaid embodiment.The present invention expands to any new feature or any new combination disclosing in this manual, and the arbitrary new method disclosing or step or any new combination of process.
Claims (7)
1. by thick sampling depth value accelerated particle, play up an algorithm, it is characterized in that, comprise the following steps:
Step 1: divide from scene and separate permanent entity and population, play up respectively processing for the later stage;
Step 2: for described permanent entity creates color buffer area and depth buffer district; And the color value of each pixel of permanent entity is plotted in described color buffer area, the depth value of each pixel of permanent entity is plotted in described depth buffer district;
Step 3: for described population creates from screen color surface with from two regions, screen degree of depth surface; And the color value of population is plotted in screen color surface, the depth value of population is plotted in screen degree of depth surface;
Step 4: x carries out down sample to depth buffer district and sampled result is stored in Li Ping depth buffer district according to sampling coefficient, described Li Ping depth buffer district, surperficial and identical from screen degree of depth surface size from screen color;
Step 5: obtain amended from screen color surface to carry out depth detection from Ji Liping depth buffer district, screen degree of depth surface: the depth value of pixel corresponding to the address in the depth value Yu Liping depth buffer district of the pixel in screen degree of depth surface is compared, if larger from the depth value that shields the pixel in degree of depth surface, this pixel is abandoned in color corresponding in screen color surface, otherwise retain this pixel in color corresponding in screen color surface;
Step 6: according to sampling coefficient x by described amended carrying out from screen color surface to being upsampled to color buffer size, use the color value that covers address respective pixel in color buffer area from the color value of the pixel of the retaining color in screen color surface, constant with the color value of the pixel address respective pixel that abandons color in screen color surface in color buffer area.
2. according to claim 1ly a kind ofly by thick sampling depth value accelerated particle, play up algorithm, it is characterized in that point sampling algorithm centered by the method for described down sample: use x
2the sampling template traversal depth buffer district of size, by each x
2the central point of the depth buffer district regional area of size extracts in Li Ping depth buffer district.
3. according to claim 2ly a kind ofly by thick sampling depth value accelerated particle, play up algorithm, it is characterized in that, the described method to up-sampling is: amended each point in screen color surface is reduced to x by address mapping calculation
2the regional area of size, in this region the color value of each pixel for after revising from the color value of this point in screen color surface, thereby will be upsampled to from screen color surface color buffer size.
4. according to claim 1ly a kind ofly by thick sampling depth value accelerated particle, play up algorithm, it is characterized in that, the method for described down sample is for putting maximal value Algorithms of Selecting around: use x
2the sampling template traversal depth buffer district of size, by each x
2the maximum of points of the depth buffer district regional area of size is extracted in Li Ping depth buffer district.
5. according to claim 4ly a kind ofly by thick sampling depth value accelerated particle, play up algorithm, it is characterized in that, the described method to up-sampling is: amended each point in screen color surface is reduced to x by address mapping calculation
2the regional area of size, in this region the color value of each pixel for after revising from the color value of this point in screen color surface, thereby will be upsampled to from screen color surface color buffer size.
6. according to claim 1ly a kind ofly by thick sampling depth value accelerated particle, play up algorithm, it is characterized in that, described color buffer area and depth buffer district are arranged in video memory.
7. according to claim 1ly a kind ofly by thick sampling depth value accelerated particle, play up algorithm, it is characterized in that, describedly from screen color surface and from screen degree of depth surface, be arranged in video memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310740915.1A CN103714570A (en) | 2013-12-30 | 2013-12-30 | Algorithm for accelerating particle rendering based on coarse sampling depth value |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310740915.1A CN103714570A (en) | 2013-12-30 | 2013-12-30 | Algorithm for accelerating particle rendering based on coarse sampling depth value |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103714570A true CN103714570A (en) | 2014-04-09 |
Family
ID=50407511
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310740915.1A Pending CN103714570A (en) | 2013-12-30 | 2013-12-30 | Algorithm for accelerating particle rendering based on coarse sampling depth value |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103714570A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108476325A (en) * | 2015-11-09 | 2018-08-31 | 奈飞公司 | High dynamic range color translational correction |
US10715772B2 (en) | 2015-11-09 | 2020-07-14 | Netflix, Inc. | High dynamic range color conversion correction |
US10742986B2 (en) | 2015-11-09 | 2020-08-11 | Netflix, Inc. | High dynamic range color conversion correction |
-
2013
- 2013-12-30 CN CN201310740915.1A patent/CN103714570A/en active Pending
Non-Patent Citations (5)
Title |
---|
IAIN CANTLAY: "《GPU精粹3》", 1 June 2010 * |
J JANSEN等: "《Fast rendering of opacity- mapped particles using DirectX 11 tessellation and mixed resolutions》", 《NVIDIA WHITEPAPER》 * |
任逢爽: "《基于软粒子技术的烟雾特效模拟》", 《中国优秀硕士学位论文全文数据库(电子期刊)》 * |
徐冬: "《基于镶嵌的低分辨率离屏混合粒子渲染》", 《数字技术与应用》 * |
赵欣等: "《基于粒子系统实现船舶航迹仿真的加速方法》", 《大连海事大学学报》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108476325A (en) * | 2015-11-09 | 2018-08-31 | 奈飞公司 | High dynamic range color translational correction |
US10715772B2 (en) | 2015-11-09 | 2020-07-14 | Netflix, Inc. | High dynamic range color conversion correction |
US10742986B2 (en) | 2015-11-09 | 2020-08-11 | Netflix, Inc. | High dynamic range color conversion correction |
US10750146B2 (en) | 2015-11-09 | 2020-08-18 | Netflix, Inc. | High dynamic range color conversion correction |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101922482B1 (en) | Varying effective resolution by screen location by changing active color sample count within multiple render targets | |
KR101639852B1 (en) | Pixel value compaction for graphics processing | |
CN108022223B (en) | Tone mapping method based on logarithm mapping function blocking processing fusion | |
CN104331918A (en) | Occlusion culling and acceleration method for drawing outdoor ground surface in real time based on depth map | |
JP2017091523A (en) | 3d rendering method and 3d rendering apparatus | |
US9905036B2 (en) | Graphics processing unit for adjusting level-of-detail, method of operating the same, and devices including the same | |
JP2016100017A (en) | Image processing apparatus and method | |
CN104050708A (en) | 3D game engine LOD system achievement method | |
CN105096375B (en) | Image processing method and apparatus | |
US10861243B1 (en) | Context-sensitive augmented reality | |
US20180174349A1 (en) | Adaptive partition mechanism with arbitrary tile shape for tile based rendering gpu architecture | |
EP2860701A3 (en) | Photorealistic rendering of scenes with dynamic content | |
CN104103089A (en) | Real-time soft shadow realization method based on image screen space | |
US11182942B2 (en) | Map generation system and method for generating an accurate building shadow | |
JP2016502717A5 (en) | ||
CN103714570A (en) | Algorithm for accelerating particle rendering based on coarse sampling depth value | |
CN104103092A (en) | Real-time dynamic shadowing realization method based on projector lamp | |
CN104157005A (en) | Image-based HDR (high-dynamic range) illumination rendering method | |
DE102019121200A1 (en) | MOTION-ADAPTIVE RENDERING BY SHADING WITH A VARIABLE RATE | |
CN109461197B (en) | Cloud real-time drawing optimization method based on spherical UV and re-projection | |
CN107679150A (en) | Magnanimity three-dimensional data fast dispatch method | |
CN104392475B (en) | A kind of display methods and its display device of weather particle | |
MohammadBagher et al. | Screen-space percentage-closer soft shadows | |
KR101499124B1 (en) | Method and apparratus of image processing using shared memory | |
CN109829962B (en) | Object space hidden line elimination calculation acceleration method using OPENGL |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140409 |