Main > GMT_4YP_25_2
Dr Graham Treece, Department of Engineering
F-GMT11-2: Efficient shadow-mapping for omnidirectional lights
 | | |
This is a typical medical imaging example showing the bones in both feet. We want to draw attention to a particular area and a point light is a good way to do that. | Shadows increase contrast and interpretability of the rendering. The most efficient way to add them is using shadow maps, but this is more difficult for point lights which cast shadows in all directions. | A new technique (shadow depth maps shown above) is particularly efficient in both memory and time but needs optimisation and thorough testing against alternatives to demonstate this. |
Including shadowing in renderings is a useful way to improve both contrast and interpretability. Shadows are automatically included in fully ray-cast renderings, but these are always going to be slower than traditional rasterisation methods. For visualisations based on sampled 3D data, for instance CT, both the time-to-first-render and the interactivity are very important and in this case shadow-mapping is the best approach. But the standard way to achieve this for omnidirectional (point) lights uses a cube-map: and that means rendering the scene from the light's perspective six times to each face of the cube.
More efficient alternatives have been proposed, the most well known being dual-paraboloid mapping, which involves only two renders to two rectangular depth textures. This is efficient, but the issues with this technique (non-linear transformation of depths which causes distortion if the triangles are too large, and introduces discontinuities at the seam of each map; and a very varying resolution across the shadow range) have limited it's practical value. Alternatively, tetrahedron mapping sticks to linear transformations, but requires four renders and still has somewhat variable resolution.
This project will investigate a new technique which only requires two renders but creates depth maps which are similar to rectangular-based pyramids, effectively surrounding the point light with an irregular octahedron. The transformation is linear, so there is no need to use small triangles
exceptwhere triangles span multiple top or bottom faces of the octahedron. The shadow rendering is pretty good even without fixing this: but it should be trivial to fix by splitting such triangles in a geometry shader, which would result in perfect shadow maps which only depend on resolution: and even this can be controlled by careful positioning of the apex of the octahedra (you can see it is off-centre in the images above). Using a geometry shader to split triangles may even make it possible to use a single render with very little increase in triangle count.
This should interest anyone who enjoys computer graphics and wants the chance to implement and compare different shadow techniques and rigourously explore the practical consequences of each. It would be ideal for someone with some experience of computer graphics and shaders in particular already (particularly opengl, and GLSL) but would also work for anyone who is keen to learn.
Click here for other medical imaging projects offered by Graham Treece.