CN102981840A - Overall illumination computer simulation processing method based on photon mapping image - Google Patents

Overall illumination computer simulation processing method based on photon mapping image Download PDF

Info

Publication number
CN102981840A
CN102981840A CN2012104417471A CN201210441747A CN102981840A CN 102981840 A CN102981840 A CN 102981840A CN 2012104417471 A CN2012104417471 A CN 2012104417471A CN 201210441747 A CN201210441747 A CN 201210441747A CN 102981840 A CN102981840 A CN 102981840A
Authority
CN
China
Prior art keywords
photon
scene
mapping
photon mapping
reflection
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
Application number
CN2012104417471A
Other languages
Chinese (zh)
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.)
SUZHOU LIANGJIANG TECHNOLOGY Co Ltd
Original Assignee
SUZHOU LIANGJIANG TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SUZHOU LIANGJIANG TECHNOLOGY Co Ltd filed Critical SUZHOU LIANGJIANG TECHNOLOGY Co Ltd
Priority to CN2012104417471A priority Critical patent/CN102981840A/en
Publication of CN102981840A publication Critical patent/CN102981840A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

The invention discloses an overall illumination computer simulation processing method based on a photon mapping image. The method is characterized by comprising that a photon is emitted from a light source to a computer virtualized scene and is tracked, and when the photon strikes the surface of a scene content non-specular surface object, the photon is stored in the photon mapping image; incidence luminous flux of any point in the computer virtualized scene and reflected luminescence radiancy information are extracted by means of statistic technique according to the photon mapping image, calculating the pixel color value, and carrying out image drawing and rendering in the scene. The overall illumination computer simulation processing method based on the photon mapping image is based on the principle of photon mapping, effect of a processed image is life-like, calculating and processing speed is high, and meshing is not needed. The overall illumination computer simulation processing method based on the photon mapping image is especially suitable for light treatment in complex scenes.

Description

Global illumination computer simulation disposal route based on Photon Mapping figure
Technical field
The invention belongs to the computer virtual technical field of image processing, be specifically related to a kind of global illumination computer simulation disposal route based on Photon Mapping figure.
Background technology
Along with the progress of computer software and hardware science and technology, computer graphics has also obtained developing rapidly, is widely used in every field.In various fields such as computer-aided design (CAD), computer simulation, visualization in scientific computing, virtual reality, computer animation and amusement, ad production, film and TV synthesize, requirement to picture quality is more and more higher, be not limited only to access image, but require computing velocity faster, image effect is more true to nature, sometimes also needs surreal result.Particularly naturally the simulation this aspect, represented especially for some years powerful demand recently.Requirement can be simulated special weather, environment and natural scene, material, reaches a special scene environment, and this just draws photo-realistic images and has proposed a more difficult problem.
From the physics angle, it is higher to generate quality, image with stronger sense of reality, consider from desirable situation, just need as far as possible truly communication process and the scatter distributions of simulated optical energy in scene, reach the energy transmission balance in the nature, namely consider the light source that scene is all, the reflection of illumination energy between all body surfaces (comprising diffuse reflection and mirror-reflection), the interaction relationships such as refraction and transmission, also to consider the object of originally not luminous (object that does not have energy) in energy absorption and the scattering carried out later on through illumination, Here it is so-called global illumination model (Global I11umination).Computer picture generation technique take global illumination model as the basis is called as photo-realistic images and generates (Realistic Image Synthesis) technology.
Ray trace and radiancy are two kinds of global illumination models commonly used, and wherein ray trace has characteristics simple, powerful, easy realization, but a lot of things of real world can't be processed well.Such as: shine (Bleeding), caustic (Caustics) texts.Until 1996, Photon Mapping is suggested, and ray trace all can't effectively solve these two problems, and Photon Mapping provides good solution to these two problems.Shine and the caustics phenomenon all is that the indirect light of diffuse surface is according to causing.Use the photon mapping method, this class illumination can be estimated with the photon figure (Photon map) of precomputation.Ray trace is expanded to Photon Mapping, can produce a kind of energy and solve the method for any direct or indirect illumination.And Photon Mapping also can process intermediate medium (participating media) situation, and is easy to do very much parallel computation.
Since the Photon Mapping method synthesis advantage of existing various lightings, comprise these two kinds main global illumination technology of ray trace and radiancy, therefore in recent years Photon Mapping oneself through becoming one of most popular algorithm of calculating global illumination.The present invention therefore.
Summary of the invention
The object of the invention is to provide a kind of global illumination computer simulation disposal route based on Photon Mapping figure, has solved in the prior art that photo-realistic images is difficult to the problems such as drafting under the photoenvironment.
In order to solve these problems of the prior art, technical scheme provided by the invention is:
A kind of global illumination computer simulation disposal route based on Photon Mapping figure is characterized in that said method comprising the steps of:
(1) the emission photon carries out the photon tracking the scene from light source to computer virtual; When photon strikes arrives scene content non-specular surface object surface, photon is stored among the Photon Mapping figure of structure;
(2) desire to make money or profit according to Photon Mapping and extract about the incident flux of any point in the scene of computer virtual and the luminous radiation degree information of reflection with statistical technique, the calculating pixel color value carries out the Image Rendering in the scene and plays up.
Preferably, the storage photon adopts data structure KD tree to realize that the attribute of described photon comprises the position of photon, direction and energy in the described method.
Preferably, the memory location of quantity, the Photon Mapping figure of storage photon among the described method Photon Mapping figure, add photon function, photonic absorption function and the Photon Mapping figure function of resetting.
Preferably, when photon strikes arrived scene content non-specular surface object surface, photon generation diffuse reflection, propagation or absorbed probability were determined by the Russian roulette method in the described method.
Preferably, described method Russian roulette method is carried out in accordance with the following steps:
Suppose to have in the scene reflecting surface of diffuse-reflection factor d and specularity factor S, equally distributed stochastic variable ξ ∈ [0,1] is used in d+s≤1, adopts the collision probability of happening of determining in the following method photon, that is:
During ξ ∈ [0, d], photon collision generation diffuse reflection;
During ξ ∈ [d, s+d], photon collision generation mirror-reflection;
During ξ ∈ [s+d, 1], photon collision absorbs.
Preferably, the luminous radiation degree is to close on photon by searching in the described method, estimates to give out light radiation, obtains the luminous radiation degree.
Global illumination image processing method based on Photon Mapping figure is two process/two step method, briefly, exactly drawing process is divided into two stages, does different work in each stage.Wherein first step is set up Photon Mapping figure, launches photon from light source to scene, and, when photon strikes to the non-specular surface object surface time, they are stored among the Photon Mapping figure.Second step, drafting/render process, figure utilizes statistical technique at photon, and extraction is about the incident flux of any point of scene and the luminous radiation degree information of reflection.
The purpose of photon tracing process is to calculate the indirect light photograph of diffuse reflection surface, from source emissioning light, follows the tracks of these photons and passes scene, in their information of diffuse reflection surface storage.Pre-service Photon Mapping figure needs a good data structure to represent Photon Mapping figure.It is succinct that data structure is wanted, and can close on fast searching of photon, adopts KD to set to store photon herein.
The luminous radiation degree estimates that the generation for image is a crucial stage, the color value of calculating pixel, the directly effect of response diagram picture.Be exactly on any given direction, all to have the ability to calculate its luminous radiation degree for the surface point of any non-mirror reflection as one of advantage of Photon Mapping figure.Provide Photon Mapping figure, calculate the luminous radiation degree with it, realize that the computing of render phase is played up.
The present invention compared with prior art has following beneficial effect:
Technical solution of the present invention adopts Photon Mapping figure to carry out photo-irradiation treatment, and photo-irradiation treatment process and scene are separately processed, and the realization of technical scheme obtains rendering effect true to nature based on the principle of Photon Mapping.Photon figure and scene statement are to separate fully, without double counting.Do not need gridding, very fast at the complex scene medium velocity.For most of scene, can accomplish efficient.
Description of drawings
The invention will be further described below in conjunction with drawings and Examples:
Fig. 1 is that technical solution of the present invention is based on the global illumination computer simulation process flow figure of Photon Mapping figure.
Embodiment
Below in conjunction with specific embodiment such scheme is described further.Should be understood that these embodiment are not limited to limit the scope of the invention for explanation the present invention.The implementation condition that adopts among the embodiment can be done further adjustment according to the condition of concrete producer, and not marked implementation condition is generally the condition in the normal experiment.
Embodiment
As shown in Figure 1, present embodiment carries out the global illumination computer simulation processing flow chart based on Photon Mapping figure.Specifically carry out in accordance with the following steps:
(1) sets up the structure of photon
The structure of computing machine structure photon arranges by the parameter of simulated photons.The structure of photon mainly contains three variablees, is respectively the position of photon, direction, and energy, its structure is as follows:
Figure BDA00002371643400041
Because the present invention has used KD to set to store photon, therefore a variable also to be set indicate the position of photon in the KD tree.
(2) set up the class of photon figure
In order to disseminate energy and to adjust the photon motion, need to set up one and comprise photon structure and all functions CWinInetConnection.Such mainly contains following member variable or function: a pointer that points to overall photon figure, the variable of an interior photon number of the current photon figure of record, the constructed fuction that is used for replacement variable and useless pointer is used for the destructor function of unloading internal memory, adds the function of photon in the photon figure.
(3) in scene, launch photon
The emission photon at first needs to do in the scene be by each light source on random direction in the scene n photon of emission.At x, y arranges a random number on the z component, so just can obtain the random direction of a light transmition respectively.If bump in the scene, then process this photon, continue to repeat this process, until light source has sent n photon.When desirable photon battery has fired all, calculate again the energy of the shared light source of each photon.
The algorithmic procedure of the energy of the shared light source of each photon is as follows:
1. the light source in the scene set;
2. the number of emission photon is set;
3. choose a random direction emission photon;
4. seek the collision of nearest photon and object;
5. return the information of the point of impingement, object;
6. behind all photons of emission, calculate photon energy (1/n).
(4) photon storage
Only when the photon strikes diffuse reflection surface, it just can be stored in the present embodiment setting.Because for mirror-reflection, need a large amount of photons to map out reciprocal image.This point, ray tracing can be done better.Photon launches between object back and forth, and this just means that the photon that runs into diffuse reflection surface can be stored several times by the motion path along it, and this has just consisted of photon figure.
Present embodiment is as follows for the operation of photon:
1. when a diffuse reflection surface of a photon strikes, photon incident direction and energy storage in overall photon figure.Photon figure only comprises the diffuse reflection effect.
2. when photon strikes to minute surface, according to the opacity of object, determine that photon is reflected or reflects.
3. when surperficial existing diffuse reflection has mirror-reflection again, then adopt a kind of method to determine at random to occur minute surface emission or diffuse reflection.
If 4. photon is by Surface absorption, then it is stored among the photon figure, and finishes the life of photon.
Therefore, when a photon strikes arrived object, it can reflect arbitrarily, propagate, and perhaps is absorbed.No matter be that photon is to be reflected, to propagate or be absorbed, according to the characterisitic parameter of Facing material, the possibility that various effects occur has definite probability.Present embodiment is determined the probability of generation with the method for Russian roulette.
The concrete using method of Russian roulette is that for the reflecting surface with diffuse-reflection factor d and specularity factor S, equally distributed stochastic variable ξ ∈ [0,1] is used in d+s≤1, the strategy below adopting:
During ξ ∈ [0, d], belong to diffuse reflection;
During ξ ∈ [d, s+d], belong to mirror-reflection;
During ξ ∈ [s+d, 1], belong to absorption.
In an embodiment, the use of Russian roulette means the energy that does not change the reflection photon---correctness is guaranteed by the energy arithmetic mean of several photons in the time before reciprocation finishes.Consider the example of a Facing material, reflect 50 incident raies, only have the photon of half to be reflected with the method for Russian roulette,, but still have whole energy.For this example, if launch 10000 photons to the surface, can reflect 5000 photons that half energy in 10000 photons or reflection have whole energy.Can find out that Russian roulette can significantly reduce photon and follow the tracks of computation requirement.
(5) photon is played up
Render process is by the radiancy of each point on the photon figure calculating face.Here, camera and observer also will take into account.Similar reverse ray tracing is from the viewing plane emission of light, and the discovery point of impingement, and key point is where light has bumped against.Here calculate the radiancy that a point projects view plane with the cosine colouring.The cosine colouring namely is to determine the power of light by the cosine value that calculates incident ray and body surface normal angle.When cosine value was 1, light was the brightest, was lower than at 0 o'clock and represented that this point is in the back side of object, can't be subject to the irradiation of current light.
In order to play up the polygon that projects on the view plane, must find that the radiancy on the polygon is estimated, but before this, must seek near the photon of the point of impingement, be called as the photon base value.Searching closes on photon and adopts encirclement ball method, estimates that radiometric process is as follows:
1. place a spheroid at the point of impingement.
2. expand this spheroid, until it has comprised the photon of enough your initial requirements.
3. expand this spheroid, until it returns the point farthest of finding.
4. spheroid is become circle, center of circle radial location is constant, and circle is positioned on the section of body surface.
5. radiancy equals incident direction and normal angle cosine value in the circle greater than 0 photon energy with divided by the area of justifying.
The contrast of Photon Mapping and ray tracing and radiancy method
Figure BDA00002371643400061
Above-mentioned example only is explanation technical conceive of the present invention and characteristics, and its purpose is to allow the people who is familiar with technique can understand content of the present invention and according to this enforcement, can not limit protection scope of the present invention with this.All equivalent transformations that Spirit Essence is done according to the present invention or modification all should be encompassed within protection scope of the present invention.

Claims (6)

1. global illumination computer simulation disposal route based on Photon Mapping figure is characterized in that said method comprising the steps of:
(1) the emission photon carries out the photon tracking the scene from light source to computer virtual; When photon strikes arrives scene content non-specular surface object surface, photon is stored among the Photon Mapping figure of structure;
(2) desire to make money or profit according to Photon Mapping and extract about the incident flux of any point in the scene of computer virtual and the luminous radiation degree information of reflection with statistical technique, the calculating pixel color value carries out the Image Rendering in the scene and plays up.
2. method according to claim 1 is characterized in that the storage photon adopts data structure KD tree to realize that the attribute of described photon comprises the position of photon, direction and energy in the described method.
3. method according to claim 1, it is characterized in that quantity, the Photon Mapping figure of storage photon among the described method Photon Mapping figure the memory location, add photon function, photonic absorption function and the Photon Mapping figure function of resetting.
4. method according to claim 1 is characterized in that in the described method that photon generation diffuse reflection, propagation or absorbed probability are determined by the Russian roulette method when photon strikes during to scene content non-specular surface object surface.
5. method according to claim 4 is characterized in that described method Russian roulette method carries out in accordance with the following steps:
Suppose to have in the scene reflecting surface of diffuse-reflection factor d and specularity factor S, equally distributed stochastic variable ξ ∈ [0,1] is used in d+s≤1, adopts the collision probability of happening of determining in the following method photon, that is:
During ξ ∈ [0, d], photon collision generation diffuse reflection;
During ξ ∈ [d, s+d], photon collision generation mirror-reflection;
During ξ ∈ [s+d, 1], photon collision absorbs.
6. method according to claim 1 is characterized in that the luminous radiation degree is to close on photon by searching in the described method, estimates to give out light radiation, obtains the luminous radiation degree.
CN2012104417471A 2012-11-08 2012-11-08 Overall illumination computer simulation processing method based on photon mapping image Pending CN102981840A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012104417471A CN102981840A (en) 2012-11-08 2012-11-08 Overall illumination computer simulation processing method based on photon mapping image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012104417471A CN102981840A (en) 2012-11-08 2012-11-08 Overall illumination computer simulation processing method based on photon mapping image

Publications (1)

Publication Number Publication Date
CN102981840A true CN102981840A (en) 2013-03-20

Family

ID=47855905

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012104417471A Pending CN102981840A (en) 2012-11-08 2012-11-08 Overall illumination computer simulation processing method based on photon mapping image

Country Status (1)

Country Link
CN (1) CN102981840A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104700448A (en) * 2015-03-23 2015-06-10 山东大学 Self adaption photon mapping optimization algorithm based on gradient
CN105184848A (en) * 2015-08-13 2015-12-23 北京大学 Deviation control method in photon mapping
CN104200509B (en) * 2014-08-19 2017-01-04 山东大学 A kind of Photon Mapping accelerated method based on point cache
CN107067459A (en) * 2015-12-29 2017-08-18 西门子保健有限责任公司 For carrying out visualization method and visualization device by volume to three dimensional object
CN109389667A (en) * 2018-08-23 2019-02-26 北京大学 A kind of efficient global illumination method for drafting based on deep learning
CN109509246A (en) * 2018-03-25 2019-03-22 哈尔滨工程大学 A kind of photon figure clustering method divided based on adaptive line of sight
CN110599579A (en) * 2019-09-20 2019-12-20 山东师范大学 Photon resampling-based random asymptotic photon mapping image rendering method and system
CN114529660A (en) * 2022-02-23 2022-05-24 山东师范大学 Drawing method and system based on photon storage structure

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1584667A (en) * 2004-06-15 2005-02-23 南京大学 Self adaptable photon density controlling method driven by importance grade
CN101826214A (en) * 2010-03-29 2010-09-08 中山大学 Photon mapping-based global illumination method
CN102074041A (en) * 2010-12-21 2011-05-25 长春理工大学 Method for drawing planar caustic effect of 3D virtual scene produced by specular reflection

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1584667A (en) * 2004-06-15 2005-02-23 南京大学 Self adaptable photon density controlling method driven by importance grade
CN101826214A (en) * 2010-03-29 2010-09-08 中山大学 Photon mapping-based global illumination method
CN102074041A (en) * 2010-12-21 2011-05-25 长春理工大学 Method for drawing planar caustic effect of 3D virtual scene produced by specular reflection

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HENRIK WANN JENSEN: "A practical guide to global illumination using ray tracing and photon mapping", 《SIGGRAPH"04 ACM SIGGRAPH 2004 COURSE NOTES》, 8 August 2004 (2004-08-08) *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104200509B (en) * 2014-08-19 2017-01-04 山东大学 A kind of Photon Mapping accelerated method based on point cache
CN104700448B (en) * 2015-03-23 2017-06-20 山东大学 A kind of self adaptation Photon Mapping optimized algorithm based on gradient
CN104700448A (en) * 2015-03-23 2015-06-10 山东大学 Self adaption photon mapping optimization algorithm based on gradient
CN105184848A (en) * 2015-08-13 2015-12-23 北京大学 Deviation control method in photon mapping
CN105184848B (en) * 2015-08-13 2018-01-09 北京大学 Deviation Control Method in Photon Mapping
CN107067459A (en) * 2015-12-29 2017-08-18 西门子保健有限责任公司 For carrying out visualization method and visualization device by volume to three dimensional object
CN109509246A (en) * 2018-03-25 2019-03-22 哈尔滨工程大学 A kind of photon figure clustering method divided based on adaptive line of sight
CN109389667A (en) * 2018-08-23 2019-02-26 北京大学 A kind of efficient global illumination method for drafting based on deep learning
CN109389667B (en) * 2018-08-23 2023-07-18 北京大学 High-efficiency global illumination drawing method based on deep learning
CN110599579A (en) * 2019-09-20 2019-12-20 山东师范大学 Photon resampling-based random asymptotic photon mapping image rendering method and system
CN110599579B (en) * 2019-09-20 2023-02-24 山东师范大学 Photon resampling-based random asymptotic photon mapping image rendering method and system
CN114529660A (en) * 2022-02-23 2022-05-24 山东师范大学 Drawing method and system based on photon storage structure
CN114529660B (en) * 2022-02-23 2024-07-16 山东师范大学 Drawing method and system based on photon storage structure

Similar Documents

Publication Publication Date Title
CN110827390B (en) Method for processing unordered opacity and alpha ray/primitive intersection
CN110827387B (en) Method for traversing continuous hierarchical bounding box of intersection points without shader intervention
CN102981840A (en) Overall illumination computer simulation processing method based on photon mapping image
US10062199B2 (en) Efficient rendering based on ray intersections with virtual objects
CN107077756B (en) Three-dimensional object visualization method, visualization apparatus, and computer-readable storage medium
CN113808241B (en) Hardware acceleration of ray traced primitives sharing vertices
CN113808244B (en) Ray tracing hardware acceleration supporting motion blur and motion/morphing geometry
Wyman et al. Interactive image-space techniques for approximating caustics
CN113781626A (en) Techniques for traversing data used in ray tracing
Friedrich et al. Exploring the use of ray tracing for future games
US9189883B1 (en) Rendering of multiple volumes
CN101826214A (en) Photon mapping-based global illumination method
CN103995700A (en) Method for achieving global illumination of 3D game engine
CN112396684A (en) Ray tracing method, ray tracing device and machine-readable storage medium
Peddie Ray tracing: a tool for all
Yao et al. Multi‐image based photon tracing for interactive global illumination of dynamic scenes
CN112041894B (en) Enhancing realism of a scene involving a water surface during rendering
CN116740253B (en) Ray tracing method and electronic equipment
CN118397160A (en) Autonomous three-dimensional rendering engine for reverse site building system of oil field site
Rao et al. Comparing 3D rendering engines in blender
Nair Using Raymarched shaders as environments in 3D video games
González et al. based ambient occlusion
Liu et al. scheme of dynamic clouds generation for 3d real time flight simulation
Shen et al. Real-time dynamic simulation of 3D cloud for marine search and rescue simulator
Yu Ray Tracing in Computer Graphics

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned

Effective date of abandoning: 20170208

C20 Patent right or utility model deemed to be abandoned or is abandoned