Simulation of Atmospheric Phenomena
Total Page:16
File Type:pdf, Size:1020Kb
This article was originally published in a journal published by Elsevier, and the attached copy is provided by Elsevier for the author’s benefit and for the benefit of the author’s institution, for non-commercial research and educational use including without limitation use in instruction at your institution, sending it to specific colleagues that you know, and providing a copy to your institution’s administrator. All other uses, reproduction and distribution, including without limitation commercial reprints, selling or licensing copies or access, or posting on open internet sites, your personal or institution’s website or repository, are prohibited. For exceptions, permission may be sought for such use through Elsevier’s permissions site at: http://www.elsevier.com/locate/permissionusematerial ARTICLE IN PRESS Computers & Graphics 30 (2006) 994–1010 www.elsevier.com/locate/cag Technical Section Simulation of atmospheric phenomena Diego GutierrezÃ, Francisco J. Seron , Adolfo Munoz , Oscar Anson Department of Computer Science and Systems Engineering, University of Zaragoza, C/Maria de Luna 1, 50018 Zaragoza, Spain Received 19 January 2006; accepted 12 May 2006 Abstract This paper presents a physically based simulation of atmospheric phenomena. It takes into account the physics of non-homogeneous media in which the index of refraction varies continuously, creating curved light paths. As opposed to previous research on this area, we solve the physically based differential equation that describes the trajectory of light. We develop an accurate expression of the index of refraction in the atmosphere as a function of wavelength, based on real measured data. We also describe our atmosphere profile manager, which lets us mimic the initial conditions of real-world scenes for our simulations. The method is validated both visually (by comparing the images with the real pictures) and numerically (with the extensive literature from other areas of research such as optics or meteorology). The phenomena simulated include the inferior and superior mirages, the Fata Morgana, the Novaya–Zemlya, the Viking’s end of the world, the distortions caused by heat waves and the green flash. r 2006 Elsevier Ltd. All rights reserved. Keywords: Atmospheric phenomena; Nonlinear ray tracing; Inhomogeneous media 1. Introduction apply it here to simulate six different effects: the inferior and superior mirages, the Fata Morgana, the Novaya- Simulating natural phenomena has always been one of the Zemlya, the Viking’s end of the world and the green flash, most challenging goals of computer graphics. In particular, and propose several others, such as the distortions caused the effect of the atmosphere on sunlight, under certain by heat waves or fire. circumstances, causes a number of really spectacular phenomena; some are well-known, like the mirages, whereas 1.1. Overview some of them remain mostly unknown, such as the Fata Morgana or the Novaya-Zemlya. As far as the authors The atmosphere is a non-homogeneous medium, with its know some of the atmospheric phenomena presented in this properties varying continuously from point to point. The paper have never been simulated before, including the last most important property in terms of defining the light two mentioned above. This is due to the difficulty of first paths is the index of refraction, which in turn depends reproducing the exact, specific atmospheric conditions strongly on temperature, density and wavelength (and required to reproduce the effect and second, accurately more subtly on other parameters such as humidity). The calculating the nonlinear trajectories of light as it travels continuous variation of the light paths induced by the non- through the atmosphere under such conditions. homogeneous index of refraction can be described by a We present here our ray tracing method to reproduce differential equation, as will be shown in Section 3. some of these spectacular phenomena. The method is Our simulation is based on three main points: general and therefore can be applied to the simulation of any effect caused by nonlinear trajectories of light. We Fermat’s principle, which yields the physically based description of the light path through a non-homoge- ÃCorresponding author. Tel.: +34 976 762 354; fax: +34 976 761 914. E-mail addresses: [email protected] (D. Gutierrez), [email protected] neous medium (with a continuously varying index of (F.J. Seron), [email protected] (A. Munoz), [email protected] refraction), coupled with a fast, efficient numerical (O. Anson). resolution method. 0097-8493/$ - see front matter r 2006 Elsevier Ltd. All rights reserved. doi:10.1016/j.cag.2006.05.002 ARTICLE IN PRESS D. Gutierrez et al. / Computers & Graphics 30 (2006) 994–1010 995 An accurate model of the atmosphere, which includes sphere as seen from the space [4]. These works are based on temperature and pressure at every point, as well as the simplified models of the physics of the atmosphere, since equations that yield the index of refraction at every they are mainly focused on performance rather than differential point at every wavelength, needed for the realism. Related to them we can find others which rely correct application of Fermat’s principle. more on the physics of the atmosphere and therefore the Our Atmospheric Profile Manager (APM), a tool to color of the sky is more realistic and physically more recreate the necessary atmospheric conditions, based on accurate. For instance Irwin [5] takes into account functions whose predicted values match actual measured Rayleigh scattering (due to the air molecules), and Jacke` l data. and Walter [6] consider Mie scattering (due to the aerosols of the atmosphere). Mie scattering enables also cloud, rain All the simulations presented in this paper are physically and even rainbow simulations. In [7], by Riley et al., both based. The equations are justified either by comparing the Rayleigh and Mie scattering are considered, although results with measured data or by citing previous works many simplifications (like single scattering) are made in which have validated them. These references are mostly order to accelerate the render times by GPU. Dobashi et al. taken from other research areas such as optics or [8] also follow a similar approach. A very interesting survey meteorology, as it is our conviction that accurate simula- about all the possible scattering related phenomena in the tions of natural phenomena do require a multidisciplinary atmosphere is the work of Sloup [9], which presents approach. Finally, although for this paper we focus on the different approaches and different models and phase Earth’s atmosphere, our model is completely general and functions for aerosols, ozone and clear air, and therefore obviously valid for any medium. sets the basis for the simulation of phenomena like clouds, The rest of the work is organized as follows: the next halos or rainbows. section describes the previous work and helps contextualize this research. Section 3 presents our simulation method, including a brief description of the physical laws involved, 2.2. Refraction related the model of the atmosphere, the equation describing the path of light and the resolution method. Section 5 validates The first work considering the atmosphere as an the method, with rendered scenes shown in Section 4. inhomogeneous medium, in which the index of refraction Finally, Sections 6 and 7 discuss the conclusions and the varies at different heights, was developed by Berger et al. future work. [10]. As a consequence, the light path is modified not only by the interaction with different objects, but by the own 2. Previous work atmosphere as well. This way some effects like superior and inferior mirages can be simulated. Their model is based on Modeling nature has always been one of the most a set of layers of the atmosphere at different heights with ambitious goals of computer graphics. There are many different indexes of refraction, and while tracing a light ray phenomena that are caused by the varying non-homo- its path is refracted at the boundaries between two layers geneous properties of the atmosphere, and consequently applying Snell’s Law. On the other hand, Musgrave [11] there has been a lot of work aimed at simulating them. rejects the previous model based on refraction and These papers can be classified into two main categories: proposes a new one, based on total reflection. This model Absorption and scattering related: These aim to obtain is also able to simulate some mirages, although it is rather the color resulting from the interaction of light and the incomplete. atmosphere. They consider that the atmosphere is a The model for simulating the atmosphere by Lehn [12] is participating medium and therefore absorption and scat- more complete. It is similar to the proposed in [10] but tering events occur while light traverses it. Phenomena like instead of pure refractions it considers parabolic paths of clouds and rainbows are simulated this way. light inside the different layers, considering a set of per- Refraction related: These focus on the obtention of the layer individual properties. Lint¸u et al. [13] follow the work true shape of what is seen. They consider that the in [12], including also wavelength dependance, and conse- atmosphere is a non-homogeneous media, and therefore quently it is capable to simulate dispersion-based atmo- light does not follow straight paths while traversing it. spheric phenomena, like the green flash. However, all these Phenomena like mirages and sunset effects can be layer-based works are limited to one dimension variations simulated this way. This paper greatly contributes to this of the index of refraction and are not capable of simulating category. other atmospheric effects like the distortion caused by fire. A more general method is presented by Seron et al. [14]. 2.1. Absorption and scattering related It computes the path of light by calculating Fermat’s principle using Euler’s Method.