CN110176055A - A kind of adaptive approach for the simulation real-time global illumination in 3D virtual engine - Google Patents

A kind of adaptive approach for the simulation real-time global illumination in 3D virtual engine Download PDF

Info

Publication number
CN110176055A
CN110176055A CN201910453097.4A CN201910453097A CN110176055A CN 110176055 A CN110176055 A CN 110176055A CN 201910453097 A CN201910453097 A CN 201910453097A CN 110176055 A CN110176055 A CN 110176055A
Authority
CN
China
Prior art keywords
light source
point light
global illumination
real
illumination
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
Application number
CN201910453097.4A
Other languages
Chinese (zh)
Other versions
CN110176055B (en
Inventor
李子豪
陈恒鑫
张�杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University
Original Assignee
Chongqing University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing University filed Critical Chongqing University
Priority to CN201910453097.4A priority Critical patent/CN110176055B/en
Publication of CN110176055A publication Critical patent/CN110176055A/en
Application granted granted Critical
Publication of CN110176055B publication Critical patent/CN110176055B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/506Illumination models
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present invention relates to a kind of for simulating the adaptive approach of real-time global illumination in 3D virtual engine, belongs to analogue technique field.A kind of adaptive approach for the simulation real-time global illumination in 3D virtual engine, method includes the following steps: S1: simulating the real-time global illumination of point light source;S2: the real-time global illumination of spotlight is simulated;S3: adaptive modeling global illumination.The present invention reduces the performance cost that virtual emulation software increases real-time global illumination function on the basis of guaranteeing 3D virtual scene authenticity significantly, and simulation effect can be adjusted according to nonidentity operation environment self-adaption.

Description

A kind of adaptive approach for the simulation real-time global illumination in 3D virtual engine
Technical field
The invention belongs to analogue technique field, be related to it is a kind of for simulated in 3D virtual engine real-time global illumination from Adaptive method.
Background technique
Most of 3D virtual engine platforms provide the function of calculating real-time lighting for the virtual emulation software of exploitation, still The calculation amount of this function consumption is extremely huge, in the environment of low operational capability, in such as virtual emulation software based on Web, Software Caton can be caused even to be unable to run due to calculating real-time lighting.But the real-time of light source is not calculated in virtual emulation software Illumination can make 3D virtual scene lack authenticity.
Summary of the invention
In view of this, the purpose of the present invention is to provide a kind of for simulating real-time global illumination in 3D virtual engine Adaptive approach.
In order to achieve the above objectives, the invention provides the following technical scheme:
A kind of adaptive approach for the simulation real-time global illumination in 3D virtual engine, this method includes following step It is rapid:
S1: the real-time global illumination of point light source is simulated;
S2: the real-time global illumination of spotlight is simulated;
S3: adaptive modeling global illumination.
Further, the step S1 specifically:
It is modified according to Lambert Law to Blinn-phong illumination model:
Cspecular=(ClightMspcular) max (0, nl);
Wherein, Cspcualr is the intensity of illumination after reflection;Clight is light source intensity of illumination;Mspecular is material Reflection coefficient;Vector n is normal direction unit vector;Vector l is the unit vector of the ray negated;
A ray, detection collision, when ray detection is to when contacting object are respectively drawn in front and back six direction up and down Position of collision point is obtained, a point light source is generated in Position of collision point, obtains the intensity of illumination of the point light source according to formula;According to The unit vector and normal direction unit vector of ray, obtain reflection light direction, draw an indirect ray from the direction, then Secondary generation point light source;It executes in total and generates point light source operation three times, generate six point light sources every time.
Further, the step S2 specifically:
According to the angle of spotlight, a ray is drawn in the center that spotlight shines, according to the side in step S1 Method successively executes generation and generates point light source operation simulation global illumination three times, but only generates a point light source in the operation of every step.
Further, the step S3 specifically:
According to the method for point light source in step S1 and S2 and spotlight simulation global illumination, in the scene one light of every addition Source just will do it generates the operation of point light source to simulate global illumination three times;
All point light sources for defining a set PointLight storage addition, define three set, respectively FirstPointLight, SecondPointLight and ThirdPointLight are added to store every when point light source respectively Six point light sources that step operation generates;Define all spotlights of a set SpotLight storage addition;Define three collection It closes, respectively FirstSpotLight, SecondSpotLight and ThirdSpotLight, respectively to store addition optically focused The point light source that every step operation generates when source.
The beneficial effects of the present invention are: the present invention reduces significantly on the basis of guaranteeing 3D virtual scene authenticity Virtual emulation software increases the performance cost of real-time global illumination function, and can according to nonidentity operation environment self-adaption tune Mould preparation intends effect.
Other advantages, target and feature of the invention will be illustrated in the following description to a certain extent, and And to a certain extent, based on will be apparent to those skilled in the art to investigating hereafter, Huo Zheke To be instructed from the practice of the present invention.Target of the invention and other advantages can be realized by following specification and It obtains.
Detailed description of the invention
To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention is made below in conjunction with attached drawing excellent The detailed description of choosing, in which:
Fig. 1 is the real-time global illumination schematic diagram for simulating point light source;
Fig. 2 is the real-time global illumination schematic diagram for simulating spotlight;
Fig. 3 is adaptive modeling global illumination method flow chart.
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification Other advantages and efficacy of the present invention can be easily understood for disclosed content.The present invention can also pass through in addition different specific realities The mode of applying is embodied or practiced, the various details in this specification can also based on different viewpoints and application, without departing from Various modifications or alterations are carried out under spirit of the invention.It should be noted that diagram provided in following embodiment is only to show Meaning mode illustrates basic conception of the invention, and in the absence of conflict, the feature in following embodiment and embodiment can phase Mutually combination.
Wherein, the drawings are for illustrative purposes only and are merely schematic diagrams, rather than pictorial diagram, should not be understood as to this The limitation of invention;Embodiment in order to better illustrate the present invention, the certain components of attached drawing have omission, zoom in or out, not Represent the size of actual product;It will be understood by those skilled in the art that certain known features and its explanation may be omitted and be in attached drawing It is understood that.
The same or similar label correspond to the same or similar components in the attached drawing of the embodiment of the present invention;It is retouched in of the invention In stating, it is to be understood that if there is the orientation or positional relationship of the instructions such as term " on ", "lower", "left", "right", "front", "rear" To be based on the orientation or positional relationship shown in the drawings, be merely for convenience of description of the present invention and simplification of the description, rather than indicate or It implies that signified device or element must have a particular orientation, be constructed and operated in a specific orientation, therefore is described in attached drawing The term of positional relationship only for illustration, is not considered as limiting the invention, for the ordinary skill of this field For personnel, the concrete meaning of above-mentioned term can be understood as the case may be.
FIG. 1 to FIG. 3 is please referred to, to be a kind of for simulating the adaptive approach of real-time global illumination in 3D virtual engine.
1, the real-time global illumination of point light source is simulated
According to Lambert Law, (cosine value of angle is at just between the intensity and surface normal and light source direction of reflection light Than) modify to Blinn-phong illumination model: Cspecular=(ClightMspcular) max (0, nl).
(Cspcualr: the intensity of illumination after reflection;
Clight: light source intensity of illumination
Mspecular: material reflection coefficient
Vector n: normal direction unit vector
Vector l: the unit vector of the ray negated)
A ray, detection collision, when ray detection is to when contacting object are respectively drawn in front and back six direction up and down Position of collision point is obtained, a point light source is generated in Position of collision point, obtains the illumination of the point light source according to formula above Intensity.According to the unit vector of ray and normal direction unit vector, reflection light direction is obtained, draws one instead from the direction Ray generates point light source according to method as above again.It executes in total and generates point light source operation three times, generate six point light every time Source.
2, the real-time global illumination of spotlight is simulated
According to the angle of spotlight, a ray is drawn in the center that spotlight shines, according to method above It successively executes to generate and generates point light source operation simulation global illumination three times, but only generate a point light source in the operation of every step.
3, adaptive modeling global illumination method process
According to the method for above point light source and spotlight simulation global illumination, one light source of every addition will in the scene The operation of point light source generate three times to simulate global illumination.
All point light sources for defining a set PointLight storage addition, define three set, respectively FirstPointLight, SecondPointLight, ThirdPointLight are added to store every when point light source respectively Six point light sources that step operation generates.Define all spotlights of a set SpotLight storage addition.Define three collection It closes, respectively FirstSpotLight, SecondSpotLight, ThirdSpotLight, respectively to store addition optically focused The point light source that every step operation generates when source.
Finally, it is stated that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting, although referring to compared with Good embodiment describes the invention in detail, those skilled in the art should understand that, it can be to skill of the invention Art scheme is modified or replaced equivalently, and without departing from the objective and range of the technical program, should all be covered in the present invention Scope of the claims in.

Claims (4)

1. a kind of for simulating the adaptive approach of real-time global illumination in 3D virtual engine, it is characterised in that: this method packet Include following steps:
S1: the real-time global illumination of point light source is simulated;
S2: the real-time global illumination of spotlight is simulated;
S3: adaptive modeling global illumination.
2. it is according to claim 1 a kind of for simulating the adaptive approach of real-time global illumination in 3D virtual engine, It is characterized by: the step S1 specifically:
It is modified according to Lambert Law to Blinn-phong illumination model:
Cspecular=(ClightMspcular) max (0, nl);
Wherein, Cspcualr is the intensity of illumination after reflection;Clight is light source intensity of illumination;Mspecular is material reflection Coefficient;Vector n is normal direction unit vector;Vector l is the unit vector of the ray negated;
A ray is respectively drawn in front and back six direction up and down, detection collision, when ray detection when contacting object to obtaining Position of collision point generates a point light source in Position of collision point, obtains the intensity of illumination of the point light source according to formula;According to ray Unit vector and normal direction unit vector, obtain reflection light direction, draw an indirect ray from the direction, then it is secondary At point light source;It executes in total and generates point light source operation three times, generate six point light sources every time.
3. it is according to claim 2 a kind of for simulating the adaptive approach of real-time global illumination in 3D virtual engine, It is characterized by: the step S2 specifically:
According to the angle of spotlight, draw a ray in the center that spotlight shines, according to the method in step S1 according to Secondary execution generates and generates point light source operation simulation global illumination three times, but only generates a point light source in the operation of every step.
4. it is according to claim 1 a kind of for simulating the adaptive approach of real-time global illumination in 3D virtual engine, It is characterized by: the step S3 specifically:
According to the method for point light source in step S1 and S2 and spotlight simulation global illumination, one light source of every addition is just in the scene It will do it and generate the operation of point light source three times to simulate global illumination;
All point light sources for defining a set PointLight storage addition, define three set, respectively FirstPointLight, SecondPointLight and ThirdPointLight are added to store every when point light source respectively Six point light sources that step operation generates;Define all spotlights of a set SpotLight storage addition;Define three collection It closes, respectively FirstSpotLight, SecondSpotLight and ThirdSpotLight, respectively to store addition optically focused The point light source that every step operation generates when source.
CN201910453097.4A 2019-05-28 2019-05-28 Self-adaptive method for simulating real-time global illumination in 3D virtual engine Active CN110176055B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910453097.4A CN110176055B (en) 2019-05-28 2019-05-28 Self-adaptive method for simulating real-time global illumination in 3D virtual engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910453097.4A CN110176055B (en) 2019-05-28 2019-05-28 Self-adaptive method for simulating real-time global illumination in 3D virtual engine

Publications (2)

Publication Number Publication Date
CN110176055A true CN110176055A (en) 2019-08-27
CN110176055B CN110176055B (en) 2023-04-18

Family

ID=67695784

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910453097.4A Active CN110176055B (en) 2019-05-28 2019-05-28 Self-adaptive method for simulating real-time global illumination in 3D virtual engine

Country Status (1)

Country Link
CN (1) CN110176055B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5313568A (en) * 1990-05-31 1994-05-17 Hewlett-Packard Company Three dimensional computer graphics employing ray tracing to compute form factors in radiosity
US20090102843A1 (en) * 2007-10-17 2009-04-23 Microsoft Corporation Image-based proxy accumulation for realtime soft global illumination
EP2057605A2 (en) * 2006-07-24 2009-05-13 Michael Bunnell System and methods for real-time rendering of deformable geometry with global illumination
US20090295805A1 (en) * 2008-06-02 2009-12-03 Samsung Electronics Co., Ltd. Hierarchical based 3D image processor, method, and medium
CN102346918A (en) * 2011-09-30 2012-02-08 长春理工大学 Method for drawing three-dimensional animation scene only containing object change
US20120237112A1 (en) * 2011-03-15 2012-09-20 Ashok Veeraraghavan Structured Light for 3D Shape Reconstruction Subject to Global Illumination
CN102819860A (en) * 2012-08-16 2012-12-12 北京航空航天大学 Real-time global illumination method for sub-surface scattering object on the basis of radiosity
CN106157264A (en) * 2016-06-30 2016-11-23 北京大学 Large area image uneven illumination bearing calibration based on empirical mode decomposition
US20180108347A1 (en) * 2015-06-12 2018-04-19 Sony Corporation Information processing device, information processing method, and program
CN112116693A (en) * 2020-08-20 2020-12-22 中山大学 Biomolecule visualization ray tracing rendering method based on CPU

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5313568A (en) * 1990-05-31 1994-05-17 Hewlett-Packard Company Three dimensional computer graphics employing ray tracing to compute form factors in radiosity
EP2057605A2 (en) * 2006-07-24 2009-05-13 Michael Bunnell System and methods for real-time rendering of deformable geometry with global illumination
US20090102843A1 (en) * 2007-10-17 2009-04-23 Microsoft Corporation Image-based proxy accumulation for realtime soft global illumination
US20090295805A1 (en) * 2008-06-02 2009-12-03 Samsung Electronics Co., Ltd. Hierarchical based 3D image processor, method, and medium
US20120237112A1 (en) * 2011-03-15 2012-09-20 Ashok Veeraraghavan Structured Light for 3D Shape Reconstruction Subject to Global Illumination
CN102346918A (en) * 2011-09-30 2012-02-08 长春理工大学 Method for drawing three-dimensional animation scene only containing object change
CN102819860A (en) * 2012-08-16 2012-12-12 北京航空航天大学 Real-time global illumination method for sub-surface scattering object on the basis of radiosity
US20180108347A1 (en) * 2015-06-12 2018-04-19 Sony Corporation Information processing device, information processing method, and program
CN106157264A (en) * 2016-06-30 2016-11-23 北京大学 Large area image uneven illumination bearing calibration based on empirical mode decomposition
CN112116693A (en) * 2020-08-20 2020-12-22 中山大学 Biomolecule visualization ray tracing rendering method based on CPU

Non-Patent Citations (11)

* Cited by examiner, † Cited by third party
Title
DYLAN_DAY: "【Unity】入门学习笔记180720——Unity Shader入门(2-2)——Unity中的基础光照", 《HTTPS://BLOG.CSDN.NET/DYLAN_DAY/ARTICLE/DETAILS/81075881》 *
WILLIAM A. STOKES等: "Perceptual illumination components: a new approach to efficient, high quality global illumination rendering" *
XINRUN CHEN等: "A virtual reality experiment system for an introductory computer hardware course" *
吴伟和等: "基于直接光照的全局光照模拟", 《计算机工程》 *
吴文珍;李全忠;王海峰;田媛媛;: "油田虚拟现实系统中的光照模型算法研究及应用" *
曹家乐: "实时阴影渲染算法的研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
李杨;周果;李淳;邱显杰;王兆其;: "基于三角形自适应细分的有效光照烘焙方法" *
李艳梅等: "立即辐射度综述", 《计算机应用研究》 *
柴学梁等: "采用重要性面片采样的实时全局光照", 《计算机工程与应用》 *
袁璐;: "基于立即辐射度的实时全局光照算法" *
许春伟: "双向光割技术在多光绘制中的应用研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Also Published As

Publication number Publication date
CN110176055B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
US11928772B2 (en) Method for forward progress and programmable timeouts of tree traversal mechanisms in hardware
US11164360B2 (en) Method for handling of out-of-order opaque and alpha ray/primitive intersections
US20200302676A1 (en) Query-specific behavioral modification of tree traversal
KR102223064B1 (en) Image processing apparatus and method
US10810785B2 (en) Method for forward progress tree traversal mechanisms in hardware
US11302056B2 (en) Techniques for traversing data employed in ray tracing
US7884819B2 (en) Pixel color accumulation in a ray tracing image processing system
CN101388114B (en) Method and system for estimating human body attitudes
US20080192044A1 (en) Deferred Acceleration Data Structure Optimization for Improved Performance
US7688320B2 (en) Methods and systems for texture prefetching based on a most recently hit primitive algorithm
US11380041B2 (en) Enhanced techniques for traversing ray tracing acceleration structures
US20080074416A1 (en) Multiple Spacial Indexes for Dynamic Scene Management in Graphics Rendering
CN104317391A (en) Stereoscopic vision-based three-dimensional palm posture recognition interactive method and system
US8339398B2 (en) Integrated acceleration data structure for physics and ray tracing workload
US10157494B2 (en) Apparatus and method for processing virtual point lights in an image
CA2529044A1 (en) Three-dimensional modeling from arbitrary three-dimensional curves
CN109448084A (en) It is a kind of to carry out the algorithm that light textures are baked and banked up with earth based on voxelization global illumination algorithm
CN105335996A (en) Light irradiation effect calculation method and device
US8102389B2 (en) Box casting using an integrated acceleration data structure
CN110176055A (en) A kind of adaptive approach for the simulation real-time global illumination in 3D virtual engine
US20240009226A1 (en) Techniques for traversing data employed in ray tracing
Irgenfried et al. Realization and evaluation of image processing tasks based on synthetic sensor data: 2 use cases
Wu Interactive 3D Digital Art in Modern Packaging Design
Es et al. GPU based real time stereoscopic ray tracing
CN117541708A (en) Image processing method and device and electronic equipment

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