CN116206045A - Drawing method and system for semi-infinite participation medium multiple scattering - Google Patents

Drawing method and system for semi-infinite participation medium multiple scattering Download PDF

Info

Publication number
CN116206045A
CN116206045A CN202310240707.9A CN202310240707A CN116206045A CN 116206045 A CN116206045 A CN 116206045A CN 202310240707 A CN202310240707 A CN 202310240707A CN 116206045 A CN116206045 A CN 116206045A
Authority
CN
China
Prior art keywords
medium
emergent
probability density
drawn
attribute
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
CN202310240707.9A
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.)
Shandong University
Original Assignee
Shandong 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 Shandong University filed Critical Shandong University
Priority to CN202310240707.9A priority Critical patent/CN116206045A/en
Publication of CN116206045A publication Critical patent/CN116206045A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/06Ray-tracing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/08Volume rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/506Illumination models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/21Collision detection, intersection
    • 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
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T90/00Enabling technologies or technologies with a potential or indirect contribution to GHG emissions mitigation

Abstract

The invention discloses a drawing method and a drawing system of semi-infinite participation medium multiple scattering, which are characterized in that medium properties and surface properties of a medium object to be drawn are input into a trained position probability density network model, probability density function parameters of the surface of the medium object to be drawn about an emergent position are output, and the emergent position is obtained by sampling; inputting the medium attribute, the surface attribute and the emergent position into a trained direction probability density network model, outputting probability density function parameters of the emergent point about the emergent direction, and sampling to obtain an emergent direction; inputting the medium attribute, the surface attribute, the emergent position and the emergent direction into a trained evaluation network model, and outputting a multiple scattering radiation brightness value in a specific direction of a certain position on the surface of a medium object to be drawn; and carrying out volume path tracking on each image pixel to obtain a multiple scattering drawing result of the medium object to be drawn.

Description

Drawing method and system for semi-infinite participation medium multiple scattering
Technical Field
The invention relates to the technical field of graphic realism rendering, in particular to a drawing method and system for semi-infinite participation medium multiple scattering.
Background
The statements in this section merely relate to the background of the present disclosure and may not necessarily constitute prior art.
Scenes in the real world contain participating media, colloquially voxels consisting of various particles, such as air, fog, etc. Light is absorbed in the participating media or undergoes a number of scattering events that eventually emerge from another point on the media surface, and this light transmission process can be summarized as a bi-directional surface scattering reflection distribution function (Bidirectional Surface Scattering Reflectance Distribution Function, BSSRDF). The phenomenon of multiple scattering in the participating medium is described as a process that light rays are scattered three times or more in the medium and then are emitted out of the medium, the contribution ratio of the light rays to colors in the medium with a very small average free path is larger, more scattering paths need to be tracked to obtain acceptable drawing results, the whole time and resources are consumed, and the realistic drawing of a scene becomes very difficult.
In recent years, in the field of off-line rendering, some methods use multiple scattering results inside the participating media within the prediction horizon (e.g. cube, sphere) of the neural network, while greatly accelerating the rendering process, the lack of an overall study of the participating media with surfaces, how to build a unified model of surface rendering and participating media rendering remains a complex problem.
Disclosure of Invention
In order to solve the defects of the prior art, the invention provides the drawing method and the drawing system for the semi-infinite participation medium multiple scattering, which relate surface rendering and participation medium rendering, predict the light transmission result of the semi-infinite participation medium with the surface by using a neural network, reduce the total time of a volume path tracking algorithm and obtain a drawing result with high quality.
In a first aspect, the invention provides a method for drawing semi-infinite participation medium multiple scattering;
the drawing method of semi-infinite participation medium multiple scattering comprises the following steps:
acquiring a medium attribute and a surface attribute of a medium object to be drawn;
inputting the medium attribute and the surface attribute of the medium object to be drawn into a trained position probability density network to obtain an emergent position;
inputting the medium attribute, the surface attribute and the emergent position of the medium object to be drawn into a trained direction probability density network to obtain an emergent direction;
inputting the medium attribute, the surface attribute, the emergent position and the emergent direction of the medium object to be drawn into a trained evaluation network model to obtain multiple scattering radiation brightness values on the emergent position and the emergent direction of the surface of the medium object to be drawn;
and (3) tracking the volume path of each image pixel from the camera, and obtaining multiple scattering radiation brightness values of all camera rays according to tracking results, thereby obtaining multiple scattering drawing results of the medium object to be drawn.
In a second aspect, the present invention provides a rendering system for semi-infinite participation in multiple scattering of a medium;
a rendering system for semi-infinite participation in multiple scattering of a medium, comprising:
an acquisition module configured to: acquiring a medium attribute and a surface attribute of a medium object to be drawn;
a position prediction module configured to: inputting the medium attribute and the surface attribute of the medium object to be drawn into a trained position probability density network to obtain an emergent position;
a direction prediction module configured to: inputting the medium attribute, the surface attribute and the emergent position of the medium object to be drawn into a trained direction probability density network to obtain an emergent direction;
a radiance prediction module configured to: inputting the medium attribute, the surface attribute, the emergent position and the emergent direction of the medium object to be drawn into a trained evaluation network model to obtain multiple scattering radiation brightness values on the emergent position and the emergent direction of the surface of the medium object to be drawn;
a volume path tracking module configured to: and (3) tracking the volume path of each image pixel from the camera, and obtaining multiple scattering radiation brightness values of all camera rays according to tracking results, thereby obtaining multiple scattering drawing results of the medium object to be drawn.
In a third aspect, the present invention also provides an electronic device, including:
a memory for non-transitory storage of computer readable instructions; and
a processor for executing the computer-readable instructions,
wherein the computer readable instructions, when executed by the processor, perform the method of the first aspect described above.
In a fourth aspect, the invention also provides a storage medium storing non-transitory computer readable instructions, wherein the instructions of the method of the first aspect are performed when the non-transitory computer readable instructions are executed by a computer.
In a fifth aspect, the invention also provides a computer program product comprising a computer program for implementing the method of the first aspect described above when run on one or more processors.
Compared with the prior art, the invention has the beneficial effects that:
the present disclosure proposes a location probability density network that reconstructs probability density functions of semi-infinite participating media with surfaces with respect to exit locations, the network being applicable to semi-infinite participating media with surfaces of various types and attributes.
The present disclosure proposes a directional probability density network that reconstructs a probability density function of a certain exit position of a semi-infinite participating medium having a surface with respect to an exit direction, the network being applicable to semi-infinite participating media having a surface of various types and properties.
The present disclosure relates surface rendering to participating media rendering, refining multiple scattering phenomena in semi-infinite participating media with surfaces as an eight-dimensional function: two bits correspond to the properties of the participating medium (albedo alpha and anisotropy coefficient g), one dimension corresponds to the surface property (refractive index eta), one dimension corresponds to the angle between the incident direction and the normal of the incident point surface, two dimensions correspond to the spatial coordinates of the exit position when the light exits the surface, and finally two dimensions correspond to the exit direction when the light exits from a certain exit point on the surface. The present disclosure provides a fully connected network for reconstructing multiple scattering information in a BSSRDF, the network being suitable for use with various types and properties of semi-infinite participating media having surfaces.
The volume path tracking method is optimized and improved on the basis of the above steps: the use of two sampling networks and one evaluation network to calculate the optical transmission results of a semi-infinite participating medium with a surface reduces the overhead of calculating multiple scattering in the original method.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention.
FIG. 1 is a drawing flow chart of a semi-infinite participating medium multiple scattering based on a neural network provided in an embodiment of the present disclosure;
FIG. 2 is a schematic view of a spatial position and an exit direction provided by a first embodiment of the present disclosure;
FIGS. 3 (a) -3 (c) are diagrams of training the neural network provided in accordance with an embodiment of the present disclosure;
FIGS. 4 (a) -4 (f) are graphs of neural network training effects provided in accordance with an embodiment of the present disclosure;
fig. 5 (a) -5 (b) are partial result diagrams provided by an embodiment of the present disclosure.
Detailed Description
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the invention. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular forms also are intended to include the plural forms, and furthermore, it is to be understood that the terms "comprises" and "comprising" and any variations thereof are intended to cover non-exclusive inclusions, such as, for example, processes, methods, systems, products or devices that comprise a series of steps or units, are not necessarily limited to those steps or units that are expressly listed, but may include other steps or units that are not expressly listed or inherent to such processes, methods, products or devices.
Embodiments of the invention and features of the embodiments may be combined with each other without conflict.
All data acquisition in the embodiment is legal application of the data on the basis of meeting laws and regulations and agreements of users.
Example 1
The embodiment provides a drawing method of semi-infinite participation medium multiple scattering;
as shown in fig. 1, the drawing method of semi-infinite participation medium multiple scattering includes:
s101: acquiring a medium attribute and a surface attribute of a medium object to be drawn;
s102: inputting the medium attribute and the surface attribute of the medium object to be drawn into a trained position probability density network to obtain an emergent position;
s103: inputting the medium attribute, the surface attribute and the emergent position of the medium object to be drawn into a trained direction probability density network to obtain an emergent direction;
s104: inputting the medium attribute, the surface attribute, the emergent position and the emergent direction of the medium object to be drawn into a trained evaluation network model to obtain multiple scattering radiation brightness values on the emergent position and the emergent direction of the surface of the medium object to be drawn;
s105: and (3) tracking the volume path of each image pixel from the camera, and obtaining multiple scattering radiation brightness values of all camera rays according to tracking results, thereby obtaining multiple scattering drawing results of the medium object to be drawn.
Further, the step S101: acquiring the medium attribute and the surface attribute of a medium object to be drawn, wherein,
a media attribute comprising: scattering albedo and coefficient of anisotropy;
the scattering albedo, denoted by α, describes the probability σ of energy scattering after a fixed distance of light propagation s Occupying the transmission attenuation coefficient sigma t =σ as The ratio of (2) is in the range of [0, 1]]Wherein σ is a To describe the probability of energy absorption after a fixed distance of light propagation;
the anisotropy coefficient is used for describing the anisotropy degree of the phase function, and is expressed by g, the range is [ -1, +1], when g is 0, the propagation probability of each direction is the same when scattering, the closer to 1, the larger the probability of straight line propagation is, the closer to-1, and the larger the probability of back propagation is.
The surface attribute refers to refractive index;
the refractive index, which describes the ratio of the propagation speed of light in vacuum to the propagation speed of light in the medium, is denoted by η.
Further, the medium attribute and the surface attribute of the medium object to be drawn are obtained, wherein the medium attribute and the surface attribute are input by a user into different attribute parameters.
Further, the step S102: inputting the medium attribute and the surface attribute of the medium object to be drawn into a trained position probability density network to obtain an emergent position, wherein the method specifically comprises the following steps:
s102-1: inputting the medium attribute and the surface attribute of the medium object to be drawn into a trained position probability density network, and outputting probability density function parameters of the surface of the medium object to be drawn on the emergent position;
s102-2: sampling according to probability density function parameters of the surface of the medium object to be drawn on the emergent position to obtain the emergent position.
Further, the step S102-2: sampling according to probability density function parameters of the surface of the medium object to be drawn on the emergent position to obtain the emergent position, wherein the sampling comprises the following steps:
s102-21: calculating a cumulative distribution function (CDF, cumulative Distribution Function) for the mixed coefficient set according to the mixed coefficient set in the probability density function, and then sampling to obtain Gaussian distribution;
s102-22: and sampling by using a Box-Muller algorithm from the Gaussian distribution to obtain an emergent position.
Further, the step S102: inputting the medium attribute and the surface attribute of the medium object to be drawn into a trained position probability density network to obtain an emergent position, wherein the trained position probability density network comprises the following training processes:
constructing a position probability density network;
constructing a first training set;
the first training set comprises known medium properties, surface properties, an included angle between known incident light rays and the normal of the surface of an incident point, an emergent position and probability density value when the known light rays emerge from a medium-participating object with a surface;
and inputting the training set into a position probability density network for training, and obtaining the trained position probability density network when the loss function reaches the minimum value.
The drawing mediums in the first training set are a plurality of drawing mediums.
In the training process, instead of taking a single type of drawing medium as an input value, multiple types of drawing medium information are mixed and then input into a position probability density network for training.
Further, the constructing a location probability density network, the network structure of the location probability density network includes:
the position probability density network comprises a first input layer, a first hidden layer, a second hidden layer, a third hidden layer, a fourth hidden layer, a fifth hidden layer, a sixth hidden layer and a first output layer which are sequentially connected; each hidden layer has 48 nodes (see fig. 3 (a)), any node of the previous layer in the adjacent layers of the position probability density network is connected with all nodes of the next layer, and uses ReLU as an activation function;
the input parameters of the first input layer comprise a medium attribute parameter, a surface attribute parameter and an incident angle parameter, wherein the medium attribute parameter and the surface attribute parameter refer to a scattering albedo alpha, an anisotropy coefficient g and a refractive index eta; the incident angle is the angle between the incident direction and the normal line of the surface at the incident point, and θ i And (3) representing.
The output parameters of the first output layer are the output parameters of the surface of the medium object to be drawn relative to the emergent position (x loc ,y loc ) Probability density function p (x) loc ,y loc ) Parameters of (2)
Figure BDA0004123992770000081
Wherein the spatial position coordinates (x loc ,y loc ) Is the x, y coordinates in the local rectangular coordinate system, which is used to represent the exit position, as shown in fig. 2.
Further, the probability density function p (x loc ,y loc ) The expression is as follows:
Figure BDA0004123992770000082
probability density function p (x loc ,y loc ) Parameters of (2)
Figure BDA0004123992770000083
Wherein, the mixing coefficient alpha corresponding to the kth Gaussian distribution in the Gaussian mixture function distribution k Satisfy all mixing coefficients added to 1, i.e., Σ k α k =1; the kth Gaussian distribution
Figure BDA0004123992770000084
Mu, as a two-dimensional Gaussian function k Is the mean value of Gaussian function, +.>
Figure BDA0004123992770000085
Variance of Gaussian function->
Figure BDA0004123992770000086
Logarithmic (log).
It should be understood that the neural network used in this embodiment is structured as a fully connected network. The neural network comprises: a location probability density network, a direction probability density network, and an evaluation network. For all data, they were normalized first and mixed randomly. The whole network is trained by Pytorch, the optimizer of which is Adam.
Further, the step S103: inputting the medium attribute, the surface attribute and the emergent position of the medium object to be drawn into a trained direction probability density network to obtain the emergent direction, wherein the method specifically comprises the following steps:
s103-1: inputting the medium attribute, the surface attribute and the set emergent position into a trained direction probability density network, and outputting probability density function parameters of the set emergent position of the surface of the medium object to be drawn on the emergent direction;
s103-2: and sampling according to probability density function parameters of the set emergent position of the surface of the medium object to be drawn with respect to the emergent direction, so as to obtain the emergent direction.
Further, the step S103-2: sampling according to probability density function parameters of the set emergent position of the surface of the medium object to be drawn with respect to the emergent direction, so as to obtain the emergent direction, which comprises the following steps:
according to coefficient values in the probability density function parameters, CDF sampling is used for obtaining Gaussian distribution;
and sampling by using a Box-Muller algorithm from the Gaussian distribution to obtain an emergent direction.
Further, the step S103: inputting the medium attribute, the surface attribute and the emergent position of the medium object to be drawn into a trained direction probability density network to obtain the emergent direction, wherein the trained direction probability density network comprises the following training processes:
constructing a direction probability density network;
constructing a second training set;
the second training set comprises known medium properties, surface properties, an included angle between known incident light rays and the normal of the surface of an incident point, an emergent position, an emergent direction and probability density values when the known light rays emerge from a medium-participating object with a surface;
and inputting the second training set into the direction probability density network for training, and obtaining the trained direction probability density network when the loss function reaches the minimum value.
The drawing mediums in the second training set are a plurality of drawing mediums.
In the training process, instead of taking a single type of drawing medium as an input value, multiple types of drawing medium information are mixed and then input into a direction probability density network for training.
Further, as shown in fig. 3 (b), the direction probability density network includes:
the second input layer, the seventh hidden layer, the eighth hidden layer, the ninth hidden layer, the tenth hidden layer, the eleventh hidden layer, the twelfth hidden layer and the second output layer are sequentially connected, reLU is used as an activation function, each hidden layer is provided with 32 nodes, and any node of the previous layer in the adjacent layers of the direction probability density network is connected with all nodes of the next layer;
the input parameters (alpha, g, eta, theta) of the second input layer i ,x loc ,y loc ),θ i Indicating the incident angle x loc ,y loc Representing the spatial position coordinates.
The output parameter of the second output layer is the output parameter of the surface of the medium object to be drawn relative to the emergent direction (x dir ,y dir ) Is of (1)Rate density function p (x dir ,y dir ) Parameters (parameters)
Figure BDA0004123992770000101
Wherein, the liquid crystal display device comprises a liquid crystal display device,
direction coordinates (x) dir ,y dir ) For indicating the direction of emergence, the coordinates being defined by coordinates in a spherical coordinate system
Figure BDA0004123992770000102
Transformed into, as shown in FIG. 2, in which θ o Is the angle between the emergent direction and the z-axis under the local coordinate system, +.>
Figure BDA0004123992770000103
Is the angle between the component of the exit direction in the xoy plane and the x-axis.
In order to better fit the probability density function, the direction coordinates project the emergent unit hemispheres to a z=1 plane under a local rectangular coordinate system to obtain projected emergent direction coordinates (x dir ,y dir ,z dir ) The specific transformation is calculated as follows:
z dir =cosθ o
Figure BDA0004123992770000104
Figure BDA0004123992770000105
further, probability density function p (x dir ,y dir ) As a mixed gaussian function, the expression is as follows:
Figure BDA0004123992770000111
probability density function p (x loc ,y loc ) Parameters of (2)
Figure BDA0004123992770000112
Wherein, the mixing coefficient alpha corresponding to the kth Gaussian distribution in the Gaussian mixture function distribution k Satisfy all mixing coefficients added to 1, i.e., Σ k α k =1; the kth Gaussian distribution
Figure BDA0004123992770000113
Mu, as a two-dimensional Gaussian function k Is the mean value of Gaussian function, +.>
Figure BDA0004123992770000114
Variance of Gaussian function->
Figure BDA0004123992770000115
Logarithmic (log).
Further, the step S104: inputting the medium attribute, the surface attribute, the emergent position and the emergent direction of the medium object to be drawn into a trained evaluation network model to obtain multiple scattering radiation brightness values on the emergent position and the emergent direction of the surface of the medium object to be drawn, wherein the trained evaluation network model comprises the following training processes:
constructing an evaluation network model;
constructing a third training set;
the third training set comprises known medium properties, surface properties, an included angle between known incident light rays and the normal of the surface of an incident point, an emergent position, an emergent direction and multiple scattering radiation brightness values when the known light rays emerge from a medium-participating object with a surface;
and inputting the third training set into the evaluation network model for training, and obtaining the trained evaluation network model when the loss function reaches the minimum value.
The drawing mediums in the third training set are a plurality of drawing mediums.
In the training process, instead of taking a single type of drawing medium as an input value, multiple types of drawing medium information are mixed and then input into an evaluation network model for training.
Further, as shown in fig. 3 (c), the evaluating network model includes:
a third input layer, a thirteenth hidden layer, a fourteenth hidden layer, a fifteenth hidden layer and a third output layer which are sequentially connected; each hidden layer has 64 nodes, and any node of the previous layer in the adjacent layers is connected with all nodes of the next layer; and using tanh as the activation function.
Wherein the input parameters of the third input layer are (alpha, g, eta, theta) i ,x loc ,y loc ,x dir ,y dir ) The output parameter of the third output layer is the multiple scattering radiation brightness value in the setting direction of the setting position on the surface of the medium object to be drawn.
Further, the step S105: starting from a camera, tracking a volume path of each image pixel, and obtaining multiple scattering radiation brightness values of all camera rays according to tracking results, thereby obtaining multiple scattering drawing results of a medium object to be drawn; the method specifically comprises the following steps:
s105-1: each pixel tracks a camera ray, and when the ray refracts into a medium object with a surface, S101 to S104 are repeated to obtain a multiple scattering radiance value when the ray exits the surface;
s105-2: the same method is adopted, and then multiple scattering radiance values of rays of other cameras are obtained;
s105-3: and obtaining the total multiple scattering radiance value of all the camera rays, and obtaining the multiple scattering drawing result of the participated medium object with the surface to be drawn.
The present disclosure defines an expression of multiple scattering terms in BSSRDF (bi-directional surface scattering reflection distribution function, bidirectional Surface Scattering Reflectance Distribution Function) in relation to medium properties, surface properties, angle of incident ray to the surface normal of the point of incidence, spatial position at the exit surface of the ray, exit direction, which gives the energy of the light radiation in the new exit direction when the ray exits the surface after refraction from the surface through a series of scattering. The evaluation network in S104 fits this multiple scattering term, wherein,
multiple scattering term, use of
Figure BDA0004123992770000121
Representing it, polar coordinates (r, θ s ) Indicates the spatial position of the emission, the spherical coordinates +.>
Figure BDA0004123992770000122
The emission direction is shown (shown in fig. 2).
For the entire participating media space with surfaces, the average free path is assumed to be 1, the anisotropic parameter g and the scattering reflectivity α are used to represent different combinations of media properties, and the refractive index η is used to represent surfaces of different properties. For these three parameters, the following parameter sets are combined, respectively:
g∈{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.95,0.99}
α∈{0.01,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.95,0.99}
η∈{1.1,1.2,1.3,1.4,1.5}
since the intensity of multiply scattered light radiation changes more significantly (exponentially) in a medium with a greater degree of anisotropy in the scattering direction and a greater reflectivity, increasing the sampling in the region close to 1 makes the neural network more sensitive to these high frequency (higher intensity values and more pronounced transformations) data.
Further, the known angle between the incident light ray and the normal of the surface of the incident point includes:
θ i ∈{0°,15°,30°,45°,60°,70°,80°,85°,88°}
since the refraction angle changes drastically near 90 ° and is meaningless at 90 °, setting the maximum incidence angle to 88 ° while increasing the sampling case of 85 ° makes the neural network more sensitive to data at high refraction angles. Each medium corresponds to a multiple dispersion table for each incident angle, which stores the light radiance values when light is emitted in different directions at different positions on the surface of the medium.
The present disclosure specifies that the maximum distance of r is 20×l and recording is performed every 0.2×l for
Figure BDA0004123992770000131
The recording is performed every 10 °, so that there are 100×36 positional changes and 10×36 directional changes.
In order to acquire the data set required for neural network training, for each participating medium (α i ,g i ,η i ) At the surface center origin (0, 0) along each incident angle θ i And 5 hundred million photons are continuously emitted, the photons are continuously scattered or absorbed, and are emitted from the surface of the medium, and for each photon entering the recording point of the position, the multiple scattering contributions of the photon to all directions (10 multiplied by 36 directions) at the position are recorded and accumulated. When the photons have been emitted, each sample point is normalized using a probability density-based method, i.e. divided by the spatial volume of each recorded location and the number of all beams entering that location.
Fig. 4 (a) -4 (f) illustrate the neural network training effect in the present disclosure.
The rendering algorithm of the present disclosure is done on the basis of a volume path tracking (Volumetric Path Tracing, VPT) algorithm. In the actual rendering process, firstly, a ray is emitted from a camera to each pixel on an image for path tracking, the ray is intersected in a scene (ray and triangle model detection is carried out to judge whether the ray collides with a participating medium object with a surface, and when the ray collides with the participating medium object with the surface, reflection or refraction occurs. The above-described surfaces and media are determined by the user given different properties prior to rendering.
After light is refracted and enters the medium, the surface attribute of an object to be drawn, the medium attribute and the included angle between the incident light and the normal line of the surface of the incident point are recorded, then the emergent position, the emergent direction and the emergent multiple scattering radiation brightness value are predicted and sampled through a neural network, the contribution value is continuously accumulated until the contribution value is intersected with the light source, and finally the color value of the pixel is obtained.
Finally, fig. 5 (a) -5 (b) show a series of rendering results obtained according to the steps of the present embodiment.
Example two
The embodiment provides a drawing system of semi-infinite participation medium multiple scattering;
a rendering system for semi-infinite participation in multiple scattering of a medium, comprising:
an acquisition module configured to: acquiring a medium attribute and a surface attribute of a medium object to be drawn;
a position prediction module configured to: inputting the medium attribute and the surface attribute of the medium object to be drawn into a trained position probability density network to obtain an emergent position;
a direction prediction module configured to: inputting the medium attribute, the surface attribute and the emergent position of the medium object to be drawn into a trained direction probability density network to obtain an emergent direction;
a radiance prediction module configured to: inputting the medium attribute, the surface attribute, the emergent position and the emergent direction of the medium object to be drawn into a trained evaluation network model to obtain multiple scattering radiation brightness values on the emergent position and the emergent direction of the surface of the medium object to be drawn;
a volume path tracking module configured to: and (3) tracking the volume path of each image pixel from the camera, and obtaining multiple scattering radiation brightness values of all camera rays according to tracking results, thereby obtaining multiple scattering drawing results of the medium object to be drawn.
Here, the above-mentioned acquisition module, position prediction module, direction prediction module, radiance prediction module, and volume path tracking module correspond to steps S101 to S105 in the first embodiment, and the above-mentioned modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the first embodiment. It should be noted that the modules described above may be implemented as part of a system in a computer system, such as a set of computer-executable instructions.
The foregoing embodiments are directed to various embodiments, and details of one embodiment may be found in the related description of another embodiment.
The proposed system may be implemented in other ways. For example, the system embodiments described above are merely illustrative, such as the division of the modules described above, are merely a logical function division, and may be implemented in other manners, such as multiple modules may be combined or integrated into another system, or some features may be omitted, or not performed.
Example III
The embodiment also provides an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein the processor is coupled to the memory, the one or more computer programs being stored in the memory, the processor executing the one or more computer programs stored in the memory when the electronic device is running, to cause the electronic device to perform the method of the first embodiment.
It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general purpose processors, digital signal processors DSP, application specific integrated circuits ASIC, off-the-shelf programmable gate array FPGA or other programmable logic device, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may include read only memory and random access memory and provide instructions and data to the processor, and a portion of the memory may also include non-volatile random access memory. For example, the memory may also store information of the device type.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software.
The method in the first embodiment may be directly implemented as a hardware processor executing or implemented by a combination of hardware and software modules in the processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method. To avoid repetition, a detailed description is not provided herein.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
Example IV
The present embodiment also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, perform the method of embodiment one.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. The method for drawing the semi-infinite participation medium multiple scattering is characterized by comprising the following steps of:
acquiring a medium attribute and a surface attribute of a medium object to be drawn;
inputting the medium attribute and the surface attribute of the medium object to be drawn into a trained position probability density network to obtain an emergent position;
inputting the medium attribute, the surface attribute and the emergent position of the medium object to be drawn into a trained direction probability density network to obtain an emergent direction;
inputting the medium attribute, the surface attribute, the emergent position and the emergent direction of the medium object to be drawn into a trained evaluation network model to obtain multiple scattering radiation brightness values on the emergent position and the emergent direction of the surface of the medium object to be drawn;
and (3) tracking the volume path of each image pixel from the camera, and obtaining multiple scattering radiation brightness values of all camera rays according to tracking results, thereby obtaining multiple scattering drawing results of the medium object to be drawn.
2. The method for drawing semi-infinite participation medium multiple scattering according to claim 1, wherein the medium attribute and the surface attribute of the medium object to be drawn are input into a trained position probability density network to obtain an emergent position, and the method specifically comprises the following steps:
inputting the medium attribute and the surface attribute of the medium object to be drawn into a trained position probability density network, and outputting probability density function parameters of the surface of the medium object to be drawn on the emergent position;
sampling according to probability density function parameters of the surface of the medium object to be drawn on the emergent position to obtain the emergent position.
3. The method for drawing semi-infinite participation medium multiple scattering according to claim 2, wherein sampling is performed according to probability density function parameters of a surface of a medium object to be drawn with respect to an exit position to obtain an exit position, comprising:
according to a mixed coefficient set in the probability density function, calculating a cumulative distribution function of the mixed coefficient set, and then sampling to obtain Gaussian distribution;
and sampling to obtain an emergent position from the Gaussian distribution.
4. The method for drawing semi-infinite participation medium multiple scattering according to claim 1, wherein medium properties and surface properties of a medium object to be drawn are input into a trained position probability density network to obtain an emergent position, wherein the trained position probability density network comprises the following training processes:
constructing a position probability density network; constructing a first training set;
the first training set comprises known medium properties, surface properties, an included angle between known incident light rays and the normal of the surface of an incident point, an emergent position and probability density value when the known light rays emerge from a medium-participating object with a surface;
and inputting the training set into a position probability density network for training, and obtaining the trained position probability density network when the loss function reaches the minimum value.
5. The method for drawing semi-infinite participation medium multiple scattering according to claim 4, wherein the construction of the position probability density network includes:
the position probability density network comprises a first input layer, a first hidden layer, a second hidden layer, a third hidden layer, a fourth hidden layer, a fifth hidden layer, a sixth hidden layer and a first output layer which are sequentially connected; any node of the previous layer in the adjacent layers of the position probability density network is connected with all nodes of the next layer.
6. The method for drawing semi-infinite participation medium multiple scattering according to claim 1, wherein the medium attribute, the surface attribute and the exit position of the medium object to be drawn are input into a trained direction probability density network to obtain the exit direction, and the method specifically comprises the following steps:
inputting the medium attribute, the surface attribute and the set emergent position into a trained direction probability density network, and outputting probability density function parameters of the set emergent position of the surface of the medium object to be drawn on the emergent direction;
sampling according to probability density function parameters of the set emergent position of the surface of the medium object to be drawn with respect to the emergent direction, so as to obtain an emergent direction;
the direction probability density network comprises the following network structures: the second input layer, the seventh hidden layer, the eighth hidden layer, the ninth hidden layer, the tenth hidden layer, the eleventh hidden layer, the twelfth hidden layer and the second output layer are sequentially connected, and any node of the previous layer in the adjacent layers of the direction probability density network is connected with all nodes of the next layer.
7. The method for drawing semi-infinite participation medium multiple scattering according to claim 1, wherein medium properties, surface properties, exit positions and exit directions of a medium object to be drawn are input into a trained evaluation network model to obtain multiple scattering radiation brightness values in the exit positions and the exit directions on the surface of the medium object to be drawn, wherein the trained evaluation network model comprises the following training processes:
constructing an evaluation network model; constructing a third training set;
the third training set comprises known medium properties, surface properties, an included angle between known incident light rays and the normal of the surface of an incident point, an emergent position, an emergent direction and multiple scattering radiation brightness values when the known light rays emerge from a medium-participating object with a surface;
inputting the third training set into the evaluation network model for training, and obtaining a trained evaluation network model when the loss function reaches the minimum value;
the evaluating network model, the network structure of which comprises: a third input layer, a thirteenth hidden layer, a fourteenth hidden layer, a fifteenth hidden layer and a third output layer which are sequentially connected; any node of the previous layer in the adjacent layers is connected with all nodes of the next layer.
8. A rendering system for semi-infinite participation in multiple scattering of a medium, comprising:
an acquisition module configured to: acquiring a medium attribute and a surface attribute of a medium object to be drawn;
a position prediction module configured to: inputting the medium attribute and the surface attribute of the medium object to be drawn into a trained position probability density network to obtain an emergent position;
a direction prediction module configured to: inputting the medium attribute, the surface attribute and the emergent position of the medium object to be drawn into a trained direction probability density network to obtain an emergent direction;
a radiance prediction module configured to: inputting the medium attribute, the surface attribute, the emergent position and the emergent direction of the medium object to be drawn into a trained evaluation network model to obtain multiple scattering radiation brightness values on the emergent position and the emergent direction of the surface of the medium object to be drawn;
a volume path tracking module configured to: and (3) tracking the volume path of each image pixel from the camera, and obtaining multiple scattering radiation brightness values of all camera rays according to tracking results, thereby obtaining multiple scattering drawing results of the medium object to be drawn.
9. An electronic device, comprising:
a memory for non-transitory storage of computer readable instructions; and
a processor for executing the computer-readable instructions,
wherein the computer readable instructions, when executed by the processor, perform the method of any of the preceding claims 1-7.
10. A storage medium, characterized by non-transitory storing computer-readable instructions, wherein the instructions of the method of any one of claims 1-7 are performed when the non-transitory computer-readable instructions are executed by a computer.
CN202310240707.9A 2023-03-09 2023-03-09 Drawing method and system for semi-infinite participation medium multiple scattering Pending CN116206045A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310240707.9A CN116206045A (en) 2023-03-09 2023-03-09 Drawing method and system for semi-infinite participation medium multiple scattering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310240707.9A CN116206045A (en) 2023-03-09 2023-03-09 Drawing method and system for semi-infinite participation medium multiple scattering

Publications (1)

Publication Number Publication Date
CN116206045A true CN116206045A (en) 2023-06-02

Family

ID=86509418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310240707.9A Pending CN116206045A (en) 2023-03-09 2023-03-09 Drawing method and system for semi-infinite participation medium multiple scattering

Country Status (1)

Country Link
CN (1) CN116206045A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117292068A (en) * 2023-11-24 2023-12-26 北京渲光科技有限公司 Multiple scattering distribution generation network training method, rendering method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117292068A (en) * 2023-11-24 2023-12-26 北京渲光科技有限公司 Multiple scattering distribution generation network training method, rendering method and device
CN117292068B (en) * 2023-11-24 2024-03-05 北京渲光科技有限公司 Multiple scattering distribution generation network training method, rendering method and device

Similar Documents

Publication Publication Date Title
US11288855B2 (en) Determining lighting information for rendering a scene in computer graphics using illumination point sampling
CN116206045A (en) Drawing method and system for semi-infinite participation medium multiple scattering
CN112396684A (en) Ray tracing method, ray tracing device and machine-readable storage medium
CN111583371A (en) Neural network-based participatory medium multiple scattering drawing method and system
Bai et al. Acceleration of wireless channel simulation using gpus
CN115731350A (en) Simulation method and device for virtual laser radar of vehicle
Qian et al. FAOD-Net: a fast AOD-Net for dehazing single image
CN116385623A (en) Drawing method and system for multiple scattering of participating medium with depth information
Holzschuch Accurate computation of single scattering in participating media with refractive boundaries
Siebert et al. Fast optical monte carlo simulation with surface-based geometries using chroma
CN105761295B (en) A kind of the water surface method for reconstructing and system of data-driven
Shinya et al. Multiple scattering approximation in heterogeneous media by narrow beam distributions
Pekkarinen et al. Physically based lens flare rendering in" The Lego Movie 2"
Kronander Physically Based Rendering of Synthetic Objects in Real Environments
Kajs Real-Time Rendering of Granular Materials
Yan Physically-based Modeling and Rendering of Complex Visual Appearance
Kinev et al. Methods for Calculating and Visualizing the Spatial Distribution of Illumination in Three-dimensional Models of Optically Complex Scenes
Minnetian New Monte Carlo estimators for differentiating volumetric light transport
Fang et al. A real-time rendering method for high albedo anisotropic materials with multiple scattering
TG et al. Neural BSSRDF: Object Appearance Representation Including Heterogeneous Subsurface Scattering
DE102023119797A1 (en) DIFFERENTIAL OBJECT INSERTION USING HYBRID ILLUMINATION VOLUME FOR SYNTHETIC DATA GENERATION APPLICATIONS
Guo Multi-scale Appearance Modeling of Complex Materials
Wyman et al. A Gentle Introduction to ReSTIR
CN115546380A (en) Ray tracing method, device and equipment
Romanyuk et al. Global Lighting Based on Functionally Defined Surfaces and Voxels in Real Time Using a GPU

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