Fabrice NEYRET, Prashant GOSWAMI, Pascal GUEHL - Maverick team, LJK, at INRIA-Montbonnot
Optical effects such as reflection, refraction and shadows enhance the realism of generated images. All these effects can be produced by following the light rays and/or the underlying physics. In Computer Graphics, the ray-tracing methods simulates the geometric optics by following rays backward from the eyes to the scene passing through each screen pixels. Mirroring on reflects and refraction into glass is easy using Snell-Descarte law. The presence of shadow vs light at a surface location is tested by sending a ray towards the light source in order to test its visibility. But ray-tracing techniques use for realistic images are very costly to compute: just count the total number of rays multiplied by the cost of testing if a ray intersect one of the triangles of the scene ! So, real-time applications rather rely on Z-buffer algorithms (through OpenGL or DirectX), which is the algorithm implemented on Graphics Boards.
But our goal is to have both the real time and the nice effects. To achieve this, our GigaVoxels ray-tracer represents scenes as Sparse Voxels Octrees on GPU. This brings structure to space (direct access to location and neighborhood, natural ordering, spatial hierarchy) that meshes miss. This allows for faster high-quality rendering.
The purpose of this project is to couple OpenGL for what is directly visible and GigaVoxels for the secondary ray when required for various optical effects.
GigaVoxels can be used into an OpenGL scene rendering by the way of fragment shader (e.g., in GLSL): when a surface pixel is drawn, we determine a ray-direction and launch it into GigaVoxels ray-tracing. For efficiency, this is factored by first just preparing a ray-map in shader, then sending it once to Gigavoxels in order to obtain the color seen through each ray, as a layer to be combined to the OpenGL image.
As a first step, the student will implement refraction and bumped-map refraction in order to simulate a glass or water layer on top of a mesh. An analytical bump-map will allow for animated water effects.
In a second step, the purpose is to add soft shadows and glossy reflections to the OpenGL scene by using an "impostor" of the scene into GigaVoxels, i.e., a coarse voxelized version (a voxelizor is already available). Softness and glossiness are usually more realistic and more costly to obtain, but for GigaVoxels it is cheaper (and requires smaller voxel resolution).
The role of the student is to produce a demo that implements
the above mentioned features using GigaVoxels.
Notions of parallelism (multi-threading) or GPU programming (GLSL, CUDA, etc) would be a plus, but these can be learn easily during the practice.
Tutorial on Reflections and Refractions.