3DGS re-illumination method and system based on light absorption rate calculation and volume light
Patent Information
- Application Number
- CN202611139537.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-07-30
AI Technical Summary
[0005]本申请目的是提供一种基于吸光率计算与体积光的3DGS重光照方法及系统,以解决现有技术中高温梯度场景下体积光重光照渲染物理准确性不足的问题
[0017] The 3DGS relighting method based on absorbance calculation and volumetric light provided in this application can capture the bending trajectory of light induced by temperature field in real time by constructing a refractive index gradient field and performing step sampling along the volumetric light probe. The refractive index vector of each step sampling point is converted into bending curvature parameters, thereby accurately tracking the real propagation path of light in the high temperature gradient field, and getting rid of the limitation of the assumption of straight-line propagation of light in the prior art.
Smart Images

Figure CN122676036B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of 3D scene rendering technology, and in particular relates to a 3DGS relighting method and system based on absorbance calculation and volumetric light. Background Technology
[0002] 3D Gaussian Splatting (3DGS), as an emerging real-time radiation field representation method, models scenes using a set of volumetric Gaussian primitives, and has broad application prospects in fields such as digital twins, virtual reality, and industrial visualization. Relighting techniques enable reconstructed 3DGS scenes to exhibit realistic rendering effects under different lighting conditions, which is of great significance for the dynamic visualization of digital twin scenes such as smelting workshops and high-temperature industrial environments.
[0003] Existing 3DGS relighting techniques mainly include volumetric shadow calculation methods based on depth Gaussian shadow mapping and relighting schemes based on material lighting decomposition. These methods reconstruct lighting effects by assigning normals, BRDF parameters, and spherical harmonics to Gaussian points, and some schemes also introduce volumetric light propagation and shadow casting mechanisms. However, existing techniques generally assume that light rays propagate along geometrically straight lines when dealing with volumetric light and assign a direction-independent isotropic absorbance scalar to each Gaussian point.
[0004] In scenarios with strong temperature gradients, such as high-temperature furnaces, the continuous spatial variation of air refractive index causes light propagation paths to bend. Furthermore, semi-transparent media like smoke exhibit strong anisotropic scattering characteristics under backlighting conditions. Existing technologies cannot simultaneously handle the coupling effect of light path bending and the dependence of absorbance direction. When the temperature gradient-induced light bending continuously introduces incident angle errors, which are significantly amplified by the anisotropic phase function in the nonlinear region, the volumetric light intensity calculation error can reach several times or even orders of magnitude, leading to severe distortion in relighting rendering results. Therefore, existing technologies suffer from insufficient physical accuracy in volumetric light relighting rendering under high-temperature gradient scenarios. Summary of the Invention
[0005] The purpose of this application is to provide a 3DGS relighting method and system based on absorbance calculation and volumetric lighting, so as to solve the problem of insufficient physical accuracy of volumetric lighting relighting rendering in high-temperature gradient scenes in the prior art.
[0006] To address the aforementioned technical problems, in a first aspect, this application provides a 3DGS relighting method based on absorbance calculation and volumetric light, comprising: Acquire the 3DGS Gaussian point set of the target scene, temperature distribution data around the target object, location of the lighting source, and camera position; A refractive index gradient field is constructed based on the rate of change of air refractive index at adjacent spatial locations, and the air refractive index is determined based on temperature distribution data; A probe ray is emitted from the position of the illumination source toward the Gaussian point of the target to be rendered, which is extracted from the Gaussian point set of 3DGS. The probe ray is step-sampled and the refractive index vector of each step-sampled point is extracted from the refractive index gradient field using interpolation. The bending curvature of the probe ray at the step sampling point is calculated based on the refractive index vector, and the first direction vector of each Gaussian point on the probe ray path to the target Gaussian point is determined based on the bending curvature. The forward scattering coefficient is determined based on the particle size properties of Gaussian points on the detection path and the wavelength of the illumination source. The spatial angle between the first direction vector and the second direction vector pointing from the camera position to each Gaussian point is calculated. The transmittance of the target Gaussian point is determined based on the absorbance of all Gaussian points along the detection path. The color of the target Gaussian point is modulated using the transmittance to obtain the re-illumination rendering color. The absorbance is calculated using a scattering phase function with spatial angle and forward scattering coefficient as input.
[0007] Optionally, the position of the illumination source and the position of the camera are located on the back side and the illuminated side of the target object, respectively, and the temperature distribution data is stored in the form of a three-dimensional grid with each grid node recording the temperature value of the corresponding spatial location. A refractive index gradient field is constructed based on the rate of change of air refractive index at adjacent spatial locations. The air refractive index is determined based on temperature distribution data, including: Based on the temperature value at each spatial location in the temperature distribution data, and according to the preset correspondence between temperature and air refractive index, the air refractive index corresponding to each spatial location is obtained; Calculate the difference between the air refractive index and the air refractive index of adjacent spatial locations along the X-axis, Y-axis, and Z-axis to obtain the corresponding first difference. Based on the ratio of each first difference to the distance between the corresponding adjacent locations, construct the refractive index vector for each spatial location. Construct the refractive index gradient field based on all refractive index vectors.
[0008] Optionally, the 3DGS Gaussian point set is obtained by 3D modeling the target scene based on 3D Gaussian splashing and includes the spatial coordinates, color attributes, opacity and grain size attributes of each Gaussian point; Probe rays are emitted from the illumination source location toward the Gaussian points of the target object to be rendered, extracted from the 3DGS Gaussian point set. The probe rays are step-sampled, and interpolation is used to extract the refractive index vector for each step-sampled point from the refractive index gradient field, including: Extract Gaussian points whose spatial coordinates are located within the region corresponding to the pixel to be rendered from the 3DGS Gaussian point set as target Gaussian points; A probe ray is emitted from the position of the illumination source toward the target Gaussian point. Multiple step sampling points are set along the probe ray with a preset step size, which is determined according to the grid spacing of the refractive index gradient field. The refractive index vector of each step sampling point is obtained by weighting the reciprocal of the distance between each grid node in the refractive index gradient field and the corresponding step sampling point.
[0009] Optionally, the Gaussian points on the detection path include intermediate Gaussian points and the target Gaussian point. The intermediate Gaussian points are all Gaussian points other than the target Gaussian point that the detection light passes through during its propagation from the illumination source to the target Gaussian point.
[0010] Optionally, the curvature of the probe ray at the step sampling point is calculated based on the refractive index vector, and the first direction vector of each Gaussian point on the probe ray's path to the target Gaussian point is determined based on the curvature, including: The direction vector pointing from the position of the illumination source to the target Gaussian point is taken as the initial direction vector of the first step sampling point. The refractive index vector of the step sampling point is decomposed into a vertical component that is perpendicular to the initial direction vector, and the magnitude of the vertical component is determined as the curvature. Using the product of curvature and preset step size as the deflection angle, the initial direction vector is rotated along the direction of the vertical component by the deflection angle to obtain the propagation direction vector at the step sampling point. The propagation direction vector is used as the initial direction vector for the next step sampling point. The refractive index vector of the step sampling point is decomposed into a vertical component that is perpendicular to the initial direction vector until all step sampling points have been traversed to obtain the propagation direction vector at each step sampling point. Calculate the spatial coordinates of each Gaussian point on the detection path from the two adjacent step sampling points, and determine the propagation direction vector of the step sampling point corresponding to the minimum distance as the first direction vector of the Gaussian point.
[0011] Optionally, the forward scattering coefficient is determined based on the particle size properties of the Gaussian points along the detection path and the wavelength of the illumination source. The spatial angle between the first direction vector and the second direction vector pointing from the camera position to each Gaussian point is calculated, including: Calculate the ratio of the particle size attribute to the wavelength of the illumination source at each Gaussian point along the detection path to obtain the first ratio for each Gaussian point; Based on the first ratio, and according to the preset correspondence between the first ratio and the forward scattering coefficient, the forward scattering coefficient of each Gaussian point is obtained. By normalizing the direction vector formed by the spatial coordinates pointing from the camera position to each Gaussian point, a second direction vector with the same dimension as the first direction vector is obtained for each Gaussian point. The dot product of the first direction vector and the second direction vector for each Gaussian point is calculated, and the inverse cosine of the dot product is determined to be the spatial angle.
[0012] Optionally, the method further includes: Calculate the cosine value of the spatial angle at each Gaussian point. Use the cosine value and the corresponding forward scattering coefficient as input parameters. Substitute the input parameters into the scattering phase function to calculate the scattering intensity value at each Gaussian point. The scattering phase function uses the weighted combination of the square of the forward scattering coefficient and the cosine value as the denominator and the square of the forward scattering coefficient as the numerator. The product of the scattering intensity value and the corresponding opacity of each Gaussian point is calculated to obtain the absorbance of each Gaussian point. The opacity is an inherent property parameter of each Gaussian point in the 3DGS Gaussian point set, with a value range of 0 to 1.
[0013] Optionally, the transmittance of the target Gaussian point is determined based on the absorbance of all Gaussian points along the detection path, and the color of the target Gaussian point is modulated using the transmittance to obtain the re-illumination rendering color, including: The transmittance of the target Gaussian point is obtained by multiplying the absorbance of all Gaussian points along the detection path. The red, green, and blue color components of the target Gaussian point are calculated separately and multiplied by the transmittance, and then combined to obtain the re-illuminated rendering color.
[0014] Secondly, this application provides a 3DGS relighting system based on absorbance calculation and volumetric light, comprising: The acquisition module is used to acquire the 3DGS Gaussian point set of the target scene, the temperature distribution data around the target object, the position of the lighting source, and the position of the camera; The module is used to construct a refractive index gradient field based on the rate of change of air refractive index at adjacent spatial locations. The air refractive index is determined based on temperature distribution data. The generation module is used to emit probe rays from the position of the illumination source to the Gaussian point of the target to be rendered extracted from the 3DGS Gaussian point set, perform step sampling on the probe rays and extract the refractive index vector of each step sampling point from the refractive index gradient field using interpolation; The calculation module is used to calculate the curvature of the probe ray at the step sampling point based on the refractive index vector, and determine the first direction vector of each Gaussian point on the detection path of the probe ray to the target Gaussian point based on the curvature. The calculation module is also used to determine the forward scattering coefficient based on the particle size properties of the Gaussian points on the detection path and the wavelength of the illumination source, and to calculate the spatial angle between the first direction vector and the second direction vector pointing from the camera position to each Gaussian point; The generation module is also used to determine the transmittance of the target Gaussian point based on the absorbance of all Gaussian points on the detection path, and to modulate the color of the target Gaussian point using the transmittance to obtain the relighting rendering color. The absorbance is calculated by a scattering phase function with the spatial angle and forward scattering coefficient as input.
[0015] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor for executing a computer program to implement the steps of the 3DGS relighting method based on absorbance calculation and volumetric light as described in the first aspect above.
[0016] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps of the 3DGS relighting method based on absorbance calculation and volumetric light as described in the first aspect above.
[0017] The 3DGS relighting method based on absorbance calculation and volumetric light provided in this application can capture the bending trajectory of light induced by temperature field in real time by constructing a refractive index gradient field and performing step sampling along the volumetric light probe. The refractive index vector of each step sampling point is converted into bending curvature parameters, thereby accurately tracking the real propagation path of light in the high temperature gradient field, and getting rid of the limitation of the assumption of straight-line propagation of light in the prior art.
[0018] Meanwhile, this application determines the forward scattering coefficient based on the ratio of Gaussian point particle size to light source wavelength, and combines this with the spatial angle between the actual incident direction and the observation direction. It then dynamically calculates the anisotropic absorbance of each Gaussian point using a scattering phase function, ensuring that the absorbance value accurately reflects the direction-dependent characteristics under backlighting conditions. This deep coupling mechanism between refraction path tracing and anisotropic absorbance calculation ensures that the incident angle deviation introduced by light bending is correctly reflected in the absorbance calculation by the scattering phase function. This eliminates the cumulative compound error caused by the combined effects of temperature gradient and backlighting conditions, significantly improving the physical accuracy and visual realism of 3DGS volumetric relighting rendering in high-temperature gradient scenes.
[0019] Furthermore, this application clarifies the backlighting configuration where the illumination source and camera are located on the backlight side and the light-receiving side of the high-temperature target object, respectively. This scene setting precisely corresponds to the typical working conditions in industrial environments such as smelting workshops, where volumetric light effects are most significant but scattering anisotropy is most sensitive. By storing temperature distribution data in the form of a three-dimensional grid and recording the temperature value for each grid node, a spatial discretization representation of the temperature field is established.
[0020] This application calculates the air refractive index difference between adjacent spatial locations along the X, Y, and Z axes, and transforms the difference-to-spacing ratio into three components of the refractive index vector. This gradient field construction method based on finite differences can accurately capture the spatial directionality and intensity distribution characteristics of temperature gradients. The constructed refractive index gradient field not only provides a precise physical basis for calculating the curvature of light rays but also ensures the accuracy of trilinear interpolation during step sampling, thus laying a high-fidelity refractive field foundation for tracing the entire volumetric light path and effectively supporting the accuracy of physical simulation of light propagation behavior under high-temperature gradient environments. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A schematic flowchart of a 3DGS relighting method based on absorbance calculation and volumetric light provided for an embodiment of this application; Figure 2 This is a schematic diagram of a volumetric light propagation path provided in an embodiment of this application; Figure 3 A flowchart illustrating the calculation of a first direction vector is provided for an embodiment of this application; Figure 4 This is a schematic diagram of a 3DGS relighting system based on absorbance calculation and volumetric light, provided as an embodiment of this application. Detailed Implementation
[0023] 3DGS relighting in high-temperature gradient scenarios faces fundamental physical modeling defects: existing technologies generally adopt the assumption of rectilinear propagation of light and assign isotropic absorbance scalars to Gaussian points. This simplified model is acceptable in a uniform environment at room temperature, but it causes serious distortion in industrial scenarios such as smelting workshops.
[0024] Specifically, the strong temperature gradient around the high-temperature furnace causes the air refractive index to change continuously in space, resulting in the volume light rays from the backlight side bending continuously during propagation. The actual incident direction when the light reaches the Gaussian point of the smoke deviates significantly from the geometric straight line direction. Furthermore, the scattering characteristics of the smoke under backlight conditions are inherently highly anisotropic, and the absorbance described by the Henyey-Greenstein phase function is extremely sensitive to changes in the incident angle.
[0025] Existing technologies cannot trace the bending path of light in the refraction field, nor can they calculate the direction-dependent absorptivity. Furthermore, they cannot handle the coupling effect between the two, namely, the incident angle error continuously introduced by the temperature gradient is greatly amplified in the nonlinear region of the anisotropic phase function. This ultimately leads to a volumetric light intensity calculation error of several times or even orders of magnitude, which severely restricts the rendering fidelity of digital twin scenes. There is an urgent need for a physically accurate method that can simultaneously model the refraction path and anisotropic scattering.
[0026] To address the aforementioned issues, this application proposes a 3DGS relighting method based on absorbance calculation and volumetric light. Its core lies in achieving accurate tracking of light bending paths and dynamic evaluation of direction-dependent absorbance under temperature gradient scenarios through the collaborative calculation of refractive index gradient field construction and anisotropic scattering phase function.
[0027] Specifically, this application first constructs a three-dimensional refractive index gradient field based on the temperature distribution data around the high-temperature target object. Then, it emits volumetric light probe rays from an illumination source toward the target Gaussian point. By using step sampling and trilinear interpolation, it obtains the refractive index vector of each sampling point and calculates the curvature of the light rays in the refractive field, thereby determining the true incident direction of each Gaussian point on the actual propagation path of the light rays. Based on this, this application determines the forward scattering coefficient according to the ratio of the Gaussian point particle size to the light source wavelength. Combining the spatial angle between the true incident direction and the camera observation direction, it calculates the anisotropic absorbance using the scattering phase function. Finally, it integrates the absorbance of all Gaussian points on the path to obtain the volumetric light transmittance and modulates the color.
[0028] This method eliminates the incident angle system deviation introduced by the temperature gradient through refraction path tracing, accurately reflects the direction dependence of absorbance under backlight conditions through the scattering phase function, and realizes the correct coupling calculation of the two physical effects by using the real incident direction on the curved path as the phase function input. It solves the composite error problem caused by ignoring light bending and anisotropic scattering in the existing technology, and significantly improves the physical accuracy and rendering realism of 3DGS volumetric lighting in high temperature gradient scenes.
[0029] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0030] To address the problems of existing technologies, embodiments of this application provide a 3DGS relighting method, apparatus, device, computer storage medium, and computer program product based on absorbance calculation and volumetric light. The 3DGS relighting method based on absorbance calculation and volumetric light provided in this application embodiment will be described below first.
[0031] Figure 1 This illustration shows a flowchart of a 3DGS relighting method based on absorbance calculation and volumetric light, according to an embodiment of this application. Figure 1 As shown, the method includes: S101. Obtain the 3DGS Gaussian point set of the target scene, the temperature distribution data around the target object, the position of the lighting source, and the position of the camera.
[0032] 3DGS Gaussian point set refers to the set of volumetric Gaussian elements obtained by 3D modeling a target scene using 3D Gaussian splashing technology. Each Gaussian point includes spatial coordinates, color attributes, opacity, and grain size attributes, which refer to parameters such as the scale parameter or eigenvalue of the covariance matrix of the Gaussian point in 3D space. The target object refers to a high-temperature object in the scene whose surface temperature exceeds a preset temperature threshold. This can be an object with a surface temperature higher than a certain threshold. Objects such as high-temperature furnaces, smelters, or heating equipment in smelting workshops, and the temperature of the surrounding air changes continuously in space.
[0033] Temperature distribution data refers to the distribution of temperature values at various points within a spatial region surrounding a target object. It is generated using spatial discretization methods such as uniform or adaptive mesh generation, typically at a specific mesh resolution. The temperature is stored in a 3D mesh format, with each mesh node recording the temperature value at its corresponding spatial location. The lighting source position refers to the coordinate position of the light source used for relighting calculations in the scene within 3D space, while the camera position refers to the coordinate position and pose parameters of the virtual camera observing the scene within 3D space.
[0034] First, images of the target scene are acquired using a multi-view image acquisition device to obtain a multi-view image sequence of the scene. Then, the image sequence is processed using a 3D Gaussian splash reconstruction algorithm to generate a 3DGS Gaussian point set. Each Gaussian point Including three-dimensional coordinates RGB color values Opacity and particle size properties .
[0035] Next, temperature data is collected from the space surrounding the target object using a temperature sensor array or an infrared thermal imager to obtain temperature distribution data in the form of a three-dimensional spatial grid. ,in Represents grid coordinates The temperature value at that location. Simultaneously, the location of the lighting source is determined based on the configuration requirements of the heavy lighting scene. and camera position and its orientation vector.
[0036] S102. Construct a refractive index gradient field based on the rate of change of air refractive index at adjacent spatial locations. The air refractive index is determined based on temperature distribution data.
[0037] Optionally, the position of the lighting source and the position of the camera are located on the back side and the light-receiving side of the target object, respectively, and the temperature distribution data is stored in the form of a three-dimensional grid, with each grid node recording the temperature value of the corresponding spatial location.
[0038] Step S102 constructs a refractive index gradient field based on the rate of change of air refractive index at adjacent spatial locations. The process of determining the air refractive index based on temperature distribution data can specifically include: S1021. Based on the temperature value of each spatial location in the temperature distribution data, and according to the preset correspondence between temperature and air refractive index, obtain the air refractive index corresponding to each spatial location.
[0039] The refractive index of air is the ratio of the speed of light in a vacuum to the speed of light in air. Its magnitude is affected by air temperature and density, and it exhibits a continuous spatial variation in high-temperature gradient scenarios. The preset relationship between temperature and air refractive index is shown in Table 1 below: Table 1: Relationship between Temperature and Air Refractive Index
[0040] As shown in Table 1, Table 1 presents the air refractive index values corresponding to eight representative temperature nodes within the typical high-temperature range of smelting scenarios, from room temperature to high temperature. These values are based on the Gladstone-Dale physical empirical formula. This was determined based on actual measurements and calibrations performed in the smelting workshop. Specifically, for air media... This is the Gladstone-Dale constant, with a value of ; Standard atmospheric pressure, with a value of [value missing]. ; Absolute temperature, its unit is Kelvin. That is, during calculation .
[0041] First, the temperature distribution data collected in S101 Each grid node in the process is processed one by one, and the temperature value of that node is recorded. As input for the query, compare it with Table 1. If Exactly the same as a certain temperature node in Table 1 If they match, then the corresponding refractive index value is directly read as the air refractive index at that location. ;like Falling on two adjacent temperature nodes in Table 1 and Between them, the calculation is performed using linear interpolation. ,in and These are the temperature nodes in Table 1. and The corresponding air refractive index value.
[0042] Next, the above table lookup and interpolation process is repeated for all grid nodes in the temperature distribution data to finally obtain refractive index distribution data with the same spatial resolution as the temperature grid. Each of them Recorded grid coordinates The air refractive index value at that location.
[0043] S1022. Calculate the difference between the air refractive index and the air refractive index of adjacent spatial positions in the X-axis, Y-axis and Z-axis directions respectively, and obtain the corresponding first difference. Based on the ratio of each first difference to the corresponding distance between adjacent positions, construct the refractive index vector of each spatial position, and construct the refractive index gradient field based on all refractive index vectors.
[0044] The first difference refers to the difference between the air refractive index at a certain spatial location and the air refractive index at its adjacent spatial locations in the X, Y, or Z axis directions. It reflects the change in refractive index in the three coordinate axes, and can be positive or negative. The larger the absolute value, the more drastic the change in refractive index in that direction.
[0045] The refractive index vector is a three-dimensional vector composed of the ratio of the first difference to the distance between adjacent positions in the corresponding direction. It is a directional descriptor composed of the rate of change of the refractive index in the X, Y, and Z axes at a certain spatial location, and its direction points to the direction in which the refractive index increases the fastest. Its magnitude reflects the magnitude of the rate of change of the refractive index in that direction. In the region of strong temperature gradient near the high-temperature furnace, the magnitude of the refractive index vector is larger, while in the uniform temperature region far away from the heat source, the refractive index vector approaches zero.
[0046] The refractive index gradient field refers to a three-dimensional spatial field composed of the refractive index vectors at all spatial locations in the three-dimensional mesh of the target scene. It can be a three-dimensional vector field with the same resolution as the temperature mesh and it completely records the spatial direction and rate of change of the refractive index in the entire scene space.
[0047] First, based on the refractive index distribution data obtained in S1021 For each grid node Calculate the first difference along the X, Y, and Z axes respectively. Let the positional spacing between adjacent grid nodes in the three directions be respectively... , , Then the node The rate of change of refractive index along the three directions, i.e., the refractive index vector. The three components are obtained by finite difference method: ,in , , They are nodes The refractive index values at adjacent nodes in the positive directions of the X, Y, and Z axes, with the numerator being the first difference in the corresponding direction and the denominator being the distance between adjacent positions in the corresponding direction.
[0048] For nodes located at the grid boundaries, one-sided difference can be used instead of two-sided difference to ensure that all nodes obtain a valid refractive index vector. Next, the refractive index distribution data... The above calculation process is repeated for all grid nodes, and finally the refractive index vectors of all nodes are integrated to construct the complete refractive index gradient field. .
[0049] This embodiment converts temperature distribution data node by node into refractive index distribution data by using a preset correspondence between temperature and air refractive index. Then, finite difference calculations are performed along the X, Y, and Z axes to construct a refractive index gradient field that accurately reflects the direction and rate of change of spatial refractive index. Compared to existing technologies that ignore the influence of temperature field on the optical properties of air, this refractive index gradient field completely preserves the spatial distribution characteristics of refractive index in the strong temperature gradient region near the high-temperature furnace.
[0050] S103. A probe ray is emitted from the position of the illumination source toward the Gaussian point of the target to be rendered extracted from the 3DGS Gaussian point set. The probe ray is step-sampled and the refractive index vector of each step-sampled point is extracted from the refractive index gradient field using interpolation.
[0051] Optionally, the 3DGS Gaussian point set is obtained by 3D modeling the target scene based on 3D Gaussian splashing and includes the spatial coordinates, color attributes, opacity, and grain size attributes of each Gaussian point.
[0052] Step S103 involves emitting probe rays from the illumination source location toward the Gaussian points of the target to be rendered extracted from the 3DGS Gaussian point set, performing step sampling on the probe rays, and extracting the refractive index vector of each step sampling point from the refractive index gradient field using interpolation. Specifically, this process includes: S1031. Extract Gaussian points whose spatial coordinates are located within the region corresponding to the pixel to be rendered from the 3DGS Gaussian point set as target Gaussian points.
[0053] The region corresponding to the pixel to be rendered refers to the spatial range that needs to be relit in the current frame rendering task, determined by the view frustum clipping. It can be a 3D spatial region defined by spatial coordinates, calculated jointly by the camera position, camera orientation vector, and field of view angle. Gaussian points within this region will participate in the volumetric light transmittance calculation and color modulation of this frame. The target Gaussian point refers to a Gaussian point selected from the 3DGS Gaussian point set whose spatial coordinates fall within the region corresponding to the pixel to be rendered, and can be a subset of the 3DGS Gaussian point set.
[0054] First, based on the camera position determined in S101 The orientation vector and the camera's field of view parameters are used to calculate the frustum space range corresponding to the current rendering frame, and this range is defined as the region corresponding to the pixel to be rendered. Next, the 3DGS Gaussian point set generated in S101 is processed. Each Gaussian point in Perform spatial coordinate determination and check its three-dimensional coordinates. Does it fall within the area? Within the target Gaussian point set, extract all Gaussian points that meet the conditions. ,in Each target Gaussian point Inherit its The corresponding Gaussian point has all its properties, including spatial coordinates, color properties, and opacity. and particle size properties .
[0055] S1032. A probe ray is emitted from the position of the illumination source toward the target Gaussian point. Multiple step sampling points are set along the probe ray with a preset step size. The preset step size is determined according to the grid spacing of the refractive index gradient field.
[0056] Figure 2 This is a schematic diagram illustrating a volumetric light propagation path provided in an embodiment of this application. (Combined with...) Figure 2 As shown in the figure, the location of the lighting source is displayed. Camera position and the target Gaussian point Detection light refers to light emitted from the location of the illumination source. Start from the light source and point towards the target Gaussian point. Virtual rays propagating in an initial direction are used to simulate the refractive index changes and path curvature experienced by volumetric light emitted from a lighting source as it propagates through the scene medium, with its propagation path within a refractive index gradient field. Under its influence, it will continuously deflect.
[0057] Step sampling points such as Figure 2 In , , "Equal" refers to following the probe light in preset step sizes. The discrete spatial locations set at equal intervals are used to represent the propagation path of the probe light in a segmented discretized manner, and the refractive index vector at each step sampling point will be used to calculate the curvature of the light at that location.
[0058] Due to the change in refractive index caused by the temperature gradient, the light reaches the target Gaussian point after passing through a series of step sampling points. The true incident direction, i.e., the first direction vector. It deviates significantly from the initial direction of rectilinear propagation. Simultaneously, from the target Gaussian point... Pointing to the camera position The direction constitutes the second direction vector First direction vector With the second direction vector The angle between them is the spatial angle. This included angle is used for the subsequent calculation of the scattering phase function and determines the energy attenuation characteristics of light scattered towards the camera's viewpoint.
[0059] The preset step size refers to the spatial distance between adjacent step sampling points, and its preferred range can be... to The step size is usually determined to be half of the grid spacing of the refractive index gradient field. The smaller the step size, the higher the path tracing accuracy but the greater the computational cost. In practical applications, a balance between accuracy and efficiency is achieved based on the grid spacing of the refractive index gradient field.
[0060] First, for the target Gaussian point set Each target Gaussian point in Process them one by one, based on the position of the lighting source determined in S101. Starting point Using the spatial coordinates as the endpoint, calculate from... point to unit direction vector ,by As the initial direction of propagation, from Departure direction Launch probe rays.
[0061] Next, based on the refractive index gradient field constructed in S102 The grid spacing determines the preset step size. It can be half the grid spacing. ,in The grid spacing is [split size]. The step size is [split size] along the probe ray. Step sampling points are set sequentially, and the positions of the step sampling points are determined by an iterative update method, i.e., the initial position of the first step sampling point is... .
[0062] The following The position of each step sampling point is based on the previous sampling point. The propagation direction vector at that location is obtained through iteration. To avoid infinite stepping, a maximum total number of step sampling points is set. ,in greater than The path curvature tolerance coefficient. When the sampling point is close to the target Gaussian point. Spatial distance less than Or reach the maximum number of steps Sampling is terminated at a certain time, thus obtaining the step sampling point sequence. .
[0063] S1033. According to the reciprocal of the distance between each grid node in the refractive index gradient field and the corresponding step sampling point, the refractive index vector of the eight grid nodes adjacent to each step sampling point in the refractive index gradient field is weighted and averaged to obtain the refractive index vector of each step sampling point.
[0064] The eight grid nodes adjacent to the step sampling point refer to the refractive index gradient field Around the step sampling point in the 3D mesh The eight vertex nodes of the given grid cell together form the smallest grid cube cell surrounding the sampling point, and their refractive index vectors are synthesized by weighted averaging to obtain the estimated refractive index vector at the sampling point. The refractive index vector of the step sampling point is a three-dimensional vector obtained by taking the inverse distance weighted average of the refractive index vectors of the eight adjacent grid nodes, and it can be a continuous estimate of the direction and rate of spatial change of refractive index at the step sampling point.
[0065] First, the step sampling point sequence Each step sampling point Process them one by one, in the refractive index gradient field Center positioning surround From the given mesh element, extract the eight vertex mesh nodes of that element, denoted as . The corresponding refractive index vector is .
[0066] Next, calculate With each vertex node The spatial distance parameter between them. This embodiment employs a trilinear interpolation equivalent optimization algorithm based on inverse distance weighting. Calculation and Euclidean distance between , in reciprocal of each distance As the interpolation equivalent weighting parameter, a weighted average of the refractive index vectors of the eight vertex nodes is calculated to obtain the step sampling points. The refractive index vector at the location The weighted averaging process is repeated for all step sampling points to obtain the refractive index vector sequence corresponding to each step sampling point. .
[0067] This embodiment accurately selects the target Gaussian points to be rendered from the 3DGS Gaussian point set by determining the spatial range of the view frustum, avoiding invalid volumetric light calculations on all Gaussian points in the scene and effectively reducing the computational scale of subsequent path tracing. Based on this, a preset step size is dynamically determined according to the grid spacing of the refractive index gradient field, achieving a reasonable balance between path tracing accuracy and computational efficiency, ensuring that the segmented discretization representation of the volumetric light propagation path for each step sampling point is sufficiently refined.
[0068] Furthermore, by performing a distance-inverse weighted average of the refractive index vectors of the eight grid nodes surrounding each step sampling point, a continuous interpolation estimation of the refractive index gradient field from discrete grid nodes to arbitrary spatial locations is achieved. The resulting refractive index vector sequence can accurately reflect the spatial variation characteristics of the refractive index at various points along the propagation path of the volumetric light probe.
[0069] S104. Calculate the curvature of the probe ray at the step sampling point based on the refractive index vector, and determine the first direction vector of each Gaussian point on the probe ray path to the target Gaussian point based on the curvature.
[0070] Optionally, in step S104, the Gaussian points on the detection path include intermediate Gaussian points and the target Gaussian point. The intermediate Gaussian points are all Gaussian points other than the target Gaussian point that the detection light passes through during its propagation from the illumination source to the target Gaussian point.
[0071] Optionally, step S104, which calculates the curvature of the probe ray at the step sampling point based on the refractive index vector and determines the first direction vector of each Gaussian point on the probe ray's path to the target Gaussian point based on the curvature, may specifically include: Figure 3 A schematic flowchart illustrating the calculation of a first direction vector according to an embodiment of this application is shown. Figure 3 As shown, the method includes: S1041. The direction vector pointing from the position of the illumination source to the target Gaussian point is used as the initial direction vector of the first step sampling point.
[0072] S1042. Decompose the refractive index vector of the step sampling point into a vertical component that is perpendicular to the initial direction vector, and determine the magnitude of the vertical component as the curvature.
[0073] The initial direction vector refers to the direction vector used when the volumetric light probe begins to propagate at the current step sampling point. For the first step sampling point, its initial direction vector is the unit direction vector pointing from the illumination source position to the target Gaussian point. For subsequent step sampling points, the initial direction vector is the propagation direction vector obtained after deflection calculation from the previous step sampling point.
[0074] The vertical component refers to the component perpendicular to the current initial direction vector after decomposing the refractive index vector at the step sampling point. Its direction determines the deflection direction of the volumetric probe ray at that sampling point, and its magnitude reflects the intensity of the refractive index gradient change perpendicular to the propagation direction. The curvature is a quantified value of the degree of path bending of the probe ray at the step sampling point and can be the modulus of the vertical component. A larger value indicates more severe path bending at that location, and the curvature is significantly higher in regions with strong refractive index gradients near the high-temperature furnace than in regions with uniform temperature at a distance.
[0075] First, for the target Gaussian point set Each target Gaussian point in Take the corresponding step sampling point sequence obtained in S103. and its refractive index vector sequence The unit direction vector calculated from S1032 in S103 As the first step sampling point initial direction vector .
[0076] Next, for the current step sampling point The refractive index vector at the location Decompose it and calculate its initial direction vector. The projection components in the direction, and then from Subtracting the projection component from the middle yields the component perpendicular to the middle. vertical component ,in Let be the dot product of the refractive index vector and the initial direction vector, representing the magnitude of the projection of the refractive index vector onto the propagation direction. According to the classical optical equation of motion, the curvature of the ray is proportional to... The vertical component.
[0077] Due to the refractive index of air medium Extremely close As shown in Table 1 To simplify the computational overhead in computer graphics rendering, this embodiment omits the division by [the factor]. The steps directly approximate the determination of the vertical component. The modulus is the curvature at the step sampling point. .
[0078] S1043. Using the product of curvature and preset step length as the deflection angle, rotate the initial direction vector along the direction of the vertical component by the deflection angle to obtain the propagation direction vector at the step sampling point.
[0079] S1044. Determine whether all step sampling points have been traversed.
[0080] S1045. If not, then take the propagation direction vector as the initial direction vector of the next sampling point, and return to decompose the refractive index vector of the sampling point into a vertical component perpendicular to the initial direction vector.
[0081] S1046. Continue until all step sampling points have been traversed to obtain the propagation direction vector at each step sampling point.
[0082] The deflection angle refers to the angle by which the volumetric probe ray deflects at the step sampling point due to the refractive index gradient; it can be expressed as the curvature. With preset step size The product of these angles reflects the degree to which the direction vector of the light deviates from its original propagation direction after traveling a step distance. The propagation direction vector refers to the updated direction vector obtained after the volumetric light probe has undergone deflection calculation at the current step sampling point. It reflects the actual propagation direction of the light after the path bending at this step sampling point and will be directly transmitted as the initial direction vector for the next step sampling point.
[0083] First, based on the obtained step sampling points Curvature at the point Vertical component and preset step size Calculate the deflection angle at the step sampling point. Next, the initial direction vector... Along the vertical component unit direction Rotation Angle, obtain the current step sampling point The propagation direction vector at the location .
[0084] right Normalization is performed to obtain the unit propagation direction vector, with As the next sampling point initial direction vector , return to The refractive index vector at the location Perform vertical component decomposition, iterating in this way until all components have been traversed. By taking several sampling points, a propagation direction vector sequence is finally obtained at each sampling point. This sequence fully describes the actual propagation path of the volumetric probe ray as it gradually bends under the influence of the refractive index gradient field, as well as the propagation direction at each location.
[0085] S1047. Calculate the spatial coordinates of each Gaussian point on the detection path and the two adjacent step sampling points.
[0086] S1048. Determine the propagation direction vector of the step sampling point corresponding to the minimum distance as the first direction vector of the Gaussian point.
[0087] S1049. Determine whether all Gaussian points have been traversed. If not, return to calculate the spatial coordinates of each Gaussian point on the detection path and its two adjacent step sampling points, until all Gaussian points have been traversed.
[0088] Two adjacent step sampling points refer to the sequence of step sampling points. The two consecutively numbered step sampling points spatially closest to a Gaussian point on the detection path are used to provide a local propagation direction reference for assigning a value to the first direction vector of that Gaussian point. The first direction vector refers to the actual propagation direction vector of the volumetric light probe at each Gaussian point on the detection path. It can be the propagation direction vector at the step sampling point with the smallest distance from that Gaussian point and represents the true incident direction of the volumetric light probe after being bent by the refractive index gradient field when it reaches that Gaussian point.
[0089] First, identify all Gaussian points along the detection path, including intermediate Gaussian points and the target Gaussian point. Specifically, from the 3DGS Gaussian point set... Extract the Gaussian points whose spatial coordinates fall within the neighborhood of the propagation path of the volumetric light probe, and compare them with the target Gaussian point. Together they form a complete set of Gaussian points along the detection path, denoted as ,in The intermediate Gaussian point, This represents the number of intermediate Gaussian points.
[0090] Next, each Gaussian point on the detection path is processed one by one, using a certain intermediate Gaussian point as the basis. For example, in the step sampling point sequence Find with Two consecutive step sampling points that are spatially adjacent and Calculate separately and , Euclidean distance and By comparing the magnitudes of the two distances, the propagation direction vector at the step sampling point corresponding to the minimum distance is determined as the first direction vector of that Gaussian point. Right now .
[0091] Repeat the above distance comparison and direction assignment process for all Gaussian points on the detection path to finally obtain the first set of direction vectors corresponding to each Gaussian point on the detection path. The target Gaussian point First direction vector The direction vector is determined according to the propagation direction of the most recent step sampling point.
[0092] This embodiment decomposes the refractive index vector at the step sampling point into a vertical component perpendicular to the propagation direction, quantifies the curvature using the magnitude of the vertical component, and then gradually rotates and updates the propagation direction vector using the product of the curvature and the preset step size as the deflection angle. This achieves iterative and precise tracking of the bending propagation path of the volumetric light probe in the refractive index gradient field. Compared with the simplified assumption of straight-line propagation of light in the prior art, it can accurately restore the path deflection effect induced by the temperature gradient field.
[0093] Furthermore, by comparing the distance between each Gaussian point on the detection path and its adjacent step sampling points, and using the propagation direction vector of the nearest sampling point as the first direction vector of that Gaussian point, each Gaussian point can obtain the true volumetric light incident direction corresponding to its spatial position, thus eliminating the systematic angular deviation introduced by substituting the geometric straight line direction for the actual incident direction.
[0094] S105. Determine the forward scattering coefficient based on the particle size properties of the Gaussian points on the detection path and the wavelength of the illumination source, and calculate the spatial angle between the first direction vector and the second direction vector pointing from the camera position to each Gaussian point.
[0095] Optionally, step S105, which determines the forward scattering coefficient based on the particle size properties of the Gaussian points along the detection path and the wavelength of the illumination source, and calculates the spatial angle between the first direction vector and the second direction vector pointing from the camera position to each Gaussian point, may specifically include: S1051. Calculate the ratio of the particle size attribute of each Gaussian point on the detection path to the wavelength of the illumination source, and obtain the first ratio of each Gaussian point.
[0096] The first ratio refers to the ratio of the particle size attribute of each Gaussian point on the detection path to the wavelength of the illumination source. This ratio reflects the relative size relationship between the scattering particle size and the incident light wavelength. If the ratio is small, it indicates that the particle size is much smaller than the light wavelength and the scattering behavior tends to be isotropic. If the ratio is large, it indicates that the particle size is much larger than the light wavelength and the scattering behavior tends to have strong forward scattering characteristics.
[0097] First, for the complete set of Gaussian points along the detection path For each Gaussian point, read its grain size properties, such as the middle Gaussian point. Particle size properties Target Gaussian point Particle size properties These attributes are all inherited from the inherent parameters of the corresponding Gaussian points in the 3DGS Gaussian point set.
[0098] Next, determine the wavelength of the lighting source. This can be a pre-defined scalar parameter, with values assigned based on the actual lighting source type. The grain size attribute of each Gaussian point is correlated with the light source wavelength. Divide to obtain the first ratio at that Gaussian point, for example, the middle Gaussian point. First ratio Target Gaussian point First ratio Repeat the above calculation for all Gaussian points along the detection path to obtain the complete first ratio set.
[0099] S1052. Based on the first ratio, according to the preset correspondence between the first ratio and the forward scattering coefficient, the forward scattering coefficient of each Gaussian point is obtained.
[0100] The forward scattering coefficient is a scalar parameter used to describe the directionality of scattering at a Gaussian point. It is a key directional parameter in the Henyey-Greenstein scattering phase function. The closer the value is to 1, the more concentrated the scattered energy at that Gaussian point is in the forward direction; the closer the value is to 0, the more isotropic the scattering behavior tends to be. The preset first ratio and its correspondence with the forward scattering coefficient are shown in Table 2 below: Table 2: Relationship between the first ratio and the forward scattering coefficient
[0101] As shown in Table 2, Table 2 presents the forward scattering coefficient values corresponding to seven representative first ratio ranges from particle sizes much smaller than the wavelength to much larger than the wavelength. This correspondence is determined based on Mie scattering theory, numerical simulation of the optical properties of typical industrial smoke particles, and fitting with experimental data. It can be seen that the forward scattering coefficient increases monotonically with the increase of the first ratio. Within the typical size range of smoke particles in a smelting workshop, the forward scattering coefficient is at a moderately strong level, reflecting the strong forward-oriented characteristics of the scattering behavior of smoke particles.
[0102] First, for each Gaussian point obtained in S1051, the first ratio is compared with the boundary values of each interval in Table 2 to determine the interval to which the ratio belongs. Next, the forward scattering coefficient value corresponding to that interval is read as the forward scattering coefficient of that Gaussian point. For boundary ratios that fall exactly between two intervals, linear interpolation of the corresponding coefficients in adjacent intervals can be used to estimate the ratio and improve the continuity of the scattering coefficient values.
[0103] S1053. By normalizing the direction vector formed by the spatial coordinates pointing from the camera position to each Gaussian point, a second direction vector with the same dimension as the first direction vector is obtained for each Gaussian point. The dot product of the first direction vector and the second direction vector of each Gaussian point is calculated, and the inverse cosine value of the dot product is determined to be the spatial angle.
[0104] The second direction vector is a unit vector obtained by normalizing the direction vector formed by pointing from the camera position to the spatial coordinates of each Gaussian point. It represents the observation direction from the camera to that Gaussian point from the observer's perspective and has the same dimension as the first direction vector. Together, they determine the scattering geometry of the volumetric light at that Gaussian point. The spatial angle is the angle between the first and second direction vectors and reflects the angular relationship between the actual incident direction of the volumetric light and the camera's observation direction.
[0105] First, for each Gaussian point on the detection path, calculate the distance from the camera position. The direction vector pointing to the spatial coordinates of that Gaussian point, for example, pointing to the middle Gaussian point. The direction vector is For the target Gaussian point, it is: Next, the direction vector is normalized to obtain a second direction vector with the same dimension as the first direction vector, such as the middle Gaussian point. The second direction vector Target Gaussian point The second direction vector is calculated similarly. .
[0106] Then, calculate the dot product of the first direction vector and the second direction vector at each Gaussian point. For example, the dot product at the middle Gaussian point is... The dot product of the target Gaussian point is The inverse cosine of the dot product is then used to determine the spatial angle at the Gaussian point. Repeat the above normalization, dot product, and inverse cosine calculation process for all Gaussian points along the detection path to finally obtain a complete set of spatial angles.
[0107] In this embodiment, the forward scattering coefficient is determined by looking up a table using the ratio of the Gaussian point particle size attribute to the wavelength of the illumination source. This gives the scattering directionality parameter of each Gaussian point a clear physical basis and can accurately distinguish the differences in forward scattering intensity of particles of different sizes in backlit scenes.
[0108] Based on this, by normalizing and dot producting the first direction vector and the second direction vector calculated from the camera position, a spatial angle reflecting the relationship between the true incident direction and the observation direction of the volume light is obtained. Compared with the method of directly calculating the incident angle using the geometric straight line direction in the prior art, this spatial angle fully inherits the true propagation direction after bending correction by the refractive index gradient field in S104, thereby avoiding the angle calculation deviation caused by ignoring the light bending effect.
[0109] S106. Determine the transmittance of the target Gaussian point based on the absorbance of all Gaussian points on the detection path. Use the transmittance to modulate the color of the target Gaussian point to obtain the re-illumination rendering color. The absorbance is calculated by a scattering phase function with spatial angle and forward scattering coefficient as input.
[0110] Optionally, the process of calculating the absorbance of each Gaussian point in step S106 may specifically include: S1061. Calculate the cosine value of the spatial angle between each Gaussian point. Using the cosine value and the corresponding forward scattering coefficient as input parameters, substitute the input parameters into the scattering phase function to calculate the scattering intensity value of each Gaussian point. The scattering phase function uses the weighted combination of the square of the forward scattering coefficient and the cosine value as the denominator and the square of the forward scattering coefficient as the numerator.
[0111] The scattering intensity value is a scalar result obtained by substituting the cosine of the spatial angle and the forward scattering coefficient into the scattering phase function, and it reflects the relative scattering energy strength of the Gaussian point under a given combination of incident and observation directions.
[0112] The scattering phase function is a mathematical function used to quantify the intensity of anisotropic scattering, with the forward scattering coefficient and the cosine of the spatial angle as input parameters. It can be in the form of the Henyey-Greenstein phase function, and its denominator is a weighted combination of the square of the forward scattering coefficient and the cosine of the spatial angle, while the numerator is a minus the square of the forward scattering coefficient. This function is extremely sensitive to changes in the cosine value when the forward scattering coefficient is large and the spatial angle is close to the backlight direction.
[0113] First, for each Gaussian point on the detection path, the spatial angle obtained in S105 is read, and the cosine value is calculated. Since this spatial angle was directly obtained in the previous processing step using the inverse cosine of the dot product of the first and second direction vectors, i.e. To avoid redundant calculations of inverse trigonometric functions and save hardware computing power, the dot product result calculated in S105 is directly extracted as the cosine value of the spatial angle in this step. For example, the intermediate Gaussian point. The cosine value of the spatial angle is directly taken as Target Gaussian point Similarly, the cosine value of the spatial angle is taken as... .
[0114] Next, the cosine of the spatial angle and the corresponding forward scattering coefficient are used... Substitute the input parameters into the scattering phase function to calculate the scattering intensity value. The molecule is a minus the forward scattering coefficient. The square of the product, with the denominator being the square of the forward scattering coefficient. cosine of the angle with space according to The weighted combination is then taken as a power of two (3 / 2). This substitution process is repeated for all Gaussian points along the detection path to obtain the final set of scattering intensity values for each Gaussian point.
[0115] S1062. Calculate the product of the scattering intensity value of each Gaussian point and the corresponding opacity to obtain the absorbance of each Gaussian point. The opacity is an inherent property parameter of each Gaussian point in the 3DGS Gaussian point set, with a value range of 0 to 1.
[0116] In this scheme, absorbance specifically refers to the quantified value of the viewpoint-dependent equivalent occlusion and scattering deviation capability of each Gaussian point for volumetric light, and can be the product of the scattering intensity value and opacity of that Gaussian point. Its value comprehensively reflects both the physical opacity of the material at that Gaussian point and the light energy attenuation caused by anisotropic scattering of light deviating from the camera's viewing direction.
[0117] A higher absorbance indicates a stronger effective light attenuation effect of the Gaussian point due to its own absorption or scattering of light in directions other than the camera. When the absorbance approaches its limit, the Gaussian point tends to be completely opaque to the camera's viewpoint and significantly blocks the volumetric light contribution from Gaussian points behind it towards the camera's viewpoint. Opacity refers to the inherent property parameter carried by each Gaussian point in the 3DGS Gaussian point set, with a value ranging from 0 to 1.
[0118] First, for each Gaussian point on the detection path, read the scattering intensity value calculated in S1061 and the inherent opacity property of that Gaussian point, such as the middle Gaussian point. The opacity is Target Gaussian point The opacity is Next, the scattering intensity value is multiplied by the opacity to obtain the absorbance at that Gaussian point, such as the middle Gaussian point. absorbance Target Gaussian point The absorbance was calculated similarly. Repeat the above product calculation for all Gaussian points along the detection path to obtain the complete set of absorbance values.
[0119] Optionally, step S106, which involves determining the transmittance of the target Gaussian point based on the absorbance of all Gaussian points along the detection path and using the transmittance to modulate the color of the target Gaussian point to obtain the re-illumination rendering color, may specifically include: S1063. Calculate the product of the absorbance of all Gaussian points on the detection path to obtain the transmittance of the target Gaussian point.
[0120] Transmittance refers to the final transmitted intensity of volumetric light at the target Gaussian point after cumulative attenuation at all Gaussian points along the detection path. It can be the product of the absorbance of all Gaussian points along the detection path. This value comprehensively reflects the overall blocking and attenuation effect experienced by volumetric light as it propagates from the illumination source to the target Gaussian point. The lower the transmittance, the stronger the cumulative attenuation experienced by the volumetric light along the propagation path.
[0121] First, obtain the complete set of Gaussian points along the detection path. The absorbance corresponding to each Gaussian point, including the absorbance of the middle Gaussian point. and the absorbance of the target Gaussian point It should be noted that the volumetric light transmittance in this scheme is a viewpoint-dependent equivalent transmittance for graphics rendering. It not only includes the physical occlusion attenuation of the medium itself, but also couples the anisotropic scattering attenuation probability of light in the direction of camera observation to achieve single-path integral approximation.
[0122] Next, using the absorbance of all Gaussian points along the detection path, and based on the physical logic that optical transmittance and absorbance have a complementary attenuation relationship, the transmittance component of each Gaussian point is defined as a fraction minus the absorbance of that point. These fractions are then multiplied sequentially to obtain the target Gaussian point. Volume light transmittance .
[0123] S1064. Calculate the products of the red, green, and blue channel color components in the color attribute of the target Gaussian point and the volumetric light transmittance, and then combine them to obtain the re-illuminated rendering color.
[0124] The color value of the re-illuminated rendering refers to the color value of the target Gaussian point after being modulated by the volumetric light transmittance. It can be obtained by multiplying the red, green and blue color components of the target Gaussian point's original color attributes by the volumetric light transmittance and then combining them. This result comprehensively reflects the combined effect of the target Gaussian point's own color attributes and the volumetric light attenuation effect it experiences under temperature gradient field and backlight scattering conditions.
[0125] First, read the target Gaussian point obtained in S101. Color attributes, including the red channel color component Green channel color components and blue channel color components Next, the three color components are compared with the volumetric light transmittance calculated in S1063. Multiplying them together yields the three modulated color components: .
[0126] Finally, the three modulated color components are combined to obtain the relighting rendering color of the target Gaussian point. For the target set of Gaussian points The above color modulation process is repeated for each target Gaussian point in the process, and finally the relighting rendering color set of all target Gaussian points in the entire area to be rendered is obtained, which is used to synthesize the final relighting rendering image.
[0127] This embodiment calculates the scattering intensity value by substituting the cosine of the spatial angle and the forward scattering coefficient into the scattering phase function, and combines the opacity to obtain the absorbance that comprehensively reflects the material's opacity and anisotropic scattering directionality. This ensures that the absorbance calculation at each Gaussian point fully inherits the true incident direction after path curvature correction in S104 and the directional scattering parameters determined in S105, thereby accurately capturing the composite error caused by the path deflection induced by the temperature gradient field and the highly sensitive coupling and superposition of the anisotropic phase function under backlight conditions.
[0128] Based on this, the volumetric light transmittance of the target Gaussian point is obtained by multiplying the absorbance of all Gaussian points on the detection path. This transmittance is then used to modulate the red, green, and blue channel color components, respectively. This achieves a complete closed loop from physically accurate absorbance calculation to final relighting rendering color output. Compared with the existing technology that assumes straight-line propagation of light and uses isotropic absorbance scalar processing, this method can control the calculation error of volumetric light intensity in high-temperature gradient scenes within a reasonable range, significantly improving the physical accuracy and visual realism of 3DGS relighting rendering results in complex industrial scenes such as digital twin smelting workshops.
[0129] Figure 4 This application provides a schematic diagram of a specific implementation of a 3DGS relighting system based on absorbance calculation and volumetric light, as shown in the embodiments of this application. Figure 4 The system may include: The acquisition module 410 is used to acquire the 3DGS Gaussian point set of the target scene, the temperature distribution data around the target object, the position of the lighting source and the position of the camera; Module 420 is used to construct a refractive index gradient field based on the rate of change of air refractive index at adjacent spatial locations, where the air refractive index is determined based on temperature distribution data; The generation module 430 is used to emit probe rays from the position of the illumination source to the Gaussian point of the target to be rendered extracted from the 3DGS Gaussian point set, perform step sampling on the probe rays and extract the refractive index vector of each step sampling point from the refractive index gradient field using interpolation; The calculation module 440 is used to calculate the curvature of the probe ray at the step sampling point based on the refractive index vector, and to determine the first direction vector of each Gaussian point on the detection path of the probe ray to the target Gaussian point based on the curvature. The calculation module 440 is also used to determine the forward scattering coefficient based on the particle size properties of the Gaussian points on the detection path and the wavelength of the illumination source, and to calculate the spatial angle between the first direction vector and the second direction vector pointing from the camera position to each Gaussian point. The generation module 430 is also used to determine the transmittance of the target Gaussian point based on the absorbance of all Gaussian points on the detection path, and to obtain the relighting rendering color by modulating the color of the target Gaussian point using the transmittance. The absorbance is calculated by a scattering phase function with the spatial angle and forward scattering coefficient as input.
[0130] The 3DGS relighting system based on absorbance calculation and volumetric light in this application embodiment is used to implement the aforementioned 3DGS relighting method based on absorbance calculation and volumetric light. Therefore, the specific implementation of the 3DGS relighting system based on absorbance calculation and volumetric light can be found in the embodiment section of the 3DGS relighting method based on absorbance calculation and volumetric light above. The specific implementation can be referred to the description of the corresponding embodiments, which will not be repeated here.
[0131] Electronic devices may include processors and memory storing computer program instructions.
[0132] Specifically, the processor may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0133] The memory may include a large-capacity storage device for data or instructions. For example, and not limitingly, the memory may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory may include removable or non-removable (or fixed) media. Where appropriate, the memory may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, the memory is non-volatile solid-state memory.
[0134] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to the first aspect of this disclosure.
[0135] The processor reads and executes computer program instructions stored in the memory to implement any of the 3DGS relighting methods based on absorbance calculation and volumetric light in the above embodiments.
[0136] In one example, the electronic device may also include a communication interface and a bus. The processor, memory, and communication interface are connected via the bus and communicate with each other.
[0137] The communication interface is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0138] A bus, including hardware, software, or both, couples components of an online data traffic metering device together. For example, and not limitingly, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, a bus may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.
[0139] The electronic device can execute the 3DGS relighting method based on absorbance calculation and volumetric light in the embodiments of this application, thereby realizing the 3DGS relighting method based on absorbance calculation and volumetric light described in conjunction with the accompanying drawings.
[0140] Furthermore, in conjunction with the 3DGS relighting method based on absorbance calculation and volumetric light in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the 3DGS relighting methods based on absorbance calculation and volumetric light in the above embodiments.
[0141] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0142] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0143] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0144] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0145] The above provides a detailed description of a 3DGS relighting method and system based on absorbance calculation and volumetric light, as provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.
Claims
1. A 3DGS re-illumination method based on absorbance calculation and volumetric light, characterized in that, include: Acquire the 3DGS Gaussian point set of the target scene, temperature distribution data around the target object, location of the lighting source, and camera position; A refractive index gradient field is constructed based on the rate of change of air refractive index at adjacent spatial locations, wherein the air refractive index is determined based on the temperature distribution data; A probe ray is emitted from the position of the illumination source toward the Gaussian point of the target to be rendered extracted from the 3DGS Gaussian point set. The probe ray is step-sampled and the refractive index vector of each step-sampled point is extracted from the refractive index gradient field using interpolation. The bending curvature of the probe ray at the step sampling point is calculated based on the refractive index vector, and the first direction vector of each Gaussian point on the probe ray path to the target Gaussian point is determined based on the bending curvature. The forward scattering coefficient is determined based on the particle size properties of Gaussian points on the detection path and the wavelength of the illumination source. The spatial angle between the first direction vector and the second direction vector pointing from the camera position to each Gaussian point is calculated. The transmittance of the target Gaussian point is determined based on the absorbance of all Gaussian points along the detection path. The color of the target Gaussian point is modulated using the transmittance to obtain the re-illumination rendering color. The absorbance is calculated by a scattering phase function with the spatial angle and the forward scattering coefficient as input. The position of the illumination source and the position of the camera are respectively located on the back side and the light-receiving side of the target object. The temperature distribution data is stored in the form of a three-dimensional grid and each grid node records the temperature value of the corresponding spatial position. The refractive index gradient field is constructed based on the rate of change of air refractive index at adjacent spatial locations, wherein the air refractive index is determined according to the temperature distribution data, including: Based on the temperature value at each spatial location in the temperature distribution data, and according to the preset correspondence between temperature and air refractive index, the air refractive index corresponding to each spatial location is obtained; The differences between the air refractive index and the air refractive index of adjacent spatial positions in the X-axis, Y-axis, and Z-axis directions are calculated to obtain the corresponding first difference. Based on the ratio of each first difference to the distance between the corresponding adjacent positions, a refractive index vector for each spatial position is constructed. The refractive index gradient field is constructed based on all the refractive index vectors.
2. The method according to claim 1, characterized in that, The 3DGS Gaussian point set is obtained by 3D modeling the target scene based on 3D Gaussian splashing and includes the spatial coordinates, color attributes, opacity, and particle size attributes of each Gaussian point; The step of emitting probe rays from the location of the illumination source toward the Gaussian points of the target to be rendered extracted from the 3DGS Gaussian point set, performing step sampling on the probe rays, and extracting the refractive index vector of each step sampling point from the refractive index gradient field using interpolation includes: The Gaussian points whose spatial coordinates are located within the region corresponding to the pixel to be rendered are extracted from the 3DGS Gaussian point set and used as the target Gaussian points. A probe ray is emitted from the position of the illumination source toward the target Gaussian point, and multiple step sampling points are set along the probe ray with a preset step size, wherein the preset step size is determined according to the grid spacing of the refractive index gradient field; The refractive index vector of each step sampling point is obtained by weighting the reciprocal of the distance between each grid node in the refractive index gradient field and the corresponding step sampling point.
3. The method according to claim 1, characterized in that, The Gaussian points on the detection path include intermediate Gaussian points and the target Gaussian point. The intermediate Gaussian points are all Gaussian points except the target Gaussian point that the detection light passes through during its propagation from the illumination source to the target Gaussian point.
4. The method according to claim 2, characterized in that, The step of calculating the curvature of the probe ray at the step sampling point based on the refractive index vector, and determining the first direction vector of each Gaussian point on the probe ray path to the target Gaussian point based on the curvature, includes: Using the direction vector pointing from the position of the illumination source to the target Gaussian point as the initial direction vector of the first step sampling point, the refractive index vector of the step sampling point is decomposed into a vertical component perpendicular to the initial direction vector, and the magnitude of the vertical component is determined as the curvature. Using the product of the curvature and the preset step size as the deflection angle, the initial direction vector is rotated along the direction of the vertical component by the deflection angle to obtain the propagation direction vector at the step sampling point. The propagation direction vector is used as the initial direction vector for the next step sampling point. The refractive index vector of the step sampling point is decomposed into a vertical component perpendicular to the initial direction vector until all step sampling points have been traversed to obtain the propagation direction vector at each step sampling point. Calculate the spatial coordinates distance between each Gaussian point on the detection path and two adjacent step sampling points, and determine the propagation direction vector of the step sampling point corresponding to the minimum distance as the first direction vector of the Gaussian point.
5. The method according to claim 1, characterized in that, The step of determining the forward scattering coefficient based on the particle size properties of Gaussian points along the detection path and the wavelength of the illumination source, and calculating the spatial angle between the first direction vector and the second direction vector pointing from the camera position to each Gaussian point, includes: Calculate the ratio of the particle size attribute of each Gaussian point on the detection path to the wavelength of the illumination source to obtain the first ratio of each Gaussian point; Based on the first ratio, and according to the preset correspondence between the first ratio and the forward scattering coefficient, the forward scattering coefficient of each Gaussian point is obtained. By normalizing the direction vector formed by the spatial coordinates pointing from the camera position to each Gaussian point, a second direction vector with the same dimension as the first direction vector is obtained for each Gaussian point. The dot product of the first direction vector and the second direction vector at each Gaussian point is calculated, and the inverse cosine value of the dot product is determined to be the spatial angle.
6. The method according to claim 1, characterized in that, The method further includes: Calculate the cosine value of the spatial angle at each Gaussian point, and use the cosine value and the corresponding forward scattering coefficient as input parameters. Substitute the input parameters into the scattering phase function to calculate the scattering intensity value at each Gaussian point. The scattering phase function uses the weighted combination of the square of the forward scattering coefficient and the cosine value as the denominator, and the square of the forward scattering coefficient as the numerator. The product of the scattering intensity value and the corresponding opacity of each Gaussian point is calculated to obtain the absorbance of each Gaussian point. The opacity is an inherent property parameter of each Gaussian point in the 3DGS Gaussian point set, with a value range of 0 to 1.
7. The method according to claim 1, characterized in that, The step of determining the transmittance of the target Gaussian point based on the absorbance of all Gaussian points along the detection path, and using the transmittance to modulate the color of the target Gaussian point to obtain the re-illumination rendering color, includes: The transmittance of the target Gaussian point is obtained by multiplying the absorbance of all Gaussian points along the detection path. The red, green, and blue channel color components of the target Gaussian point are calculated separately and multiplied by the transmittance, and then combined to obtain the re-illuminated rendering color.
8. A 3DGS relighting system based on absorbance calculation and volumetric light, characterized in that, include: The acquisition module is used to acquire the 3DGS Gaussian point set of the target scene, the temperature distribution data around the target object, the position of the lighting source, and the position of the camera; The construction module is used to construct a refractive index gradient field based on the rate of change of air refractive index at adjacent spatial locations, wherein the air refractive index is determined according to the temperature distribution data; specifically, the construction module is used so that the position of the illumination source and the position of the camera are located on the backlight side and the light-receiving side of the target object, respectively, and the temperature distribution data is stored in the form of a three-dimensional grid, with each grid node recording the temperature value at the corresponding spatial location; Based on the temperature value at each spatial location in the temperature distribution data, and according to the preset correspondence between temperature and air refractive index, the air refractive index corresponding to each spatial location is obtained; the difference between the air refractive index and the air refractive index of adjacent spatial locations in the X-axis, Y-axis, and Z-axis directions is calculated to obtain the corresponding first difference; based on the ratio of each first difference to the distance between the corresponding adjacent locations, a refractive index vector for each spatial location is constructed; and the refractive index gradient field is constructed based on all the refractive index vectors. The generation module is used to emit probe rays from the position of the illumination source to the Gaussian point of the target to be rendered extracted from the 3DGS Gaussian point set, perform step sampling on the probe rays, and extract the refractive index vector of each step sampling point from the refractive index gradient field using interpolation. The calculation module is used to calculate the curvature of the probe ray at the step sampling point based on the refractive index vector, and to determine the first direction vector of each Gaussian point on the detection path of the probe ray to the target Gaussian point based on the curvature. The calculation module is also used to determine the forward scattering coefficient based on the particle size properties of the Gaussian points on the detection path and the wavelength of the illumination source, and to calculate the spatial angle between the first direction vector and the second direction vector pointing from the camera position to each Gaussian point; The generation module is also used to determine the transmittance of the target Gaussian point based on the absorbance of all Gaussian points on the detection path, and to modulate the color of the target Gaussian point using the transmittance to obtain the re-illumination rendering color. The absorbance is calculated by a scattering phase function with the spatial angle and the forward scattering coefficient as input.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the 3DGS relighting method based on absorbance calculation and volumetric light as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Improved 3DGS scene reconstruction and rendering method based on depth and curvature supervision
CN120014172A
Panoramic image three-dimensional reconstruction method based on 3DGS
CN120526066A