01-10-2012, 11:58 AM
Graphical Rendering of Rain
Graphical Rendering.pdf (Size: 1.87 MB / Downloads: 70)
Abstract
There has been a manyfold increase in the computational speed of graphics hardware
in recent times. This power afforded by modern graphics cards enables the possibility of
simulating complex environmental phenomena, such as atmospheric special effects.
The main objective of the project is to create realistic rain falling effect in real time
taking into account the refraction and reflection of raindrop by modeling the world as a cube
map, and using environment mapping technique.
In this dissertation, we study two principal concepts of simulation of rain falling effects
using: Delta3D Particle System Editor, which renders rain falling effect using two static
raindrop textures, and Physical Properties-Based Method which renders rain falling effect
by mapping the background scene onto raindrops according to their refraction property. We
observe that the reflection property of a raindrop is also important since it contribute to its
visibility in the dark regions. Hence, we propose a new method that takes into account both
refraction and reflection property of raindrop.
Introduction
Special Effects, especially atmospheric effects such as rain, cloud, snow and other outdoor scenes
in interactive applications (video games, training systems...) are important in creating realistic
environments. As current graphics hardware’s computation speed is improving, their high degree
of realism is also required to immerse the user in a visually convincing environment. However,
rendering these effects is a hard problem, especially in real time.
Rain is a complex atmospheric physical phenomenon and consists of numerous visual cues as
shown in Figure 1.1. There are different forms of rainfall like light, moderate, heavy, and extreme
rainfall. The falling of raindrops is commonly and easily seen in the environment, than its effect
after it hits the ground. Whenever falling raindrops hit the surface of the ground, it causes two
effects: water rippling and splashing of raindrop. During rain, all raindrops are merged together
and form a stream of water on the streets and objects.
Rain Rendering
In general, Particle Systems are used to generate rain in many video games by using particles
falling vertically from the sky. Each particle is a translucent white streak. This may be a
segment geometrically composed of two points, or approximated by a texture plated on a rectangle
stretched vertically (commonly called billboard). The second technique has an advantage
of allowing different drop sizes depending on the depth relative to observer, unlike the use of
segments which have a fixed width whatever their position in the scene.
Langer et al. [1] presented interactive an image-based spectral synthesis method to render snow
and rain. The proposed method that is a combination of a Particle System and a spectral analysis
technique, which creates a dynamic rainy or snowy environment texture. The spectrum of
the falling snow or rain texture is defined by a dispersion relation in the image plane. Figure 1.2
presents a result obtained by this method.
Problem Statement
The main objective of the project is to create realistic rain falling effect taking into account the
refraction and reflection of raindrop by modeling the world as a cube map, and using environment
matting techniques. Unfortunately, this takes a lot of computation to render an image. Hence,
We also focus on optimization running time of this technique in order make this effect run
in real-time (which means the number of image or frame generated per second (frame-rate) is
greater than 20).
Report Outline
The reminder of the report is organized as follows. Chapter 2 presents a brief introduction
to Delta3D. Chapter 3 describes three concepts of creating rain falling effect using: Delta3D
Particle System Editor, Physical Properties-Based Method, and Cube Map and Environment
Mapping. In Chapter 4, implementation of the third concept is discussed in detailed. Optimization
rendering time and results of this method are also described.
Delta3D
Delta3D [10][11] is an Open Source engine which can be used for games, simulations, or other
graphical applications. Its modular design integrates other well-known Open Source projects
such as Open Scene Graph [12], Open Dynamics Engine [13], Character Animation Library [14],
and OpenAL [15] as well as projects such as Trolltech’s Qt, Crazy Eddie’s GUI (CEGUI), Xerces-
C, Producer, InterSense Tracker Drivers, HawkNL, and the Game Networking Engine (GNE).
It has a high-level, cross-platform (Win32 and Linux) C++ API designed with programmers in
mind to soften the learning curve, but always makes lower levels of abstraction available to the
developer. Programmers can develop content through the level editor-they can write Python
script to the Delta3D API or to the underlying tools directly. Delta3D uses the standard Lesser
GNU Public License (LGPL) [16]. It’s completely modular and allows a best-of-breed approach
whereby any module can be swapped out if a better option becomes available. Figure 2.1 shows
the Delta3D architecture. All the products in the bottom layer are existing open source projects.
Delta3D unifies them into one consistent API with associated tools.
Using Delta3D Particle System Editor
The principal concept of this method is to first create a texture of a raindrop and map it on a
small billboard (particle) that will always face the viewer (camera). Then, a rectangular emitter
is made to shoot randomly particles straight down from a particular height. Some properties
of a particle have to be set, such as, life of drop (for example 2 seconds, it’s best to have raindrops
disappear when they hits the ground), size of drop (or particle, for example from 0.15m
to 0.25m) , various numbers of particles creation (for example from 150 particles/sec to 200
particles/sec), and initial velocity rang of drops (for example from 6 m/s to 10 m/s) so that
raindrops don’t fall at regular rates, numbers, and patterns. Even though the particles are
supposed to be random, most people will notice a pattern after a while. So finally, to further
stop this from happening, emitters (or layers) have to be created by putting different numbers
into these emitter’s properties and especially making different raindrop textures.
Whenever a raindrop hits the wet surface of flat area such as the surface of the water in pool,
circular of ripple (water ring) will occurs. This effect can be made by this particle system editor
in a similar manner. At first, texture of water ring has to be mapped to a particle that always
lay flat on the ground. Then a rectangular emitter is made to shoot randomly particles but
the velocity shooting has to be set to zero in order to keep the particle from floating upwards.
Lastly, the size of particle (or water ring) has to be set from 0m to 0.16m so that enlargement
of water ring can be seen.