A system and method are provided for approximating a diffusion profile utilizing gathered lighting information associated with an occluded portion of an object. In use, the present technique gathers information associated with an occluded portion of an object that is illuminated with a two-dimensional pattern of light including an edge which defines an illuminated portion and the occluded portion of the object. To this end, a diffusion profile of the object is approximated, utilizing such information.
|
8. A method, comprising:
gathering information associated with anon-illuminated first portion of a physically tangible object that is illuminated with a two-dimensional pattern of light including an edge which defines an illuminated second portion and the non-illuminated first portion of the physically tangible object, the information describing light scattered from the illuminated second portion of the physically tangible object; and
approximating a diffusion profile of the physically tangible object, utilizing the information;
wherein the diffusion profile is approximated utilizing a plurality of gaussian functions;
wherein the approximating is performed utilizing a processor;
wherein convolutions of multiples and dipoles are fit to the diffusion profile;
wherein the convolutions of multipoles are computed utilizing a plurality of gaussian functions.
18. A system, comprising:
a processor for gathering information associated with a non-illuminated first portion of a physically tangible object that is illuminated with a two-dimensional pattern of light including an edge which defines an illuminated second portion and the non-illuminated first portion of the physically tangible object, and approximating a diffusion profile of the physically tangible object, utilizing the information, the information describing light scattered from the illuminated second portion of the physically tangible object;
wherein the diffusion profile is approximated utilizing a plurality of gaussian functions;
wherein the system is operable such that convolutions of multipoles and dipoles are fit to the diffusion profile;
wherein the system is operable such that the convolutions of multipoles are computed utilizing a plurality of gaussian functions.
17. A computer program product embodied on a non-transitory computer readable medium, comprising:
computer code for gathering information associated with a non-illuminated first portion of a physically tangible object that is illuminated with a two-dimensional pattern of light including an edge which defines an illuminated second portion and the non-illuminated first portion of the physically tangible object, the information describing light scattered from the illuminated second portion of the physically tangible object; and
computer code for approximating a diffusion profile of the physically tangible object, utilizing the information;
wherein the computer program product is operable such that the diffusion profile is approximated utilizing a plurality of gaussian functions;
wherein the computer program product is operable such that convolutions of multipoles and dipoles are fit to the diffusion profile;
wherein the computer program product is operable such that the convolutions of multipoles are computed utilizing a plurality of gaussian functions.
11. A system, comprising:
a processor for gathering information associated with an occluded portion of a physically tangible object that is illuminated with a two-dimensional pattern of light including an edge which defines an illuminated portion and the occluded portion of the physically tangible object, and approximating a diffusion profile of the physically tangible object utilizing the information, the information describing light scattered from the illuminated portion of the physically tangible object and the two-dimensional pattern being provided utilizing an occluder separate from the physically tangible object that is closer to the physically tangible object than a source of the light;
wherein the system is operable such that prior to the approximation of the diffusion profile, a gamma correction operation is performed on the gathered information, an estimate of ambient lighting is removed from the gathered information, and noise and texture of the edge is removed from the gathered information utilizing a directional blur tangential applied to the edge.
1. A method, comprising:
gathering information associated with an occluded portion of a physically tangible object that is illuminated with a two-dimensional pattern of light including an edge which defines an illuminated portion and the occluded portion of the physically tangible object, the information describing light scattered from the illuminated portion of the physically tangible object and the two-dimensional pattern being provided utilizing an occluder separate from the physically tangible object that is closer to the physically tangible object than a source of the light; and
approximating a diffusion profile of the physically tangible object utilizing the information;
wherein the approximating is performed utilizing a processor;
wherein prior to the approximation of the diffusion profile, a gamma correction operation is performed on the gathered information, an estimate of ambient lighting is removed from the gathered information, and noise and texture of the edge is removed from the gathered information utilizing a directional blur tangential applied to the edge.
10. A computer program product embodied on a non-transitory computer readable medium, comprising:
computer code for gathering information associated with an occluded portion of a physically tangible object that is illuminated with a two-dimensional pattern of light including an edge which defines an illuminated portion and the occluded portion of the physically tangible object, the information describing light scattered from the illuminated portion of the physically tangible object and the two-dimensional pattern being provided utilizing an occluder separate from the physically tangible object that is closer to the physically tangible object than a source of the light; and
computer code for approximating a diffusion profile of the physically tangible object utilizing the information;
wherein the computer program product is operable such that prior to the approximation of the diffusion profile, a gamma correction operation is performed on the gathered information, an estimate of ambient lighting is removed from the gathered information, and noise and texture of the edge is removed from the gathered information utilizing a directional blur tangential applied to the edge.
3. The method of
7. The method of
9. The method of
12. The system of
13. The method of
14. The method of
15. The method of
16. The method of
|
The present application claims priority to a provisional application filed Mar. 8, 2007 under Application Ser. No. 60/893,869, which is incorporated herein by reference in its entirety.
The present invention relates to diffusion profiles, and more particularly to diffusion profiling.
Accurate rendering of many real-world objects requires modeling subsurface scattering effects to capture translucent appearance. Examples of translucent materials include, but are certainly not limited to milk, ketchup, jade, marble, plastic, etc. One important class of translucent materials, namely organic materials such as plant leaves and human skin, include multiple translucent layers. Human skin, in particular, presents a challenge for realistic rendering.
In the past, prior art systems have approximated the aforementioned subsurface scattering effects using diffusion profiles. Typically, such diffusion profiles have been captured by illuminating an object with a laser and photographing a fall off using high dynamic range (HDR) lighting techniques, etc. These systems rely on the use of expensive lasers, cameras, etc. Moreover, such laser-based systems exhibit difficulty when approximating multi-layer profiles.
There is thus a need for addressing these and/or other issues associated with the prior art.
A system and method are provided for approximating a diffusion profile utilizing gathered lighting information associated with an occluded portion of an object. In use, the present technique gathers information associated with an occluded portion of an object that is illuminated with a two-dimensional pattern of light including an edge which defines an illuminated portion and the occluded portion of the object. To this end, a diffusion profile of the object is approximated, utilizing such information.
In the context of the present description, the term diffusion profile may refer to any profile that describes how a wave scatters off and/or transmits through a material. For example, the diffusion profile may include, but is certainly not limited to a transmittance profile, a reflectance profile, etc. Of course, such diffusion profile may refer to any wave including, but not limited to light, heat, electromagnetic waves, neutron transport, etc.
As shown in
The calculation of operation 102 may involve any mathematical operation. Just by way of example, in one embodiment, the results may include a plurality of convolutions of a dataset (e.g. 2D, 3D, or higher) using the Gaussian functions. In various embodiments, such dataset may be discrete, or defined analytically or implicitly. In still additional embodiments, each convolution may be separable, and can even be hierarchically built from the last, etc.
Next, in operation 104, the results of the Gaussian functions are summed. Such sum may then be used to generate an approximation of the convolution function. See operation 106. In the context of an embodiment involving the aforementioned weights, a linear combination may thus result. Therefore, in various embodiments where operation 102 involves the aforementioned convolution, the sum of Gaussian functions may be used to approximate the dataset convolved by the approximated convolution function.
By approximating the convolution function in such manner, one or more images may be rendered utilizing the approximation, thus increasing the speed with which rendering can take place. See operation 108. In some embodiments, the method 100 may be used to achieve real-time or near real-time rendering. Of course, however, embodiments are contemplated where such technique is utilized for improved offline rendering.
More illustrative information will now be set forth regarding various optional architectures and features with which the foregoing framework may or may not be implemented, per the desires of the user. Specifically, more information will be provided regarding embodiments involving convolution functions in the form of diffusion profiles. Thus, it should be strongly noted that the following information is set forth for illustrative purposes and should not be construed as limiting in any manner. Any of the following features may be optionally incorporated with or without the exclusion of other features described.
For example, in various embodiments, the aforementioned diffusion profile may be represented by dipoles and/or multipoles. In such embodiments, such dipoles and multipoles may be approximated by the sum of Gaussians of the method 100 of
In such context, it is noted that light transport in translucent materials is governed by the bidirectional scattering surface reflectance distribution function (BSSRDF). Such BSSRDF, S, gives the proportion of light incident at position xi in direction ωi that radiates out from position x0 in direction ω0. A total outgoing radiance L0 is shown in Expression #1.
L0(x0,ω0)=∫A∫2πS(xi,
One possible dipole diffusion approximation that allows efficient simulation of highly scattering materials is shown in Expression #2.
More information regarding such dipole diffusion approximation may be found with reference to JENSEN, H. W., MARSCHNER, S. R., LEVOY, M., AND HANRAHAN, P. 2001. A practical model for subsurface light transport. In Proceedings of SIGGRAPH 2001, 511-518, which is incorporated herein by reference in its entirety.
By Expression #2, S is reduced to depend only on the scattering properties of the material, the Fresnel terms at x0 and xi and the distance between x0 and xi. It should be noted that Fi is the Fresnel transmittance and R(r) is the radial diffusion profile of the material. Further information regarding such Fresnel transmittance F1 may be found with reference to PHARR, M., AND HUMPHREYS, G. 2004. Physically Based Rendering: From Theory to Implementation. Morgan Kaufmann Publishers Inc., which is incorporated herein by reference in its entirety.
Using dipoles, simple analytic diffusion profiles may be derived assuming a flat, homogeneous, semi-infinite dielectric material. More information regarding multi-layered environments (without the aforementioned semi-infinite requirement) will now be set forth in the context of
As shown, a plurality of layers 202 (e.g. thin slabs, etc.) is provided which may take the form of different layers. Just by way of example, the layers 202 may represent an organic material with multiple translucent layers (e.g. plant leaves, human skin, etc.). While two (2) layers 202 are shown in
While the light source 203 is shown to impart light on a front side of the layers 202, it should be noted that such light may also be imparted on a back side of the layers 202. This may be useful for providing additional information, for reasons that will soon become apparent.
Such light has a point of entry 204 and a point of exit 206 with a distance r therebetween. While not shown, the light is subject to a sizeable amount of scattering, reflecting, etc. amongst the various layers 202, before leaving at the point of exit 206. Such behavior is a function of a diffusion profile 208 of each of the layers 202. Each diffusion profile 208 may, in one possible embodiment, be characterized as a combination of a reflectance profile R(r) and a transmittance profile T(r), which are calculated using a multipole.
Such profiles describe how much diffuse light reflects off (or transmits through) each layer 202 due to a focused white beam of light hitting each layer 202 at the distance r from the point being considered (e.g. the point of exit 206, etc.). In one optional embodiment, different profiles may be computed for each wavelength of light being treated.
In Expression #2 discussed hereinabove, the reflectance profile R(r) may be used if xi is on the same side of the associated layer 202 as x0, otherwise T(r) is used. In the case of back lighting, T(r) uses r=∥x0−x′i∥ where x′i is xi projected through the associated layer 202 to the back side in the direction of a normal of the associated layer 202. Rough surfaces may also be accounted for by modifying the Fresnel terms.
In use, the reflectance and transmittance profiles may be computed for two layers 202 placed together by analyzing the convolution of diffusion profiles of one layer 202 by that of another, as light bounces between them. More information regarding such technique may be found with reference to DONNER, C., AND JENSEN, H. W. 2005. Light diffusion in multi-layered translucent materials. In Proceedings of SIGGRAPH 2005, 1032-1039, which is incorporated herein by reference in its entirety.
Since Expressions #1-2 involve two-dimensional surface convolution of irradiance (scaled by Fresnel terms) with a radially symmetric convolution kernel R(r), associativity of convolution allows precomputation of the net kernel that describes the diffusion by the combined layers. For instance, the net diffusion profile of direct transmission through two layers without inter-layer reflection is the convolution T1+(r)*T2+(r) where T1+(r) and T2+(r) are the forward transmittance profiles for the two layers.
Expression #3 shows an accounting for inter-layer reflections.
T12+=T1+*T2++T1+*R2+*R1−*T2++T1+*R2+*R1−*R2+*R1−*T2+ . . .
Here, the “+” and “−” superscripts denote reflectance and transmittance profiles in a given direction. For instance, the second term in Expression #3 accounts for light transmitting through a first layer, reflecting off a second layer, then reflecting off the first layer going backward (−), and then transmitting through the second layer going forward (+). In the case of varying indices of refraction among layers, and in the case of three or more layers, R+i(r)≠R−i(r).
To this end, each two dimensional radial profile may be transformed to frequency space where convolutions become multiplications. See Expression #4.
12+=1+2++1+2+1−2++1+2+1−2+1−2+ . . . =1+2+(1+(2+1−)+(2+1−)2+(2+1−)3 . . . )
It can further be noted that the geometric series can be replaced, provided +2(r)−1<1 for all r, leaving that shown in Expression #5.
Note that similar derivations apply for −12(r), +12(r), and −12(r).
Again, more information regarding such technique may be found with reference to DONNER, C., AND JENSEN, H. W. 2005. Light diffusion in multi-layered translucent materials. In Proceedings of SIGGRAPH 2005, 1032-1039, which is incorporated herein by reference in its entirety.
To this end, a combination of any number of layers is permitted (plus an optional semi-infinite bottom layer), treating two at a time. Given material properties of two layers, eight radial profiles (T1,2+,−(r), R1,2+,−(r)) are computed using the multipoles. Eight (8) Fast Fourier transforms (FFTs) [and/or eight (8) 1D Hankel transforms] transform the profiles (applied radially in two dimensions) to frequency space, and then four formulae (12, 12+,−(r)) are applied to compute four frequency-space profiles of the combined layers. This may be repeated recursively for additional layers, treating the current collection of k layers as layer 1 and adding layer k+1 as layer 2. Finally, two inverse FFTs produce the reflectance and transmittance profiles used for rendering.
As mentioned previously, dipoles and multipoles that represent diffusion profiles may be approximated with sums of a number of Gaussians. In various embodiments, four Gaussians may be found to fit most single layer profiles, and more can be used to increase accuracy. To fit Gaussians to a diffusion profile R(r), one may minimize Expression #6 below.
Both the weights wi and the variances νi for k Gaussians may vary. In addition, error terms are weighted by r as profiles are applied radially, each value combining light from a circle of circumference proportional to r. The Gaussian of variance ν is described in Expression #7 below.
Sums of Gaussians may be used in the context of the present embodiment for a variety of reasons. First, since Gaussians are separable, they can be applied as two one-dimensional convolutions in x and then y over a surface. This allows a fast estimate of the surface irradiance convolution, shown in Expression #1, provided the surface is roughly planar (which is already assumed in the derivation of the dipole and multipole theories). The convolution by the non-separable kernel R(r) may be estimated as the sum of convolutions by each separable Gaussian term. Second, convolution by a wider Gaussian can be computed from the result of a previous convolution by a narrower Gaussian, considerably faster than from the original irradiance values.
Once a dipole or multipole profile is given as a sum of Gaussians, the convolutions to combine two layers (see Expression #3) become less expensive, not necessarily requiring Fourier transforms, etc. The radial two-dimensional convolution of any two Gaussians is another Gaussian as shown in Expression #8.
G(ν1)*G(ν2)=G(ν1+ν2)
The two-dimensional convolution of two radial profiles, each of which is approximated as a sum of Gaussians, is shown in Expression #9.
The result is a set of k1k2 Gaussians. In some embodiments, this may or may not avoid the FFTs and inverse FFTs required to combine two layer profiles. Although Expression #3 contains an infinite number of convolutions and additions, the summation of powers of R2+R1−, in practice, can be terminated more quickly with negligible error. Computing the total diffuse response
of each profile input to Expression #3, and using Expression #5, provides an accurate estimate of the total diffuse response of the geometric series of convolutions in Expression #3. This, in turn, provides a useful error metric for terminating the infinite series using the Gaussian convolution method. Comparing the current estimated total diffuse response to the known target, each Gaussian has a total diffuse response of 1.
In one embodiment, tracking the total diffuse response of the summation and comparing to the value predicted by Expression #5 may allow for early termination of the summation of powers. For example, when computing the profile for combined transmission by two slabs (e.g. Expression #3), n may be found as described in Expression #10 below.
In Expression #10, the d subscript refers to the total diffuse response of each profile, and ∈ is the maximum tolerated energy loss in terminating the infinite series of inter-slab reflections at n. The total diffuse response of any profile represented as a sum of Gaussians is simply the sum of the weights. Expression #10 uses the quickly computed total known diffuse response and compares the current sum of the inter-slab reflections to a known total until the current sum of the inter-slab reflections and the total sum are close.
Expression #9 squares the number of Gaussian terms after each multiply, causing the number of operations to accumulate quickly. However, fitting all initial layer profiles to powers of a smallest narrow Gaussian of variance ν, causes any two Gaussians to convolve back into the same set. That is, each R(r) and T(r) profile is approximated as a linear combination of {G(ν), G(ν)*G(ν), G(ν)*G(ν)*G(ν), . . . }, which by Expression #8 is equivalent to {G(ν), G(2ν), G(3ν), . . . }.
It should be noted that convolutions and additions of scattering profiles may be analogous to polynomial multiplications and additions over Gaussians. Thus, a lengthy process involving two-dimensional array additions, multiplications, divisions and FFTs may be reduced to no more than a small number of polynomial operations.
In one embodiment, the Levenberg-Marquardt optimization may be used to solve Expression #6. In another embodiment, closed formulae may be used that empirically give a close fit to any dipole over a wide range of material parameters, using 8 Gaussians. More information regarding such an optional technique will now be set forth. It should be strongly noted, however, that the following details are set forth for illustrative purposes only and should not be construed as limiting in any manner whatsoever.
A pattern may be observed as to the way four Gaussians optimize to fit a given pole equation, which allows fast analytic fitting of four Gaussians to any pole equation with no Levenberg-Marquardt minimization code or convergence concerns, in some embodiments. The profiles for dipoles and multipoles depend on r in the manner described in Expression #11 below.
Expression #11 satisfies
Finding a single Gaussian with equal power and equal x-intercept gives w0G(ν0,r), with w0(σtr,z)=2πPd(σtr,z) and ν0=Pd(σtr,z)/P(0,σtr,z). This provides an analytic single Gaussian fit to any pole, however it is not necessarily sufficiently accurate for rendering in some embodiments. Further analysis of fitting has revealed the spread of Gaussian variances to be invariably close to {0.2304ν0, 0.7225ν0, 2.6569ν0, 13.6ν0} for a wide range of σtr and z. With these variances, the four weights are wi=Ci(|σtrZ|)Pd(σtr, z), where Ci are four curves which have fairly simple analytic approximations (see Expression #12). Fitting each pole independently with 4 Gaussians, 8 Gaussians may be found that fit any dipole with minimal error.
In one embodiment, the sum-of-Gaussians approximation scheme, described in detail above, may be used for diffuse scattering profiles to enable real-time rendering of multi-layer translucent materials under dynamic all-frequency lighting. Extensions to the texture-space diffusion and translucent shadow map algorithms are described in further detail below in the context of
As shown in operation 402, a texture surface is generated including both color and depth information (e.g. R, G, B, depth values, etc.). Such information may, in one embodiment, be stored in an off-screen buffer. In another embodiment, a parameterized mesh may be used (e.g. a 1:1 UV parameterization, or a series of charts plus a partition of unity, etc.). Further, an irradiance function (attenuated by ρdt) may be convolved over the mesh by rasterizing irradiance into an off-screen texture in the aforementioned off-screen buffer.
After or in parallel with operation 402, both stretch and curvature information may be computed. Note operation 404. In one embodiment, such stretch and curvature information may be dynamically generated utilizing fragment shaders or any desired mechanism, for that matter. Further, in one embodiment, a stretch value and curvature value may be stored for each u and ν value associated with the texture surface of operation 402. For reasons that will soon become apparent, the color, depth, stretch, and color information of operations 402-404 may be stored for later use. Note operation 406.
In possible embodiments, various graphics processor derivative instructions of a fragment shader may be used to quickly estimate the aforementioned stretch value. Further, various techniques may be used to efficiently compute normal curvature over a general mesh (with or without displacement, bump, or normal maps, etc.).
Next, in operation 408, a previously-stored texture surface and the associated stretch/curvature information may be convolved to provide a new blurred texture surface. In one optional embodiment, the texture space stretching and normal curvature may be convolved simultaneously with irradiance (e.g. in a separate 4 channel texture, etc.). As will soon become apparent, the convolution of stretch/curvature information is what prevents small scale features from affecting large scale convolution. Again, the results of such convolution may be stored as set forth in operation 410.
Both the stretching and normal curvature modulate each separable blur convolution step, providing a more accurate accumulation of samples based on the true distance between them in space. The stretch information may directly scale the spread of the separable samples in texture space. Further, surface curvature may be used to modulate the shape of the (otherwise) Gaussian kernels using a simple heuristic.
As the effective radius, roughly 3ν, of the current convolution step approaches π times the radius of normal curvature 1/K, all samples along the surface are then equidistant from a virtual source a distance 3 ν/π below the surface. Therefore, one approach may involve blending towards a unit power box filter as 3νapproaches π/K. If, however, the mean free path is not comparable to 3ν, the current convolution step may not necessarily be heavily weighted in approximating the material profile. This change may be lost in further convolution steps, thereby eliminating the introduction of unwanted error.
Thus, a basis set of Gaussian convolutions for a current texture is computed, taking into account normal curvature and texture space stretching in each direction. For efficiency, such convolution may comprise a two step process involving a first multi-point vertical tap followed by a second multi-point horizontal tap (e.g. the convolution may be performed separately in u and ν, etc.), and convolution kernels may be chosen such that each convolution step operates hierarchically on the result of the previous step (as will soon become apparent), etc.
As indicated in decision 412, operations 408-410 may be repeated as desired to generate multiple instances of the texture surface and the associated stretch/curvature information. The number of convolutions and resulting texture/stretch/curvature information may, in some embodiments, be equal to the number of Gaussians that can eventually be used to approximate the diffusion profile.
Thereafter, a diffusion radiance may be computed in operation 414. To this end, the information may be weighted and combined. Thus, a complete basis of radial Gaussian convolutions may be combined in a final render pass using texture mapping. In various embodiments, the basis functions may be combined separately in R, G, and B to accurately match the diffusion profiles of the material, and the total diffuse exitance may be scaled by ρdt and combined with specular reflection. See operation 416.
During the final render pass, an average depth may be computed through the surface (from the point of the light) from the basis of convolved distances (as will be elaborated upon later in greater detail). Appropriate convolutions of irradiance may then found at the point of entry by sampling the convolved irradiance textures at the coordinates (u,ν) stored in the translucent shadow map. The local and global scattering terms may further be combined based on the proximity of the coordinates (u,ν) where light enters and the coordinates (u,ν) of the point being rendered (favoring the local scattering approximation and scaling away the global scattering contribution as the two locations in texture space approach each other).
In various optional embodiments, translucent shadow maps may be modified to account for forward scattering through thin regions. It should be noted that, whereas translucent shadow maps render the depth, irradiance, and surface normal, and thus store these quantities for the surface nearest the light (the “light facing surface”) at every pixel of the shadow map, the present embodiment renders and stores the coordinates (u,ν) along with depth. More information regarding translucent shadow maps may be found with reference to DACHSBACHER, C., AND STAMMINGER, M. 2003. Translucent shadow maps. In Eurographics Symposium on Rendering: 14th Eurographics Workshop on Rendering, 197-201, which is incorporated herein by reference in its entirety.
Still yet, in additional embodiments, the depth may be estimated through the surface from the topmost surface from the point of view of light. More information regarding such technique may be found with reference to GREEN, S. 2004. Real-time approximations to subsurface scattering. In GPU Gems, R. Fernando, Ed. Addison Wesley, Mar., ch. 16, 263-278, which is incorporated herein by reference in its entirety.
Furthermore, a set of multiscale depth convolutions may be built along with irradiance (e.g. depth through the surface may be stored in the alpha channel of the convolved textures, etc.). In the original translucent shadow map algorithm, high frequency changes in depth through the surface can cause unwanted high frequency artifacts, which may be reduced by using a better estimate of average depth.
In one embodiment, the (u,ν) coordinates and depth of the light facing surface are rendered and stored to allow every shadowed surface location to compute distance through the object toward the light, and to access convolved versions of irradiance on the light facing surface by looking up into the same irradiance textures used for local scattering. For example, at any shadowed location (e.g. point C), the translucent shadow map provides a distance or depth (m) and the (u,ν) coordinates of a point on the light-facing surface (e.g. point A).
It may be desirable to estimate the scattered light exiting at the shadowed location C, which is the convolution of irradiance at each light-facing point by a profile (R) through the thickness of an object. The convolution may instead be computed at a point B which is directly in line with point A (i.e. a 90 degree angle between the light facing surface, point A, and point B), since this computation may be accomplished very efficiently. It should be noted that, for low angles (0), B may be close to C, and for high angles, the Fresnel term may reduce the contribution. The convolution kernel is shown in Expression #13 below.
In this example, d=m cos(θ) may represent the thickness of the object. Because the Gaussians are separable in the third dimension, global transmittance is the weighted sum of k texture lookups, each weighted by wie−d
In the current example, the depth (m), computed by the shadow map, is corrected by cos(θ), since a diffusion approximation is being used and the most direct thickness may be more applicable. Surface normals at point A and point C may be compared and the distance correction applied when the surfaces are oppositely facing. As an example, an interpolation between the points may be accomplished using: lerp(m,m cos(θ),max(0,−NA·NC)).
It should be noted that the derivation described in the current example assumes a planar surface with constant thickness d. This is similar to the dipole and multipole theories, which were derived in a plane-parallel setting but are directly applied to curved surfaces. Of course, this assumption may not hold for 3D models in general, however directly applying the technique to curved surfaces may be desirable.
In one embodiment, the depth (m) may be convolved through the surface, over the surface of the object. For example, e−m*k may be convolved over the surface over the surface of the object, where k is a constant. Although, this embodiment is described in the context of the current example, such embodiment may be implemented in the context of other various embodiments and examples.
Further, high-frequency changes in depth through the surface may create high-frequency artifacts in a final image. In one embodiment, the depth may be convolved simultaneously with irradiance by storing the depth in an alpha channel before convolving the irradiance textures, to mitigate these effects. Computation of forward transmittance for each Gaussian i then may use the convolved depth from irradiance texture i−1.
To avoid double contribution from both local and global scattering, the global scattering terms may be interpolated to 0 as the (u,ν) coordinate of the point being rendered (e.g. point C) approaches the (u,ν) coordinate of the light facing surface at a point (e.g. point A). In one embodiment, a separate interpolation may be used for each Gaussian starting when the two locations are a distance 6√{square root over (νi)} apart.
Additionally, in one embodiment, the diffuse color map may be treated as an infinitesimal, highly absorptive layer that absorbs light once as it enters the surface and once as it leaves. More information regarding such technique may be found with reference to WEYRICH, T., MATUSIK, W., PFISTER, H., BICKEL, B., DONNER, C., TU, C., MCANDLESS, J., LEE, J., NGAN, A., JENSEN, H. W., AND GROSS, M. 2006. Analysis of human faces using a measurement-based skin reflectance model. ACM Transactions on Graphics 25, 3 (July), 1013-1024, which is incorporated herein by reference in its entirety.
It should be noted that the application of the sum-of-Gaussians approximation scheme, described in detail above, is not limited to enabling real-time rendering of multi-layer translucent materials under dynamic all-frequency lighting. For example, other embodiments may include, but are not limited to the sum-of-Gaussians approximation scheme being used for diffuse scattering profiles to enable efficient offline rendering of multi-layer translucent materials under dynamic all-frequency lighting. In addition, such sum-of-Gaussians approximation scheme may be applied to rendering of single-layer translucent materials under dynamic all-frequency lighting.
An exemplary implementation of the method 400 of
TABLE #1
Render irradiance texture:
Render Translucent Shadow Map (TSM)
Render any other shadow maps
Irrad = sum of diffuse light from point, spot,
environment lights
Irrad *= Fresnel term rdt (xi)
Irrad *= sqrt(diffuse color)
Irrad.alpha = distance through surface, from the TSM
Render Stretch-and-Curvature texture:
Simple fragment program with derivative instructions
Stretch = four channel texture of U stretch, V stretch,
U curvature, and V curvature
// Gaussian basis is G(v), G(2v), ..., G(kv)
For i = 1 to k, compute Irrad convolved by G(i*v):
Blur Stretch by v in U direction, compensated by
Stretch
Blur Irrad by v in U direction, compensated by Stretch
Blur Stretch by v in V direction, compensated by
Stretch
Blur Irrad by v in V direction, compensated by Stretch
// Now Stretch and Irrad are blurred by i*v in both U
and V
IrradBasis[i] = Irrad
Render final image:
Render mesh in 3D, reading from textures
Image = 0
For i = 1 to k :
Image += wi * IrradBasis[i]
AvgDist = average distance through surface based on
IrradBasis[i].alpha
w0i = weight of global scattering based on AvgDist
and TSM
Image + = w0i * IrradBasis[i] at the (u,v) from the TSM
Image *= Fresnel term rdt (xo)
Image *= sqrt(diffuse color)
Image += sum of specular term of lights
Of course, such exemplary implementation is set forth for illustrative purposes only and should not be construed as limiting in any manner whatsoever.
In another embodiment, a simple image-based technique may be used to capture approximate reflectance and transmittance profiles for multi-layered materials. Such embodiment may be particularly useful where various information (e.g. scattering properties, thickness, etc. of various layers, etc.) of a multi-layer object is not known. More information regarding such embodiment will now be set forth in the context of
As shown, an object is illuminated with a two-dimensional pattern of light. See operation 502. In the context of the present description, such object may include absolutely anything capable of having a diffusion profile. In one optional embodiment, the object may include a plurality of layers in the form of a multi-layer object.
Further, the pattern of light includes an edge which defines an illuminated portion and an occluded portion of the object. In one embodiment, the two-dimensional pattern may be provided utilizing an occluder that is positioned closer to the object than the light source, and occludes light from illuminating part of the object. Such occluder may, in turn, include a white diffuse object, in some embodiments. As an option, the two-dimensional pattern may change as a function of time. More illustrative information regarding one possible way the object may be illuminated will be set forth during the description of
With such illumination, information associated with the occluded portion of the object may be gathered (with or without information associated with the illuminated portion of the object). Note operation 504. In the context of the present description, such information may include any data associated with the occluded portion of the object that may be used in approximating a diffusion profile of the object, as will soon become apparent. In one embodiment, the information may describe light scattered from the illuminated portion of the object. In various embodiments, such information may be gathered utilizing a camera. In some embodiments, operation 502 may be omitted in a situation where the foregoing information is gathered directly from a pre-captured image, etc.
To this end, a diffusion profile of the object may be approximated utilizing the information gathered in operation 504. See operation 506. In one embodiment where the aforementioned occluded/illuminated edge at least substantially represents a step function, and the information gathered in operation 504 describes light scattered from the illuminated portion of the object; such information may be considered to represent an integral, or “pre-integration,” of the step function, which may, in turn, be exploited in any one of a number of ways to approximate the diffusion profile. More illustrative information regarding various possible techniques for approximating the diffusion profile will be set forth in greater detail during the description of subsequent figures.
As shown, a light source 602 is used to illuminate an object 604. Further included is an occluder 606 that is situated between the source 602 and the object 604 for casting a shadow on the object 604, thus providing an occluded portion 606 and an illuminated portion 608 with an edge 607 therebetween. In other embodiments, the occluder 606 may actually touch the object 604, thus resulting in a shadow that may be perfectly sharp (assuming a perfectly sharp edge). In use, the illuminated portion 608 of the object 604 next to the occluder 606 may contain half of the shadow falloff which may be enough to analyze the diffusion profile.
In various embodiments, the object 604 may include a white diffuse object in the form of a white piece of chalk, white paper, and/or even a near-Lambertian reflector. Of course, other embodiments are contemplated where the object is grey or any other color, for that matter. Further, the object 604 may be small and placed flat against a measured surface. In particular, the object 604 may be placed to cross the shadow edge (but somewhere different from a region where diffusion is analyzed) so as to give as an accurate read of a softness of the resultant shadow, while leaving a large enough area containing the shadow edge for analysis.
As mentioned earlier, the pattern of light resulting from the occluder 606 may vary as a function of time. For example, in such embodiments, the object may be illuminated with structured light (e.g. black-white patterns such as checkerboards, barcodes, etc.) that change over time. This, in turn, allows one to estimate spatially varying diffusion across a surface of the object 604. This may be particularly useful for human faces and skin. In one optional embodiment, the foregoing pattern of light may be provided using a digital light processing (DLP) projector, a custom light emitting diode (LED)-based illuminant, a synchronized camera, eta., thus providing a rapid capture in the order of milliseconds.
In one embodiment, patterns of colored illumination may be used rather than white light, enabling a more accurate analyses of the diffusion profiles at different colors/frequency bands. For example, one can project red, green, blue, etc. light and then capture all wavelengths with a “black-and-white” camera. A rainbow may even be projected (e.g. by passing a beam of white light through a prism, etc.), and simultaneously capture all wavelengths across a visible spectrum (and into IR/UV), with an accuracy only limited by the spatial resolution of the camera. In one possible embodiment, the rainbow may run vertically, so the top scan line of camera pixels on the illuminated side may be deep red, the next scan line may be not-quite-as-deep-red, the middle scan lines may be green, the bottom scan line may be blue, etc., where each scan line may acquire a shadow integrated across a different spectral band.
In use, information may be gathered in association with one or more portions 610 (e.g. points) of the occluded portion 606 of the object 604. As shown, such information may describe light that scatters from the illuminated portion 608 of the object 604 to the occluded portion 606, and back to the illuminated portion 608, etc. Such information may, in turn, be used to approximate a diffusion profile of the object 604. More illustrative information regarding various possible techniques for approximating such diffusion profile will now be set forth in greater detail during reference to
In operation 702, reflected light around an edge between illuminated/occluded portions of an object is photographed to produce a single image. Of course, multiple images in the form of video or the like may be provided in other embodiments, etc. In one embodiment, such photograph may be captured utilizing a low-cost camera (e.g. digital camera with less than 10, 5, 2 MPixel resolution, etc.). Of course, use of high-cost cameras is also contemplated.
Next, in operation 704, a gamma correction operation is performed if necessary, and an estimate of ambient lighting is removed. Still yet, a directional blur tangential is applied to the shadow to remove noise and texture. Such gamma correction compensates for issues that may result from a camera used for the original capture. Further, the other operations may further enhance a resultant image.
To this end, a falloff across the edge between the illuminated/occluded portions of the object (where the falloff is perpendicular to the shadow boundary) may be approximated utilizing a plurality of error functions (e.g. ERFs, etc.). See operation 706. To accomplish this, a step function that represents the transition between one side of the edge to the other may be convolved with one or more other functions. In one embodiment, such other function may take the form of a Gaussian function. Of course, use of other functions is contemplated. To this end, a resulting shadow boundary may be linearly fit with a set of error functions.
In other embodiments, error functions may not necessarily be used. For example, where the shadow is not perfect and a white or grey diffuser is used to capture the non-perfect shadow, convolving the captured shadow by Gaussians will not necessarily. result in an error function. Further, if a basis of functions other than Gaussians is used to approximate a convolution kernel or diffusion profile (even with a perfect shadow), the resulting shadow falloffs will not necessarily include error functions.
Next, in operation 708, a plurality of weights is identified utilizing the error functions. For example, a plurality of error functions may be calculated for a plurality of data points that are linearly arranged and cross the aforementioned edge. A coefficient of each of such error functions may serve as the above weights.
To this end, the diffusion profile of the object may be approximated based on a sum of functions and the weights. See operation 710. Expression #14 shows one example of how a diffusion profile R(r) may be approximated utilizing Gaussian functions G and weights ωi. It should be noted, however, that use of other types of functions (other than Gaussian) is contemplated.
R(r)=ΣG(νi,r)·wi Expression #14
In various embodiments, any number of components (e.g. i=1 to N, etc.) may be summed. By way of example, in some embodiments, such number N may be a function of the object itself. For instance, in the case of human skin, N may be set to six (6). With the diffusion profile approximated, an image representative of the object may be rendered, utilizing the approximation. For example, the techniques set forth during the description of the previous figures may be used for such purpose. In some embodiments, surface markers may be used for accurate scale estimation.
To this end, an image-based technique may be used to capture approximate diffusion (e.g. reflectance, transmittance, etc.) profiles for multi-layered objects. Such diffusion profiles of real-world materials may be acquired instead of or in addition to calculating them directly from scattering properties and thicknesses of various multi-layer objects, by photographing a hard shadow being cast onto the object in question. Because the object may be somewhat translucent, the shadow may not necessarily be perfectly “hard,” but will rather fall off gradually as light from the illuminated portion scatters into the occluded portion. In some optional embodiments, analyzing such falloff in separate color channels may allow one to analytically fit a diffusion profile.
Thus, by photographing the shadow cast across the object, one may estimate the total incident irradiance in the scene and compensate for the not-perfectly hard shadow that will be cast by a light source and occluder. Of course, other embodiments are contemplated where no photograph is necessary and any required information is gathered using other techniques. More particularly, by noting that convolution of a step function by a kernel, R(r), contains sufficient information to compute R(r), a hard shadow boundary may be the subject of analysis. Further, the resulting weights may thus be used to determine a set of Gaussians or other functions which approximate the diffusion profile which, in turn, may be used for rendering purposes.
In various embodiments, scattering coefficients of a material may be estimated by analyzing a 1-D radial profile. There are two scattering coefficients for each layer of material, namely an absorption coefficient (e.g. absorption cross-section, etc.) and a scattering coefficient (e.g. scattering cross-section, etc.). A pair of such coefficients may be determined by fitting a dipole to a linear combination of Gaussians. In the case of a thin single-layer material, such coefficients may be determined by fitting a multipole to the sum of Gaussians (which estimates the original 1D profile/convolution-function used to convolve the shadow). If a multi-layer material is assumed and a convolution of dipoles and multipoles is fit to the measured 1D convolution function (approximated by a sum of Gaussians), a pair of absorption and scattering coefficients may be computed for each layer in the material. To this end, a single pair or plurality of pairs of absorption and scattering coefficients may be determined by fitting a dipole, multipole, convolutions of multipoles and dipoles are fit, etc.
In some embodiments, the foregoing technique may be used to avoid use of more expensive laser-based systems. However, additional embodiments are contemplated where the present techniques are used in combination with such laser-centric techniques. For example, such combination may be beneficial since the laser may capture local fall off more accurately, while possibly avoiding multi-exposure HDR for broad scattering, since the present techniques may potentially obtain such quite accurately. Of course, the use of such laser is set forth for illustrative purposes only, since any beam of light may be used including, but not limited to a laser beam, a focused halogen beam, a projector beam originating from a single pixel of light, and/or any other beam of light, for that matter.
To this end, a diffusion profile may be estimated within a material by analyzing both a shadow edge and a laser falloff. Error functions may be fit to the shadow edge falloff while corresponding Gaussians may be simultaneously fit to a laser profile (which may enable a more accurate profile estimate). Further, scattering coefficient estimates may also be more accurate.
Various optional applications of the foregoing technique have been contemplated. For example, where the object includes human skin, the diffusion profile of the human skin may be utilized for generating an avatar. Using the present capture technology, one may rapidly create accurate models of the scattering properties of human skin, including spatially-varying effects such as scars, freckles, vitiligo, makeup, etc. This may then be used for creating realistic avatars in a game or virtual environment, or capturing the appearance of actors in a film for special effects purposes.
In another embodiment, the diffusion profile of the human skin may be utilized for performing a medical operation and/or a cosmetic operation on the human skin. For instance, the ability to capture and analyze the light-scattering properties of human faces and skin may be applicable in the field of dermatology, since the appearance of cancerous and/or precancerous lesions may be sometimes be typified by their translucence. Still yet, rashes and other skin conditions such as vitiligo may be amenable to analysis and detection as well. The ability to acquire and realistically render skin may also be useful for visualizing post-operative results (e.g. for tattoo- or varicose vein-removal procedures, etc.). In such medical applications, one may analyze the shadow fall off in more spectral channels than a typical red-green-blue camera affords, including infrared and ultraviolet wavelengths, etc.
In embodiments related to cosmetics, a tool may be used to scan exact material properties of a human face. Thereafter, realistic interactive rendering of the face may be performed under different lighting conditions and with additional layers of opaque and/or translucent materials (e.g. makeup, etc.) applied. Of course, the foregoing applications are set forth for illustrative purposes only and should not be construed as limiting in any manner whatsoever. For example, applications may range from fruit scanning, to artwork authentication, and so on.
In yet another embodiment, the environment light may be importance-sampled with a few point lights. Still yet, in still another embodiment, where minimal precomputation is available, precomputed radiance transfer (PRT) techniques may be employed to directly model single scattering. More information regarding such technique may be found with reference to WANG, R., IRAN, J., AND LUEBKE, D. 2005. All-frequency interactive relighting of translucent objects with single and multiple scattering. ACM Trans. Gr. 24, 3, 1202-1207, which is incorporated herein by reference in its entirety.
In still another embodiment, a texture chart approach may be used to correct for stretch and curvature, for example, where models with complex topology or extreme curvature exist, or where parameterized models are burdensome.
In another embodiment, the efficient analytical fitting of Gaussians may be implemented directly in the fragment shader, thus fitting profiles at every pixel every frame. This may allow support for spatially varying (i.e. texture-controlled) diffusion profiles, and building of an efficient and intuitive material editing framework for multi-layer materials.
Additionally, in another embodiment, real-time fitting to a spectral skin model may be implemented. More information regarding such model may be found with reference to “A Spectral BSSRDF for Shading Human Skin” by Craig Donner and Henrik Wann Jensen. Eurographics Symposium on Rendering (2006), which is incorporated herein by reference in its entirety.
The system 800 also includes a graphics processor 806 and a display 808, i.e. a computer monitor. In one embodiment, the graphics processor 806 may include a plurality of shader modules, a rasterization module, etc. Each of the foregoing modules may even be situated on a single semiconductor platform to form a graphics processing unit (GPU).
In the present description, a single semiconductor platform may refer to a sole unitary semiconductor-based integrated circuit or chip. It should be noted that the term single semiconductor platform may also refer to multi-chip modules with increased connectivity which simulate on-chip operation, and make substantial improvements over utilizing a conventional central processing unit (CPU) and bus implementation. Of course, the various modules may also be situated separately or in various combinations of semiconductor platforms per the desires of the user.
The system 800 may also include a secondary storage 810. The secondary storage 810 includes, for example, a hard disk drive and/or a removable storage drive, representing a floppy disk drive, a magnetic tape drive, a compact disk drive, etc. The removable storage drive reads from and/or writes to a removable storage unit in a well known manner.
Computer programs, or computer control logic algorithms, may be stored in the main memory 804 and/or the secondary storage 810. Such computer programs, when executed, enable the system 800 to perform various functions. Memory 804, storage 810 and/or any other storage are possible examples of computer-readable media.
As an option, the system 800 may further include a camera and/or light source 812 interconnected in the manner shown. Of course, such camera and/or light source may each be packaged separately or integrated with respect to any one or more of the remaining components of the system 800. In use, such the light source may be employed to illuminate an object, while the camera may be used to capture light reflected by the object, along with information regarding a shadow resulting from any intermediate occluder, etc., for the reasons set forth during the description of previous
In one embodiment, the architecture and/or functionality of the various previous figures may be implemented in the context of the host processor 801, graphics processor 806, an integrated circuit (not shown) that is capable of at least a portion of the capabilities of both the host processor 801 and the graphics processor 806, a chipset (i.e. a group of integrated circuits designed to work and sold as a unit for performing related functions, etc.), and/or any other integrated circuit for that matter.
Still yet, the architecture and/or functionality of the various previous figures may be implemented in the context of a general computer system, a circuit board system, a game console system dedicated for entertainment purposes, an application-specific system, and/or any other desired system. For example, the system 800 may take the form of a desktop computer, lap-top computer, and/or any other type of logic. Still yet, the system 800 may take the form of various other devices m including, but not limited to a personal digital assistant (PDA) device, a mobile phone device, a television, etc. Further, while not shown, the system 800 may be coupled to a network [e.g. a telecommunications network, local area network (LAN), wireless network, wide area network (WAN) such as the Internet, peer-to-peer network, cable network, etc.) for communication purposes.
While various embodiments have been described above, it should be understood that they have been presented by way of example only, and not limitation. Thus, the breadth and scope of a preferred embodiment should not be limited by any of the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents.
Luebke, David Patrick, d'Eon, Eugene J.
Patent | Priority | Assignee | Title |
10607404, | Feb 16 2015 | Thomson Licensing | Device and method for estimating a glossy part of radiation |
8682086, | Jun 02 2010 | Robert Bosch Automotive Steering GmbH | Systems and methods for determining image representations at a pixel level |
8855974, | Nov 12 2010 | Electronics and Telecommunications Research Institute | System and method for recommending sensitive make-up based on skin tone of user |
9098886, | Oct 09 2012 | Kabushiki Kaisha Toshiba | Apparatus and method for processing an image |
9129442, | Jul 28 2011 | Sony Corporation; Sony Mobile Communications AB | Presenting three dimensional depth |
9274047, | May 24 2013 | Massachusetts Institute of Technology | Methods and apparatus for imaging of occluded objects |
9448060, | May 24 2013 | Massachusetts Institute of Technology | Methods and apparatus for imaging of occluded objects |
9761044, | Mar 18 2014 | Samsung Electronics Co., Ltd. | Apparatus and method for generation of a light transport map with transparency information |
Patent | Priority | Assignee | Title |
6097397, | Nov 20 1997 | Intel Corporation | Anisotropic texture mapping using silhouette/footprint analysis in a computer image generation system |
7231080, | Feb 13 2001 | Orbotech Ltd. | Multiple optical input inspection system |
7346882, | Jul 30 2001 | Kabushiki Kaisha Toshiba | Pattern forming method, mask manufacturing method, and LSI manufacturing method |
7573474, | May 01 2002 | Microsoft Technology Licensing, LLC | Systems and methods for optimizing geometric stretch of a parametrization scheme |
7679621, | Sep 07 2005 | Kabushiki Kaisha Toshiba | Image processing apparatus and method |
8064726, | Mar 08 2007 | Nvidia Corporation | Apparatus and method for approximating a convolution function utilizing a sum of gaussian functions |
20040109077, | |||
20040193670, | |||
20060013505, | |||
20060110052, | |||
20060227137, | |||
20070065015, | |||
20070223815, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Dec 09 2007 | LUEBKE, DAVID PATRICK | Nvidia Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 020266 | /0374 | |
Dec 10 2007 | D EON, EUGENE J | Nvidia Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 020266 | /0374 | |
Dec 17 2007 | Nvidia Corporation | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Feb 23 2017 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Sep 23 2020 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Date | Maintenance Schedule |
Sep 17 2016 | 4 years fee payment window open |
Mar 17 2017 | 6 months grace period start (w surcharge) |
Sep 17 2017 | patent expiry (for year 4) |
Sep 17 2019 | 2 years to revive unintentionally abandoned end. (for year 4) |
Sep 17 2020 | 8 years fee payment window open |
Mar 17 2021 | 6 months grace period start (w surcharge) |
Sep 17 2021 | patent expiry (for year 8) |
Sep 17 2023 | 2 years to revive unintentionally abandoned end. (for year 8) |
Sep 17 2024 | 12 years fee payment window open |
Mar 17 2025 | 6 months grace period start (w surcharge) |
Sep 17 2025 | patent expiry (for year 12) |
Sep 17 2027 | 2 years to revive unintentionally abandoned end. (for year 12) |