• 沒有找到結果。

Accurate and Dynamic Anisotropic Scattering

6.2 Future Work

A possible direction of future work is the development of an analytic angle-formulated scattering model which considers anisotropic light sources, since the intensity is singularly dependent upon only angle. Also, algorithms for volumetric shadows using analytic tech-niques have potential for real-time applications. A discussion for each of these avenues follows.

6.2.1 Analytic Model for Scattering from Anisotropic Light Sources

Although anisotropic light sources reflect many real-world situations, light scattering effects for scenes with anisotropic light sources are difficult to include in any analytic model due to the non-constant nature of source radiance. A possible direction for future work is the development of a model for scattering from a light source such as the commonly used openGL spotlight model. The intensity of the source falls off with angle θ between the source’s illumination axis and a light ray, described by

I(θ) =

where N is the spotlight exponent and θc is the critical angle when the intensity drops to 0. The angle-formulated analytic model for airlight(Equation 4.6) is a good starting point

for considering scattering effects for a light source with the intensity distribution of Equa-tion 6.1 due to the anisotropic light source intensity’s dependence on angle. Substituting Equation 6.1 as the source intensity in our angle-formulated analytic model is shown below:

La(γ, dsv, dvp, κt) = κte−κtt

The angle between the illumination axis and the perpendicular bisector to the view ray with respect the source is denoted α, shown in Figure 6.1. The challenge for developing an analytic model appropriate for real-time rendering is movement of the physical parameter α outside of the integral. A substitution using a series of cosine terms cosNx =P

iAicos(ix) was considered but proved impractical due to the large number of terms if N is large.

illumination

Figure 6.1: Diagram of scattering with anisotropic light source

6.2.2 Volumetric Shadows

Rendering volumetric shadows using analytic techniques has potential for real-time appli-cations, as shown by the volumetric shadow algorithm [Biri et al., 2006] of Section 3.2.1.

In addition to the high fill rate for rendering the shadow volume, the algorithm also has problems when rendering shadow polygons of relatively large size. A possible improvement

for the latter problem is to avoid having to sort the shadow polygons, which is required to determine which shadow polygons are themselves in shadow. Instead, a shadow map can be used to resolve the visibility of each shadow polygon. This experimental algorithm is summarized in the following paragraphs, along with the unsolved problems encountered.

The algorithm utilizes our analytic lighting model and requires the construction of the classic shadow maps and shadow volumes. With modification to the fragment shader, it can be easily implemented as an extra rendering pass of shadow planes generated by the shadow volume algorithm.

Airlight with Occluders

To include volumetric shadows, we must consider airlight that never reaches the viewer due to occluders along the view ray. For this purpose, shadow polygons are generated by the shadow volume algorithm to indicate where the view ray potentially enters into and exits out of shadowed regions. To determine whether a point along the view ray intersecting a shadow polygon at a distance x in fact enters into or exits out of shadowed regions can be determined by the binary visibility function V (x). We consider a point visible if it lies at the edge of a shadowed region. Thus, V (x) = 1 only at those points where the view ray enters or exits shadowed regions, and V (x) = 0 otherwise. Refer to Figure 6.2 for an illustration of V (x). Assuming all objects are closed, we may then express the amount of airlight with occluders L0a as

L0a= La(dvp) − Xn

i

V (di,f)La(di,f) − V (di,b)La(di,b) (6.2) where n is the number of shadow polygons intersecting the view ray, di,b is the distance to the ith back-facing shadow polygon intersecting the view ray, and di,f is the distance to the ith front-facing shadow polygon intersecting the view ray.

Implementation Design

Equation 6.2 can be implemented by rendering the shadow polygons of the scene in an extra pass using the fragment shader. The analytic model for airlight, Equation 4.6, is used evaluate the airlight terms La in the fragment shader.

Figure 6.2: Diagram for volumetric shadow algorithm.

Shadow maps are used to determine V (d). Lookup of a shadow map in the frag-ment shader at the transformed coordinates for simply distance d along the view ray will not surprisingly generate inaccurate results since a shadow polygon, conceptually the edge of a shadowed region, may or may not be visible according to a shadow map. Instead, V (d) is determined by a lookup of all adjacent texels to the texel corresponding to the transformed coordinates at d. If any one of the adjacent texels is not under shadow according to the shadow map, then V (d) = 1. Otherwise V (d) = 0. Our experiments have shown this is a good indicator for V (d), though there definitely is potential for a more efficient indicator.

The steps for rendering volumetric shadows consist of:

SceneGeometry Pass

1. Render scene geometry. If fragment in shadow, assign contribution to 0.

That is, this step computes La(dvp) of Equation 6.2.

Shadow polygons pass

1. Set depth test write off.

2. Set additive blending.

3. Render front-facing shadow polygons.

That is, this step computesPn

i V (di,f)La(di,f) of Equation 6.2.

4. Set reverse subtractive blending.

5. Render back-facing polygons.

That is, this step computes -Pn

i V (di,b)La(di,b) of Equation 6.2.

Experimental Results

Volumetric shadows for simple objects can be rendered; however, the shadow polygons for complex objects cause unsolved discontinuous shading problems. One source of this problem is the situation when shadow polygons intersect other shadow polygons. In such a case, fragments at the intersection of two shadow polygons are rendered twice. Additionally, clamping problems occur when the sum of contributions exceed one for the pass when rendering front-facing shadow polygons. Lastly, the fill rate for the shadow polygons greatly affects the performance of the algorithm, such that complex scenes slow the frame rate significantly. Images from some experiments are shown in Figures 6.3, 6.4, 6.5, 6.6, and 6.7.

Figure 6.3: Image of simple torus’ volumetric shadow.

Figure 6.4: Image of simple table’s volumetric shadow.

Figure 6.5: When intersecting shadow polygons exist, fragments at the intersection are incorrectly rendered multiple times with non-zero contribution.

Figure 6.6: Image illustrating clamping problem. RGB values clamp to one incorrectly when the contribution of the scene and front-facing shadow polygons exceeds one. High intensity of light source induces clamping problems, causing general over-darkening of the torus’ hole.

The really dark strips result where more shadow polygons are rendered, since sharp edges in the silhouette may have concave areas(not a fundamental problem in itself, just a result of clamping problem).

Figure 6.7: Image of car’s volumetric shadow. Discontinuous shading problems occur when rendering the shadow of more complex objects. The source of discontinuous shading problems include intersecting shadow polygons, clamping, and perhaps other unforeseen reasons.

Bibliography

[Ashikhmin et al., 2004] Ashikhmin, M., Premoze, S., Ramamoorthi, R., and Nayar, S.

(2004). Blurring of light due to multiple scattering by the medium: a path integral approach. Technical report CUCS-017-04, Columbia University.

[Biri et al., 2002] Biri, V., Michelin, S., and Arques, D. (2002). Real-time animation of realistic fog. In Thirteenth Eurographics Workshop on Rendering 2002.

[Biri et al., 2006] Biri, V., Michelin, S., and Arques, D. (2006). Real-time rendering of atmospheric scattering and volumetric shadows. In The 14th International Conference in Central Europe on Computer Graphics, Visualization and Computer Vision 2006.

[Cerezo et al., 2005] Cerezo, E., Perez-Cazorla, F., Pueyo, X., Seron, F., and Sillion, F.

(2005). A survey on participating media rendering techniques. The Visual Computer.

[Dobashi et al., 2000a] Dobashi, Y., Kaneda, K., Yamashita, H., Okita, T., and Nishita, T. (2000a). A simple, efficient method for realistic animation of clouds. In SIGGRAPH

’00: Proceedings of the 27th annual conference on Computer graphics and interactive techniques, pages 19–28.

[Dobashi et al., 2000b] Dobashi, Y., Yamamoto, T., and Nishita, T. (2000b). Interactive rendering method for displaying shafts of light. In PG ’00: Proceedings of the 8th Pacific Conference on Computer Graphics and Applications, page 31.

[Dobashi et al., 2002] Dobashi, Y., Yamamoto, T., and Nishita, T. (2002). Interactive ren-dering of atmospheric scattering effects using graphics hardware. In HWWS ’02:

Pro-ceedings of the ACM SIGGRAPH/EUROGRAPHICS conference on Graphics hardware, pages 99–107.

[Dunn, 1997] Dunn, A. (1997). Light Scattering Properties of Cells. PhD thesis, University of Texas at Austin.

[Everitt and Kilgard, 2002] Everitt, C. and Kilgard, M. (2002). Practical and robust sten-ciled shadow volumes for hardware-accelerated rendering.

[Harris and Lastra, 2001] Harris, M. J. and Lastra, A. (2001). Real-time cloud rendering.

In EG 2001 Proceedings, pages 76–84.

[Hegeman et al., 2005] Hegeman, K., Ashikhmin, M., and Premoze, S. (2005). A lighting model for general participating media. In SI3D ’05: Proceedings of the 2005 symposium on Interactive 3D graphics and games, pages 117–124.

[Hoffman and Preetham, 2003] Hoffman, N. and Preetham, A. J. (2003). Real-time light-atmosphere interactions for outdoor scenes. Graphics programming methods, pages 337–

352.

[Ishimaru, 1997] Ishimaru, A. (1997). Wave Propagation and Scattering in Random Media.

IEEE Press.

[Iwasaki et al., 2003] Iwasaki, K., Dobashi, Y., and Nishita, T. (2003). A volume rendering approach for sea surfaces taking into account second order scattering using scattering maps. In VG ’03: Proceedings of the 2003 Eurographics/IEEE TVCG Workshop on Volume graphics, pages 129–136.

[Jensen, 2001] Jensen, H. W. (2001). Realistic image synthesis using photon mapping. A.

K. Peters, Ltd.

[Jensen and Christensen, 1998] Jensen, H. W. and Christensen, P. H. (1998). Efficient sim-ulation of light transport in scences with participating media using photon maps. In SIGGRAPH ’98: Proceedings of the 25th annual conference on Computer graphics and interactive techniques, pages 311–320.

[Kajiya and Herzen, 1984] Kajiya, J. T. and Herzen, B. P. V. (1984). Ray tracing volume densities. In SIGGRAPH ’84: Proceedings of the 11th annual conference on Computer graphics and interactive techniques, pages 165–174.

[Lafortune and Willems, 1996] Lafortune, E. P. and Willems, Y. D. (1996). Rendering participating media with bidirectional path tracing. In Proceedings of the eurographics workshop on Rendering techniques ’96, pages 91–100, London, UK. Springer-Verlag.

[Lecocq et al., 2000] Lecocq, P., Kemeny, A., Michelin, S., and Arques, D. (2000). Math-ematical approximation for real-time lighting rendering through participating media. In PG ’00: Proceedings of the 8th Pacific Conference on Computer Graphics and Applica-tions, page 400.

[Lloyd et al., 2004] Lloyd, B., Wendt, J., Govindaraju, N., and Manocha, D. (2004). Cc shadow volumes. In Proceedings of the Eurographics Symposium on Rendering (2004).

[Max, 1995] Max, N. (1995). Optical models for direct volume rendering. IEEE Transac-tions on Visualization and Computer Graphics, 1(2):99–108.

[Narasimhan and Nayar, 2003] Narasimhan, S. G. and Nayar, S. K. (2003). Shedding light on the weather. In IEEE CVPR.

[Nishita et al., 1996] Nishita, T., Dobashi, Y., and Nakamae, E. (1996). Display of clouds taking into account multiple anisotropic scattering and sky light. In SIGGRAPH ’96:

Proceedings of the 23rd annual conference on Computer graphics and interactive tech-niques, pages 379–386.

[Nishita et al., 1987] Nishita, T., Miyawaki, Y., and Nakamae, E. (1987). A shading model for atmospheric scattering considering luminous intensity distribution of light sources. In SIGGRAPH ’87: Proceedings of the 14th annual conference on Computer graphics and interactive techniques, pages 303–310.

[Nishita et al., 1985] Nishita, T., Okamura, I., and Nakamae, E. (1985). Shading models for point and linear sources. ACM Trans. Graph., 4(2):124–146.

[Nishita et al., 1993] Nishita, T., Sirai, T., Tadamura, K., and Nakamae, E. (1993). Display of the earth taking into account atmospheric scattering. In SIGGRAPH ’93: Proceedings of the 20th annual conference on Computer graphics and interactive techniques, pages 175–182.

[O’Neil, 2005] O’Neil, S. (2005). Accurate atmospheric scattering. GPU Gems 2.

[Pharr and Humphreys, 2004] Pharr, M. and Humphreys, G. (2004). Physically Based Ren-dering: From Theory to Implementation. Morgan Kaufmann Publishers Inc.

[Preetham, 2003] Preetham, A. J. (2003). Modeling skylight and aerial perspective. ACM SIGGRAPH 2003 Course #1 Notes.

[Preetham et al., 1999] Preetham, A. J., Shirley, P., and Smits, B. (1999). A practical an-alytic model for daylight. In SIGGRAPH ’99: Proceedings of the 26th annual conference on Computer graphics and interactive techniques, pages 91–100.

[Premoze et al., 2004] Premoze, S., Ashikhmin, M., Ramamoorthi, R., and Nayar, S. K.

(2004). Practical rendering of multiple scattering effects in participating media. In Rendering Techniques, pages 363–373.

[Premoze et al., 2003] Premoze, S., Ashikhmin, M., and Shirley, P. (2003). Path integration for light transport in volumes. In EGRW ’03: Proceedings of the 14th Eurographics workshop on Rendering, pages 52–63.

[Ramamoorthi and Hanrahan, 2002] Ramamoorthi, R. and Hanrahan, P. (2002). Fre-quency space environment map rendering. In SIGGRAPH ’02: Proceedings of the 29th annual conference on Computer graphics and interactive techniques, pages 517–526.

[Riley et al., 2004] Riley, K., Ebert, D. S., Kraus, M., Tessendorf, J., and Hansen, C. (2004).

Efficient rendering of atmospheric phenomena. In Eurographics Symposium on Rendering, pages 375–386.

[Sloup, 2002] Sloup, J. (2002). A survey of the modelling and rendering of the earth’s atmosphere. In Proceedings of the 18th Spring Conference on Computer Graphics.

[Sun et al., 2005] Sun, B., Ramamoorthi, R., Narasimhan, S. G., and Nayar, S. K. (2005).

A practical analytic single scattering model for real-time rendering. ACM Transactions on Graphics (SIGGRAPH).

[Wang, 2004] Wang, N. (2004). Realistic and fast cloud rendering. Journal of Graphics Tools, 9(3):21–40.

[Williams, 1978] Williams, L. (1978). Casting curved shadows on curved surfaces. In SIG-GRAPH ’78: Proceedings of the 5th annual conference on Computer graphics and inter-active techniques, pages 270–274.

[Zhang and Crawfis, 2002] Zhang, C. and Crawfis, R. (2002). Volumetric shadows using splatting. In VIS ’02: Proceedings of the conference on Visualization ’02, pages 85–92, Washington, DC, USA. IEEE Computer Society.

[Zhang and Crawfis, 2003] Zhang, C. and Crawfis, R. (2003). Shadows and soft shadows with participating media using splatting. IEEE Transactions on Visualization and Com-puter Graphics, 9(2):139–149.

相關文件