CN104268923A - Illumination method based on picture level images - Google Patents

Illumination method based on picture level images Download PDF

Info

Publication number
CN104268923A
CN104268923A CN201410450058.6A CN201410450058A CN104268923A CN 104268923 A CN104268923 A CN 104268923A CN 201410450058 A CN201410450058 A CN 201410450058A CN 104268923 A CN104268923 A CN 104268923A
Authority
CN
China
Prior art keywords
theta
phi
function
illumination
cos
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410450058.6A
Other languages
Chinese (zh)
Inventor
张翼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Of Ancient India Day Infotech Share Co Ltd In Wuxi
Original Assignee
Of Ancient India Day Infotech Share Co Ltd In Wuxi
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 Of Ancient India Day Infotech Share Co Ltd In Wuxi filed Critical Of Ancient India Day Infotech Share Co Ltd In Wuxi
Priority to CN201410450058.6A priority Critical patent/CN104268923A/en
Publication of CN104268923A publication Critical patent/CN104268923A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/506Illumination models

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

The invention discloses an illumination method based on picture level images. The method mainly includes the steps that an illumination equation is resolved through a particular solution Legendre polynomial in a Legendre equation; spherical harmonic coefficients are utilized, a resolved function is projected through a spherical harmonic function, and then the restored illumination equation is obtained; the illumination value of an environment map and the color value of a map are multiplied, and the obtained result is the final pixel color value. According to the illumination method based on the picture level images, the defects that in the prior art, the image processing difficulty is large, the image quality is poor, and the simulation effect is not good can be overcome, and the advantages that the image processing difficulty is small, the image quality is good, and the simulation effect is good are achieved.

Description

A kind of illumination method based on photo level image
Technical field
The present invention relates to field of Computer Graphics, particularly, relate to a kind of illumination method based on photo level image.
Background technology
Along with the development of computer graphics techniques, integral equation and numerical operation are applied to image procossing and obtain very ten-strike, and the treatment technology of computer graphics and graph image receives publicity, picture can be realized by these technology and play up style really, need to provide a kind of photo level Rendering, in this, technology is to the light in three-dimensional scenic, material, pinup picture has this very high requirement, while entirety holds picture, more emphasize the understanding to microworld, stress the performance of texture and details, by deep performance, real picture effect the same as photo can be reached.
Utilize panorama sketch in scene as computing machine texture on the model of Practical computer teaching at present, demonstrate the natural surface image of object gloss, and add that the illumination of the image of high dynamic range becomes the focus of current research, also have some based on Monte Carlo integral and calculating image-based lighting, though the effect that these illumination can be done well, but simulating reality that can be real also has very large gap.
Realizing in process of the present invention, inventor finding at least to exist in prior art that image procossing difficulty is large, poor image quality and the defect such as simulate effect is bad.
Summary of the invention
The object of the invention is to, for the problems referred to above, propose a kind of illumination method based on photo level image, to realize the advantage that image procossing difficulty is little, picture quality good and simulate effect is good.
For achieving the above object, the technical solution used in the present invention is: a kind of illumination method based on photo level image, mainly comprises:
A, a particular solution Legendre polynomial in Legendre equation is utilized to carry out decomposition computation to illumination equation;
B, utilize spherical harmonic coefficient, the function of above-mentioned decomposition is projected through spheric harmonic function, obtain the illumination equation after reducing;
C, be multiplied with the color value of the pinup picture of self by the illumination value by Environment, acquired results is the color value of final pixel.
Further, in step a, described illumination equation is:
E=∫L(ω)(n·ω)dω (1);
Wherein, E represents the illumination value affected by Environment in overall direction, and each pixel is based on such integral formula computing, and L (ω) is that reflected light is from the brightness each incident ray ω, n ω represents the projection of normal in ω direction, and this value is for being denoted as cos θ usually.
Further, described step a is specially:
A1, based on formula (1), ω direction to be expressed as (X', Y', Z'), that is:
X ′ = sin θ i cos Φ i Y ′ = sin θ i sin Φ i Z ′ = cos θ i ;
Wherein, θ ibe respectively cartesian coordinate system Z axis angle, Φ ifor the angle of cartesian coordinate system X-axis;
A2, realize based on above-mentioned angle the conversion that Cartesian coordinates is tied to spheric coordinate system.
Further, described step a1, specifically comprises:
For first polynomial decomposition L (ω) project to spheric harmonic function for L'(θ i, Φ i);
According to Legendre polynomial, the L (ω) of formula (1) is above decomposed into:
L ′ ( θ i , Φ i ) = Σ l , m L lm Y lm ( θ i , Φ i ) - - - ( 2 )
Wherein L lmbasis function and Y lmtwo polynomial expressions of the component (projection function) of basis function;
And basis function L lmcan be expressed as:
C 1 = L lm = ∫ θ i = 0 π ∫ Φ i 2 π L ( θ i , Φ i ) Y lm ( θ i , Φ i ) sin θ i d θ i d Φ i - - - ( 3 )
Based on formula (3), can find out that then two polynomial convolution algorithms carry out to the result obtained the constant C1 that integration is fixed, C2, C3 and above-mentioned L lmfunction can be numerous;
(2) obtain spherical harmonic coefficient (zoom factor) by the humorous conversion of ball
Based on above-mentioned L lmdefined by spheric harmonic function, as l=0, spheric harmonic function can be used for approximate ambient lighting; This spheric harmonic function is:
Y lm ( &theta; i , &Phi; i ) = 2 P l m cos ( m&Phi; i ) Q l m cos &theta; i , m > 0 2 P l m sin ( - m&Phi; i ) Q l m cos &theta; i , m < 0 P l 0 Q l 0 cos &theta; i , m = 0 ; - - - ( 4 )
And for the zoom factor of spheric harmonic function, Q is corresponding with Legendre polynomial;
Above-mentioned Q is corresponding with Legendre polynomial, and it has three attributes (5) (6) (7), can be calculated the Legendre's value under each index by these three attribute equations:
( 1 - m ) Q l m = x ( 2 l - 1 ) Q l - 1 m - ( l + m - 1 ) Q l - 2 m - - - ( 5 )
Q m m = ( - 1 ) m ( 2 m - 1 ) ! ! ( 1 - x 2 ) m 2 - - - ( 6 )
Q m + 1 m = x ( 2 m + 1 ) Q m m - - - ( 7 )
There is P and Q of above-mentioned precomputation just can projection function Y lmi, Φ i) based under spheric coordinate system, obtain after applying this Factoring Polynomials;
According to equation (1) another polynomial expression ∫ cos θ id θ iprojecting to spheric harmonic function is A' l:
Definition A (θ) is the polynomial expression about θ, and gets A (θ)>=0, and a definition coefficient A l:
A ( &theta; ) = max [ cos &theta; i , 0 ] = &Sigma; l A l Y lm ( &theta; i ) - - - ( 8 )
A l = 2 &pi; &Integral; 0 &pi; 2 Y n , 0 ( &theta; i ) cos &theta; i sin &theta; i d &theta; i - - - ( 9 )
Work as n=1: A l = &pi; 3 ;
Work as n>1, and when being odd number, A l=0;
When n is even number, A l = 2 &pi; 2 n + 1 4 &pi; ( - 1 ) n 2 - 1 ( n + 2 ) ( n - 1 ) &times; [ n ! 2 n ( n ! / 2 ) 2 ]
The variables A that then definition one is new ' l;
A' 0=2.094395 A' l=2.094395 A' 2=0.785398;
(4) what final original function can be similar to regard as:
L &prime; ( &theta; i , &Phi; i ) = &Sigma; l , m A &prime; l L lm Y lm ( &theta; i , &Phi; i )
Order E ( &theta; i , &Phi; i ) = &Sigma; l , m A &prime; l L lm Y lm ( &theta; i , &Phi; i ) - - - ( 10 )
Further, described step b, specifically comprises:
First according to formula (3), calculate:
L 00,L 10,L 1-1,L 11,L 20,L 2-1,L 2-2,L 21,L 22
Then substitute into formula (10), obtain:
E 00,E 10,E 1-1,E 11,E 20,E 2-1,E 2-2,E 21,E 22
Like this, each pixel only needs to calculate preset times " projection ", obtains original function E for needing, and based on the C1 of above-mentioned calculating, C2, C3 convolution value and the corresponding projection function sum that is multiplied is approximate original function.
Further, described step c, specifically comprises:
The result that illumination value by Environment is multiplied with the color value of the pinup picture of self is obtained the color value of final pixel, then obtaining each pixel final color value in scene is:
B=ρE;
Then B to obtain in scene actual illumination value, ρ be the color value of pinup picture namely: the U of corresponding vertex, V colouring information.
The illumination method based on photo level image of various embodiments of the present invention, owing to mainly comprising: utilize a particular solution Legendre polynomial in Legendre equation to carry out decomposition computation to illumination equation; Utilize spherical harmonic coefficient, the function of above-mentioned decomposition is projected through spheric harmonic function, obtain the illumination equation after reducing; Be multiplied with the color value of the pinup picture of self by illumination value by Environment, acquired results is the color value of final pixel; Thus can overcome that image procossing difficulty in prior art is large, poor image quality and the bad defect of simulate effect, to realize the advantage that image procossing difficulty is little, picture quality good and simulate effect is good.
Other features and advantages of the present invention will be set forth in the following description, and, partly become apparent from instructions, or understand by implementing the present invention.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for instructions, together with embodiments of the present invention for explaining the present invention, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 be in the illumination method Scene that the present invention is based on photo level image certain any corresponding hemisphere face of pixel normal direction as the schematic diagram of spheric coordinate system;
Polynomial L (ω) decomposes in the illumination method that the present invention is based on photo level image to project to spheric harmonic function curve map by Fig. 2;
Fig. 3 obtains approximate antiderivative curve map through spheric harmonic function projection after Factoring Polynomials in the illumination method that the present invention is based on photo level image;
Fig. 4 is the process flow diagram of the illumination method that the present invention is based on photo level image.
Embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein is only for instruction and explanation of the present invention, is not intended to limit the present invention.
According to the embodiment of the present invention, as Figure 1-Figure 4, provide a kind of illumination method based on photo level image, relate to the illumination algorithm reaching photo level surround lighting.Should, based on the illumination method of photo level image, be the technology based on IBL, this technology well can realize other lighting effect of scene display movie-level.
In the scene of game world, scene of game is divided into N number of cuboid box to be come in render scenes, each cubical face can be subject to a texture pinup picture of scene around, model material in cube inside also along with the texture mapping of these illumination is visually changed, these pinup pictures we become cube pinup picture.We main post-processing object are, by pixel calculate color value around this pixel on this pixel shader affect accumulative, we represent relation between them, as shown in illumination equation formulations (1) with integration usually.
E=∫L(ω)(n·ω)dω; (1)
Wherein, E represents the illumination value affected by Environment in overall direction, and each pixel is based on such integral formula computing, L (ω) be reflected light from the brightness each incident ray ω, n ω represents the projection of normal in ω direction.Usually this value is for being denoted as: cos θ.
Based in the ambient lighting of this image, incident light can obtain by Environment is approximate, and each pixel light needs Environment to superpose according to a large amount of integral operationes of integration, but this operation efficiency is poor, can not real-time rendering, and picture effect is poor.
Based on the thought of above-mentioned formula (1), ω represents any direction, to the integration in all ω directions.Such integral result can not calculate.We the present invention improves formula (1) exactly.Obtain the integrating effect of the illumination in approximate computable all ω directions.As shown in Figure 1.
First: carry out Legendre polynomial based on the illumination equation formulations (1) by pixel and decompose the equation after illumination
Legendre polynomial is one of most important function set in mathematical physics, have a wide range of applications in mathematical physics solves, generally be applied to the aspects such as elliptic function, geometry, uranology, in general, this polynomial expression derivation is very complicated, and the present invention to utilize in Legendre equation a particular solution Legendre polynomial to carry out decomposition computation to illumination integration and characteristic in conjunction with spheric harmonic function participates in calculating; An important characteristic is had: the integration of product on spherical space of two functions equals the dot product of spherical harmonic coefficient vector, and a, b vector is respectively spherical harmonic coefficient vector for spheric harmonic function; That is:
&Integral; f ( x ) g ( x ) dx = &Integral; f &prime; ( x ) g &prime; ( x ) = a &RightArrow; &CenterDot; b &RightArrow; ;
Also analyze by Founer senes thought simultaneously, any periodic function can represent with sine function and cosine function, general title they be orthogonal basis function, applying in actual computation, life cycle function can approach original function with the linear combination of a series of trigonometric function; And the basis function used in spheric harmonic function conversion is exactly the humorous basis function of ball.
And orthogonal basis function can be defined as an original signal, a series of band convergent-divergent harmonic wave sum can be decomposed into.Such as: we will calculate the weight of basis function g (x) component in signal f (x), and need to carry out integration to f (x) g (x) in f field of definition, this computing is called convolution.
But the Lighting information that in scene, some pixels affect by Environment will be calculated, some pixels on setting model surface are the summations of the illumination value by all Environments of surrounding hemisphere face radiancy, integration due to this hemispherical all illumination value can not calculate completely to get, present invention employs above-mentioned with Legendre polynomial, the high mathematical thought such as spheric harmonic function and the conversion of Fourier leaf-size class, some points in the model of place that approximate calculating is real-time are by the illumination value of surrounding environment pinup picture, in the middle of practice, using the coordinate system object of half corresponding for the normal direction of this some spherical space as research.As shown in Figure 1:
Based on formula (1), ω direction is expressed as (X', Y', Z'), that is:
X &prime; = sin &theta; i cos &Phi; i Y &prime; = sin &theta; i sin &Phi; i Z &prime; = cos &theta; i ;
Wherein, θ ibe respectively cartesian coordinate system Z axis angle, Φ ifor the angle of cartesian coordinate system X-axis.
The conversion that Cartesian coordinates is tied to spheric coordinate system can be realized based on above-mentioned angle.Be described in detail as follows:
For first polynomial decomposition L (ω) project to spheric harmonic function for L'(θ i, Φ i);
According to Legendre polynomial, the L (ω) of formula (1) is above decomposed into:
L &prime; ( &theta; i , &Phi; i ) = &Sigma; l , m L lm Y lm ( &theta; i , &Phi; i ) - - - ( 2 )
Wherein L lmbasis function and Y lmtwo polynomial expressions of the component (projection function) of basis function;
And basis function L lmcan be expressed as:
C 1 = L lm = &Integral; &theta; i = 0 &pi; &Integral; &Phi; i 2 &pi; L ( &theta; i , &Phi; i ) Y lm ( &theta; i , &Phi; i ) sin &theta; i d &theta; i d &Phi; i - - - ( 3 )
But equation formulations (3) can be expressed as the form of Fig. 2 with image.
Then two polynomial convolution algorithms carry out to the result obtained the constant C1 that integration is fixed to have figure to find out, C2, C3, and above-mentioned Y lmfunction can be numerous, and in figure, we have only got three values and describe.
(2) obtain spherical harmonic coefficient (zoom factor) by the humorous conversion of ball
Based on above-mentioned Y lmdefined by spheric harmonic function, as l=0, spheric harmonic function can be used for approximate ambient lighting.In calculating process, the conversion of this spheric harmonic function generates at pretreatment stage, this pretreatment stage or spended time are still very large, relate to the high density calculating etc. of light, a time consumption is still after GPU accelerates, but along with the development of computer hardware, this technology can not become a difficult problem, and this spheric harmonic function can be expressed as follows:
Y lm ( &theta; i , &Phi; i ) = 2 P l m cos ( m&Phi; i ) Q l m cos &theta; i , m > 0 2 P l m sin ( - m&Phi; i ) Q l m cos &theta; i , m < 0 P l 0 Q l 0 cos &theta; i , m = 0 ; - - - ( 4 )
And for the zoom factor of spheric harmonic function, Q is can in the hope of the spheric harmonic function of spherical space after corresponding adjoint Legendre polynomial has had above-mentioned parameterized expression, the function that can obtain on any one spherical space carries out the projection of spheric harmonic function and reduces, and this is also the prerequisite that next step is wanted pre-service calculating and plays up.
Above-mentioned Q is corresponding with Legendre polynomial, and it has three attributes (5) (6) (7), can be calculated the Legendre's value under each index by these three attribute equations; Usual spheric harmonic function is defined in complex number space, but only getting real part for this example has met the demands.
( 1 - m ) Q l m = x ( 2 l - 1 ) Q l - 1 m - ( l + m - 1 ) Q l - 2 m - - - ( 5 )
Q m m = ( - 1 ) m ( 2 m - 1 ) ! ! ( 1 - x 2 ) m 2 - - - ( 6 )
Q m + 1 m = x ( 2 m + 1 ) Q m m - - - ( 7 )
There is P and Q of above-mentioned precomputation just can projection function Y lmi, Φ i) based under spheric coordinate system, obtain after applying this Factoring Polynomials; Such as:
Y 00ii),Y 10ii),Y 1-1ii),Y 11ii),Y 20ii),Y 2-1ii),Y 2-2ii),Y 21ii),Y 22ii)
But the numerical value of l is got more much more accurate, in order to be adapted to the requirement calculating illumination in real time, we have sampled 9 numbers, and l gets 0, and 1,2 obtain Y by calculating us lmi, Φ i) numerical value:
(X,Y,Z)=(sinθ icosΦ i,sinθ isinΦ i,cosθ i)
Y 00ii)=0.282095
(Y 11,Y 10,Y 1-1)(θ ii)=0.488603(X,Z,Y)
(Y 21,Y 2-1,Y 2-2)(θ ii)=1.092548(XZ,YZ,XY)
Y 20ii)=0.315392(3Z 2-1)
Y 22ii)=0.546274(X 2-Y 2)
Wherein ,-l≤m≤l, l >=0.
According to equation (1) another polynomial expression ∫ cos θ id θ iprojecting to spheric harmonic function is A' l:
Definition A (θ) is the polynomial expression about θ, and gets A (θ)>=0, and a definition coefficient A l:
A ( &theta; ) = max [ cos &theta; i , 0 ] = &Sigma; l A l Y lm ( &theta; i ) - - - ( 8 )
A l = 2 &pi; &Integral; 0 &pi; 2 Y n , 0 ( &theta; i ) cos &theta; i sin &theta; i d &theta; i - - - ( 9 )
Work as n=1: A l = &pi; 3 ;
Work as n>1, and when being odd number, A l=0;
When n is even number, A l = 2 &pi; 2 n + 1 4 &pi; ( - 1 ) n 2 - 1 ( n + 2 ) ( n - 1 ) &times; [ n ! 2 n ( n ! / 2 ) 2 ]
The variables A that then definition one is new ' l;
A' 0=2.094395 A' l=2.094395 A' 2=0.785398;
(4) what final original function can be similar to regard as:
L &prime; ( &theta; i , &Phi; i ) = &Sigma; l , m A &prime; l L lm Y lm ( &theta; i , &Phi; i )
Order E ( &theta; i , &Phi; i ) = &Sigma; l , m A &prime; l L lm Y lm ( &theta; i , &Phi; i ) - - - ( 10 )
Second: utilize spherical harmonic coefficient that the function of decomposition is obtained the illumination equation after reducing through spheric harmonic function projection
Can to sample E (θ according to above-mentioned formula (10) i, Φ i) in 9 numerical value:
E 00ii)+E 10ii)+E 1-1ii)+E 11ii)+E 20ii)+E 2-1ii)
+E 2-2ii)+E 21ii)+E 22ii)
(θ can be expressed as its spheric coordinate system of any one pixel hypothesis i, Φ i), only need calculating 9 times, be respectively
E 00, E 10, E 1-1, E 11, E 20, E 2-1, E 2-2, E 21, E 22, be exactly then the final illumination value of this pixel adding up.Be exactly specifically first according to formula (3), calculate:
L 00,L 10,L 1-1,L 11,L 20,L 2-1,L 2-2,L 21,L 22
Then substitute into (10) formula can calculate:
E 00,E 10,E 1-1,E 11,E 20,E 2-1,E 2-2,E 21,E 22
Each like this pixel only needs to calculate 9 illumination " projection ", obtains original function E for needing, and based on above-mentioned calculating C1, C2, C3 convolution value and the corresponding projection function sum that is multiplied is approximate original function.
3rd: the color value result that the illumination value by Environment is multiplied with the color value of the pinup picture of self being obtained final pixel, then obtaining each pixel final color value in scene is:
B=ρE;
Then B to obtain in scene actual illumination value, ρ be the color value of pinup picture namely: the U of corresponding vertex, V colouring information.
Technical scheme of the present invention, more there is advance than current technology, it is the one of Real-time Rendering Technology, high-quality playing up and hatching effect can be produced, need to obtain high quality graphic, spherical harmonic coefficient can be regulated to reach good expression effect, and the present invention utilizes spheric harmonic function to be carrying out by summit, and makes scene more level and smooth, careful like this.
Last it is noted that the foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, although with reference to previous embodiment to invention has been detailed description, for a person skilled in the art, it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. based on an illumination method for photo level image, it is characterized in that, mainly comprise:
A, a particular solution Legendre polynomial in Legendre equation is utilized to carry out decomposition computation to illumination equation;
B, utilize spherical harmonic coefficient, the function of above-mentioned decomposition is projected through spheric harmonic function, obtain the illumination equation after reducing;
C, be multiplied with the color value of the pinup picture of self by the illumination value by Environment, acquired results is the color value of final pixel.
2. the illumination method based on photo level image according to claim 1, is characterized in that, in step a, described illumination equation is:
E=∫L(ω)(n·ω)dω (1)
Wherein, E represents the illumination value affected by Environment in overall direction, and each pixel is based on such integral formula computing, and L (ω) is that reflected light is from the brightness each incident ray ω, n ω represents the projection of normal in ω direction, and this value is for being denoted as cos θ usually.
3. the illumination method based on photo level image according to claim 2, is characterized in that, described step a is specially:
A1, based on formula (1), ω direction to be expressed as (X', Y', Z'), that is:
X &prime; = sin &theta; i cos &Phi; i Y &prime; = sin &theta; i sin &Phi; i Z &prime; = cos &theta; i
Wherein, θ ibe respectively cartesian coordinate system Z axis angle, Φ ifor the angle of cartesian coordinate system X-axis;
A2, realize based on above-mentioned angle the conversion that Cartesian coordinates is tied to spheric coordinate system.
4. the illumination method based on photo level image according to claim 3, is characterized in that, described step a1, specifically comprises:
For first polynomial decomposition L (ω) project to spheric harmonic function for L'(θ i, Φ i);
According to Legendre polynomial, the L (ω) of formula (1) is above decomposed into:
L &prime; ( &theta; i , &Phi; i ) = &Sigma; l , m L lm Y lm ( &theta; i , &Phi; i ) - - - ( 2 )
Wherein L lmbasis function and Y lmtwo polynomial expressions of the component (projection function) of basis function;
And basis function L lmcan be expressed as:
C 1 = L lm = &Integral; &theta; i = 0 &pi; &Integral; &Phi; i 2 &pi; L ( &theta; i , &Phi; i ) Y lm ( &theta; i , &Phi; i ) sin &theta; i d &theta; i d &Phi; i - - - ( 3 )
Based on formula (3), can find out that then two polynomial convolution algorithms carry out to the result obtained the constant C1 that integration is fixed, C2, C3 and above-mentioned Y lmfunction can be numerous;
(2) obtain spherical harmonic coefficient (zoom factor) by the humorous conversion of ball
Based on above-mentioned Y lmdefined by spheric harmonic function, as l=0, spheric harmonic function can be used for approximate ambient lighting; This spheric harmonic function is:
Y lm ( &theta; i , &Phi; i ) = 2 P l m cos ( m&Phi; i ) Q l m cos &theta; i , m > 0 2 P l m sin ( - m&Phi; i ) Q l m cos &theta; i , m < 0 P l 0 Q l 0 cos &theta; i , m = 0 - - - ( 4 )
And for the zoom factor of spheric harmonic function, Q is corresponding with Legendre polynomial;
Above-mentioned Q is corresponding with Legendre polynomial, and it has three attributes (5) (6) (7), can be calculated the Legendre's value under each index by these three attribute equations:
( 1 - m ) Q l m = x ( 2 l - 1 ) Q l - 1 m - ( l + m - 1 ) Q l - 2 m - - - ( 5 )
Q m m = ( - 1 ) m ( 2 m - 1 ) ! ! ( 1 - x 2 ) m 2 - - - ( 6 )
Q m + 1 m = x ( 2 m + 1 ) Q m m - - - ( 7 )
There is P and Q of above-mentioned precomputation just can projection function Y lmi, Φ i) based under spheric coordinate system, obtain after applying this Factoring Polynomials;
According to equation (1) another polynomial expression ∫ cos θ id θ iprojecting to spheric harmonic function is A' l:
Definition A (θ) is the polynomial expression about θ, and gets A (θ)>=0, and a definition coefficient A l:
A ( &theta; ) = max [ cos &theta; i , 0 ] = &Sigma; l A l Y lm ( &theta; i ) - - - ( 8 )
A l = 2 &pi; &Integral; 0 &pi; 2 Y n , 0 ( &theta; i ) cos &theta; i sin &theta; i d &theta; i - - - ( 9 )
Work as n=1: A l = &pi; 3 ;
Work as n>1, and when being odd number, A l=0;
When n is even number, A l = 2 &pi; 2 n + 1 4 &pi; ( - 1 ) n 2 - 1 ( n + 2 ) ( n - 1 ) &times; [ n ! 2 n ( n ! / 2 ) 2 ]
The variables A that then definition one is new ' l;
A' 0=2.094395 A' l=2.094395 A' 2=0.785398;
(4) what final original function can be similar to regard as:
L &prime; ( &theta; i , &Phi; i ) = &Sigma; l , m A &prime; l L lm Y lm ( &theta; i , &Phi; i )
Order E ( &theta; i , &Phi; i ) = &Sigma; l , m A &prime; l L lm Y lm ( &theta; i , &Phi; i ) - - - ( 10 )
5. the illumination method based on photo level image according to claim 3 or 4, is characterized in that, described step b, specifically comprises:
First according to formula (3), calculate:
L 00,L 10,L 1-1,L 11,L 20,L 2-1,L 2-2,L 21,L 22
Then substitute into formula (10), obtain:
E 00,E 10,E 1-1,E 11,E 20,E 2-1,E 2-2,E 21,E 22
Like this, each pixel only needs to calculate preset times " projection ", obtains original function E for needing, and based on the C1 of above-mentioned calculating, C2, C3 convolution value and the corresponding projection function sum that is multiplied is approximate original function.
6. the illumination method based on photo level image according to claim 5, is characterized in that, described step c, specifically comprises:
The result that illumination value by Environment is multiplied with the color value of the pinup picture of self is obtained the color value of final pixel, then obtaining each pixel final color value in scene is:
B=ρE;
Then B to obtain in scene actual illumination value, ρ be the color value of pinup picture namely: the U of corresponding vertex, V colouring information.
CN201410450058.6A 2014-09-04 2014-09-04 Illumination method based on picture level images Pending CN104268923A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410450058.6A CN104268923A (en) 2014-09-04 2014-09-04 Illumination method based on picture level images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410450058.6A CN104268923A (en) 2014-09-04 2014-09-04 Illumination method based on picture level images

Publications (1)

Publication Number Publication Date
CN104268923A true CN104268923A (en) 2015-01-07

Family

ID=52160442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410450058.6A Pending CN104268923A (en) 2014-09-04 2014-09-04 Illumination method based on picture level images

Country Status (1)

Country Link
CN (1) CN104268923A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447829A (en) * 2015-11-25 2016-03-30 小米科技有限责任公司 Image processing method and device
CN106484850A (en) * 2016-09-30 2017-03-08 北京百度网讯科技有限公司 Panoramic table display packing and device
CN108090949A (en) * 2017-12-26 2018-05-29 苏州蜗牛数字科技股份有限公司 A kind of real-time global illumination method propagated based on luminous energy
CN110458902A (en) * 2019-03-26 2019-11-15 华为技术有限公司 3D illumination estimation method and electronic equipment
CN111275781A (en) * 2020-01-17 2020-06-12 江苏艾佳家居用品有限公司 Rendering optimization method based on function coordinate space
CN112473135A (en) * 2020-11-06 2021-03-12 完美世界(北京)软件科技发展有限公司 Real-time illumination simulation method, device, equipment and storage medium for mobile game
WO2024021557A1 (en) * 2022-07-25 2024-02-01 网易(杭州)网络有限公司 Reflected illumination determination method and apparatus, global illumination determination method and apparatus, medium, and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
刘中华等: "《基于光照线性子空间的人脸图像识别研究》", 《计算机工程与应用》 *
张丽: "《真实感光照技术的研究与实现》", 《中国优秀硕士学位论文全文数据库(电子期刊)》 *
王晶等: "《基于方向滤波和自商图像的人脸光照补偿》", 《光子学报》 *
顾耀林等: "《一种基于低维线性子空间的球面谐波光照算法》", 《计算机应用》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447829A (en) * 2015-11-25 2016-03-30 小米科技有限责任公司 Image processing method and device
CN105447829B (en) * 2015-11-25 2018-06-08 小米科技有限责任公司 Image processing method and device
CN106484850A (en) * 2016-09-30 2017-03-08 北京百度网讯科技有限公司 Panoramic table display packing and device
CN106484850B (en) * 2016-09-30 2019-10-15 北京百度网讯科技有限公司 Panoramic table display methods and device
CN108090949A (en) * 2017-12-26 2018-05-29 苏州蜗牛数字科技股份有限公司 A kind of real-time global illumination method propagated based on luminous energy
CN110458902A (en) * 2019-03-26 2019-11-15 华为技术有限公司 3D illumination estimation method and electronic equipment
CN110458902B (en) * 2019-03-26 2022-04-05 华为技术有限公司 3D illumination estimation method and electronic equipment
CN111275781A (en) * 2020-01-17 2020-06-12 江苏艾佳家居用品有限公司 Rendering optimization method based on function coordinate space
CN112473135A (en) * 2020-11-06 2021-03-12 完美世界(北京)软件科技发展有限公司 Real-time illumination simulation method, device, equipment and storage medium for mobile game
WO2024021557A1 (en) * 2022-07-25 2024-02-01 网易(杭州)网络有限公司 Reflected illumination determination method and apparatus, global illumination determination method and apparatus, medium, and device

Similar Documents

Publication Publication Date Title
CN104268923A (en) Illumination method based on picture level images
KR101199475B1 (en) Method and apparatus for reconstruction 3 dimension model
US10147217B2 (en) Audio-based caricature exaggeration
KR20080090671A (en) Apparatus and method for mapping textures to object model
CN104484896A (en) Physical method based on environment mapping for simulating human skin subsurface scattering
KR20090080421A (en) Method and system for compressing and decoding mesh data of 3-dimensional mesh model
CN114863038B (en) Real-time dynamic free visual angle synthesis method and device based on explicit geometric deformation
US20080012853A1 (en) Generating mesh from implicit surface
CA2744504A1 (en) Optimal point density using camera proximity for point-based global illumination
CN102819855B (en) The generation method of two dimensional image and device
Sun et al. Fast multipole representation of diffusion curves and points.
US8232999B2 (en) Fast oceans at near infinite resolution
US20080043023A1 (en) Approximating subdivision surfaces with bezier patches
US20230368459A1 (en) Systems and methods for rendering virtual objects using editable light-source parameter estimation
Petkov et al. Interactive visibility retargeting in vr using conformal visualization
Schneider et al. Efficient global illumination for morphable models
CN115965727A (en) Image rendering method, device, equipment and medium
CN107464278B (en) Full-view sphere light field rendering method
Li et al. Primitive-Based 3d building modeling, sensor simulation, and estimation
US8952968B1 (en) Wave modeling for computer-generated imagery using intersection prevention on water surfaces
US10803654B2 (en) Three-dimensional human face reconstruction method
Wu et al. Depth acquisition from dual-frequency fringes based on end-to-end learning
DE PARGA et al. Parallel Algorithms for Real-Time GPGPU Volumetric Cloud Dynamics and Morphing.
Migranov A System for Visualizing the Three-Dimensional Spherical and Elliptic Spaces
TWI797761B (en) Display method of virtual reality

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150107