Method and system for rendering multiple scattering of semi-infinite participating media

Through neural networks, the optical transmission results of semi-infinite participating media are predicted, and the complexity of multiple scattering phenomena is solved, achieving efficient drawing results and enhanced scene reality.

CN116206045BActive Publication Date: 2025-05-13SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310240707.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-09
Publication Date
2025-05-13
Estimated Expiration
2043-03-09

AI Technical Summary

Technical Problem

The prior art is difficult to effectively solve the complexity of multiple scattering phenomena in semi-infinite participating media, especially when light in the medium undergoes three or more scattering, making drawing the realism of the scene difficult.

Method used

The neural network is used to predict the optical transmission results of semi-infinite participating media with surfaces, and calculate the exit position, exit direction and multiple scattered radiation brightness values ​​through the position probability density network, direction probability density network and evaluation network to reduce the total time of the volume path tracking algorithm.

Benefits of technology

It realizes efficient processing of multiple scattering phenomena in semi-infinite participating media, reduces calculation overhead, obtains high-quality drawing results, and enhances the realism of the scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116206045B_ABST
    Figure CN116206045B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for drawing multiple scattering of a semi-infinite participating medium. The method comprises the following steps: inputting the medium properties and surface properties of a medium object to be drawn into a trained position probability density network model, outputting the probability density function parameters of the surface of the medium object to be drawn with respect to the exit position, and sampling to obtain an exit position; inputting the medium properties, surface properties and exit position into a trained direction probability density network model, outputting the probability density function parameters of the exit point with respect to the exit direction, and sampling to obtain an exit direction; inputting the medium properties, surface properties, exit position and exit direction into a trained evaluation network model, outputting the multiple scattering radiation brightness value in a specific direction of a certain position on the surface of the medium object to be drawn; and performing volume path tracing on each image pixel to obtain a multiple scattering drawing result of the medium object to be drawn.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of realistic rendering of graphics, and in particular to a rendering method and system for multiple scattering of semi-infinite participating media. Background Art

[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.

[0003] Scenes in the real world contain participating media, which are generally voxels composed of various particles, such as air and fog. Light is absorbed in participating media, or undergoes a large number of scattering events and finally emerges from another point on the surface of the medium. This light transmission process can be summarized as the bidirectional surface scattering reflectance distribution function (BSSRDF). The multiple scattering phenomenon in participating media is described as the process in which light is emitted from the medium after three or more scatterings in the medium. In media with very small mean free paths, the contribution to color is greater, and more scattering paths need to be traced to obtain acceptable rendering results. The overall time and resources consumed are too much, making it very difficult to render realistic scenes.

[0004] In the field of offline rendering in recent years, some methods use neural networks to predict the multiple scattering results inside participating media within a range (such as a cube or sphere). Although this greatly accelerates the rendering process, there is a lack of overall research on participating media with surfaces. How to build a unified model for surface rendering and participating medium rendering remains a complex problem. Summary of the invention

[0005] In order to address the deficiencies of the prior art, the present invention provides a method and system for rendering multiple scattering of semi-infinite participating media, which links surface rendering and participating medium rendering, and uses a neural network to predict the light transmission results of a semi-infinite participating medium with a surface, thereby reducing the total time of the volume path tracing algorithm and obtaining high-quality rendering results.

[0006] In a first aspect, the present invention provides a method for rendering multiple scattering of a semi-infinite participating medium;

[0007] Methods for rendering multiple scattering in semi-infinite participating media include:

[0008] Obtain the medium properties and surface properties of the medium object to be drawn;

[0009] Input the medium properties and surface properties of the medium object to be drawn into the trained position probability density network to obtain the exit position;

[0010] Input the medium properties, surface properties and emission position of the medium object to be drawn into the trained direction probability density network to obtain the emission direction;

[0011] Inputting the medium properties, surface properties, emission position and emission direction of the medium object to be drawn into the trained evaluation network model to obtain the multi-scattered radiation brightness value at the emission position and emission direction on the surface of the medium object to be drawn;

[0012] Starting from the camera, volume path tracing is performed on each image pixel. Based on the tracing results, the multi-scattered radiation brightness values ​​of all camera rays are obtained, and then the multi-scattered rendering results of the medium object to be rendered are obtained.

[0013] In a second aspect, the present invention provides a system for mapping multiple scattering of semi-infinite participating media;

[0014] A rendering system for multiple scattering in semi-infinite participating media, including:

[0015] An acquisition module, which is configured to: acquire medium properties and surface properties of the medium object to be drawn;

[0016] A position prediction module is configured to: input the medium properties and surface properties of the medium object to be drawn into the trained position probability density network to obtain the exit position;

[0017] A direction prediction module is configured to: input the medium properties, surface properties and emission position of the medium object to be drawn into the trained direction probability density network to obtain the emission direction;

[0018] A radiation brightness prediction module is configured to: input the medium properties, surface properties, emission position and emission direction of the medium object to be drawn into the trained evaluation network model to obtain the multi-scattered radiation brightness value at the emission position and emission direction of the surface of the medium object to be drawn;

[0019] The volume path tracing module is configured to: start from the camera, perform volume path tracing on each image pixel, obtain the multi-scattered radiation brightness value of all camera rays according to the tracing results, and then obtain the multi-scattered rendering result of the medium object to be rendered.

[0020] In a third aspect, the present invention further provides an electronic device, comprising:

[0021] a memory for non-transitory storage of computer-readable instructions; and

[0022] a processor for executing the computer readable instructions,

[0023] When the computer-readable instructions are executed by the processor, the method described in the first aspect is executed.

[0024] In a fourth aspect, the present invention further provides a storage medium that non-temporarily stores computer-readable instructions, wherein when the non-temporary computer-readable instructions are executed by a computer, the instructions of the method described in the first aspect are executed.

[0025] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, wherein the computer program is used to implement the method described in the first aspect when running on one or more processors.

[0026] Compared with the prior art, the present invention has the following beneficial effects:

[0027] The present disclosure proposes a position probability density network to reconstruct the probability density function of a semi-infinite participating medium with a surface about the exit position. The network is applicable to semi-infinite participating media with surfaces of various types and properties.

[0028] The present disclosure proposes a directional probability density network to reconstruct the probability density function of a certain emission position of a semi-infinite participating medium with a surface with respect to the emission direction. The network is applicable to semi-infinite participating media with surfaces of various types and properties.

[0029] The present disclosure links surface rendering with participating medium rendering, and refines the multiple scattering phenomenon in a semi-infinite participating medium with a surface into an eight-dimensional function: two dimensions correspond to the properties of the participating medium (albedo α and anisotropy coefficient g), one dimension corresponds to the surface property (refractive index η), one dimension corresponds to the angle between the incident direction and the surface normal of the incident point, two dimensions correspond to the spatial coordinates of the exit position when the light exits the surface, and the last 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 to reconstruct the multiple scattering information in the BSSRDF, and the network is applicable to semi-infinite participating media with surfaces of various types and properties.

[0030] The volume path tracing method is optimized and improved on the above basis: two sampling networks and one evaluation network are used to calculate the light transport results of semi-infinite participating media with surfaces, reducing the overhead of calculating multiple scattering in the original method. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0032] Figure 1It is a flowchart of drawing multiple scattering of semi-infinite participating media based on neural network provided in the first embodiment of the present disclosure;

[0033] Figure 2 is a schematic diagram of the spatial position and emission direction provided in the first embodiment of the present disclosure;

[0034] Figure 3(a)-Figure 3(c) is a schematic diagram of a neural network for training provided in Embodiment 1 of the present disclosure;

[0035] Figure 4(a)-Figure 4(f) This is a neural network training effect diagram provided by the first embodiment of the present disclosure;

[0036] Figure 5(a)-Figure 5(b) This is a partial result diagram provided by Example 1 of the present disclosure. DETAILED DESCRIPTION

[0037] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0038] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0039] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0040] In this embodiment, all data is obtained in compliance with laws and regulations and based on the user's consent, and is used legally.

[0041] Embodiment 1

[0042] This embodiment provides a method for rendering multiple scattering of semi-infinite participating media;

[0043] like Figure 1 As shown in the figure, the method for drawing multiple scattering of semi-infinite participating media includes:

[0044] S101: Acquire medium properties and surface properties of a medium object to be drawn;

[0045] S102: inputting the medium properties and surface properties of the medium object to be drawn into the trained position probability density network to obtain the exit position;

[0046] S103: inputting the medium properties, surface properties and emission position of the medium object to be drawn into the trained direction probability density network to obtain the emission direction;

[0047] S104: inputting the medium properties, surface properties, emission position and emission direction of the medium object to be drawn into the trained evaluation network model to obtain the multi-scattered radiation brightness value at the emission position and emission direction of the surface of the medium object to be drawn;

[0048] S105: Starting from the camera, volume path tracing is performed on each image pixel, and based on the tracing result, the multi-scattering radiation brightness value of all camera rays is obtained, and then the multi-scattering rendering result of the medium object to be rendered is obtained.

[0049] Furthermore, the S101: obtaining the medium properties and surface properties of the medium object to be drawn, wherein:

[0050] Medium properties, including: scattering albedo and anisotropy coefficients;

[0051] The scattering albedo, denoted by α, is used to describe the probability σ that energy will be scattered after light propagates a fixed distance. s Accounting for the transmission attenuation coefficient σ t =σ a +σ s The ratio ranges from [0 to 1], where σ a To describe the probability of energy absorption after light propagates a fixed distance;

[0052] The anisotropy coefficient is used to describe the degree of anisotropy of the phase function and is represented by g, with a range of [-1, +1]. When g is 0, the probability of propagation in each direction during scattering is the same. The closer it is to 1, the greater the probability of linear propagation. The closer it is to -1, the greater the probability of reverse propagation.

[0053] The surface property refers to the refractive index;

[0054] The refractive index is used to describe the ratio of the propagation speed of light in a vacuum to the propagation speed of light in the medium, and is represented by η.

[0055] Furthermore, the medium properties and surface properties of the medium object to be drawn are obtained, wherein the medium properties and surface properties are different property parameters input by the user.

[0056] Furthermore, the S102: inputting the medium properties and surface properties of the medium object to be drawn into the trained position probability density network to obtain the exit position specifically includes:

[0057] S102-1: inputting the medium properties and surface properties of the medium object to be drawn into the trained position probability density network, and outputting the probability density function parameters of the surface of the medium object to be drawn with respect to the exit position;

[0058] S102-2: Sampling is performed according to the probability density function parameters of the surface of the medium object to be drawn with respect to the emission position to obtain an emission position.

[0059] Furthermore, the step S102-2: sampling according to the probability density function parameters of the surface of the medium object to be drawn with respect to the exit position to obtain an exit position includes:

[0060] S102-21: According to the mixing coefficient set in the probability density function, a cumulative distribution function (CDF) is calculated for the mixing coefficient set, and then sampling is performed to obtain a Gaussian distribution;

[0061] S102-22: From the Gaussian distribution, use the Box–Muller algorithm to sample and obtain an emission position.

[0062] Furthermore, the S102: inputting the medium properties and surface properties of the medium object to be drawn into the trained position probability density network to obtain the exit position, wherein the training process of the trained position probability density network includes:

[0063] Construct a location probability density network;

[0064] Construct the first training set;

[0065] The first training set includes known medium properties, surface properties, the angle between the known incident light and the surface normal of the incident point, and the exit position and probability density value of the known light when it is emitted from a participating medium object having a surface;

[0066] The training set is input into the position probability density network for training. When the loss function reaches the minimum value, the trained position probability density network is obtained.

[0067] The drawing media in the first training set are a plurality of drawing media.

[0068] During the training process, instead of taking a single type of drawing medium as input value, information of multiple types of drawing media is mixed and input into the position probability density network for training.

[0069] Furthermore, the position probability density network is constructed, and the network structure of the position probability density network includes:

[0070] 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 connected in sequence; each hidden layer has 48 nodes (see FIG. 3(a)), any node of the previous layer in adjacent layers of the position probability density network is connected to all nodes of the next layer, and ReLU is used as an activation function;

[0071] The input parameters of the first input layer include medium property parameters, surface property parameters and incident angle parameters, wherein the medium property parameters and surface property parameters refer to the scattering albedo α, the anisotropy coefficient g and the refractive index η; the incident angle is the angle between the incident direction and the surface normal at the incident point, expressed as θ i express.

[0072] The output parameters of the first output layer are the surface parameters of the medium object to be drawn with respect to the exit position (x loc ,y loc ) is the probability density function p(x loc ,y loc ) Among them, the spatial position coordinate (x loc ,y loc ) are the x and y coordinates in the local rectangular coordinate system, which are used to represent the emission position, such as Figure 2 shown.

[0073] Furthermore, the probability density function p(x loc ,y loc ) is a mixed Gaussian function, and its expression is as follows:

[0074]

[0075] The probability density function p(x loc ,y loc ) Among them, the mixing coefficient α corresponding to the kth Gaussian distribution in the mixed Gaussian function distribution is k , so that all mixing coefficients add up to 1, that is, ∑ k α k =1; kth Gaussian distribution is a two-dimensional Gaussian function, μ k is the mean of the Gaussian function, is the variance of the Gaussian function The logarithm of .

[0076] It should be understood that the structure of the neural network used in this embodiment is a fully connected network. The neural network includes: a position probability density network, a direction probability density network and an evaluation network. For all data, they are first normalized and randomly mixed. The entire network is trained by Pytorch, and its optimizer is Adam.

[0077] Furthermore, the step S103: inputting the medium properties, surface properties and emission position of the medium object to be drawn into the trained direction probability density network to obtain the emission direction specifically includes:

[0078] S103-1: Input the medium properties, surface properties and set emission position into the trained direction probability density network, and output the probability density function parameters of the set emission position on the surface of the medium object to be drawn with respect to the emission direction;

[0079] S103-2: sampling the probability density function parameters of the emission position with respect to the emission direction according to the surface of the medium object to be drawn, and obtaining an emission direction.

[0080] Furthermore, the step S103-2: sampling the probability density function parameters of the emission position with respect to the emission direction according to the surface of the medium object to be drawn to obtain an emission direction specifically includes:

[0081] According to the coefficient value in the probability density function parameter, the Gaussian distribution is obtained by using CDF sampling;

[0082] From the Gaussian distribution, an emission direction is sampled using the Box–Muller algorithm.

[0083] Furthermore, in S103, the medium properties, surface properties and emission position of the medium object to be drawn are input into the trained direction probability density network to obtain the emission direction, wherein the training process of the trained direction probability density network includes:

[0084] Construct directional probability density network;

[0085] Construct the second training set;

[0086] The second training set includes known medium properties, surface properties, the angle between the known incident light and the surface normal of the incident point, the exit position, exit direction and probability density value of the known light when it is emitted from the participating medium object with a surface;

[0087] The second training set is input into the direction probability density network for training, and when the loss function reaches a minimum value, the trained direction probability density network is obtained.

[0088] The drawing medium in the second training set is a plurality of drawing media.

[0089] During the training process, instead of taking a single type of drawing medium as input value, information of multiple types of drawing media is mixed and input into the directional probability density network for training.

[0090] Furthermore, as shown in FIG3( b ), the directional probability density network has a network structure including:

[0091] 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 connected in sequence, using ReLU as an activation function, each hidden layer has 32 nodes, and any node of the previous layer in the adjacent layers of the directional probability density network is connected to all nodes of the next layer;

[0092] The input parameters (α, g, η, θ) of the second input layer i , x loc ,y loc ), θ i represents the incident angle, x loc ,y loc Represents spatial position coordinates.

[0093] The output parameter of the second output layer is the surface of the medium object to be drawn with respect to the emission direction (x dir ,y dir ) is the probability density function p(x dir ,y dir )parameter in,

[0094] Direction coordinate (x dir ,y dir ) is used to indicate the emission direction, which is the coordinate of the spherical coordinate system. Transformed, see Figure 2 As shown, where θ o is the angle between the emission direction and the z-axis in the local coordinate system, is the angle between the component of the emission direction in the xoy plane and the x-axis.

[0095] In order to better fit the probability density function, the direction coordinates are projected onto the z=1 plane by projecting the emission unit hemisphere in the local rectangular coordinate system to obtain the projected emission direction coordinates (x dir ,y dir , z dir ), the specific transformation is calculated as follows:

[0096] z dir = cosθ o

[0097]

[0098]

[0099] Furthermore, the probability density function p(x dir ,y dir ), is a mixed Gaussian function, and its expression is as follows:

[0100]

[0101] The probability density function p(x loc ,y loc ) Among them, the mixing coefficient α corresponding to the kth Gaussian distribution in the mixed Gaussian function distribution is k , so that all mixing coefficients add up to 1, that is, ∑ k α k =1; kth Gaussian distribution is a two-dimensional Gaussian function, μ k is the mean of the Gaussian function, is the variance of the Gaussian function The logarithm of .

[0102] Further, the S104: inputting the medium properties, surface properties, emission position and emission direction of the medium object to be drawn into the trained evaluation network model to obtain the multi-scattered radiation brightness value at the emission position and emission direction of the surface of the medium object to be drawn, wherein the training process of the trained evaluation network model includes:

[0103] Constructing an evaluation network model;

[0104] Construct the third training set;

[0105] The third training set includes known medium properties, surface properties, the angle between the known incident light and the surface normal of the incident point, the exit position, exit direction and multiple scattered radiation brightness value of the known light when it is emitted from the participating medium object with a surface;

[0106] The third training set is input into the evaluation network model for training, and when the loss function reaches the minimum value, the trained evaluation network model is obtained.

[0107] The drawing medium in the third training set is a plurality of drawing media.

[0108] During the training process, instead of taking a single type of drawing medium as input value, information of multiple types of drawing media is mixed and input into the evaluation network model for training.

[0109] Furthermore, as shown in FIG3(c), the evaluation network model has a network structure including:

[0110] The third input layer, the thirteenth hidden layer, the fourteenth hidden layer, the fifteenth hidden layer and the third output layer are connected in sequence; each hidden layer has 64 nodes, and any node of the previous layer in the adjacent layers is connected to all the nodes of the next layer; and tanh is used as the activation function.

[0111] Among them, the input parameters of the third input layer are (α, g, η, θ i , x loc ,y loc , x dir ,y dir ), the output parameter of the third output layer is the multiple scattered radiation brightness value in the set direction at the set position on the surface of the medium object to be drawn.

[0112] Furthermore, the S105: starting from the camera, performing volume path tracing for each image pixel, obtaining the multi-scattered radiation brightness values ​​of all camera rays according to the tracing results, and then obtaining the multi-scattered rendering result of the medium object to be rendered; specifically includes:

[0113] S105-1: Each pixel traces a camera ray, and when the ray refracts into a participating medium object with a surface, S101 to S104 are repeated to obtain a multi-scattered radiosity value when the ray exits the surface;

[0114] S105-2: Using the same method, obtain the multi-scattered radiosity values ​​of other camera rays;

[0115] S105-3: Obtain the total multi-scattering radiosity value of all camera rays, and obtain the multi-scattering rendering result of the participating medium object with a surface to be rendered.

[0116] This disclosure defines an expression of a multiple scattering term in a BSSRDF (Bidirectional Surface Scattering Reflectance Distribution Function) that is related to medium properties, surface properties, the angle between the incident light and the surface normal at the incident point, the spatial position of the light when it exits the surface, and the exit direction. This expression gives the light radiation energy in the new exit direction when the light enters from the surface after being refracted and then exits from the surface after a series of scattering. The evaluation network in S104 fits this multiple scattering term, where

[0117] The multiple scattering term, using To represent it, polar coordinates (r, θ s ) represents the spatial position of the emission, spherical coordinates Indicates the emission direction ( Figure 2 express).

[0118] For the entire participating medium space with a surface, the mean free path is assumed to be 1, and the anisotropy parameter g and the scattering reflectivity α are used to represent different combinations of medium properties, and the refractive index η is used to represent surfaces with different properties. For these three parameters, they are combined according to the following parameter sets:

[0119] 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}

[0120] α∈{0.01, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99}

[0121] η∈{1.1, 1.2, 1.3, 1.4, 1.5}

[0122] Since the brightness of multiply scattered light radiation changes significantly (exponentially) in media with large anisotropy in the scattering direction and large reflectivity, sampling is increased in the area close to 1 to make the neural network more sensitive to these high-frequency (high brightness values ​​and obvious changes) data.

[0123] Furthermore, the known angle between the incident light and the surface normal at the incident point includes:

[0124] θ i ∈{0°, 15°, 30°, 45°, 60°, 70°, 80°, 85°, 88°}

[0125] Since the refraction angle changes dramatically when it is close to 90° and the refraction angle is meaningless at 90°, the maximum incident angle is set to 88°, and the sampling of 85° is increased to make the neural network more sensitive to data at high refraction angles. Each medium has a multi-scattering table for each incident angle, which stores the light radiation brightness values ​​when the light is emitted in different directions at different positions on the surface of the medium.

[0126] The disclosure stipulates that the maximum distance of r is 20×l, and records are made every 0.2×l. Recording was done every 10°, so there were 100×36 position changes and 10×36 direction changes.

[0127] In order to obtain the data set required for neural network training, for each participating medium with a surface (α i , g i , η i), at the origin (0, 0, 0) at the center of the surface along each incident angle θ i 500 million photons are continuously emitted, and the photons are continuously scattered or absorbed and emitted from the surface of the medium. For each photon entering the recording point at that position, its multiple scattering contribution to each direction (10×36 directions) at that position is recorded and accumulated. When all the photons are emitted, each sample point is normalized using a probability density-based method, that is, divided by the spatial volume of each recording position and the number of all beams entering that position.

[0128] Figure 4(a)-Figure 4(f) The neural network training effect in the present disclosure is demonstrated.

[0129] The rendering algorithm disclosed in the present invention is completed on the basis of the volumetric path tracing (VPT) algorithm. In the actual rendering process, starting from the camera, a ray is emitted to each pixel on the image for path tracing. The rays are intersected in the scene (rays and triangle models are detected to determine whether they collide). When the rays collide with a participating medium object with a surface, reflection or refraction occurs. The above-mentioned surfaces and media are determined by the user with different attributes before rendering.

[0130] When the light refracts into the medium, the surface properties of the object to be drawn, the medium properties, and the angle between the incident light and the surface normal of the incident point are recorded. Then, the neural network is used to predict and sample the exit position, exit direction, and exit multiple scattered radiation brightness value. The contribution value is accumulated until it intersects with the light source, and finally the color value of the pixel is obtained.

[0131] at last Figure 5(a)-Figure 5(b) A series of rendering results obtained according to the steps of this embodiment are shown.

[0132] Embodiment 2

[0133] This embodiment provides a rendering system for multiple scattering of semi-infinite participating media;

[0134] A rendering system for multiple scattering in semi-infinite participating media, including:

[0135] An acquisition module, which is configured to: acquire medium properties and surface properties of the medium object to be drawn;

[0136] A position prediction module is configured to: input the medium properties and surface properties of the medium object to be drawn into the trained position probability density network to obtain the exit position;

[0137] A direction prediction module is configured to: input the medium properties, surface properties and emission position of the medium object to be drawn into the trained direction probability density network to obtain the emission direction;

[0138] A radiation brightness prediction module is configured to: input the medium properties, surface properties, emission position and emission direction of the medium object to be drawn into the trained evaluation network model to obtain the multi-scattered radiation brightness value at the emission position and emission direction of the surface of the medium object to be drawn;

[0139] The volume path tracing module is configured to: start from the camera, perform volume path tracing on each image pixel, obtain the multi-scattered radiation brightness value of all camera rays according to the tracing results, and then obtain the multi-scattered rendering result of the medium object to be rendered.

[0140] It should be noted that the acquisition module, position prediction module, direction prediction module, radiation brightness prediction module and volume path tracking module correspond to steps S101 to S105 in Embodiment 1, and the examples and application scenarios implemented by the modules are the same as those of the corresponding steps, but are not limited to the contents disclosed in Embodiment 1. It should be noted that the modules as part of the system can be executed in a computer system such as a set of computer executable instructions.

[0141] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0142] The proposed system can be implemented in other ways. For example, the system embodiment described above is only illustrative, and the division of the modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.

[0143] Embodiment 3

[0144] This 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 connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory so that the electronic device executes the method described in the above embodiment one.

[0145] 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 arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0146] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0147] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software.

[0148] The method in the first embodiment can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.

[0149] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0150] Embodiment 4

[0151] This embodiment further provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the method described in the first embodiment is completed.

[0152] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for rendering multiple scattering in semi-infinite participating media, characterized in that: include: Obtain the medium properties and surface properties of the medium object to be drawn; Input the medium properties and surface properties of the medium object to be drawn into the trained position probability density network to obtain the exit position; Input the medium properties, surface properties and emission position of the medium object to be drawn into the trained direction probability density network to obtain the emission direction; Inputting the medium properties, surface properties, emission position and emission direction of the medium object to be drawn into the trained evaluation network model to obtain the multi-scattered radiation brightness value at the emission position and emission direction on the surface of the medium object to be drawn; Starting from the camera, volume path tracing is performed on each image pixel. Based on the tracing results, the multi-scattered radiation brightness values ​​of all camera rays are obtained, and then the multi-scattered rendering results of the medium object to be rendered are obtained.

2. The method for drawing multiple scattering of semi-infinite participating media as claimed in claim 1, characterized in that: The medium properties and surface properties of the medium object to be drawn are input into the trained position probability density network to obtain the exit position, which specifically includes: Input the medium properties and surface properties of the medium object to be drawn into the trained position probability density network, and output the probability density function parameters of the surface of the medium object to be drawn with respect to the exit position; Sampling is performed according to the probability density function parameters of the surface of the medium object to be drawn with respect to the emission position to obtain an emission position.

3. The method for drawing multiple scattering of semi-infinite participating media as claimed in claim 2, characterized in that: Sampling is performed according to the probability density function parameters of the surface of the medium object to be drawn about the exit position to obtain an exit position, including: According to the mixing coefficient set in the probability density function, the cumulative distribution function is calculated for the mixing coefficient set, and then sampling is performed to obtain a Gaussian distribution; From the Gaussian distribution, an exit position is sampled.

4. The method for drawing multiple scattering of semi-infinite participating media as claimed in claim 1, characterized in that: The medium properties and surface properties of the medium object to be drawn are input into the trained position probability density network to obtain the output position, wherein the training process of the trained position probability density network includes: Construct a position probability density network; construct the first training set; The first training set includes known medium properties, surface properties, the angle between the known incident light and the surface normal of the incident point, and the exit position and probability density value of the known light when it is emitted from a participating medium object having a surface; The training set is input into the position probability density network for training. When the loss function reaches the minimum value, the trained position probability density network is obtained.

5. The method for drawing multiple scattering of semi-infinite participating media as claimed in claim 4, characterized in that: The position probability density network is constructed, and the network structure of the position probability density network includes: The position probability density network includes 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 connected in sequence; any node of the previous layer in adjacent layers of the position probability density network is connected to all nodes of the next layer.

6. The method for drawing multiple scattering of semi-infinite participating media as claimed in claim 1, characterized in that: The medium properties, surface properties and emission position of the medium object to be drawn are input into the trained direction probability density network to obtain the emission direction, which includes: Input the medium properties, surface properties and set emission position into the trained directional probability density network, and output the probability density function parameters of the set emission position on the surface of the medium object to be drawn with respect to the emission direction; According to the surface of the medium object to be drawn, a probability density function parameter of the emission position with respect to the emission direction is set for sampling to obtain an emission direction; The directional probability density network has a network structure comprising: a second input layer, a seventh hidden layer, an eighth hidden layer, a ninth hidden layer, a tenth hidden layer, an eleventh hidden layer, a twelfth hidden layer and a second output layer connected in sequence, and any node of the previous layer in adjacent layers of the directional probability density network is connected to all nodes of the next layer.

7. The method for drawing multiple scattering of semi-infinite participating media as claimed in claim 1, characterized in that: The medium properties, surface properties, emission position and emission direction of the medium object to be drawn are input into the trained evaluation network model to obtain the multiple scattered radiation brightness value at the emission position and emission direction of the surface of the medium object to be drawn, wherein the training process of the trained evaluation network model includes: Construct an evaluation network model; construct a third training set; The third training set includes known medium properties, surface properties, the angle between the known incident light and the surface normal of the incident point, the exit position, exit direction and multiple scattered radiation brightness value of the known light when it is emitted from the participating medium object with a surface; The third training set is input into the evaluation network model for training, and when the loss function reaches a minimum value, a trained evaluation network model is obtained; The evaluation network model has a network structure comprising: a third input layer, a thirteenth hidden layer, a fourteenth hidden layer, a fifteenth hidden layer and a third output layer connected in sequence; any node of the previous layer in adjacent layers is connected to all nodes of the next layer.

8. A rendering system for multiple scattering in semi-infinite participating media, characterized by: include: An acquisition module, which is configured to: acquire medium properties and surface properties of the medium object to be drawn; A position prediction module is configured to: input the medium properties and surface properties of the medium object to be drawn into the trained position probability density network to obtain the exit position; A direction prediction module is configured to: input the medium properties, surface properties and emission position of the medium object to be drawn into the trained direction probability density network to obtain the emission direction; A radiation brightness prediction module is configured to: input the medium properties, surface properties, emission position and emission direction of the medium object to be drawn into the trained evaluation network model to obtain the multi-scattered radiation brightness value at the emission position and emission direction of the surface of the medium object to be drawn; The volume path tracing module is configured to: start from the camera, perform volume path tracing on each image pixel, obtain the multi-scattered radiation brightness value of all camera rays according to the tracing results, and then obtain the multi-scattered rendering result of the medium object to be rendered.

9. An electronic device, comprising: a memory for non-transitory storage of computer readable instructions; as well as a processor for executing the computer readable instructions, When the computer-readable instructions are executed by the processor, the method described in any one of claims 1 to 7 is executed.

10. A storage medium, characterized in that: The computer-readable instructions are non-transitory stored, wherein when the non-transitory computer-readable instructions are executed by a computer, the instructions of the method according to any one of claims 1 to 7 are executed.

Citation Information

Patent Citations

  • Participation medium multiple scattering drawing method and system based on neural network

    CN111583371A

  • Method for calculating flow tortuosity in porous medium through limited migration simulation

    CN115081210A