CN109493412B - Oversampling ray tracing method for multiplexing scene point light source visibility - Google Patents

Oversampling ray tracing method for multiplexing scene point light source visibility Download PDF

Info

Publication number
CN109493412B
CN109493412B CN201811317381.0A CN201811317381A CN109493412B CN 109493412 B CN109493412 B CN 109493412B CN 201811317381 A CN201811317381 A CN 201811317381A CN 109493412 B CN109493412 B CN 109493412B
Authority
CN
China
Prior art keywords
variable
scene
point
step102
light source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811317381.0A
Other languages
Chinese (zh)
Other versions
CN109493412A (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.)
Changchun University of Science and Technology
Original Assignee
Changchun University of Science and Technology
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 Changchun University of Science and Technology filed Critical Changchun University of Science and Technology
Priority to CN201811317381.0A priority Critical patent/CN109493412B/en
Publication of CN109493412A publication Critical patent/CN109493412A/en
Application granted granted Critical
Publication of CN109493412B publication Critical patent/CN109493412B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/06Ray-tracing

Abstract

The invention discloses a supersampling ray tracing method for multiplexing scene point light source visibility. When the method is used for performing oversampling ray tracing drawing on a three-dimensional scene, for scene points which cannot be directly visible from a view point on a ray transmission path, when testing the light source visibility of the scene points, firstly, whether scene points adjacent to the scene points exist in a certain range is searched in a grid space data structure, if not, the visibility between a light source and the currently processed scene point is calculated and stored in the grid space data structure, otherwise, the light source visibility of the nearest adjacent scene point on the space position and a normal vector is used as the light source visibility approximate value of the currently processed scene point. The method can obviously reduce the light source visibility test overhead in the super-sampling ray tracing drawing, and improve the speed of the super-sampling ray tracing drawing of the three-dimensional scene.

Description

Oversampling ray tracing method for multiplexing scene point light source visibility
Technical Field
The invention belongs to the technical field of virtual three-dimensional scene drawing, and relates to a supersampling ray tracing method for multiplexing scene point light source visibility.
Background
Supersampling is a common technique for achieving antialiasing of three-dimensional scene rendered pictures. As shown in fig. 1, in the ray tracing rendering of the three-dimensional scene picture using supersampling, a plurality of rays need to be emitted from a viewpoint to each pixel on a virtual pixel plane of a virtual camera, then tracking operations are respectively performed on the rays, and finally, the illumination brightness contribution values of the rays passing through the same pixel are averaged, and the average illumination brightness contribution value is converted into a final color value of the pixel. Ray tracing using supersampling of three-dimensional scene pictures is time consuming because multiple rays are generated for each pixel on the virtual pixel plane. Light source visibility calculations for scene points are an important time-consuming operation in ray tracing. The light source visibility calculation of the scene point is to judge whether the scene point and the light source are directly visible, if the scene point and the light source are directly visible, the light source visibility of the scene point can be regarded as 1, otherwise, the light source visibility of the scene point can be regarded as 0. The ray tracing operation requires solving various intersections of the ray transmission path and the geometric objects of the three-dimensional scene, and calculating the illumination brightness contribution value generated by the light source at each intersection and transmitted in the opposite direction of the ray incidence direction at the intersection. Note that the actual ray-transmitting direction should be from the light source position and finally to the viewpoint, however ray tracing usually starts tracing rays from the viewpoint position, and thus the ray-transmitting direction of ray tracing is exactly opposite to the actual ray-transmitting direction. When calculating the illumination intensity contribution value generated by the light source at each intersection point (which is a scene point) and transmitted in the opposite direction to the incident direction of the light ray at the intersection point, it is necessary to calculate the light source visibility of the intersection point. For ray tracing rendering of a three-dimensional scene picture using supersampling, since each pixel on a virtual pixel plane corresponds to a plurality of rays, the transmission directions of the rays are generally the same, and therefore, the light source visibility of the intersection points of the transmission paths of the rays and the geometric objects of the three-dimensional scene has spatial correlation, which provides the possibility of multiplexing the light source visibility of the rays. To reduce certain errors that may be introduced by multiplexing the light source visibility of a scene point, a method of accurately calculating the light source visibility of a scene point directly viewable from a viewpoint is preferably employed. In order to reuse the light source visibility of a scene point, the light source visibility of the scene point needs to be stored. A Grid (Grid) spatial data structure may be used to store light source visibility of scene points so that when light source visibility of scene points are multiplexed, the relevant scene points can be quickly found. Computer Graphics and Practice,3rd Edition, written by j.f. hughes et al and published by Addison-Wesley 2014, describes a grid space data structure in detail, each element in the grid space data structure has a keyword (key), and an element can be inserted into a specific position of the grid space data structure according to the keyword or can be searched from the grid space data structure according to the keyword. The light incident on the geometric object usually changes its transmission direction (e.g. is reflected), which is described as scattering in Computer Graphics: principles and Practice,3rd Edition, and the book describes how to calculate the illumination brightness value of the light directly emitted from the light source transmitted along a specific direction after scattering on the surface of the geometric object. The invention provides a super-sampling ray tracking method for multiplexing scene point light source visibility, which reduces the time overhead of super-sampling ray tracking and drawing by multiplexing the light source visibility of near-field scenic spots in the process of tracking rays.
Disclosure of Invention
The invention aims to provide a super-sampling ray tracking method for multiplexing scene point light source visibility, which achieves the purpose of reducing the light source visibility test overhead in super-sampling ray tracking by multiplexing the light source visibility calculation results of scene points stored in a grid space data structure.
The technical scheme of the invention is realized as follows: a supersampling ray tracing method for multiplexing scene point light source visibility is characterized in that the required data structure and implementation steps are as follows:
providing a data structure ISPOINTLV which is used for storing light source visibility of a scene point, wherein the data structure ISPOINTLV comprises three member variables of a scene point position POS, a surface normal vector VN of the position of the scene point and the light source visibility LVis of the scene point; the method comprises the following concrete implementation steps:
step101: creating a Grid space data structure Grid in a memory of a computer; creating a Counter in the memory of the computer, and making the value of the Counter be 0; creating a two-dimensional array IM comprising M rows and N columns of elements in a memory of a computer, wherein M is the number of pixel rows on a virtual pixel plane of a virtual camera, N is the number of pixel columns on the virtual pixel plane of the virtual camera, and each element of the two-dimensional array IM is assigned to be 0;
step102: for each pixel a001 on the virtual pixel plane of the virtual camera, the following is done:
step102-1: randomly selecting a point A002 in a space region covered by the pixel A001 according to uniform distribution, and emitting a light beam passing through the point A002 from a viewpointRay A003, calculating an intersection point A004 closest to the viewpoint of the ray A003 and a geometric object of the three-dimensional scene; creating a variable SPVis of a data structure ISPOINTLV type in a memory of a computer, assigning a scene point position POS member variable of the variable SPVis as a position of an intersection point A004, and assigning a surface normal vector VN member variable of the position of the scene point of the variable SPVis as a surface normal vector of the position of the intersection point A004; judging whether the intersection point A004 and the light source are directly visible or not, if so, calculating a direct illumination brightness contribution value A005 generated by scattering of light directly emitted by the light source at the intersection point A004 and transmitted along the direction opposite to the incident direction of the light ray A003, and simultaneously enabling I to be I dir Equal to the direct illumination brightness contribution A005, let the illuminant visibility LVis member variable of scene point of variable SPVis equal to 1, otherwise let I dir The variable SPVis is equal to 0, and the light source visibility LVis member variable of the scene point of the variable SPVis is equal to 0; inserting the variable SPVis into a Grid space data structure Grid by taking the value of the POS member variable at the scene point position of the variable SPVis as a keyword;
step102-2: let I ind =0; according to the recursive ray tracing idea, continuously tracing the transmission path A006 of the ray A003 after being scattered at the intersection point A004, and sequentially calculating each intersection point A007 which is intersected between the transmission path A006 and a geometric object of the three-dimensional scene; for each intersection a007 in the sequential order, the following operations are performed:
step102-2-1: if the Counter value is 0, then go to Step102-2-2, otherwise go to Step102-2-3;
step102-2-2: creating a variable SPVis2 of a data structure ISPOINTLV type in a memory of a computer, assigning a scene point position POS member variable of the variable SPVis2 as the position of an intersection point A007, and assigning a surface normal vector VN member variable of the position of a scene point of the variable SPVis2 as the surface normal vector of the position of the intersection point A007; judging whether the intersection point A007 and the light source are directly visible or not, if so, setting the light source visibility LVis member variable of the scene point of the variable SPVis2 to be 1, and simultaneously calculating the inverse direction of the incident direction of the light ray at the intersection point A007 along the transmission path A006, which is generated by scattering the light directly emitted by the light source at the intersection point A007The value of the direct illumination brightness contribution to the transmission is A008, and let I ind Is equal to I ind The sum is added to the direct illumination luminance contribution value a008, otherwise the light source visibility LVis member variable of the scene point of the variable SPVis2 is set to 0; inserting the variable SPVis2 into a Grid space data structure Grid by taking the value of the scene point position POS member variable of the variable SPVis2 as a keyword; turning to Step102-2-4;
step102-2-3: creating a LIST1 in a memory of a computer, and enabling the LIST1 to be empty; finding out those variables B001 of the data structure ISPOINTLV type that satisfy the condition COND1 from the Grid space data structure Grid:
condition COND1: the space distance from the position represented by the scene point position POS member variable of the variable B001 to the position of the intersection point A007 is less than delta th And the included angle between the vector represented by the surface normal vector VN member variable of the scene point of the variable B001 and the surface normal vector of the position of the intersection point A007 is less than alpha th
Adding all variables B001 of the data structure ISPOINTLV type which meet the condition COND1 and are found from the Grid space data structure Grid into a LIST LIST 1; if the LIST LIST1 is not empty, turning to Step102-2-3-1, otherwise, turning to Step102-2-3-3;
step102-2-3-1: let W =0, index =1; let delta d1 The spatial distance of the position represented by the scene point position POS member variable, equal to the variable of the type of data structure ISPOINTLV stored in the 1 st element of LIST1, to the position of intersection point a007, let α v1 The angle between the vector represented by the member variable of the surface normal vector VN where the scene point of the data structure variable of type ISPOINTLV stored at element 1 of LIST1 is located and the surface normal vector where intersection point a007 is located is such that W = W 1 ×δ d1 +w 2 ×α v1 ,w 1 And w 2 Are two weight coefficients; for each element B002 of the LIST1 except the 1 st element, the following operations are performed:
(1) let delta d Scene point position POS member variable table equal to the variable of the data structure ISPOINTLV type stored by element B002The spatial distance from the indicated position to the position of the intersection A007 is set to α v The angle between the vector represented by the surface normal vector VN member variable at the location of the scene point of the data structure ISPOINTLV type variable stored in element B002 and the surface normal vector at the location of intersection point a007 if w 1 ×δ d +w 2 ×α v <W, then let W = W 1 ×δ d +w 2 ×α v And let index equal to the position number of element B002 in LIST 1;
(2) the operation for element B002 ends;
step102-2-3-2: if the value of the light source visibility LVis member variable of a scene point of a variable of the data structure ISPOINTLV type stored in the index-th element of LIST1 is equal to 1, then calculate the direct illumination intensity contribution a008 transmitted in the opposite direction to the ray incidence direction at the intersection a007 along the transmission path a006, resulting from the scattering of the light directly emitted by the light source at the intersection a007, and let I be ind Is equal to I ind Added to the direct illumination luminance contribution value a 008; turning to Step102-2-4;
step102-2-3-3: turning to Step102-2-2;
step102-2-4: the operation for the intersection a007 ends;
step102-3: calculate the line number row of pixel A001 on the virtual pixel plane of the virtual camera, calculate the column number col of pixel A001 on the virtual pixel plane of the virtual camera, let IM [ row [ ]][col]=IM[row][col]+I dir +I ind ,IM[row][col]Representing row and col elements of a two-dimensional array IM; the operation for pixel a001 ends;
step103: incrementing the Counter value by 1, i.e., performing Counter = Counter +1; if the Counter value is less than N cth If yes, go to Step102;
step104: for IR =1,2, \8230;, M, IC =1,2, \8230;, N, let IM [ IR ] [ IC ] = IM [ IR ] [ IC ]/Counter, IM [ IR ] [ IC ] denote the IR row, IC column elements of the two-dimensional array IM; and converting the illumination brightness contribution values stored in each element of the two-dimensional array IM into the pixel color values of the three-dimensional scene picture and storing the pixel color values into a disk image file.
The beneficial effects of the invention are: when the invention carries out super-sampling ray tracing drawing on a three-dimensional scene, for scene points which can not be directly seen from a view point on a ray transmission path, when testing the light source visibility of the scene points, whether scene points adjacent to the scene points exist in a certain range is firstly searched in a grid space data structure, if so, the light source visibility of the nearest adjacent scene point on the space position and normal vector is taken as the light source visibility approximate value of the scene point currently processed, thereby achieving the purpose of saving the light source visibility test expense and further reducing the time expense of the super-sampling ray tracing drawing of the three-dimensional scene.
Drawings
FIG. 1 is a schematic diagram of supersampling ray tracing.
Detailed Description
In order that the features and advantages of the method may be more clearly understood, the method is further described below in connection with specific embodiments. In this embodiment, consider the following virtual room three-dimensional scene: a room is provided with 1 table and 1 chair, objects such as fruits, metal teapots, porcelain cups and the like are placed on the table, mirrors are hung on the four walls of the room, and a point light source is arranged on the ceiling of the room to irradiate a three-dimensional scene downwards. The CPU of the computer system selects Intel (R) Xeon (R) CPU [email protected], the memory selects Jinshiton 8GB DDR3 1333, and the hard disk selects Buffalo HD-CE 1.5TU2; windows 7 is selected as the computer operating system, and VC + +2010 is selected as the software programming tool.
The technical scheme of the invention is realized as follows: a supersampling ray tracing method for multiplexing scene point light source visibility is characterized in that the required data structure and the realization steps are as follows:
providing a data structure ISPOINTLV which is used for storing light source visibility of scene points, wherein the data structure ISPOINTLV comprises three member variables of a scene point position POS, a surface normal vector VN of the position of the scene point and the light source visibility LVis of the scene point; the method comprises the following concrete implementation steps:
step101: creating a Grid space data structure Grid in a memory of a computer; creating a Counter in the memory of the computer, and making the value of the Counter be 0; creating a two-dimensional array IM containing M rows and N columns of elements in a memory of a computer, wherein M is the number of pixel rows on a virtual pixel plane of a virtual camera, N is the number of pixel columns on the virtual pixel plane of the virtual camera, and each element of the two-dimensional array IM is assigned to be 0;
step102: for each pixel a001 on the virtual pixel plane of the virtual camera, the following is done:
step102-1: randomly selecting a point A002 in a space area covered by a pixel A001 according to uniform distribution, emitting a ray A003 passing through the point A002 from a viewpoint, and calculating an intersection point A004 of the ray A003 and a geometric object of the three-dimensional scene, which is closest to the viewpoint; creating a variable SPVis of a data structure ISPOINTLV type in a memory of a computer, assigning a scene point position POS member variable of the variable SPVis as a position of an intersection point A004, and assigning a surface normal vector VN member variable of the position of a scene point of the variable SPVis as a surface normal vector of the position of the intersection point A004; judging whether the intersection point A004 and the light source are directly visible or not, if so, calculating a direct illumination brightness contribution value A005 generated by scattering of light directly emitted by the light source at the intersection point A004 and transmitted along the opposite direction of the incident direction of the light ray A003, and simultaneously enabling I dir Equal to the direct illumination brightness contribution A005, let the illuminant visibility LVis member variable of scene point of variable SPVis equal to 1, otherwise let I dir The variable SPVision visibility LVis member variable of the scene point of the variable SPVis is equal to 0; inserting the variable SPVis into a Grid space data structure Grid by taking the value of the POS member variable at the scene point position of the variable SPVis as a keyword;
step102-2: let I ind =0; according to the recursive ray tracing idea, continuously tracing the transmission path A006 of the ray A003 after being scattered at the intersection point A004, and sequentially calculating each intersection point A007 which is intersected between the transmission path A006 and a geometric object of the three-dimensional scene; for each intersection a007 in the order, the following operations are performed:
step102-2-1: if the Counter value is 0, then go to Step102-2-2, otherwise go to Step102-2-3;
step102-2-2: creating a variable SPVis2 of a data structure ISPOINTLV type in a memory of a computer, assigning a scene point position POS member variable of the variable SPVis2 as a position of an intersection point A007, and assigning a surface normal vector VN member variable of the position of a scene point of the variable SPVis2 as a surface normal vector of the position of the intersection point A007; judging whether the intersection point A007 and the light source are directly visible or not, if so, setting the variable of the light source visibility LVis member of the scene point of the variable SPVis2 to be 1, simultaneously calculating the direct illumination brightness contribution value A008 which is generated by scattering light directly emitted by the light source at the intersection point A007 and is transmitted along the transmission path A006 in the direction opposite to the incident direction of the light at the intersection point A007 through the transmission path A006, and enabling I to be I ind Is equal to I ind The sum is added to the direct illumination luminance contribution value a008, otherwise the light source visibility LVis member variable of the scene point of the variable SPVis2 is set to 0; inserting the variable SPVis2 into a Grid space data structure Grid by taking the value of the scene point position POS member variable of the variable SPVis2 as a keyword; turning to Step102-2-4;
step102-2-3: creating a LIST1 in a memory of a computer, and enabling the LIST1 to be empty; finding those variables B001 of the type of data structure ISPOINTLV that satisfy the condition COND1 from the Grid space data structure Grid:
condition COND1: the space distance from the position represented by the variable B001 of the scene point position POS member variable to the position of the intersection point A007 is less than delta th And the included angle between the vector represented by the surface normal vector VN member variable of the scene point of the variable B001 and the surface normal vector of the position of the intersection point A007 is less than alpha th
Adding all variables B001 of data structure ISPOINTLV types which meet the condition COND1 and are found from Grid space data structure Grid into a LIST LIST 1; if the LIST LIST1 is not empty, turning to Step102-2-3-1, otherwise, turning to Step102-2-3-3;
step102-2-3-1: let W =0, index =1; let delta d1 Scene point position POS member variable table equal to the variable of the type ISPOINTLV of the data structure stored in the 1 st element of LIST1The spatial distance from the indicated position to the position of the intersection point A007 is set to α v1 The angle between the vector represented by the variable VN member of the surface normal vector at the location of the scene point, which is equal to the variable of type ISPOINTLV stored in the 1 st element of LIST1, and the surface normal vector at the location of intersection a007 is such that W = W 1 ×δ d1 +w 2 ×α v1 ,w 1 And w 2 Are two weight coefficients; for each element B002 of the LIST1 except for the 1 st element, the following operations are performed:
(1) let delta d The spatial distance of the position represented by the scene point position POS member variable, equal to the variable of the data structure ISPOINTLV type stored in element B002, to the position of the intersection point A007, let α v The angle between the vector represented by the surface normal vector VN member variable at the location of the scene point of the data structure ISPOINTLV type variable stored in element B002 and the surface normal vector at the location of intersection point a007 if w 1 ×δ d +w 2 ×α v <W, then let W = W 1 ×δ d +w 2 ×α v And let index equal to the position number of element B002 in LIST 1;
(2) the operation for element B002 ends;
step102-2-3-2: if the value of the light source visibility LVis member variable of a scene point of a variable of the data structure ISPOINTLV type stored in the index-th element of LIST1 is equal to 1, then calculate the direct illumination intensity contribution a008 transmitted in the opposite direction to the ray incidence direction at the intersection a007 along the transmission path a006, resulting from the scattering of the light directly emitted by the light source at the intersection a007, and let I be ind Is equal to I ind Added to the direct illumination luminance contribution value a 008; turning to Step102-2-4;
step102-2-3-3: turning to Step102-2-2;
step102-2-4: the operation for the intersection point a007 ends;
step102-3: calculate the line number row of pixel A001 on the virtual pixel plane of the virtual camera, calculate the column number col of pixel A001 on the virtual pixel plane of the virtual camera, let IM [ row [ ]][col]=IM[row][col]+I dir +I ind ,IM[row][col]Representing row and col elements of a two-dimensional array IM; the operation for pixel a001 ends;
step103: incrementing the Counter value by 1, i.e., performing Counter = Counter +1; if the Counter value is less than N cth If yes, go to Step102;
step104: for IR =1,2, \8230;, M, IC =1,2, \8230;, N, let IM [ IR ] [ IC ] = IM [ IR ] [ IC ]/Counter, IM [ IR ] [ IC ] denote the IR row, IC column elements of the two-dimensional array IM; and converting the illumination brightness contribution values stored in each element of the two-dimensional array IM into three-dimensional scene picture pixel color values and storing the three-dimensional scene picture pixel color values into a disk image file.
In this embodiment, w 1 =0.7,w 2 =0.3,N cth =8,M=1024,N=768,δ th The side length of the longest edge of the cuboid bounding box arranged as a chair is one twenty-fifth, alpha th = π/20rad; parameter N cth For controlling the number of oversampling rays per pixel; the elements of the two-dimensional array IM correspond to the pixels of the three-dimensional scene picture one by one, and the pixels of the three-dimensional scene picture correspond to the pixels on the virtual pixel plane one by one.

Claims (1)

1. The supersampling ray tracing method for multiplexing scene point light source visibility is characterized in that the required data structure and the realization steps are as follows:
providing a data structure ISPOINTLV which is used for storing light source visibility of scene points, wherein the data structure ISPOINTLV comprises three member variables of a scene point position POS, a surface normal vector VN of the position of the scene point and the light source visibility LVis of the scene point; the method comprises the following concrete implementation steps:
step101: creating a Grid space data structure Grid in a memory of a computer; creating a Counter in the memory of the computer, and setting the value of the Counter to be 0; creating a two-dimensional array IM comprising M rows and N columns of elements in a memory of a computer, wherein M is the number of pixel rows on a virtual pixel plane of a virtual camera, N is the number of pixel columns on the virtual pixel plane of the virtual camera, and each element of the two-dimensional array IM is assigned to be 0;
step102: for each pixel a001 on the virtual pixel plane of the virtual camera, the following is done:
step102-1: randomly selecting a point A002 in a space area covered by a pixel A001 according to uniform distribution, emitting a ray A003 passing through the point A002 from a viewpoint, and calculating an intersection point A004 of the ray A003 and a geometric object of the three-dimensional scene, which is closest to the viewpoint; creating a variable SPVis of a data structure ISPOINTLV type in a memory of a computer, assigning a scene point position POS member variable of the variable SPVis as a position of an intersection point A004, and assigning a surface normal vector VN member variable of the position of a scene point of the variable SPVis as a surface normal vector of the position of the intersection point A004; judging whether the intersection point A004 and the light source are directly visible or not, if so, calculating a direct illumination brightness contribution value A005 generated by scattering of light directly emitted by the light source at the intersection point A004 and transmitted along the direction opposite to the incident direction of the light ray A003, and simultaneously enabling I to be I dir Equal to the direct illumination brightness contribution A005, let the illuminant visibility LVis member variable of scene point of variable SPVis equal to 1, otherwise let I dir The variable SPVision visibility LVis member variable of the scene point of the variable SPVis is equal to 0; inserting the variable SPVis into a Grid space data structure Grid by taking the value of the POS member variable at the scene point position of the variable SPVis as a keyword;
step102-2: let I ind =0; according to the recursive ray tracing idea, continuously tracing the transmission path A006 of the ray A003 after being scattered at the intersection point A004, and sequentially calculating each intersection point A007 which is intersected between the transmission path A006 and a geometric object of the three-dimensional scene; for each intersection a007 in the order, the following operations are performed:
step102-2-1: if the Counter value is 0, then go to Step102-2-2, otherwise go to Step102-2-3;
step102-2-2: creating a variable SPVis2 of a data structure ISPOINTLV type in a memory of a computer, assigning a scene point position POS member variable of the variable SPVis2 as the position of an intersection point A007, and assigning a surface normal vector VN member of the position of a scene point of the variable SPVis2The variable is assigned as a surface normal vector of the position of the intersection point A007; judging whether the intersection point A007 and the light source are directly visible or not, if so, setting the member variable LVis of the scene point of the variable SPVis2 as 1, simultaneously calculating the direct illumination brightness contribution value A008 which is generated by scattering of light directly emitted by the light source at the intersection point A007 and is transmitted along the transmission path A006 in the opposite direction of the incident direction of the light at the intersection point A007, and enabling I to be I ind Is equal to I ind Adding the sum of the direct illumination brightness contribution value A008, or setting the light source visibility LVis member variable of the scene point of the variable SPVis2 as 0; inserting the variable SPVis2 into a Grid space data structure Grid by taking the value of the scene point position POS member variable of the variable SPVis2 as a keyword; turning to Step102-2-4;
step102-2-3: creating a LIST1 in a memory of a computer, and enabling the LIST1 to be empty; finding out those variables B001 of the data structure ISPOINTLV type that satisfy the condition COND1 from the Grid space data structure Grid:
condition COND1: the space distance from the position represented by the variable B001 of the scene point position POS member variable to the position of the intersection point A007 is less than delta th And the included angle between the vector represented by the surface normal vector VN member variable of the scene point of the variable B001 and the surface normal vector of the position of the intersection point A007 is less than alpha th
Adding all variables B001 of the data structure ISPOINTLV type which meet the condition COND1 and are found from the Grid space data structure Grid into a LIST LIST 1; if the LIST LIST1 is not empty, turning to Step102-2-3-1, otherwise, turning to Step102-2-3-3;
step102-2-3-1: let W =0, index =1; let delta d1 The spatial distance of the position represented by the scene point position POS member variable, equal to the variable of the type of data structure ISPOINTLV stored in the 1 st element of the LIST1, to the position of the intersection point a007, let α v1 The angle between the vector represented by the variable VN member of the surface normal vector at the location of the scene point, which is equal to the variable of type ISPOINTLV stored in the 1 st element of LIST1, and the surface normal vector at the location of intersection a007 is such that W = W 1 ×δ d1 +w 2 ×α v1 ,w 1 And w 2 Are two weight coefficients; for each element B002 of the LIST1 except the 1 st element, the following operations are performed:
(1) let delta d The spatial distance of the position represented by the scene point position POS member variable, equal to the variable of the data structure ISPOINTLV type stored in element B002, to the position of the intersection point A007 is made alpha v The angle between the vector represented by the surface normal vector VN member variable at the location of the scene point of the data structure ISPOINTLV type variable stored in element B002 and the surface normal vector at the location of intersection point a007 if w 1 ×δ d +w 2 ×α v <W, then let W = W 1 ×δ d +w 2 ×α v And let index equal the position number of element B002 in LIST 1;
(2) the operation for element B002 ends;
step102-2-3-2: if the value of the light source visibility LVis member variable of a scene point of a variable of the data structure ISPOINTLV type stored in the index-th element of the LIST1 is equal to 1, a direct illuminance contribution a008 transmitted in a direction opposite to the incident direction of the light ray at the intersection a007 on the transmission path a006 is calculated by scattering the light directly emitted by the light source at the intersection a007, and let I be ind Is equal to I ind Added to the direct illumination luminance contribution value a 008; turning to Step102-2-4;
step102-2-3-3: turning to Step102-2-2;
step102-2-4: the operation for the intersection point a007 ends;
step102-3: calculate the line number row of pixel A001 on the virtual pixel plane of the virtual camera, calculate the column number col of pixel A001 on the virtual pixel plane of the virtual camera, let IM [ row [ ]][col]=IM[row][col]+I dir +I ind ,IM[row][col]Representing row and col elements of the two-dimensional array IM; the operation for pixel a001 ends;
step103: incrementing the Counter value by 1, i.e. performing Counter = Counter +1; if the Counter value is less than N cth Turning to Step102;
step104: for IR =1,2, \8230;, M, IC =1,2, \8230;, N, let IM [ IR ] [ IC ] = IM [ IR ] [ IC ]/Counter, IM [ IR ] [ IC ] denote the IR row, IC column elements of the two-dimensional array IM; and converting the illumination brightness contribution values stored in each element of the two-dimensional array IM into the pixel color values of the three-dimensional scene picture and storing the pixel color values into a disk image file.
CN201811317381.0A 2018-11-07 2018-11-07 Oversampling ray tracing method for multiplexing scene point light source visibility Active CN109493412B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811317381.0A CN109493412B (en) 2018-11-07 2018-11-07 Oversampling ray tracing method for multiplexing scene point light source visibility

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811317381.0A CN109493412B (en) 2018-11-07 2018-11-07 Oversampling ray tracing method for multiplexing scene point light source visibility

Publications (2)

Publication Number Publication Date
CN109493412A CN109493412A (en) 2019-03-19
CN109493412B true CN109493412B (en) 2022-10-21

Family

ID=65693980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811317381.0A Active CN109493412B (en) 2018-11-07 2018-11-07 Oversampling ray tracing method for multiplexing scene point light source visibility

Country Status (1)

Country Link
CN (1) CN109493412B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110751713B (en) * 2019-10-18 2022-08-23 长春理工大学 Self-adaptive anti-aliasing method for rendering picture by ray tracing of three-dimensional scene

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447905A (en) * 2015-11-17 2016-03-30 长春理工大学 Three dimensional scene approximation soft shadow light tracking based on visible smooth filtering
CN107483910A (en) * 2017-07-14 2017-12-15 清华大学 A kind of long range Nakedness-yet stereoscopic display method and its system
CN107909647A (en) * 2017-11-22 2018-04-13 长春理工大学 The virtual 3D scenes light field projected image method for drafting of the sense of reality based on spatial reuse
CN107909639A (en) * 2017-11-10 2018-04-13 长春理工大学 The 3D scene drawing methods of scope are multiplexed according to position self adaptive control light source observability

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102007023739B4 (en) * 2007-05-16 2018-01-04 Seereal Technologies S.A. Method for rendering and generating color video holograms in real time and holographic display device
US8587588B2 (en) * 2009-08-18 2013-11-19 Dreamworks Animation Llc Ray-aggregation for ray-tracing during rendering of imagery

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447905A (en) * 2015-11-17 2016-03-30 长春理工大学 Three dimensional scene approximation soft shadow light tracking based on visible smooth filtering
CN107483910A (en) * 2017-07-14 2017-12-15 清华大学 A kind of long range Nakedness-yet stereoscopic display method and its system
CN107909639A (en) * 2017-11-10 2018-04-13 长春理工大学 The 3D scene drawing methods of scope are multiplexed according to position self adaptive control light source observability
CN107909647A (en) * 2017-11-22 2018-04-13 长春理工大学 The virtual 3D scenes light field projected image method for drafting of the sense of reality based on spatial reuse

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
动态3D虚拟场景并行化光线跟踪加速结构设计;李华等;《长春理工大学学报(自然科学版)》;20131215(第06期);全文 *
基于自适应迭代面光源采样的物理正确柔和阴影绘制算法;周文言等;《长春理工大学学报(自然科学版)》;20180615(第03期);全文 *

Also Published As

Publication number Publication date
CN109493412A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
AU2014363213B2 (en) Image rendering of laser scan data
CN101506847B (en) Methods and systems for partitioning a spatial index
Airey et al. Towards image realism with interactive update rates in complex virtual building environments
US6078332A (en) Real-time lighting method using 3D texture mapping
CN110728741B (en) Area light source irradiation three-dimensional scene picture rendering method based on multi-detail level model
JPH0757117A (en) Forming method of index to texture map and computer control display system
Khodulev et al. Physically accurate lighting simulation in computer graphics software
CN109493413B (en) Three-dimensional scene global illumination effect drawing method based on self-adaptive virtual point light source sampling
CN104077802A (en) Method for improving displaying effect of real-time simulation image in virtual scene
CN107909647B (en) Realistic virtual 3D scene light field projection image drawing method based on spatial multiplexing
US11410580B2 (en) Display non-uniformity correction
KR102151443B1 (en) Graphics processing apparatus based on hybrid gpu architecture
US20210110787A1 (en) Systems and methods for hiding dead pixels
KR20020031179A (en) Method and apparatus for rendering images with refractions
CN109493412B (en) Oversampling ray tracing method for multiplexing scene point light source visibility
US8576226B2 (en) Tertiary lighting system
US10964086B2 (en) Graphics processing
CN107909639B (en) Self-adaptive 3D scene drawing method of light source visibility multiplexing range
CN116485987A (en) Real environment simulation method and device based on shadow rendering
JPH10222701A (en) Computer graphic device and generating method for image data
Zhdanov et al. Stochastic ray tracing methods in problems of photorealistic image synthesis for augmented reality systems
US10950199B1 (en) Systems and methods for hiding dead pixels
JPH0783753A (en) Method and device for analyzing optical environment
Wallner GPU radiosity for triangular meshes with support of normal mapping and arbitrary light distributions
JP2952585B1 (en) Image generation method

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