The part that document of the present invention is revealed comprises material protected by copyright.The copyright owner has no reason to refuse your the writing that this copyright reveals and duplicates, and as shown in the patent document of patent and trademark office or the record, but keeps all copyrights in addition, whatsoever.
Embodiment
As shown in Figure 1, a software configuration of a computer graphic image demo system 100 provides the realtime graphic demonstration of a modelling object, and this demonstration uses employing light described here from shifting the mutual reflection of image demonstration technology and covering certainly.Common, this software configuration comprises that 120, one realtime graphic presentation engine 140 of a combined lighting simulator and a graphic presentation drive 180.More fully describe light below from shifting performance technology, combined lighting simulator 120 is carried out anticipating the stage of this technology, and it calculates light rotation shift according to 140 in advance from a geometric object model 110.This geometry module 110 can be a leg-of-mutton mesh, the wave complex, and perhaps any other is by the performance of the geometric configuration of modelling object.Then real time demonstration engine 140 use should precalculated smooth rotation shift according to being dynamically variable illumination environment 150 and direction of observation 160 demonstrating model subject image, this presentation engine can be controlled 170 selectively change or settings by the user.Graphic presentation drives 180 output images to an image output device (for example: display, projector, printer etc.).
In some specific embodiments of graph image demo system, the light of simulator 120 calculates in advance and uses the image demonstration of engine 140 to carry out on single computing machine from shifting, the computing environment of describing as the 6th joint below.Common, simulator 120 can move on an independent computing machine, and this result data is transferred on the computing machine of operation presentation engine 140 then, produces graph image.
Light is from shifting the technology general view.As a pre-service, combined lighting simulator 120 moves illumination simulation on module 110, thereby how to catch modelling object covering and scattered beam oneself.This result is recorded in light rotation shift according in 130 as the one group of intensive vector (diffusive condition) on the module or matrix (smooth state).When image demonstration, presentation engine 140 is that lighting environment 150 projection incident lights are to spherical hamonic function (SH) basis (following description).Shift vector then or matrix norm V-neck V territory is applied to the illumination factor vector.If the object diffusion, thereby one of the point on this object shifts vector and gets ready and produce appropriate discrete certainly shade along with illumination factor.If this object is level and smooth, thereby a transition matrix is applied to the spherical function coefficients that illumination factor is created in a certainly discrete incident light of representative on these aspects.Twocouese reflection coefficient distribution function (BRDF) convolution of this function and object, thereby subsequently based on calculating the final shade that produces the object of being demonstrated in image on the reflection direction of observing.
1. the review of spherical hamonic function
Definition: orthonormal basis on sphere of spherical hamonic function definition, S is similar to the fourier transform on the 1D circumference, and operation parameter is represented
s=(x,y,z)=(sinθcos_,sinθsin_,cosθ)
Basic function is defined as
P wherein
l mBe relevant Legendre polynomial expression, K
l mBe generalized constant
A plural number base is formed in above-mentioned definition: a true value basis is provided by this simple institute that transforms
Low frequency basic function on the low value of I (being called the wave band index) the expression sphere.The basic function of wave band I becomes the polynomial expression on I rank at x among y and the z.Calculating can be produced by simple recurrent formula.(for example: Edmonds, A, the angular momentum in the quantum theory mechanics, Princeton University, Princeton, 1960; And ZARE, R, angular momentum; The understanding of the aspect, space in chemistry and the physics, Wiley, New York, 1987).
Projection and transformation: because the SH basis is orthonormal, the function f by the scalar of S definition is by projecting its coefficient with lower integral
These coefficients provide the transformation function on n rank.
Along with the growth of phase wave band n, it is similar to f with becoming better and better.Low-frequency signals can only show with some SH wave bands accurately.Higher frequency signals is by one group of low order projection band-limiting.(for example: no false signal level and smooth)
The projection of n rank comprises n
2Individual coefficient.By following formula, be convenient to usually rewrite (2) according to the single indices vector and the basic function of projection coefficient
I=l (l+1)+m+1 wherein.The evaluation of as seen transforming function S by this formula shows as n
2A simple dot-product of coefficient vector fi that forms and evaluation basic function yi (s) vector.
Primary attribute.A SH projection attribute is the constancy of its rotation; That is, if g (s)=f (Q (s)), Q is a rotation arbitrarily on S, then
This is the mobile constancy attribute that is similar to the ID Fourier transform.In fact, this attribute means that the sampling example of working as the f generation is collected as the sampled point of a rotation series, projection, and when f turned round then, the SH projection caused not having the imitation of false signal.
The standard quadrature on SH basis provides useful attribute, promptly is given in S and goes up any two function a and b, and their projection is satisfied
In other words, the integration of the product of band-limited function is reduced to a dot-product of their projection coefficients.
Convolution: the convolution of a circulation symmetric cores function h (z) and a f function is represented as h*f.Notice that h is necessary for circulation symmetry (and should this can be defined as the simple function of a z, rather than s) for this result is defined within on the S, rather than the rotation group SO in the space of higher-dimension more, according to top equation (3).The convolution projection is satisfied
In other words, the convolution coefficient of this projection is the simple scale product of independent projection function.This attribute provides a quick approach so that with surplus medial rotation nuclear of semisphere and environment mappings convolution, this core is defined as h (z)=max (z, 0), with the mapping that obtains a light (as at Ramamoorthi, R, and Hanrahan, P, effective performance of luminous environment mapping, SIGGRAPH ' 01, described in the 497-500).In this example, the projection coefficient of h can obtain by using an analysis formula.This convolution attribute also can be used to produce the pre-filtering environment mappings by the kernel of precision.Notice that because h is about the circulation symmetry of z, its projection coefficient only is a non-zero when m=0.
The projection of the product of a pair of spherical function c of product projection (s)=a (s) b (s) (a known and b the unknown) can be looked at as by a matrix _ projection coefficient b
jA linear transformation:
Wherein the sequence number j for repetition has hinted summation, note _ be a matrix that matches.
Rotate a transformation function that is rotated by Q, f (Q (s)) can be with the linear transformation f of the projection coefficient that uses a f
iProjection.Because the attribute of rotary constant, the coefficient of each wave band is treated in this linear transformation independently.The most effective execution is finished by using a decomposition of rotating the zyz Eulerian angle of Q, uses a suitable complex loops formula.(referring to, example, Chirikjian, G, and Stein, D, the kinematic design of spherical stepper motor and replacement, Institute of Electrical and Electric Engineers machinery journal, 4 (4), 12.1999; Edmonds, A, the angular momentum in the quantum theory mechanics, Princeton University, Princeton, 1960; And ZARE, R, angular momentum; The understanding of the aspect, space in chemistry and the physics, Wiley, New York, 1987).When only relating to the low order function, the explicit rotation formula of describing in these bibliographies can be realized by using symbol to accumulate.
2. light is from shifting
Light is from shifting object O covers and disperse light to oneself the method that encapsulated.Use SH basis is crossed by light rotation Mobile Communication, (is expressed as L by the parametrization incident light first time of a p ∈ O
p(s)) represent.Therefore incident light is represented as a n
2The vector of coefficient (Lp)
iIn practice, this illumination can dynamically and sparsely be sampled near surface, perhaps only on a single point.Suppose to be that the illumination change on O is not because there be less (referring to 4.1 joints, the spatial sampling in incident light territory) in itself.Light can be calculated and very close storage on O in advance from shifting also, as shifting vector or matrix.
One is shifted vector (Mp)
iCan be used to diffusing surface and expression to producing the linear transformation that scalar withdraws from the illumination vector (being expressed as Lp ') of light, by following inner product
In other words, (Mp)
iEach composition represented an illumination basis function (Lp)
iTo the linear effect of covering at the p place.
A transition matrix (M
p)
IjCan be used to smooth surface and the expression linear conversion to the illumination vector, it is that a complete transfer photosphere shape function L ' p (s) produces a projection coefficient, rather than a scalar, that is:
Incident light and the difference of shifting between the light are L '
p(s) comprise since O existence caused covers and dispersion effect, and L
p(s) incident illumination after expression hypothesis O is removed in scene.(Mp)
IjComposition showed incident light (L
p)
jThe illumination factor of j for shifting light L '
p(
s) the linear effect of i coefficient.Next joint will be presented at O and go up how to obtain the transfer vector of diffusing surface and the transition matrix of smooth surface according to self-scattering.
2.1 diffusion transfer
Suppose that at first O is diffusion.The simplest transfer function on a p ∈ O has showed the non-diffusion transfer of covering, and is defined as scalar function
T
1×1(L
P)=(ρ
p/π)∫L
p(s)H
NP(s)ds
Light is withdrawed from generation, and it is the invariant to the viewing angle of diffusing surface.At this, ρ
pBe the albedo of the object on p, L
pBe the incident light on the p after hypothesis 0 is removed in scene, N
pBe the object normal on p, and H
Np(s)=max (N
pS, 0) be cosine weighting, about N
pThe hemisphere kernel.By individually to L
pAnd H
NpCarry out the SH projection, equation (5) is simplified T
DuAn inner product for their coefficient vectors.This key element that obtains is called as light function L herein
pWith transfer function M
pIn this first simple example,
Because N
pKnown, transfer function (M
p DU)
iThe SH projection can be calculated in advance, the result is one and shifts vector.In fact, storage is unnecessary because simple analysis formula produces its given Np.Because MpDU is an intrinsic low pass filter, the second rank projection (9 coefficients) is provided at a good down accuracy of (even non-level and smooth) lighting environment arbitrarily.
In order to comprise shade, we define the shade diffusion transfer and are
T
DS(L
p)=(ρ
p/π)∫L
p(s)H
Np(S)V
p(s)ds
Wherein when a branch of ray from the direction s of p can't intersect (promptly not having crested) again with O, extra visibility function V
p(s) → { 0,1} equals 1.Cover transfer with non-, this accumulation can be used L
pSH projection and following transfer function resolve into two functions
Independent SH projection L
pAnd M
pAgain will be at T
DSOn accumulation be reduced to an inner product of coefficient vector.
It is valuable shifting now; Light rotation Mobile Communication crosses and uses a transportation simulator device to be calculated (describing in " calculating in advance from shifting " as chapters and sections below) in advance, and the result who is stored in many somes p on the O shifts vector (M
p)
iUnlike the example of front, M
p DSThe second rank projection may be inaccurate, even in level and smooth lighting environment, because V
pCan create local high-frequency illumination, for example, by covering aperture certainly.Use the 4th or the 5th rank projection to be provided at the good result of the typical mesh in the level and smooth lighting environment.For example the diffusing surface object among Fig. 9 non-covered the comparison with occlusion image.
The image of the mutual reflection of Fig. 9) and shade at last, reflect mutually in order to catch diffusion that (for example:, reflecting diffusion transfer mutually can be defined as
Wherein
Be the light on the s direction from O oneself itself.Unless difficulty is to send incident light from the source of infinity, light
Only the given incident light on p is not known, because
Depend on the light that withdraws from, and local illumination changes on O from any point at a distance of p.If the illumination change on O is less, Lp is very approximate so, just as O by L
pIlluminated in each place.Thereby T
DIRely on L linearly
pAnd can be broken down into a product of two projection functions, as two kinds of situations in front: slight dependence and one rely on for how much.
Although precalculated mutual reflection must suppose that incident light space on O is constant, simplyr cover transfer and then do not need.Difference is to cover transfer and only relies on incident illumination on the p, yet q ≠ p, the wherein Lq ≠ Lp that rely on the O are shifted in reflection at many mutually.Therefore, as long as the incident light zone finally is sampled (discussion in the following joint " spatial sampling in incident light field ") fully subtly, local illumination change can be captured, and covers transfer and will be repaired.
Existence make that be difficult to explicitly represents the transfer function M of reflection mutually
p DI(s).Below " in advance calculate from shift " joint how calculating its projection coefficient in numerical value ground will be discussed.
2.2 smooth transfer
Certainly the transfer of smooth object can be defined similarly, but kernel function will be reduced reflection direction R of dependence (observe and rely on), rather than one (fixing) normal N.Be similar to former H kernel, light from shift can will smoothly reflect be modeled to kernel G (s, R, r), wherein " smoothness " or the broad degree of the reaction of scalar r definition mirror image.
Three similar smooth transfer functions: non-ly cover, cover and reflect mutually situation and can be defined as:
T
GU(L
p,R,r)=∫L
p(s)G(s,R,r)ds
T
GS(L
p,R,r)=∫L
p(s)G(s,R,r)Vp(s)ds
They will be output as a L at the scalar light on the R direction
pWith the function of R, their amount is all unknown on when calculating in advance.Because shifting no longer is an isolated s function, therefore can not be reduced to a simple vector of SH coefficient.
Substitute with R and r parametrization scalar and shift, a more useful decomposition is to shift incident light Lp (s) (to be expressed as L ' to a complete sphere that shifts light
p(s)).Suppose that level and smooth kernel G is about R circulation symmetry, then L '
p(s) energy and G '
r(z)=G (s, (0,0,1), r) convolution, and on R, calculate and produce a net result.
Transfer to L ' p shows as a matrix but not a vector now.For example, smoothly covering transfer can be defined as
Linear actuator on Lp, its SH projection can be expressed as symmetric matrix Vp by equation (7).Even with very level and smooth illumination, along with the growth of the smoothness of O, more SH wave band is used to L
pΦ; (for example: it is effective 25 * 9) the low frequency illumination being mapped to high-frequency transfer light to the non-square matrix in these cases.
Calculating light in advance is to influence T from a critical limitation that shifts
DIAnd T
GIIn the material properties (as albedo or smoothness) of O of mutual reflection when being operation by " baking " to pretreated transfer and can not change.On the other hand, this better simply covering when shifting the permission operation of not reflecting mutually changes and/or the spatial variations on the O of material properties.If obstruction or light source are invaded the protruding shell of O, then wrong the generation.O can only move rigidly, can not be out of shape or moves a part with respect to integral body.Also to remember to suppose low illumination change on the O to correct mutual reflection.
At last, note as diffusion transfer defined above produces light leaving the back, surface because it is by the standard hemisphere institute convolution of cosine weighting when smooth transfer generation light is incident on the surface, and by local BRDF institute convolution to produce the last light that withdraws from.To level and smooth O, also may toast into a fixing BRDF, make the convolution that when operation, does not need with G, except the restriction of dirigibility.
Fig. 9 for example the non-of a clear smooth surface object covers, covers and mutual reflected image.
3. calculate in advance from shifting
Contrast Fig. 2 now, by use the SH basis (" the reference illumination environment " of simulation) on infinite range as transmitter, the light that illumination simulator 120 (Fig. 1) calculates the modelling object in a combined lighting simulation 200 in advance shifts (being also referred to as " shift in advance certainly and calculate ") certainly, and this combined lighting simulation 200 is an object O execution.This simulation is by the unknown spherical n rank SH parametrization of incident light L; That is n,
2Individual unknowm coefficient L
iAlthough this Simulation result may be by using SH basic function y
i(s) be each L as a projector
iCalculate independently, they will be more effective for same Time Calculation.This reference illumination environment (infinity spherical L) will be when operation by reality about O, L
pIncident light substitute.
Simulation 200 starts from a path (" shade path " 202), and simulation is from leaving L and the direct direct shade that arrives the path of sampled point p ∈ O.At subsequently path (" reflex path mutually " 204), reflection increases mutually, and expression is from the path that L begins, arrive at p (Lp, LDp, LDDp, etc.) L is in the O bounce-back many times before.On every path, accumulation of energy is on each sampled point on p surface.Large-scale transmitter (that is, low-frequency SH basis) makes to assemble and upgrades more effective than projection-type.
In order to catch the direction scope on sampled point p ∈ O, simulation produces huge (10k-30k), accurate random direction set { S
d, S
d∈ S.This simulation also is at each direction S
dOn all SH basic function calculating in advance.This S
dDirection is organized in the branch sheaf space, this minute sheaf space be by with 1-2 pairs assign to an initial icosahedron be refined into spherical triangle of the same area (1-〉 4 segmentations do not cause with the plane on the same trigonum of the same area on sphere) formation.6 to 8 segmentation grades are used in this simulation, create 512 to 2048 spaces.Each space is included in a S of its inside on each stratum level
dTable.
First or shade path 202, to each p ∈ O, simulation 200 connect (on 211) those by the direction that begins from a p of object self-blocking.This simulation is in the normal N of hemisphere upthrow ejaculation about p
pShadow ray, use level to go selected direction outside hemisphere.An inaccessible position 1-V is used in this simulation
p(S
d) connect each direction S
d, point out S
dWhether in hemisphere and with O, intersect once more (that is, being covered certainly) by O.Inaccessible position also with layering space correlation connection, point out any one within it the Sd of portion whether in obturation.To such an extent as to all being connected us, self-blocking direction and space can on them, carry out further reflex path mutually; Direct sunshine next from environment is only accepted in non-completely dead-air space/sampling.
Then, on 212, simulation 200 is shifted light for some p accumulation.At diffusing surface, at each some p ∈ O, simulation is also by the SH projection M according to equation (10)
pCalculate and shift vector.At smooth surface, simulation is by the SH projection M from equation (11)
pCalculate transition matrix.In arbitrary situation, the result represents by the parameterized light of collecting on p of L.Be used for calculating the SH projection of transfer by the S that samples in direction
dOn numerical value accumulation performed, use following rule to be summarised as the transfer of an accumulation:
Subscript O refers to numeral repeatedly.Vector M
pOr matrix M
pBefore the shade path, be initialized to O at each point on p, then on each p with all S
dAddition.This rule obtains by the equation (1) of use diffusion transfer accumulation and the equation (7) of smooth transfer accumulation.
According to shown in Figure 7, mutual reflex path 204 subsequently passes has the space that inaccessible position is provided with, and this obturation position is accumulated at the shade path and is provided with during mutual reflection on 221 is shifted.Substitute shadow ray, analog transmissions is returned the ray of transfer from withdrawing from illumination on O.If ray (p, S
d) and some q ∈ O (the wherein the most close p of q) is crossing in addition, we are at direction-S
dThe light that middle sampling is withdrawed from from q.Following update rule is used, and subscript b wherein is that the bounce-back path repeats:
Shown on the shade path 202, at direction S
dOn, before gathering transfer, shift vector or matrix is that O begins mutual reflex path 204 by initialization.The diffusion rule originates from T
DIDefinition and equation (1); Smoothing regulation is from T
GIDefinition and equation (6) and (7) in obtain.In smooth transfer definition, middle factor representative is from before the path of upspringing, b-1, the light that turns back to p that sends from q.Because M
qThe storage incident light, it must be on q with the BRDF of O mutually convolution obtain at-S
dWithdraw from light on the direction, on k, produce a summation.a
kBe the k time convolution coefficient, represent by single index." reflection " symbol reflects second first vector parameters about it simply.Observation equation formula (7) has hinted (M
p)
IjBe a symmetric matrix, because it is made up of two spherical function products for the crested smooth transfer; For mutual reflection smooth transfer is incorrect.
Shown in 230, mutually reflex path 204 repeats, up to meeting an ending standard, when for example the gross energy of given path is fallen under the important limit.For typical material, reflection is subdued very quick mutually.Consider reflection mutually from the transfer summation of all paths of upspringing subsequently.
Perhaps, this simulation simple surface that allows in O that strengthens as mirror.Simulation is not recorded in the transfer of similar surfaces.Substitute, the ray of bump minute surface always reflects and propagates subsequently up to arriving at non-specular surface.Thereby, continuously repeatedly path can be represented as (L[S]
*P, L[S]
*D[S]
*P, L[S]
*D[S]
*D[S]
*P, etc.), wherein D is a diffusion or smoothly upsprings, and upsprings and S is a mirror image.It captures the caustics on diffusion or the level and smooth receiver, reacts illumination change dynamically.
4. the demonstration time of running of light transfer
The many somes p that the simulation of describing 200 (Fig. 2) just is provided on the body surface go up a module of catching the light transfer, show as vector or matrix.With reference now to Fig. 3,, real time demonstration engine 140 (Fig. 1) uses this module in the process 300 subsequently when an operation, calculates the light of transfer certainly of object in the presentation process of the object realtime graphic on a selection lighting environment and direction of observation.Fig. 4 and Fig. 5 divide other process 300 according to as the operation of diffusion and smooth surface the time to come elaborate process stream respectively.
In process 300, presentation engine 140 is carried out following action when operation: 310, according near the sampled point P of SH basis one or more 0
iLast calculating incident light { L
Pi; In 320, rotate these L
PiTo the coordinate structure of O and mix them and (as follows) produce an incident light L on O
pA territory, and in 330-390, on each the some p on the O to (L
p)
iCarry out a linear change and obtain to withdraw from light.The action 350 on, this linear change be diffusing surface with (M
p)
iA dot product (equation (8)), or the action 360 on, be smooth surface with (M
p)
yA matrix-vector multiplication (equation (9)).Smooth surface has further action 370 and 380, and the BRDF convolution of the light vector that obtains from multiplication 360 and O on p is wherein estimated observing on the reflection direction R that relies on subsequently.
In action 310, the presentation engine 140 computing environment mapping in advance of can packing into, the analysis lighting module in the evaluation software perhaps uses graphic hardware to come sampled light, as the expression to the incident light of selecting lighting environment.Being rotated in the spherical hamonic function review of the 1st joint of action 320 narrated, and it is carried out once each object, rather than to each p.Rotation is performed, because shift to be to use the common coordinate system of O is stored.If O moves rigidly, many transfer functions of the rotation O that compares are at L
PiLast rotation minority gloss sample makes that it will be more effective arranging with O.
For diffusing surface, a simple realization of action 350 is the transfer vector and the dot products of execution in a summit veil on each summit of storage.This shifts vector and also can be stored in the structure mapping, rather than each summit, and uses a pixel to hide and calculate.Because coefficient is the number that symbol is arranged, not always in [1,1] scope, DirectX 8.1 pixel veils (V1.4) or its OpenGL equivalent (by the ATI expansion) can be used, because they provide [8,8] one in a big way.In one implementation, the pixel veil only need 8 instructions go to carry out dot product and in constant register the storage Lp projection coefficient.
For coloured environment or the simulation of diffusion color on O, 3 paths are performed, and each is at r, and g carries out independent dot product for one in the b passage.Otherwise a path is just enough.
For level and smooth transfer certainly, the matrix conversion from equation (9) can be performed in software, because in current summit or pixel veil, transition matrix may can not be operated too greatly.The result be (L '
p)
i, the some p place on O shifts the SH coefficient of light.In a pixel veil, enough one of convolution 370 energy simply are cosine power (the protruding lobe of Phong) the kernel execution of G, and calculate the result on reflection direction R subsequently.The result can be write as
High SH mapping to the 5th rank can be calculated in current graphic hardware.
4.1 the spatial sampling in incident light territory
For one of dynamic sampling incident light simple and effective method is central point up-sampling incident light at O.For the local lighting of handling on O changes, one more accurate technique at a plurality of somes up-sampling incident lights.As a pre-service, given input requisite number point of destination uses ICP (repetition closest approach) algorithm just can obtain one group of good sampled point (reference, Linde, Y, Buzo, A, and Gray, R, an algorithm that is used for the design of vector quantum, IEEE communication journal COM-28,1980,84-95).This produce near the O, on O equally distributed one group of representational some P
i, can be when operation at these some place sampling incident lights.Presentation engine 140 can also be calculated the coefficient at each p point place on O in advance, and this calculates the photosphere L that mixes from result's sampling
PiThereby each contribution be created in an incident light territory on the O, be represented as L in the past
p
Figure 11 describe by sampling incident light in a single-point, ICP point and multiple sampling and during with the operation of Fig. 3 process 300 demonstrate resulting image.
4.2 at graphic hardware up-sampling SH light
In a dynamic scene, graphic hardware is used for catching gloss sample { L effectively
Pi.For this reason, according to each P corresponding to 6 faces of three-dimensional mapping ball shape parameter
iDemonstrate 6 images.O itself must be removed from these demonstrations.Integration in user's formula (1), three-dimensional map image are mapped on their the SH coefficient.
More effective, for by the basic function of differential solid horn weighting computation structure in advance,
Each is all calculated on the three-dimensional mapping parameters of s.Subsequently this as a result integration become structure B
l m(s) with the sampling L that catches
p(s) a simple dot product on.
Desirable, this calculating can be performed on graphic hardware.Selectable, because accuracy and can't make inner product on hardware, the sampled light image can be by retaking of a year or grade and projection in software subsequently.In this case, the resolution that reduces the retaking of a year or grade image as much as possible will be helpful.
The SH mapping of low order is shone upon with the solid of low-down resolution and is calculated, and supposes their quilts band limit accurately.For example, can be come projection with 64 * 4 images with the spherical signal that is limited to the 6th rank, these images have about 0.3% general case square error and about 1% worst condition square error, wherein by the hypothesis specific power signal error (that is, the integrated square on sphere is 1 signal) of standardizing.(more accurately, the general case error is the integrated square difference between signal reference and that rebuild, all cell power signals average.The worst condition error is identical integration mistake, but is for worst condition cell power signal.) for 6 * 8 * 8 mappings, this mistake reduces to 0.003% average and 0.02% worst condition.Unfortunately, type signal is not spherical band limit.Another analyzes demonstration, supposes bilinearity reconstruction continuously on the 2D image of sampling, uses the mapping on the 6th rank of 6 * 8 * 8 images to produce 0.7% and 0.2% average and worst condition square error, and produces 0.2% and 0.5% error at 6 * 16 * 16 o'clock.
In an illustrative is carried out, 6 * 16 * 16 images of from hardware, extracting.Though always correct in the point sampling demonstration, the aliasing of 2D image still is exactly a problem, because above analysis uses the bilinearity from point sampling to rebuild as reference.In order to reduce aliasing, three-dimensional map image can be carried out a boxlike and filter a large amount of the extraction by super sampling (for example, by a factor 2) on each dimension on hardware before retaking of a year or grade and projection.The basic function structure is also by super sampling, and anticipates with an identical method as one and to extract in a large number.As a gloss sample, comprise retaking of a year or grade and SH mapping, this illustrative execution about 1.16 milliseconds of cost on a PIII-933 computer with ATI Radeon 8500.
4.3 the transfer certainly of volume-based model
Shifting certainly on volume data used the framework identical with the surface.Change when this precalculated model permission that obtains moves illumination is accompanied by correctly covering and reflection mutually under any low frequency lighting environment.Figure 12 illustrates the image of a cloud model, uses volume from shifting to this image, and a volume rotation of process 300 moves variations (description after this) and catches cloud model itself is covered and dispersed light during with operation.
Follow the surface to shift, a pre-treatment step uses the SH basic function as the light of transmitter simulation on volume.For reflection not mutually cover transfers (that is, directly covering), simulate each volumetric pixel p from the transmitter focused energy to volume, passed the path attenuation of volume by this, numerical integration required on direction Sd can be represented as
A (p-〉 q wherein) be the volume overall attenuation of the path from p to q, and D is up to ray (p, S along the path
d) withdraw from three-dimensional distance.In order to comprise mutual reflection, simulation is traversed each volumetric pixel p and along random direction S
dDisperse its transfer forward.This shifts along S
dAll volumetric pixel q are precipitated up to withdrawing from volume, service regeulations
More path on volume produces further non-direct bounce-back.
Demonstration is performed by traditional approach: describe segment on the 3D volume by order from back to front, adopt alpha to synthesize and consider the transparency.Each fragment is the 2D image that comprises the sampling of shifting vector.A pixel shader thing compute illumination coefficient and need cover dot product between the transfer vector of each segment.
5. the contiguous of light shifts
Contiguous transfer is thrown light on respect to parameterized low frequency and is calculated the influence of an object O to its adjacent ambient in advance.Figure 13 illustrates the image in the adjacent waveforms field that the contiguous transfer variation (description subsequently) of hang-gliding projection soft shadows presentation process 300 (Fig. 3) to simulation 200 (Fig. 2) and operation the time catches.Transmitting simulation is identical with the simulation of shifting certainly of calculating in advance in shifting at the 3rd joint, but takes place in the 3d space point of O at one, rather than on it.In when operation, one arbitrarily recipient R can be placed on and remove to catch shade, reflection and O in this volume and under the situation of not knowing R in advance, project caustics on the R.For example, mobile automobile O can be on a Zone R territory cast shadow.Cast shadow and illumination also can respond illumination and change; For example, mobile light moves soft shadows on R.This is by considering smooth transfer and allowing dynamic lighting to conclude the volume of light (for example, referring to Greger, G, Shirley, P, Hubbard, P, and Greenberg, D, luminous volume, IEEE computer graphical and application, 6 (11): 21-29,1986).
Because in calculation procedure in advance, R is unknown, the neighbouring body of O accumulates a transition matrix of storage rather than a vector.This in addition also be correct in the diffusion recipient because do not know the normal of R in advance.
In an execution, simulator calculates the transition matrix Mp on each point in a simple 3D grid that surrounds O in advance.In when operation, in software, carry out matrixing and upload result to graphic hardware on presentation engine each point in volume from equation (9).The result be one comprise the transfer light that is applied to R (L '
p)
iA volume structure of coefficient.
Subsequently, in a pixel shader thing, this shifts light and is used to the recipient of throwing light on.A diffusion recipient is by the hemisphere H of user's formula (6) with cosine weighting
*Come this light of convolution, and the SH projection of result of calculation on the normal vector of R subsequently.Level and smooth recipient carries out equation (12).
The recipient calculates in advance from shifting, and has brought O and R not to share the difficulty of a common coordinate system.Therefore, in the dense set of the transfer of two objects sampling must rotate to arrange with another one dynamically.Let it be to the greatest extent, and complicacy is O (n
4), be the same with the complicacy of the matrix conversion of in equation (9), carrying out, that operation of the speed ratio of higher-order projection is more expensive.Improve hardware and will solve this difficulty rapidly.
Be compared to from shifting, the contiguous transfer produces some additional approximate errors.Be difficult to combination from a plurality of contiguous transfer object cast shadows or light to identical recipient.Not that the local lighting variation that exists because of O or R also is a problem; The illumination of passing the whole proximity of O must be quite stable so that accurate result is provided.The error of especially, for example losing shade will occur when the pressure of the object by O and the R enter the proximity of O.The proximity of O must also be enough big, so that surround the cast shadow or the light that may be incident upon arbitrarily on the R.Yet according to previous methods, contiguous transfer seizure effect can not be obtained in real time.
6. computing environment
Fig. 6 illustrates the example of a general suitable computing environment (600), and the illustrative embodiment here may be performed in this environment.This computing environment (600) does not plan to advise any restriction to usable range of the present invention or function, because present invention may be realized in different universal or special computing environment.
As shown in Figure 6, computing environment (600) comprises at least one processing unit (610) and storer (620).In Fig. 6, this most basic configuration (630) is included in the dotted line.Processing unit (610) is carried out and is calculated executable instruction, and may be reality or virtual processor.In a multiprocessing system, multiplied unit is carried out the calculating executable instruction and is improved processing power.Storer (620) can be the storer (for example, register, impact damper, random access memory etc.) of volatibility, non-volatile storer (for example, ROM (read-only memory), electricallyerasable ROM (EEROM), flash memory etc.) or these some combinations of two.Storer (620) storage realizes having the software (680) of light from the graph image demonstration of shifting.
A computing environment can have supplementary features, and for example, computing environment (600) comprises reservoir (640), one or more input equipments (650), and one or more output devices (660), and one or more communication connects (670).An interlocking frame (not shown), for example network interconnection of bus, controller or computing environment (600) assembly.Typically, the operating system software (not shown) provides the operating environment of other software of operation in computing environment (600), and the activity of the assembly of Coordination calculation environment (600).As what mentioned, the computing environment expectation comprises graphics process hardware and software, for example DirectX and OpenGL function library and ATI Radeon or Nvidia GeForce video card.
Reservoir (640) may comprise disk, tape or magnetic tape cassette for movably or immovable, CD-ROM, CD-RW, DVD, or any other can be used to canned data and can be in computing environment (600) accessed medium.Storer (640) storing software (680), the instruction of this software carries out image demo system (Fig. 1).
Input equipment (650) may be an input equipment that can contact, for example keyboard, mouse, writing pencil or trace ball, and a voice-input device, a scanning device, or other provide the equipment that is input to computing environment (600).For sound, input equipment (650) can be a sound card or the similar audio input device of accepting the analog or digital form.Output device (660) may be a display, printer, loudspeaker or other equipment from the output of computing environment (600) are provided.
Communication connection (670) makes at a communication media and becomes possibility to the communication on the another one computational entity.Communication media transmits such as computer executable instructions, compressed audio or video information signal, or the information of other data in a modulated digital signal and so on.A modulated message signal is such signal, and its one or more feature is provided with along with the information in signal or changes.As an example, rather than restriction, communication medium comprises the wired or wireless technology by electricity, light, radio frequency (RF), infrared, sound or the execution of other carriers.
This invention can be described in the conventional environment of computer-readable media.Computer-readable media is any useable medium, and it can be accessed in computing environment.As an example, rather than restriction, for computing environment (600), computer-readable media comprises storer (620), reservoir (640), communication media and top any combination.
This invention can be described in the conventional environment of computer executable instructions, for example is included in the program module those, truly or on the virtual processor carries out a target in a computing environment.Normally, program module comprises the routine carrying out special duty or realize special abstract data type, program, storehouse, object, class, assembly, data structure etc.The function of this program module can be according to desired combined or separately in program module among the different embodiment.The computer executable instructions of program module can be performed in this locality or distributed computing environment.
In order to state, describe in detail and use similar " determining ", " obtaining ", " adjusting " and terms such as " application " remove to be described in a calculating operation in the computing environment.These terms are abstract to the height of computing machine executable operations, can not obscure with the performed behavior of people.Carry out and change corresponding to the actual computer operating basis of these terms.
Described and illustrational principle of the present invention with reference to an illustrative embodiment, be to be appreciated that illustrative embodiment can change under the situation that does not break away from this principle on structure and details.It must be understood that here program, processing or the method described do not relate to or be limited to any specific calculations environmental form, except as otherwise noted.The dissimilar operations that may be used or carry out of various universal or special computing environment according to the instruction of describing herein.All unit of the illustrative embodiment that shows in software may be implemented on hardware, and vice versa.
Consider that principle of the present invention may be incorporated on many possible embodiment, we require with might be below claim and the invention that all is considered as us of all embodiment in the equivalent scope thereof.