Kévin Boulanger

Rendering Trees with Indirect Lighting in Real-Time

Tree rendering during the day

Tree rendering during the sunset

High quality lighting is one of the challenges for interactive tree rendering. To this end, we present a lighting model allowing real-time rendering of trees with convincing indirect lighting. Rather than defining an empirical model to mimic lighting of real trees, we work at a lower level by modeling the spatial distribution of leaves and by assigning them probabilistic properties. We focus mainly on precise low-frequency lighting that our eyes are more sensitive to and we add high-frequency details afterwards. The resulting model is efficient and simple to implement on a GPU.

The contribution of indirect lighting is of high importance within a set of leaves due to the large number of reflections and transmissions of light that take place in this set. The following images show a comparison between a photo of a real tree and our rendering method. We are able to reproduce the different lighting effects inside the tree.

Photo of a real tree      Our tree rendering

To emphasize the importance of indirect lighting, the following images compare a rendering without and with this lighting component. The lack of indirect lighting results in dark regions due to numerous occlusions of leaves.

Tree rendering without indirect lighting      Tree rendering with indirect lighting

Trees are most of the time present outdoors. We then define the lighting environment as follows: an environment light source (sky and reflection of sky light off the ground) and a directional light source (sun). Our approach is totally dynamic: radiance from the sky and the sun, and position of the sun can be modified as desired. The following images show the different lighting components. The first one is direct lighting from the sky and its reflection off the ground, the second one is direct lighting from the sun, the third one is indirect lighting from the sun after one bounce off neighbor leaves, the fourth one is the sum of all components.

Direct lighting due to the sky      Direct lighting due to the sun

Indirect lighting due to the sun      Sum of all components

Variations of sky light and sun light have strong influence on the appearance of trees. The following images show the same tree at different times of the day. These images are generated in a real-time application, no expensive computation is needed to switch between images.

Tree in the morning      Tree at noon

Tree in the afternoon      Tree at sunset

Our model can be easily applied to different kinds of tree and to scenes containing many trees. It can be easily embedded into existing shaders in the GPU. We measured the impact of our lighting model on rendering speed by rendering a set of trees with different sets of light components. We tested our algorithm on a nVidia GeForce 8800 GTX using HDR lighting. Each rendered tree is highly detailed (about 98,000 triangles).

Light components 1 tree 4 trees 100 trees
direct from the sky only
788 fps
418 fps
36 fps
direct from the sky and the sun
700 fps
349 fps
29 fps
direct from the sky and the sun + indirect from the sun
667 fps
326 fps
27 fps

We remark that the addition of the indirect lighting component has a small impact on performances (less than 7%). Our method only takes 0.4 to 1.5 millisecond per tree depending on the total number of trees. There is a small precomputation time, 2 and 40 seconds for trees of 1,500 and 40,000 leaves respectively. This precomputation has to be done only once, it is independent of lighting conditions and so can be stored with the tree mesh.

Tree rendering that shows the effect of translucency

Forest of trees for benchmark purpose

Trees at sunset

Tree at sunset

This work has been accepted for publication at the 19th Eurographics Symposium on Rendering 2008 in June 2008.

The trees are modeled using the XFrog software.

Publications


Downloads


Demo video, 640x480 DivX 6 (19.7 MB)

Preview of the tree video

If you want to have a quick preview of the video, here is a Flash version:

 

For up-to-date details on how the algorithm works, you can read the chapter on trees in my PhD thesis:

PhD thesis (pdf) (8.1 MB)

For a quick overview of the algorithm, you can look at the presentation slides of the conference:

Presentation slides of the EGSR 2008 conference (pdf) (4.03 MB)

If you have any comment, you can contact me at info@kevinboulanger.net