Interactive Refraction
2006
2006
Despite the fact that the physical laws ruling this phenomenon are perfectly known, refraction (the bending of light rays travelling through transparent media with different optical properties) is still very hard to simulate in real-time computer graphics applications due to its complexity: each time a ray changes medium (from air to glass or to water, for instance), its energy is divided between a reflected and a transmitted part, resulting to a complex recursive tree of rays.
We reduced the problem to a simpler view-dependent information, by keeping only the path of highest energy: considering a static geometry, an intensive pre-computation allows to define, for all possible viewing rays all over its surface, the output direction of this path when it leaves the object. This information is encoded using spherical harmonics, whose coefficients are stored in textures and uncompressed on-the-fly by a shader during rendering, according to the current viewpoint. The recovered output directions are then used to fetch a cube map representing the surrounding environment.
In the case of semi-opaque objects, a part of the light is absorbed as the rays travel through the media. Following the same idea, we encoded the length of the light path inside the object as well, so as to simulate view-dependent attenuation.