CN112604278B - Method for simulating global illumination on intelligent equipment based on game - Google Patents

Method for simulating global illumination on intelligent equipment based on game Download PDF

Info

Publication number
CN112604278B
CN112604278B CN202011590514.9A CN202011590514A CN112604278B CN 112604278 B CN112604278 B CN 112604278B CN 202011590514 A CN202011590514 A CN 202011590514A CN 112604278 B CN112604278 B CN 112604278B
Authority
CN
China
Prior art keywords
preset
control module
central control
patch
radiance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011590514.9A
Other languages
Chinese (zh)
Other versions
CN112604278A (en
Inventor
刘泳
许洁明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Yinhan Technology Co ltd
Original Assignee
Guangzhou Yinhan Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Yinhan Technology Co ltd filed Critical Guangzhou Yinhan Technology Co ltd
Priority to CN202011590514.9A priority Critical patent/CN112604278B/en
Publication of CN112604278A publication Critical patent/CN112604278A/en
Application granted granted Critical
Publication of CN112604278B publication Critical patent/CN112604278B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

The invention relates to a method for simulating global illumination on intelligent equipment based on a game, wherein the solution of a global illumination equation needs recursive integrals, so that the solution is not accurate, and an approximate numerical solution needs to be calculated by using integral solving methods such as Monte Carlo and the like. The invention provides a method for simulating global illumination in an intelligent device based on a game, which simulates the global illumination of a scene in real time with lower real-time calculation cost and less off-line and running storage space, can simulate illumination information of static objects of the scene, can provide credible global illumination effect for dynamic objects, and can greatly improve the reality of game pictures in the intelligent device with limited calculation capacity, cruising capacity and heating.

Description

Method for simulating global illumination on intelligent equipment based on game
Technical Field
The invention relates to the technical field of computer image processing, in particular to a method for simulating global illumination on intelligent equipment based on a game.
Background
The global illumination technology in real-time rendering is always a hotspot in the field of computer image processing, and through reasonable modeling of the real world illumination environment and solving of a global illumination equation, the effect that a light source directly irradiates an object can be simulated, the illumination effect of light rebounded by the object on the object can also be simulated, and the sense of reality of a rendering result can be greatly improved.
The solution of the global illumination equation needs recursive integration, so that an accurate solution is not available, an approximate numerical solution needs to be calculated by using Monte Carlo and other integration modes, and the Monte Carlo has the main defect of low convergence speed. In the intelligent device with limited operation capability and limited device electric quantity, the game frame is easy to drop, and the game experience is influenced.
In the related art, one solution is to use a ray tracing method, which has a simple principle but a large computational overhead in operation, especially for mobile devices, because a series of recursive products of rendering equations are required; the calculation result of the method has serious limitation, and the effects of color mixing, diffuse reflection and the like are difficult to simulate by using the method.
In the related art, another processing method is to generate an illumination map by a pre-calculation method, and realize global illumination on a static object; however, a large number of dynamic objects are usually present in the game to allow the interaction of the players, the relative positions of the dynamic objects can be changed continuously, meanwhile, the illumination results of the dynamic objects are also changed, and the illumination condition after the change of the dynamic objects can not be determined through offline pre-calculated illumination maps.
Disclosure of Invention
Therefore, the invention provides a method for simulating global illumination in intelligent equipment based on a game, which is used for solving the problem of low illumination simulation efficiency of the game in the intelligent equipment in the prior art.
The invention provides a method for simulating global illumination on intelligent equipment based on games, which comprises the following steps:
step 1: acquiring a target object to be processed in a game scene;
step 2: acquiring all virtual luminous body information in a game scene;
and step 3: dividing the target object into a plurality of continuous patches according to the position of the target object in the game scene and the grid information, wherein the patches are triangular or convex tetrahedrons, and calculating the radiance value of each patch;
and 4, step 4: calculating a shape factor for each pair of patches;
and 5: solving the numerical solution of a radiation degree linear equation system, and calculating the radiation rate of each patch;
step 6: storing a diffuse reflection part in a solving result of the static object as a two-dimensional map, rgbm code; storing the diffuse reflection part of the solution result of the position of the detection point, and coding the diffuse reflection part into a spherical harmonic form; storing the reflection map of the detection point as cubemap and calculating mipmaps;
and 7: using an equation of relating the average spontaneous emission radiance and the reflectivity on all the patches to the average total radiance, and converting the obtained radiance result into the display color of the surface after solving;
the steps 1 to 7 are all carried out in a simulation system, the simulation system is connected with a central control module through wireless, the central control module is used for controlling the operation of each unit, so that the operation processes of the steps 1 to 7 are controlled, and a matrix is arranged in the central control module.
Further, in the step 3, for each patch, a self-emission radiance and a reflectivity are given, and the reflectivity is set to be a number between 0 and 1; the total radiance of a patch includes the radiance received by any number of bounces of other patches in the scene, and the radiance of self-emission, and the central control module is provided with a total radiance value Q, and Q is set to be F + M × R × F.
Further, a preset self-emission radiance matrix F0 and a preset absolute distance matrix A0 of the target object and the light source are arranged in the central control module;
setting F0(F1, F2, F3 and F4) for the preset self-emission radiance matrix F0, wherein F1 is a first preset self-emission radiance, F2 is a second preset self-emission radiance, F3 is a third preset self-emission radiance, F4 is a fourth preset self-emission radiance, and the preset self-emission radiance is gradually increased in sequence;
setting a0(a1, a2, A3, a4) for the absolute distance matrix a0 of the preset target objects and the light source, wherein a1 is the absolute distance between the first preset target object and the light source, a2 is the absolute distance between the second preset target object and the light source, A3 is the absolute distance between the third preset target object and the light source, and a4 is the absolute distance between the fourth preset target object and the light source;
when the central control module selects the self-emission radiation degree of the target object, comparing the absolute distance A between the target object and the light source with the parameters in the A0 matrix, and selecting the corresponding self-emission amplitude value according to the comparison result:
when A is less than or equal to A1, the central control module adopts self-emission radiation degree F1;
when A is more than A1 and less than or equal to A2, the central control module adopts self-emission radiance F2;
when A is more than A2 and less than or equal to A3, the central control module adopts self-emission radiance F3;
when A is more than A3 and less than or equal to A4, the central control module adopts self-emission radiance F4;
further, a preset self-emission radiance adjusting coefficient matrix k0 and a preset target object patch number matrix B0 are also arranged in the central control module;
setting a k0(k1, k2, k3 and k4) for the preset self-emission radiance adjusting coefficient matrix k0, wherein k1 is a first preset self-emission radiance adjusting coefficient, k2 is a second preset self-emission radiance adjusting coefficient, k3 is a third preset self-emission radiance adjusting coefficient, and k4 is a fourth preset self-emission radiance adjusting coefficient, and the preset self-emission radiance adjusting coefficients are gradually increased in sequence;
setting B0(B1, B2, B3, B4) for the preset target object patch number matrix B0, where B1 is a first preset target object patch number, B2 is a second preset target object patch number, B3 is a third preset target object patch number, and B4 is a fourth preset target object patch number, and the preset target object patch numbers are gradually increased in sequence;
when the central control module adjusts the preselected self-emission radiance Fi, i is 1,2,3,4, the central control module compares the target object patch number B with parameters in a B0 matrix, and selects a corresponding preset adjusting coefficient from a k0 matrix according to a comparison result to adjust the Fi:
when B is not more than B1, the central control module selects k1 to adjust Fi;
when B is more than B1 and less than or equal to B2, the central control module selects k2 to adjust Fi;
when B is more than B2 and less than or equal to B3, the central control module selects k3 to adjust Fi;
when B is more than B3 and less than or equal to B4, the central control module selects k4 to adjust Fi;
when the central control module selects kj to adjust the preselected Fi, j is 1,2,3 and 4, and the adjusted self-emission radiation degree is Fi 'and Fi' is Fi multiplied by kj.
Further, a preset reflectivity matrix R0, a preset target object wavelength matrix λ 0, a preset reflectivity correction coefficient matrix Y0 and a preset virtual illuminant number matrix C0 are also arranged in the central control module;
for the preset reflectivity matrix R0, setting R0(R1, R2, R3, R4), where R1 is a first preset reflectivity, R2 is a second preset reflectivity, R3 is a third preset reflectivity, and R4 is a fourth preset reflectivity, and each preset reflectivity is gradually increased in sequence;
setting lambda 0 (lambda 1, lambda 2, lambda 3, lambda 4) for the preset target object wavelength matrix lambda 0, wherein lambda 1 is a first preset target object wavelength, lambda 2 is a second preset target object wavelength, lambda 3 is a third preset target object wavelength, and lambda 4 is a fourth preset target object wavelength, and the preset target object wavelengths are gradually increased in sequence;
when the central control module selects the reflectivity, the actual wavelength lambda of the target object is compared with the parameters in lambda 0, and the corresponding reflectivity is selected according to the comparison result:
when the lambda is less than or equal to lambda 1, the reflectivity R1 is selected as the central control module;
when the lambda is more than or equal to lambda 1 and less than or equal to lambda 2, the reflectivity R2 is selected as the central control module;
when lambda 2 is larger than lambda and smaller than or equal to lambda 3, the reflectivity R3 is selected as the central control module;
when the lambda is more than 3 and less than or equal to 4, the reflectivity R4 is selected as the central control module;
setting Y0(Y1, Y2, Y3 and Y4) for the preset reflectivity correction coefficient matrix Y0, wherein Y1 is a first preset reflectivity correction coefficient, Y2 is a second preset reflectivity correction coefficient, Y3 is a third preset reflectivity correction coefficient, Y4 is a fourth preset reflectivity correction coefficient, and the preset reflectivity correction coefficients are gradually increased in sequence;
setting C0(C1, C2, C3 and C4) for the preset virtual illuminant number matrix C0, wherein C1 is the number of first preset virtual illuminants, C2 is the number of second preset virtual illuminants, C3 is the number of third preset virtual illuminants, C4 is the number of fourth preset virtual illuminants, and the number of the preset virtual illuminants is gradually increased in sequence;
when the central control module adjusts the reflectivity Ri selected in advance, i is 1,2,3,4, the central control module compares the number C of the virtual illuminants with the parameters in the C0 matrix, and selects a corresponding preset adjustment coefficient from the Y0 matrix according to the comparison result to adjust Ri:
when C is less than or equal to C1, the central control module selects Y1 to regulate Ri;
when C is more than C1 and less than or equal to C2, the central control module selects Y2 to regulate Ri;
when C is more than C2 and less than or equal to C3, the central control module selects Y3 to regulate Ri;
when C is more than C3 and less than or equal to C4, the central control module selects Y4 to regulate Ri;
when the central control module selects Yj to adjust the preselected Ri, j is 1,2,3,4, and the adjusted reflectivity is Ri', Ri ═ Ri × Yj.
Furthermore, a preset matrix M0 for the number of other patch rebounds and a preset matrix Z0 for the correction coefficient of the number of other patch rebounds are also arranged in the central control module;
setting M0(M1, M2, M3 and M4) for the matrix M0 of the preset number of the rebounding of other patches, wherein M1 is the first preset number of the rebounding of other patches, M2 is the second preset number of the rebounding of other patches, M3 is the third preset number of the rebounding of other patches, M4 is the fourth preset number of the rebounding of other patches, and the number of the rebounding of other patches is gradually increased in sequence;
when the central control module selects other patch rebounding quantities, the central control module compares the virtual illuminant number C with the parameters in the C0 matrix and selects other patch rebounding quantities according to the comparison result:
when C is less than or equal to C1, the central control module selects the rebound quantity M1 of other patches;
when C is more than C1 and less than or equal to C2, the central control module selects the rebound quantity M2 of other patches;
when C is more than C2 and less than or equal to C3, the central control module selects the rebound quantity M3 of other patches;
when C is more than C3 and less than or equal to C4, the central control module selects the rebound quantity M4 of other patches;
for the other patch bounce quantity correction coefficient matrix Z0, setting Z0(Z1, Z2, Z3, Z4), where Z1 is a first preset other patch bounce quantity correction coefficient, Z2 is a second preset other patch bounce quantity correction coefficient, Z3 is a third preset other patch bounce quantity correction coefficient, Z4 is a fourth preset other patch bounce quantity correction coefficient, and each preset other patch bounce quantity correction coefficient gradually increases in sequence;
when the central control module adjusts the pre-selected other patch rebounding quantity Mi, i is 1,2,3,4, the central control module compares the target object patch quantity B with the parameters in the B0 matrix, and selects a corresponding preset adjusting coefficient from the Z0 matrix according to the comparison result to adjust the Mi:
when B is not more than B1, the central control module selects Z1 to adjust Mi;
when B is more than B1 and less than or equal to B2, Z2 is selected by the central control module to adjust Mi;
when B is more than B2 and less than or equal to B3, Z3 is selected by the central control module to adjust Mi;
when B is more than B3 and less than or equal to B4, Z4 is selected by the central control module to adjust Mi;
when the central control module selects Zj to adjust the preselected Mi, j is 1,2,3 and 4, and the adjusted rebounding quantity of other patches is Mi ', Mi' is Mi multiplied by Zj.
Furthermore, the central control module is also provided with a preset target patch and light source included angle matrix theta 0 and a self-emission radiance secondary adjusting coefficient a0;
setting theta 0 (theta 1, theta 2, theta 3 and theta 4) for the matrix theta 0 of the included angles between the target patches and the light source, wherein theta 1 is the included angle between a first preset target patch and the light source, theta 2 is the included angle between a second preset target patch and the light source, theta 3 is the included angle between a third preset target patch and the light source, theta 4 is the included angle between a fourth preset target patch and the light source, and the included angles between the preset target patches and the light source gradually increase in sequence;
setting a0(a1, a2, a3 and a4) for the self-emission radiance secondary regulating coefficient a0, wherein a1 is a first preset self-emission radiance secondary regulating coefficient, a2 is a second preset self-emission radiance secondary regulating coefficient, a3 is a third preset self-emission radiance secondary regulating coefficient, a4 is a fourth preset self-emission radiance secondary regulating coefficient, and the preset self-emission radiance secondary regulating coefficients are gradually increased in sequence;
when the central control module adjusts the pre-selected self-emission radiance Fi, the central control module compares the included angle theta between the target patch and the light source with the parameters in the theta 0 matrix, and selects a corresponding preset adjusting coefficient from the a0 matrix according to the comparison result to adjust the Fi:
when theta is not less than theta 1, the central control module selects a1 to adjust Fi;
when theta 1 is larger than theta and is not larger than theta 2, the central control module selects a2 to adjust Fi;
when theta 2 is larger than theta and smaller than or equal to theta 3, the central control module selects a3 to adjust Fi;
when theta 3 is larger than theta and is not larger than theta 4, the central control module selects a4 to adjust Fi;
when the central control module selects aj to adjust the preselected Fi, j is 1,2,3 and 4, the adjusted self-emission radiation degree is Fi, and Fi is Fi' × aj.
Furthermore, the central control module is also provided with a matrix beta 0 for presetting the average included angle between other patches and the light source, a matrix P0 for the radiation degree of rebounding of other patches and a matrix b0 for the correction coefficient of the radiation degree of rebounding of other patches;
setting beta 0 (beta 1, beta 2, beta 3, beta 4) for the matrix beta 0 of the average included angles between the other patches and the light source, wherein beta 1 is a first preset average included angle between the other patches and the light source, beta 2 is a second preset average included angle between the other patches and the light source, beta 3 is a third preset average included angle between the other patches and the light source, beta 4 is a fourth preset average included angle between the other patches and the light source, and the preset average included angles between the other patches and the light source gradually increase in sequence;
for the other patch rebound radiance P0, setting P0(P1, P2, P3, P4), where P1 is a first preset other patch rebound radiance, P2 is a second preset other patch rebound radiance, P3 is a third preset other patch rebound radiance, P4 is a fourth preset other patch rebound radiance, and the preset other patch rebound radiances gradually increase in sequence, and setting P to M × R × F;
b0(b1, b2, b3 and b4) is set for the other patch rebound radiance correction coefficient b0, wherein b1 is a first preset other patch rebound radiance correction coefficient, b2 is a second preset other patch rebound radiance correction coefficient, b3 is a third preset other patch rebound radiance correction coefficient, b4 is a fourth preset other patch rebound radiance correction coefficient, and the preset other patch rebound radiance correction coefficients gradually increase in sequence;
when the central control module adjusts the rebound radiance Pi of other pre-selected patches, i is 1,2,3,4, the central control module compares the average included angle beta between the other patches and the light source with the parameters in the beta 0 matrix, and selects a corresponding preset adjusting coefficient from the b0 matrix according to the comparison result to adjust Pi:
when beta is not more than beta 1, b1 is selected by the central control module to adjust Pi;
when beta 1 is larger than beta and is not larger than beta 2, the central control module selects b2 to regulate Pi;
when beta 2 is more than beta and less than or equal to beta 3, the central control module selects b3 to adjust Pi;
when the beta 3 is larger than the theta and is not larger than the beta 4, the central control module selects b4 to adjust Pi;
when the central control module selects bj to adjust the preselected Pi, j is 1,2,3 and 4, and the adjusted rebound radiances of other patches are Pi ', Pi' is Pi × bj.
Further, in said step 4, when calculating the shape factor of each pair of patches, a half-cube algorithm is used, and at the same time, discontinuous meshing, adaptive and hierarchical subdivision and clustering are used.
Further, when the numerical solution of the system of the linear equation system of the radiometric degree is solved in the step 5, the iteration method used is a gaussian seidel iteration method.
Compared with the prior art, the method has the advantages that in actual operation, the real-time calculation cost is low, the storage space occupied by offline and operation is small, the global illumination of the scene can be simulated in real time, the illumination information of static objects of the scene can be simulated, the credible global illumination effect can be provided for dynamic objects, and the reality of game pictures can be greatly improved in intelligent equipment with limited calculation capacity, cruising capacity and heating.
Further, when discretizing a scene, the patches are small enough and the radiance on each patch is approximately constant, lighting variations such as nearby shadow boundaries can be captured, while the number of patches generated is not too large, avoiding huge storage requirements and lengthy computation times.
Furthermore, the central control module compares the absolute distance A between the target object and the light source with the parameters in the A0 matrix to select a corresponding self-emission amplitude value Fi, and compares the target object patch number B with the parameters in the B0 matrix to select a corresponding preset adjustment coefficient to adjust the Fi, so that a more accurate self-emission amplitude value is obtained, the calculation accuracy is improved, and the illumination simulation effect of the target object is further improved.
Furthermore, the central control module compares the actual wavelength λ of the target object with the parameter in λ 0 to select the corresponding reflectivity Ri, and then compares the number C of the virtual illuminants with the parameter in the C0 matrix to select the corresponding preset adjustment coefficient to adjust Ri, so as to obtain a more accurate reflectivity value, thereby improving the accuracy of calculation and further improving the illumination simulation effect of the target object.
Furthermore, the central control module compares the number C of the virtual luminous bodies with parameters in the C0 matrix to select other patch bounce numbers Mi, and compares the number B of the target object patches with parameters in the B0 matrix to select corresponding preset adjustment coefficients to adjust Mi, so as to obtain more accurate values of other patch bounce numbers, thereby improving the accuracy of calculation and further improving the illumination simulation effect of the target object.
Furthermore, the method uses a random radiometric algorithm to determine the surface radiometric of the scene object in a pre-calculation mode in the world space of the three-dimensional scene, and the radiometric of the static object is stored as an illumination map by using RGBM coding, so that the diffuse reflection effect of global illumination can be restored; the mirror reflection part effect captures the reflection mapping through a reflection probe which is arranged in advance, and the mipmaps are used for simulating the reflection with different roughness, so that the illumination information of the static object of the scene can be simulated.
Furthermore, the detection points are arranged in advance in the scene, after global illumination information is obtained through precomputation, the global illumination information on the space points is stored by using a spherical harmonic function, and the effect of the diffuse reflection part of the global illumination dynamically moving to the object near the detection points can be restored through interpolating the illumination data on the discrete detection points; the effect of the specular reflection part is calculated by interpolation of the reflection map, so that the global illumination of the scene can be simulated in real time.
Furthermore, when the shape factors of each pair of patches are calculated, a half-cube algorithm is used, the number of the shape factors is very large, and the method can effectively reduce the real-time calculation cost.
Furthermore, when the numerical solution of the system of the radiation degree linear equation set is solved, the used iteration method is a Gauss Seidel iteration method, the calculation time length is greatly reduced, and the game experience is effectively improved.
Drawings
FIG. 1 is a schematic flow chart of a method for simulating global illumination at a smart device based on a game according to the present invention;
FIG. 2 is a block diagram of a system for simulating global illumination at an intelligent device based on a game according to the present invention;
Detailed Description
Preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only for explaining the technical principle of the present invention, and do not limit the scope of the present invention.
Fig. 1 is a block flow diagram illustrating a method for simulating global illumination at an intelligent device based on a game according to the present invention.
The invention discloses a method for simulating global illumination on intelligent equipment based on games, which comprises the following steps:
step 1: acquiring a target object to be processed in a game scene;
step 2: acquiring all virtual luminous body information in a game scene;
and step 3: dividing the target object into a plurality of continuous patches according to the position of the target object in the game scene and the grid information, wherein the patches are triangular or convex tetrahedrons, and calculating the radiance value of each patch;
and 4, step 4: calculating a shape factor for each pair of patches;
and 5: solving the numerical solution of a radiation degree linear equation system, and calculating the radiation rate of each patch;
step 6: storing a diffuse reflection part in a solving result of the static object as a two-dimensional map, rgbm code; storing the diffuse reflection part of the solution result of the position of the detection point, and coding the diffuse reflection part into a spherical harmonic form; storing the reflection map of the detection point as cubemap and calculating mipmaps;
and 7: using an equation of relating the average spontaneous emission radiance and the reflectivity on all the patches to the average total radiance, and converting the obtained radiance result into the display color of the surface after solving;
the steps 1 to 7 are all carried out in a simulation system, the simulation system is connected with a central control module through wireless, the central control module is used for controlling the operation of each unit, so that the operation processes of the steps 1 to 7 are controlled, and a matrix is arranged in the central control module.
Specifically, in the step 3, for each patch, a self-emission radiance and a reflectance are given, and the reflectance is set to a number between 0 and 1; the total radiance of a patch includes the radiance received by any number of bounces of other patches in the scene, and the radiance of self-emission, and the central control module is provided with a total radiance value Q, and Q is set to be F + M × R × F.
Specifically, a preset self-emission radiance matrix F0 and a preset absolute distance matrix A0 of the target object and the light source are arranged in the central control module;
setting F0(F1, F2, F3 and F4) for the preset self-emission radiance matrix F0, wherein F1 is a first preset self-emission radiance, F2 is a second preset self-emission radiance, F3 is a third preset self-emission radiance, F4 is a fourth preset self-emission radiance, and the preset self-emission radiance is gradually increased in sequence;
setting a0(a1, a2, A3, a4) for the absolute distance matrix a0 of the preset target objects and the light source, wherein a1 is the absolute distance between the first preset target object and the light source, a2 is the absolute distance between the second preset target object and the light source, A3 is the absolute distance between the third preset target object and the light source, and a4 is the absolute distance between the fourth preset target object and the light source;
when the central control module selects the self-emission radiation degree of the target object, comparing the absolute distance A between the target object and the light source with the parameters in the A0 matrix, and selecting the corresponding self-emission amplitude value according to the comparison result:
when A is less than or equal to A1, the central control module adopts self-emission radiation degree F1;
when A is more than A1 and less than or equal to A2, the central control module adopts self-emission radiance F2;
when A is more than A2 and less than or equal to A3, the central control module adopts self-emission radiance F3;
when A is more than A3 and less than or equal to A4, the central control module adopts self-emission radiance F4;
specifically, the central control module is further provided with a preset self-emission radiance adjusting coefficient matrix k0 and a preset target object patch number matrix B0;
setting a k0(k1, k2, k3 and k4) for the preset self-emission radiance adjusting coefficient matrix k0, wherein k1 is a first preset self-emission radiance adjusting coefficient, k2 is a second preset self-emission radiance adjusting coefficient, k3 is a third preset self-emission radiance adjusting coefficient, and k4 is a fourth preset self-emission radiance adjusting coefficient, and the preset self-emission radiance adjusting coefficients are gradually increased in sequence;
setting B0(B1, B2, B3, B4) for the preset target object patch number matrix B0, where B1 is a first preset target object patch number, B2 is a second preset target object patch number, B3 is a third preset target object patch number, and B4 is a fourth preset target object patch number, and the preset target object patch numbers are gradually increased in sequence;
when the central control module adjusts the preselected self-emission radiance Fi, i is 1,2,3,4, the central control module compares the target object patch number B with parameters in a B0 matrix, and selects a corresponding preset adjusting coefficient from a k0 matrix according to a comparison result to adjust the Fi:
when B is not more than B1, the central control module selects k1 to adjust Fi;
when B is more than B1 and less than or equal to B2, the central control module selects k2 to adjust Fi;
when B is more than B2 and less than or equal to B3, the central control module selects k3 to adjust Fi;
when B is more than B3 and less than or equal to B4, the central control module selects k4 to adjust Fi;
when the central control module selects kj to adjust the preselected Fi, j is 1,2,3 and 4, and the adjusted self-emission radiation degree is Fi 'and Fi' is Fi multiplied by kj.
The central control module selects a corresponding self-emission amplitude value Fi by comparing the absolute distance A between the target object and the light source with the parameters in the A0 matrix, and then selects a corresponding preset adjusting coefficient to adjust the Fi by comparing the number B of the target object patches with the parameters in the B0 matrix, so that a more accurate self-emission amplitude value is obtained, the calculation accuracy is improved, and the illumination simulation effect of the target object is further improved.
Specifically, the central control module is further provided with a preset reflectivity matrix R0, a preset target object wavelength matrix λ 0, a preset reflectivity correction coefficient matrix Y0 and a preset virtual illuminant number matrix C0;
for the preset reflectivity matrix R0, setting R0(R1, R2, R3, R4), where R1 is a first preset reflectivity, R2 is a second preset reflectivity, R3 is a third preset reflectivity, and R4 is a fourth preset reflectivity, and each preset reflectivity is gradually increased in sequence;
setting lambda 0 (lambda 1, lambda 2, lambda 3, lambda 4) for the preset target object wavelength matrix lambda 0, wherein lambda 1 is a first preset target object wavelength, lambda 2 is a second preset target object wavelength, lambda 3 is a third preset target object wavelength, and lambda 4 is a fourth preset target object wavelength, and the preset target object wavelengths are gradually increased in sequence;
when the central control module selects the reflectivity, the actual wavelength lambda of the target object is compared with the parameters in lambda 0, and the corresponding reflectivity is selected according to the comparison result:
when the lambda is less than or equal to lambda 1, the reflectivity R1 is selected as the central control module;
when the lambda is more than or equal to lambda 1 and less than or equal to lambda 2, the reflectivity R2 is selected as the central control module;
when lambda 2 is larger than lambda and smaller than or equal to lambda 3, the reflectivity R3 is selected as the central control module;
when the lambda is more than 3 and less than or equal to 4, the reflectivity R4 is selected as the central control module;
setting Y0(Y1, Y2, Y3 and Y4) for the preset reflectivity correction coefficient matrix Y0, wherein Y1 is a first preset reflectivity correction coefficient, Y2 is a second preset reflectivity correction coefficient, Y3 is a third preset reflectivity correction coefficient, Y4 is a fourth preset reflectivity correction coefficient, and the preset reflectivity correction coefficients are gradually increased in sequence;
setting C0(C1, C2, C3 and C4) for the preset virtual illuminant number matrix C0, wherein C1 is the number of first preset virtual illuminants, C2 is the number of second preset virtual illuminants, C3 is the number of third preset virtual illuminants, C4 is the number of fourth preset virtual illuminants, and the number of the preset virtual illuminants is gradually increased in sequence;
when the central control module adjusts the reflectivity Ri selected in advance, i is 1,2,3,4, the central control module compares the number C of the virtual illuminants with the parameters in the C0 matrix, and selects a corresponding preset adjustment coefficient from the Y0 matrix according to the comparison result to adjust Ri:
when C is less than or equal to C1, the central control module selects Y1 to regulate Ri;
when C is more than C1 and less than or equal to C2, the central control module selects Y2 to regulate Ri;
when C is more than C2 and less than or equal to C3, the central control module selects Y3 to regulate Ri;
when C is more than C3 and less than or equal to C4, the central control module selects Y4 to regulate Ri;
when the central control module selects Yj to adjust the preselected Ri, j is 1,2,3,4, and the adjusted reflectivity is Ri', Ri ═ Ri × Yj.
The central control module compares the actual wavelength lambda of the target object with the parameters in the lambda 0 to select the corresponding reflectivity Ri, and then compares the number C of the virtual luminous bodies with the parameters in the C0 matrix to select the corresponding preset adjusting coefficient to adjust the Ri, so that a more accurate reflectivity value is obtained, the calculation accuracy is improved, and the illumination simulation effect of the target object is further improved.
Specifically, the central control module is also provided with a preset other patch bounce quantity matrix M0 and a preset other patch bounce quantity correction coefficient matrix Z0;
setting M0(M1, M2, M3 and M4) for the matrix M0 of the preset number of the rebounding of other patches, wherein M1 is the first preset number of the rebounding of other patches, M2 is the second preset number of the rebounding of other patches, M3 is the third preset number of the rebounding of other patches, M4 is the fourth preset number of the rebounding of other patches, and the number of the rebounding of other patches is gradually increased in sequence;
when the central control module selects other patch rebounding quantities, the central control module compares the virtual illuminant number C with the parameters in the C0 matrix and selects other patch rebounding quantities according to the comparison result:
when C is less than or equal to C1, the central control module selects the rebound quantity M1 of other patches;
when C is more than C1 and less than or equal to C2, the central control module selects the rebound quantity M2 of other patches;
when C is more than C2 and less than or equal to C3, the central control module selects the rebound quantity M3 of other patches;
when C is more than C3 and less than or equal to C4, the central control module selects the rebound quantity M4 of other patches;
for the other patch bounce quantity correction coefficient matrix Z0, setting Z0(Z1, Z2, Z3, Z4), where Z1 is a first preset other patch bounce quantity correction coefficient, Z2 is a second preset other patch bounce quantity correction coefficient, Z3 is a third preset other patch bounce quantity correction coefficient, Z4 is a fourth preset other patch bounce quantity correction coefficient, and each preset other patch bounce quantity correction coefficient gradually increases in sequence;
when the central control module adjusts the pre-selected other patch rebounding quantity Mi, i is 1,2,3,4, the central control module compares the target object patch quantity B with the parameters in the B0 matrix, and selects a corresponding preset adjusting coefficient from the Z0 matrix according to the comparison result to adjust the Mi:
when B is not more than B1, the central control module selects Z1 to adjust Mi;
when B is more than B1 and less than or equal to B2, Z2 is selected by the central control module to adjust Mi;
when B is more than B2 and less than or equal to B3, Z3 is selected by the central control module to adjust Mi;
when B is more than B3 and less than or equal to B4, Z4 is selected by the central control module to adjust Mi;
when the central control module selects Zj to adjust the preselected Mi, j is 1,2,3 and 4, and the adjusted rebounding quantity of other patches is Mi ', Mi' is Mi multiplied by Zj.
The central control module compares the number C of the virtual luminous bodies with parameters in a C0 matrix to select other patch rebound numbers Mi, compares the number B of the target object patches with parameters in a B0 matrix to select corresponding preset adjustment coefficients to adjust Mi, so that more accurate values of the other patch rebound numbers are obtained, the calculation accuracy is improved, and the illumination simulation effect of the target object is further improved.
Specifically, the central control module is also provided with a preset target patch and light source included angle matrix theta 0 and a self-emission radiance secondary adjusting coefficient a0;
setting theta 0 (theta 1, theta 2, theta 3 and theta 4) for the matrix theta 0 of the included angles between the target patches and the light source, wherein theta 1 is the included angle between a first preset target patch and the light source, theta 2 is the included angle between a second preset target patch and the light source, theta 3 is the included angle between a third preset target patch and the light source, theta 4 is the included angle between a fourth preset target patch and the light source, and the included angles between the preset target patches and the light source gradually increase in sequence;
setting a0(a1, a2, a3 and a4) for the self-emission radiance secondary regulating coefficient a0, wherein a1 is a first preset self-emission radiance secondary regulating coefficient, a2 is a second preset self-emission radiance secondary regulating coefficient, a3 is a third preset self-emission radiance secondary regulating coefficient, a4 is a fourth preset self-emission radiance secondary regulating coefficient, and the preset self-emission radiance secondary regulating coefficients are gradually increased in sequence;
when the central control module adjusts the pre-selected self-emission radiance Fi, the central control module compares the included angle theta between the target patch and the light source with the parameters in the theta 0 matrix, and selects a corresponding preset adjusting coefficient from the a0 matrix according to the comparison result to adjust the Fi:
when theta is not less than theta 1, the central control module selects a1 to adjust Fi;
when theta 1 is larger than theta and is not larger than theta 2, the central control module selects a2 to adjust Fi;
when theta 2 is larger than theta and smaller than or equal to theta 3, the central control module selects a3 to adjust Fi;
when theta 3 is larger than theta and is not larger than theta 4, the central control module selects a4 to adjust Fi;
when the central control module selects aj to adjust the preselected Fi, j is 1,2,3 and 4, the adjusted self-emission radiation degree is Fi, and Fi is Fi' × aj.
Specifically, the central control module is also provided with a matrix beta 0 for presetting the average included angle between other patches and the light source, a matrix P0 for the radiation degree of rebounding of other patches and a matrix b0 for the correction coefficient of the radiation degree of rebounding of other patches;
setting beta 0 (beta 1, beta 2, beta 3, beta 4) for the matrix beta 0 of the average included angles between the other patches and the light source, wherein beta 1 is a first preset average included angle between the other patches and the light source, beta 2 is a second preset average included angle between the other patches and the light source, beta 3 is a third preset average included angle between the other patches and the light source, beta 4 is a fourth preset average included angle between the other patches and the light source, and the preset average included angles between the other patches and the light source gradually increase in sequence;
for the other patch rebound radiance P0, setting P0(P1, P2, P3, P4), where P1 is a first preset other patch rebound radiance, P2 is a second preset other patch rebound radiance, P3 is a third preset other patch rebound radiance, P4 is a fourth preset other patch rebound radiance, and the preset other patch rebound radiances gradually increase in sequence, and setting P to M × R × F;
b0(b1, b2, b3 and b4) is set for the other patch rebound radiance correction coefficient b0, wherein b1 is a first preset other patch rebound radiance correction coefficient, b2 is a second preset other patch rebound radiance correction coefficient, b3 is a third preset other patch rebound radiance correction coefficient, b4 is a fourth preset other patch rebound radiance correction coefficient, and the preset other patch rebound radiance correction coefficients gradually increase in sequence;
when the central control module adjusts the rebound radiance Pi of other pre-selected patches, i is 1,2,3,4, the central control module compares the average included angle beta between the other patches and the light source with the parameters in the beta 0 matrix, and selects a corresponding preset adjusting coefficient from the b0 matrix according to the comparison result to adjust Pi:
when beta is not more than beta 1, b1 is selected by the central control module to adjust Pi;
when beta 1 is larger than beta and is not larger than beta 2, the central control module selects b2 to regulate Pi;
when beta 2 is more than beta and less than or equal to beta 3, the central control module selects b3 to adjust Pi;
when the beta 3 is larger than the theta and is not larger than the beta 4, the central control module selects b4 to adjust Pi;
when the central control module selects bj to adjust the preselected Pi, j is 1,2,3 and 4, and the adjusted rebound radiances of other patches are Pi ', Pi' is Pi × bj.
Specifically, in said step 4 calculating the shape factor of each pair of patches, a half-cube algorithm is used, while discontinuous meshing, adaptive and hierarchical subdivision and clustering are used.
Specifically, when the numerical solution of the system of the linear equation system of the radiometric degree is obtained in step 5, the iterative method used is the gaussian seidel iterative method.
In order that the objects and advantages of the invention will be more readily apparent, the invention is further described below in connection with a simulation system; it should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 2 is a block diagram of a system for simulating global illumination at an intelligent device based on a game according to the present invention.
A system for simulating global lighting at a smart device based on a game, comprising:
a setting unit for setting a virtual light-emitting body position and light source information; the device is used for setting the positions and distribution of the diffuse reflection detection points; the system is used for setting the position and the precision of the specular reflection detection point; the method is used for adjusting the accuracy of pre-calculated illumination data, calculating time consumption, storage precision and compression mode.
And the calculating unit is used for calculating the result of the global illumination in an off-line manner according to the parameters of the setting device and the method of the first aspect.
The storage unit is used for storing the global light diffuse reflection component of the static object by using the two-dimensional map; storing the calculation result of the diffuse reflection detection point in a user-defined binary format; the cubemap stores the specular reflection result of the detection point and automatically calculates mipmaps; all data is compressed according to the set device parameters.
And the display unit loads the pre-calculated global illumination components of all parts during running and displays the global illumination result of the scene in real time.
Wherein, set up the unit, include:
the first setting module is used for setting the direct light emission density, the unit is a strip/square unit, and a more accurate result can be obtained by higher density, but the generation time of the computing device is prolonged;
the second setting module is used for setting the emission density of the rebound light, the unit is a strip/square unit, more accurate results can be obtained by higher density, but the generation time of the computing device can be quickly prolonged;
the third setting module is used for calculating the generation time of the device to be longer as the rebound times of the indirect light are larger;
the fourth setting module is used for carrying out noise reduction operation on the intermediate result of the off-line calculation by the calculating device;
the fifth setting module is used for setting the number of the illumination paste image pixels occupied by 1 square unit of a game scene, the larger the number of the illumination paste image pixels is, the more accurate the result stored by the storage device is, but the longer the calculation time is, the larger the storage space is;
a sixth setting module, wherein the upper limit of the size of 1 illumination map is divided into additional maps when the exceeding part is divided;
and a seventh setting module for lighting the data compression format of the map.
A display unit comprising:
the first display module loads a corresponding illumination map according to scene pre-calculated information, sets the illumination map to a rendering component of an object, and is used for calculating the diffuse reflection component of global light during coloring;
the second display module is used for screening a group of probe data near a corresponding space from the pre-calculated and stored probe data according to the position information and the bounding box information, interpolating the probe data, setting the probe data to a rendering component of the dynamic object, and calculating the diffuse reflection component of the global light during coloring;
and the third display module is used for collecting the current position information of the object by the display device according to the global light component reflected by the mirror surface, determining the selected environment probe data and allowing interpolation between the two probe data at most.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention; various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A method for simulating global illumination on an intelligent device based on a game is characterized by comprising the following steps:
step 1: acquiring a target object to be processed in a game scene;
step 2: acquiring all virtual luminous body information in a game scene;
and step 3: dividing the target object into a plurality of continuous patches according to the position of the target object in the game scene and the grid information, wherein the patches are triangular or convex tetrahedrons, and calculating the radiance value of each patch;
and 4, step 4: calculating a shape factor for each pair of patches;
and 5: solving the numerical solution of a radiation degree linear equation system, and calculating the radiation rate of each patch;
step 6: storing a diffuse reflection part in a solving result of the static object as a two-dimensional map, rgbm code; storing the diffuse reflection part of the solution result of the position of the detection point, and coding the diffuse reflection part into a spherical harmonic form; storing the reflection map of the detection point as cubemap and calculating mipmaps;
and 7: using an equation of relating the average spontaneous emission radiance and the reflectivity on all the patches to the average total radiance, and converting the obtained radiance result into the display color of the surface after solving;
the steps 1 to 7 are all carried out in a simulation system, the simulation system is connected with a central control module through wireless, the central control module is used for controlling the operation of each unit, so that the operation processes of the steps 1 to 7 are controlled, and a matrix is arranged in the central control module;
in the step 3, for each patch, self-emission radiance and reflectivity are given, and the reflectivity is set to be a number between 0 and 1; the total radiance of a patch comprises the radiance received through any number of bounces of other patches in the scene and the radiance of spontaneous emission, and the central control module is provided with a total radiance value Q, and the total radiance value Q is set to be = F + M × R × F;
the central control module is internally provided with a preset self-emission radiance matrix F0 and a preset absolute distance matrix A0 of a target object and a light source;
setting F0(F1, F2, F3 and F4) for the preset self-emission radiance matrix F0, wherein F1 is a first preset self-emission radiance, F2 is a second preset self-emission radiance, F3 is a third preset self-emission radiance, F4 is a fourth preset self-emission radiance, and the preset self-emission radiance is gradually increased in sequence;
setting a0(a1, a2, A3, a4) for the absolute distance matrix a0 of the preset target objects and the light source, wherein a1 is the absolute distance between the first preset target object and the light source, a2 is the absolute distance between the second preset target object and the light source, A3 is the absolute distance between the third preset target object and the light source, and a4 is the absolute distance between the fourth preset target object and the light source;
when the central control module selects the self-emission radiation degree of the target object, comparing the absolute distance A between the target object and the light source with the parameters in the A0 matrix, and selecting the corresponding self-emission amplitude value according to the comparison result:
when A is less than or equal to A1, the central control module adopts self-emission radiation degree F1;
when A is more than A1 and less than or equal to A2, the central control module adopts self-emission radiance F2;
when A is more than A2 and less than or equal to A3, the central control module adopts self-emission radiance F3;
when A is greater than A3 and less than or equal to A4, the central control module adopts self-emission radiance F4.
2. The game-based method for simulating global illumination at a smart device according to claim 1, wherein a preset self-emission radiance adjusting coefficient matrix k0 and a preset target object patch number matrix B0 are further provided in the central control module;
setting a k0(k1, k2, k3 and k4) for the preset self-emission radiance adjusting coefficient matrix k0, wherein k1 is a first preset self-emission radiance adjusting coefficient, k2 is a second preset self-emission radiance adjusting coefficient, k3 is a third preset self-emission radiance adjusting coefficient, and k4 is a fourth preset self-emission radiance adjusting coefficient, and the preset self-emission radiance adjusting coefficients are gradually increased in sequence;
setting B0(B1, B2, B3, B4) for the preset target object patch number matrix B0, where B1 is a first preset target object patch number, B2 is a second preset target object patch number, B3 is a third preset target object patch number, and B4 is a fourth preset target object patch number, and the preset target object patch numbers are gradually increased in sequence;
when the central control module adjusts the pre-selected self-emission radiance Fi, i =1,2,3,4, the central control module compares the target object patch number B with parameters in a B0 matrix, and selects a corresponding preset adjusting coefficient from a k0 matrix according to a comparison result to adjust Fi:
when B is not more than B1, the central control module selects k1 to adjust Fi;
when B is more than B1 and less than or equal to B2, the central control module selects k2 to adjust Fi;
when B is more than B2 and less than or equal to B3, the central control module selects k3 to adjust Fi;
when B is more than B3 and less than or equal to B4, the central control module selects k4 to adjust Fi;
when the central control module selects kj to adjust the preselected Fi, j =1,2,3 and 4, and the adjusted self-emission radiation degree is Fi 'and Fi' = Fi multiplied by kj.
3. The method for simulating global illumination on a smart device based on a game as claimed in claim 2, wherein the central control module is further provided with a preset reflectivity matrix R0, a preset target object wavelength matrix λ 0, a preset reflectivity correction coefficient matrix Y0 and a preset virtual illuminant number matrix C0;
for the preset reflectivity matrix R0, setting R0(R1, R2, R3, R4), where R1 is a first preset reflectivity, R2 is a second preset reflectivity, R3 is a third preset reflectivity, and R4 is a fourth preset reflectivity, and each preset reflectivity is gradually increased in sequence;
setting lambda 0 (lambda 1, lambda 2, lambda 3, lambda 4) for the preset target object wavelength matrix lambda 0, wherein lambda 1 is a first preset target object wavelength, lambda 2 is a second preset target object wavelength, lambda 3 is a third preset target object wavelength, and lambda 4 is a fourth preset target object wavelength, and the preset target object wavelengths are gradually increased in sequence;
when the central control module selects the reflectivity, the actual wavelength lambda of the target object is compared with the parameters in lambda 0, and the corresponding reflectivity is selected according to the comparison result:
when the lambda is less than or equal to lambda 1, the reflectivity R1 is selected as the central control module;
when the lambda is more than or equal to lambda 1 and less than or equal to lambda 2, the reflectivity R2 is selected as the central control module;
when lambda 2 is larger than lambda and smaller than or equal to lambda 3, the reflectivity R3 is selected as the central control module;
when the lambda is more than 3 and less than or equal to 4, the reflectivity R4 is selected as the central control module;
setting Y0(Y1, Y2, Y3 and Y4) for the preset reflectivity correction coefficient matrix Y0, wherein Y1 is a first preset reflectivity correction coefficient, Y2 is a second preset reflectivity correction coefficient, Y3 is a third preset reflectivity correction coefficient, Y4 is a fourth preset reflectivity correction coefficient, and the preset reflectivity correction coefficients are gradually increased in sequence;
setting C0(C1, C2, C3 and C4) for the preset virtual illuminant number matrix C0, wherein C1 is the number of first preset virtual illuminants, C2 is the number of second preset virtual illuminants, C3 is the number of third preset virtual illuminants, C4 is the number of fourth preset virtual illuminants, and the number of the preset virtual illuminants is gradually increased in sequence;
when the central control module adjusts the reflectivity Ri selected in advance, i =1,2,3,4, the central control module compares the number C of the virtual illuminants with the parameters in the C0 matrix, and selects a corresponding preset adjustment coefficient from the Y0 matrix according to the comparison result to adjust Ri:
when C is less than or equal to C1, the central control module selects Y1 to regulate Ri;
when C is more than C1 and less than or equal to C2, the central control module selects Y2 to regulate Ri;
when C is more than C2 and less than or equal to C3, the central control module selects Y3 to regulate Ri;
when C is more than C3 and less than or equal to C4, the central control module selects Y4 to regulate Ri;
when the central control module selects Yj to adjust the preselected Ri, j =1,2,3,4, and the adjusted reflectivity is Ri ', Ri' = Ri × Yj.
4. The method for simulating global illumination on a smart device based on games as claimed in claim 3, wherein the central control module is further configured with a preset other patch bounce quantity matrix M0 and a preset other patch bounce quantity correction coefficient matrix Z0;
setting M0(M1, M2, M3 and M4) for the matrix M0 of the preset number of the rebounding of other patches, wherein M1 is the first preset number of the rebounding of other patches, M2 is the second preset number of the rebounding of other patches, M3 is the third preset number of the rebounding of other patches, M4 is the fourth preset number of the rebounding of other patches, and the number of the rebounding of other patches is gradually increased in sequence;
when the central control module selects other patch rebounding quantities, the central control module compares the virtual illuminant number C with the parameters in the C0 matrix and selects other patch rebounding quantities according to the comparison result:
when C is less than or equal to C1, the central control module selects the rebound quantity M1 of other patches;
when C is more than C1 and less than or equal to C2, the central control module selects the rebound quantity M2 of other patches;
when C is more than C2 and less than or equal to C3, the central control module selects the rebound quantity M3 of other patches;
when C is more than C3 and less than or equal to C4, the central control module selects the rebound quantity M4 of other patches;
for the other patch bounce quantity correction coefficient matrix Z0, setting Z0(Z1, Z2, Z3, Z4), where Z1 is a first preset other patch bounce quantity correction coefficient, Z2 is a second preset other patch bounce quantity correction coefficient, Z3 is a third preset other patch bounce quantity correction coefficient, Z4 is a fourth preset other patch bounce quantity correction coefficient, and each preset other patch bounce quantity correction coefficient gradually increases in sequence;
when the central control module adjusts the pre-selected other patch bounce quantity Mi, i =1,2,3,4, the central control module compares the target object patch quantity B with parameters in the B0 matrix, and selects a corresponding preset adjustment coefficient from the Z0 matrix according to a comparison result to adjust Mi:
when B is not more than B1, the central control module selects Z1 to adjust Mi;
when B is more than B1 and less than or equal to B2, Z2 is selected by the central control module to adjust Mi;
when B is more than B2 and less than or equal to B3, Z3 is selected by the central control module to adjust Mi;
when B is more than B3 and less than or equal to B4, Z4 is selected by the central control module to adjust Mi;
when the central control module selects Zj to adjust the preselected Mi, j =1,2,3,4, and the adjusted rebounding quantity of other patches is Mi ', Mi' = Mi × Zj.
5. The game-based method for simulating global illumination in intelligent equipment according to claim 1, wherein a preset target patch-to-light source included angle matrix θ 0 and a self-emission radiance secondary adjustment coefficient a0 are further arranged in the central control module;
setting theta 0 (theta 1, theta 2, theta 3 and theta 4) for the matrix theta 0 of the included angles between the target patches and the light source, wherein theta 1 is the included angle between a first preset target patch and the light source, theta 2 is the included angle between a second preset target patch and the light source, theta 3 is the included angle between a third preset target patch and the light source, theta 4 is the included angle between a fourth preset target patch and the light source, and the included angles between the preset target patches and the light source gradually increase in sequence;
setting a0(a1, a2, a3 and a4) for the self-emission radiance secondary regulating coefficient a0, wherein a1 is a first preset self-emission radiance secondary regulating coefficient, a2 is a second preset self-emission radiance secondary regulating coefficient, a3 is a third preset self-emission radiance secondary regulating coefficient, a4 is a fourth preset self-emission radiance secondary regulating coefficient, and the preset self-emission radiance secondary regulating coefficients are gradually increased in sequence;
when the central control module adjusts the pre-selected self-emission radiance Fi, the central control module compares the included angle theta between the target patch and the light source with the parameters in the theta 0 matrix, and selects a corresponding preset adjusting coefficient from the a0 matrix according to the comparison result to adjust the Fi:
when theta is not less than theta 1, the central control module selects a1 to adjust Fi;
when theta 1 is larger than theta and is not larger than theta 2, the central control module selects a2 to adjust Fi;
when theta 2 is larger than theta and smaller than or equal to theta 3, the central control module selects a3 to adjust Fi;
when theta 3 is larger than theta and is not larger than theta 4, the central control module selects a4 to adjust Fi;
when the central control module selects aj to adjust the preselected Fi, j =1,2,3,4, the adjusted self-emission radiation degree is Fi ", and Fi" = Fi' × aj.
6. The method for simulating global illumination on intelligent equipment based on games as claimed in claim 5, wherein the central control module is further provided with a preset other patch-to-light source average included angle matrix β 0, other patch bounce radiance matrix P0 and other patch bounce radiance correction coefficient matrix b 0;
setting beta 0 (beta 1, beta 2, beta 3, beta 4) for the matrix beta 0 of the average included angles between the other patches and the light source, wherein beta 1 is a first preset average included angle between the other patches and the light source, beta 2 is a second preset average included angle between the other patches and the light source, beta 3 is a third preset average included angle between the other patches and the light source, beta 4 is a fourth preset average included angle between the other patches and the light source, and the preset average included angles between the other patches and the light source gradually increase in sequence;
for the other patch bounce radiance P0, setting P0(P1, P2, P3, P4), where P1 is a first preset other patch bounce radiance, P2 is a second preset other patch bounce radiance, P3 is a third preset other patch bounce radiance, P4 is a fourth preset other patch bounce radiance, and the preset other patch bounce radiances gradually increase in sequence, and setting P = M × R × F;
b0(b1, b2, b3 and b4) is set for the other patch rebound radiance correction coefficient b0, wherein b1 is a first preset other patch rebound radiance correction coefficient, b2 is a second preset other patch rebound radiance correction coefficient, b3 is a third preset other patch rebound radiance correction coefficient, b4 is a fourth preset other patch rebound radiance correction coefficient, and the preset other patch rebound radiance correction coefficients gradually increase in sequence;
when the central control module adjusts the pre-selected rebound radiance Pi of other patches, i =1,2,3,4, the central control module compares the average included angle beta between the other patches and the light source with the parameters in the beta 0 matrix, and selects a corresponding preset adjusting coefficient from the b0 matrix according to the comparison result to adjust Pi:
when beta is not more than beta 1, b1 is selected by the central control module to adjust Pi;
when beta 1 is larger than beta and is not larger than beta 2, the central control module selects b2 to regulate Pi;
when beta 2 is more than beta and less than or equal to beta 3, the central control module selects b3 to adjust Pi;
when the beta 3 is larger than the theta and is not larger than the beta 4, the central control module selects b4 to adjust Pi;
when the central control module selects bj to adjust the preselected Pi, j =1,2,3,4, and the adjusted rebound radiance of other patches is Pi ', Pi' = Pi × bj.
7. A game-based method for simulating global lighting at a smart device according to claim 1, wherein in said step 4 calculating the form factor of each pair of tiles, a half-cube algorithm is used, while using discontinuous meshing, adaptive and hierarchical segmentation and clustering.
8. The game-based method for simulating global illumination at a smart device according to claim 1, wherein the iterative method used in solving the numerical solution of the system of radiance linear equations in the step 5 is Gauss Seidel iterative method.
CN202011590514.9A 2020-12-29 2020-12-29 Method for simulating global illumination on intelligent equipment based on game Active CN112604278B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011590514.9A CN112604278B (en) 2020-12-29 2020-12-29 Method for simulating global illumination on intelligent equipment based on game

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011590514.9A CN112604278B (en) 2020-12-29 2020-12-29 Method for simulating global illumination on intelligent equipment based on game

Publications (2)

Publication Number Publication Date
CN112604278A CN112604278A (en) 2021-04-06
CN112604278B true CN112604278B (en) 2021-09-17

Family

ID=75248647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011590514.9A Active CN112604278B (en) 2020-12-29 2020-12-29 Method for simulating global illumination on intelligent equipment based on game

Country Status (1)

Country Link
CN (1) CN112604278B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1916968A (en) * 2006-09-01 2007-02-21 上海大学 Setting up method for 3D virtual reality by using matrix to realize simulation of irradiation from ambient light
CN101606181A (en) * 2006-07-24 2009-12-16 迈克尔·邦内尔 Be used for the system and method that real-time rendering has the deformable geometry of global illumination
CN102819860A (en) * 2012-08-16 2012-12-12 北京航空航天大学 Real-time global illumination method for sub-surface scattering object on the basis of radiosity
CN104157004A (en) * 2014-04-30 2014-11-19 常州赞云软件科技有限公司 Method for computing radiosity lighting through fusion of GPU and CPU
CN104167011A (en) * 2014-07-30 2014-11-26 北京航空航天大学 Micro-structure surface global lighting drawing method based on direction light radiation intensity
CN106780708A (en) * 2016-11-23 2017-05-31 北京三体高创科技有限公司 A kind of 3D model rendering method and system based on simulation refraction and global illumination
CN106780709A (en) * 2016-12-02 2017-05-31 腾讯科技(深圳)有限公司 A kind of method and device for determining global illumination information
CN107452048A (en) * 2016-05-30 2017-12-08 网易(杭州)网络有限公司 The computational methods and device of global illumination
CN109364481A (en) * 2018-10-30 2019-02-22 网易(杭州)网络有限公司 Real-time global illumination method, apparatus, medium and electronic equipment in game
WO2020006505A1 (en) * 2018-06-29 2020-01-02 Baobab Studios Inc. Systems and methods for generating dynamic real-time high-quality lighting for digital animation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7061489B2 (en) * 2003-08-15 2006-06-13 Microsoft Corporation Precomputed radiance transfer for rendering objects

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101606181A (en) * 2006-07-24 2009-12-16 迈克尔·邦内尔 Be used for the system and method that real-time rendering has the deformable geometry of global illumination
CN1916968A (en) * 2006-09-01 2007-02-21 上海大学 Setting up method for 3D virtual reality by using matrix to realize simulation of irradiation from ambient light
CN102819860A (en) * 2012-08-16 2012-12-12 北京航空航天大学 Real-time global illumination method for sub-surface scattering object on the basis of radiosity
CN104157004A (en) * 2014-04-30 2014-11-19 常州赞云软件科技有限公司 Method for computing radiosity lighting through fusion of GPU and CPU
CN104167011A (en) * 2014-07-30 2014-11-26 北京航空航天大学 Micro-structure surface global lighting drawing method based on direction light radiation intensity
CN107452048A (en) * 2016-05-30 2017-12-08 网易(杭州)网络有限公司 The computational methods and device of global illumination
CN106780708A (en) * 2016-11-23 2017-05-31 北京三体高创科技有限公司 A kind of 3D model rendering method and system based on simulation refraction and global illumination
CN106780709A (en) * 2016-12-02 2017-05-31 腾讯科技(深圳)有限公司 A kind of method and device for determining global illumination information
WO2020006505A1 (en) * 2018-06-29 2020-01-02 Baobab Studios Inc. Systems and methods for generating dynamic real-time high-quality lighting for digital animation
CN109364481A (en) * 2018-10-30 2019-02-22 网易(杭州)网络有限公司 Real-time global illumination method, apparatus, medium and electronic equipment in game

Also Published As

Publication number Publication date
CN112604278A (en) 2021-04-06

Similar Documents

Publication Publication Date Title
CN112755535B (en) Illumination rendering method and device, storage medium and computer equipment
CN114419240B (en) Illumination rendering method and device, computer equipment and storage medium
US20060077208A1 (en) Method of creating texture capable of continuous mapping
CN112365572B (en) Rendering method based on surface subdivision and related products thereof
CN108510562B (en) Digital camouflage pattern generation method based on image fractal texture
CN111445563B (en) Image generation method and related device
CN114139250A (en) Automatic light distribution method, device, equipment and storage medium based on illusion engine
CN114693856B (en) Object generation method and device, computer equipment and storage medium
CN107679150B (en) Mass three-dimensional data rapid scheduling method
CN106355634A (en) Sun simulating method and device
CN112604278B (en) Method for simulating global illumination on intelligent equipment based on game
CN108230430A (en) The processing method and processing device of cloud layer shade figure
Boulanger et al. Rendering grass in real time with dynamic lighting
CN107767458B (en) Irregular triangulation network curved surface geometric topology consistency analysis method and system
CN112473135B (en) Real-time illumination simulation method, device and equipment for mobile game and storage medium
CN112560326B (en) Method and device for determining pressure field
CN114139249A (en) Automatic light distribution method and device based on illusion engine and electronic equipment
CN115035231A (en) Shadow baking method, shadow baking device, electronic apparatus, and storage medium
CN112884876B (en) Global illumination method supporting circadian alternation and computer-readable storage medium
Marsh et al. Towards dynamic real-time daylight simulation
CN111729303B (en) Large map baking and cutting method and restoration method
CN117475053A (en) Grassland rendering method and device
CN117292038B (en) Rendering method, system, equipment and storage medium for sea surface model
CN117197276A (en) Grassland rendering method and device
Wu et al. An interactive design method for realistic fruit rot modeling and simulation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant