water - ryzom/ryzomcore GitHub Wiki
title: Water Surface Rendering (2001-2002) description: Postmortem of the NeL water surface rendering system — EMBM reflections, bump perturbation, and raycasted adaptive geometry published: true date: 2026-03-15T00:00:00.000Z tags: editor: markdown dateCreated: 2026-03-15T00:00:00.000Z
Translated from "fr dossier 2001 / projet_3d_eau_reviewed" and "fr dossier 2002 / Projet NeL - 3D - Rendu eau REVIEWED". Both versions are identical. {.is-info}
Realistic water surface rendering has been known in computer graphics for a long time. However, real-time water rendering is a relatively recent domain. In the context of the emerging interactive experiences that are MMORPGs (Massively Multiplayer Online Role Playing Games), it has become a necessity. Indeed, natural environments are often represented in these games, and bodies of water and the quality of their representation are often put forward to demonstrate the level of technical advancement of a multimedia product.
In the context of the Ryzom project, our goal is to develop a technique for rendering animated water that is sufficiently convincing while having moderate machine resource requirements. Our investigation focused in particular on bump mapping techniques — a technique that simulates an impression of relief on a surface without making its geometry more complex.
The representation of water in interactive 3D applications has proven relatively simple until now due to the limited capabilities of graphics cards.
The difficulty lies at two levels:
- Realistic representation of geometry. The most common representation for water is to use a plane, as this is quick to implement. However, representing ripples on the water surface proves more difficult. The representation of large-scale surface movements can be modeled by modifying the polygonal mesh used in the representation. Small-scale movements can use techniques such as bump mapping to simulate details without increasing the complexity of the geometry.
- Modeling of phenomena such as reflection or refraction.
Modeling the reflection of the environment on a water surface has been possible in real time since the appearance of 3D cards supporting the mapping of an environment texture onto a surface with an irregular texture (this technique is also known as EMBM, or Environment Mapped Bump Mapping). It uses two textures: an environment texture and a perturbation texture applied to the mapping coordinates of the environment texture. There is another technique using a cubic environment texture to achieve a comparable effect, but it is more expensive.
The technique, although available for several years, is only beginning to be used in multimedia applications. EMBM was seen in action during the commercialization of the Matrox G400 graphics card in a technology demonstration.

Matrox G400 demo: use of EMBM to simulate reflections on the water surface.
- [NN94] Nishita T., Nakamae, "Method of displaying optical effects within water using accumulation buffer", Siggraph'94 Computer Graphics, pp 373-379
- Jensen, "Deep-Water Animation and Rendering" (http://www.gamasutra.com/gdce/jensen/jensen_01.htm)
- Model the phenomena of reflection at the water surface in a convincing manner.
- Model the propagation of waves resulting from perturbations applied to the water surface. We choose a two-dimensional representation. The water is subdivided into columns with rectangular cross-sections whose height is known (height table).
- Use a polygon mesh that is as reduced as possible to represent the perturbations of the water surface.
- Allow the simulation of dynamics over a large surface area by reducing the computation to data perceptible by the user.
The first part of the research consisted of investigating the different techniques available for modeling the appearance of water. Then we focused on geometry generation.
Several techniques are available:
- Mapping an environment texture onto a perturbation texture.
- Cubic environment mapping with perturbation: This technique calculates the view vector reflected at the water surface and perturbed by the local normal (at small scale) of the water surface (read from a two-dimensional texture). The reflected vector is then expressed in the global coordinate frame (this is done by computing a tangent space for each point of the mesh providing the large-scale perturbations) and gives a direction that is used to read the environment color from a cubic texture.
However, none of these techniques allows modeling the variation of the micro-geometry of the water surface (modeled by a perturbation texture, the macro-geometry being modeled by a polygonal mesh). For this, we developed a technique that consists of perturbing the perturbation texture of the water surface by another perturbation texture. This is made possible by the texture addressing techniques introduced by GeForce 3-class graphics cards.
We use a height table to which we apply the two-dimensional propagation equation to simulate waves on the water surface. To avoid numerical instability problems, we chose to apply a Gaussian filter to the height table after each application of the propagation filter.
To build a suitable geometric mesh, we make the assumption that waves at the water's height are negligible. Several techniques exist, but none of them provides an optimal result for this case. Our technique consists of using raycasting on a regular grid in the observer's space to obtain such a mesh. The fineness can be controlled by using rays that are more or less closely spaced.
In order to apply the propagation equation over large surfaces, we consider that waves far from the observer are not visible. Consequently, the height table represents only the immediate surroundings of the observer, and it is shifted according to the observer's movements. The heights of regions leaving the field of view are lost.
Use of raycasting. Mesh generation in the model's coordinate frame.
This technique also guarantees a number of triangles proportional to the area occupied by the surface on screen. After computing the mesh for a given viewpoint, a vertex program (an OpenGL technique allowing arbitrary geometric calculations on mesh vertices to be performed directly by the 3D card) is used to calculate the reflection vector in order to obtain the texture coordinates for the environment texture.
The prototype was integrated into the NeL library within the MOT (Model Object Traversal) system as a model. The following screenshots illustrate the results obtained.

Use of two perturbation textures to model the water surface.

Application of a perturbation to the water surface (mesh deformation).

Computing mesh vertices using the raycasting technique. Only the perturbations of the water surface, applied on the Z axis, modify the regularity of the grid.
The results of this first prototype are conclusive. There remains however the problem of robustness of the system in the case of rapid observer movement: noise can appear due to the representation technique. Nevertheless, in the context of the Ryzom project, movement speeds remain reasonable and this problem is not felt.
- A convincing representation of water — not realistic, but adapted to real time.
- A convincing physical model for real-time rendering.