Rain Simulation in Dynamic Scenes

Rain Simulation in Dynamic Scenes

Anna Puig-Centelles, Nicolau Sunyer, Oscar Ripolles, Miguel Chover, Mateu Sbert
DOI: 10.4018/978-1-4666-0285-4.ch018
OnDemand:
(Individual Chapters)
Available
$37.50
No Current Special Offers
TOTAL SAVINGS: $37.50

Abstract

Rain is a complex phenomenon and its simulation is usually very costly. In this article, the authors propose a fully-GPU rain simulation based on the utilization of particle systems. The flexibility of CUDA allows the authors to include, aside from the rainfall simulation, a system for the detection and handling of the collisions of particles against the scenario. This detection system allows for the simulation of splashes at the same time. This system obtains a very high performance because of the hardware programming capabilities of CUDA.
Chapter Preview
Top

Introduction

The use of an efficient and realistic rain simulation system increases the realism of outdoor scenes. The problem of depicting atmospheric precipitations has been approached in many occasions, not only for rain visualization (Tatarchuk, 2006; Wang et al., 2008), but also for its interaction with other surfaces (Kaneda, Ikeda, & Yamashita, 1999; Stuppacher & Supan, 2007) or even for the accumulation of water on the ground (Fearing, 2000).

Most of the systems proposed for real-time rain simulation are based on the use of particle systems (Kusamoto, Tadamura, & Tabuchi, 2001; Wang et al., 2006; Tariq, 2007). These systems have been successfully employed in previous solutions to simulate several types of diffuse phenomena, such as smoke or fire (Reeves, 1983). Nevertheless, the use of particle systems to represent rain has significant limitations due to the cost involved in handling the great quantity of particles that is necessary to offer scenarios of intense rain with realistic appearance. As a consequence, virtual environments which integrate particle systems have serious performance problems, as rain simulation consumes a very important part of the computer resources.

A possible solution to overcome this limitation is the exploitation of graphics hardware, since its constant evolution continuously offers new possibilities. Following this idea, there are many techniques which use GPU programs (shaders) in order to alleviate the CPU load and to speed up rain visualization (Tatarchuk, 2006; Tariq, 2007). Moreover, some of the latest proposals also include the use of the Geometry Shader (Iwasaki, Dobashi, Yoshimoto, & Nishita, 2008; Puig-Centelles, Ripolles, & Chover, 2009).

In this work we propose a rain simulation system, which is managed and updated only on graphics hardware. The solution suggested is based on the utilization of particle systems to simulate rain. It includes the management of rain under variable wind conditions and also the detection and handling of collision of raindrops against the scenario to generate splashes. Figure 1 shows an image of the proposed simulation system in an intense rain environment.

Figure 1.

Intense rain environment

978-1-4666-0285-4.ch018.f01

Developing this system by means of the traditional graphics pipeline would be very complex. Our proposal offers a very flexible framework which obtains a very high performance through the use of CUDA. CUDA (Compute Unified Device Architecture) is a technology created by NVIDIA with the objective of making the most of the great processing capacity of current graphics cards to solve problems with a high computational load (Nvidia, 2007). In the specific case of the rain simulation that we propose, the use of CUDA considerably frees the CPU from an enormous number of operations. In this sense, the framework that we propose in this paper offers three main advantages with respect to previous GPU methods:

  • 1.

    It does not introduce the overhead of using a graphics library for a task independent of graphics, as is the case of the calculations made for the particle simulation. Moreover, our framework provides methods for the direct visualization of the results, given the memory interoperability between OpenGL and CUDA within the graphics card.

  • 2.

    In contrast to previous solutions, it is not necessary to perform two passes of the graphics hardware to make the calculations that update the positions of particles. All the calculations can be made in one single pass, leaving the second pass only for visualizing the geometry obtained.

  • 3.

    It is possible to add more natural effects related to the precipitation, such as the dynamic generation of geometry to simulate splashes. As we will see in the following sections, the simulation of splashes requires a third rendering pass to prepare the calculations of the collisions in a dynamic environment.

Complete Chapter List

Search this Book:
Reset