5
Image Based Real-time and Realistic Forest Rendering and Forest Growth Simulation Yi-Kuan Zhang School of Science, Xi’an Jiaotong Univ. LIAMA-NLPR, CAS Institute of Automation [email protected] Olivier Teboul LIAMA-NLPR, CAS Institute of Automation [email protected] Xiao-Peng Zhang LIAMA-NLPR, CAS Institute of Automation [email protected] Qing-Qiong Deng LIAMA-NLPR, CAS Institute of Automation [email protected] Abstract Real-time and realistic rendering of forest is an impor- tant and a difficult work in computer graphics and digi- tal forestry. An image based real-time and realistic forest rendering software is developed in this paper. Three or- thogonal billboards are used to represent the geometry and material of a tree, so that the 3D perception is enhanced and weak parallax of usual images based approaches is avoided. Shadows of all trees on the plat ground are gen- erated through the stencil buffer, shadow projection and a mixture of the shadow with grass texture. Different bill- boards are chosen on the viewing direction and the lighting direction, so that the effect of object torsion due to poor im- age direction is avoided. Forest growth, forest rendering in different lighting conditions, navigation inside a forest, and flying over a forest are all simulated. 1. Introduction Plants are a basic elements in virtual environment. They are special in the nature with complex shapes and colors, and with rich details of small, isolated and non-manifold geometry. Real-time and realistic rendering and growth simulation of a big forest is a challenge in computer graphics and virtual reality. Plant growth modeling present the growth mechanism of plants and plant communities with math- ematical formulism and geometric descriptions [2]. The complexity of each tree model and the number of trees in- cluded overwhelmed the capacity of a computer in render- ing cost, memory cost and processing cost. Different tech- nical approaches have been developed to increase the real- ism and speed of plant communities [1]. We developed a new image based approach for real-time and realistic forest rendering. It takes the advantage of the texture mapping power of modern video cards. A set of three cross billboards is used to represent the geometry and material of a tree for a direct balance between geometric simplicity and visual complexity, so that the 3D perception is enhanced. This can be used for landscape visualization, for the simulation of walk-through in a forest, and a flight over the landscapes. 2 Related Work Plant growth modeling and the visualization of plants and forest are the two main topics in this paper. 2.1 Plant Growth Modeling Successful modeling mechanisms have been established in recent years, in which some are mature software are widely applied. AMAP plant models [2], with the botanical knowledge of plant architecture of real measured data, reflect plant’s growing process, its space occupation, and the location of leaves, flowers or fruits. AMAP-Genesis TM plant gener- ator integrates the research results of AMAP plant growth modeling [2] with its specific plant procedural growth en- gine. The tool allows a great richness of different plant ar- chitectural shapes at any growth stage. Software AMAP- Orchestra TM provides users necessary tools to design and visualize a large-scale landscape project. Second International Symposium on Plant Growth Modeling, Simulation, Visualization and Applications 0-7695-2851-1/07 $20.00 © 2007 IEEE DOI 10.1109/PMA.2006.44 323 Second International Symposium on Plant Growth Modeling, Simulation, Visualization and Applications 978-0-7695-2851-9/07 $20.00 © 2007 IEEE DOI 10.1109/PMA.2006.44 323

Image Based Real-Time and Realistic Forest Rendering and Forest …vision.mas.ecp.fr/Personnel/teboul/files/pma06_teboul.pdf · 2008. 10. 9. · texture mapping power of modern video

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Image Based Real-Time and Realistic Forest Rendering and Forest …vision.mas.ecp.fr/Personnel/teboul/files/pma06_teboul.pdf · 2008. 10. 9. · texture mapping power of modern video

Image Based Real-time and Realistic Forest Renderingand Forest Growth Simulation

Yi-Kuan ZhangSchool of Science, Xi’an Jiaotong Univ.

LIAMA-NLPR, CAS Institute of [email protected]

Olivier TeboulLIAMA-NLPR,

CAS Institute of [email protected]

Xiao-Peng ZhangLIAMA-NLPR,

CAS Institute of [email protected]

Qing-Qiong DengLIAMA-NLPR,

CAS Institute of [email protected]

Abstract

Real-time and realistic rendering of forest is an impor-tant and a difficult work in computer graphics and digi-tal forestry. An image based real-time and realistic forestrendering software is developed in this paper. Three or-thogonal billboards are used to represent the geometry andmaterial of a tree, so that the 3D perception is enhancedand weak parallax of usual images based approaches isavoided. Shadows of all trees on the plat ground are gen-erated through the stencil buffer, shadow projection and amixture of the shadow with grass texture. Different bill-boards are chosen on the viewing direction and the lightingdirection, so that the effect of object torsion due to poor im-age direction is avoided. Forest growth, forest rendering indifferent lighting conditions, navigation inside a forest, andflying over a forest are all simulated.

1. Introduction

Plants are a basic elements in virtual environment. Theyare special in the nature with complex shapes and colors,and with rich details of small, isolated and non-manifoldgeometry.

Real-time and realistic rendering and growth simulationof a big forest is a challenge in computer graphics andvirtual reality. Plant growth modeling present the growthmechanism of plants and plant communities with math-ematical formulism and geometric descriptions [2]. Thecomplexity of each tree model and the number of trees in-cluded overwhelmed the capacity of a computer in render-ing cost, memory cost and processing cost. Different tech-

nical approaches have been developed to increase the real-ism and speed of plant communities [1].

We developed a new image based approach for real-timeand realistic forest rendering. It takes the advantage of thetexture mapping power of modern video cards. A set ofthree cross billboards is used to represent the geometry andmaterial of a tree for a direct balance between geometricsimplicity and visual complexity, so that the 3D perceptionis enhanced. This can be used for landscape visualization,for the simulation of walk-through in a forest, and a flightover the landscapes.

2 Related Work

Plant growth modeling and the visualization of plantsand forest are the two main topics in this paper.

2.1 Plant Growth Modeling

Successful modeling mechanisms have been establishedin recent years, in which some are mature software arewidely applied.

AMAP plant models [2], with the botanical knowledgeof plant architecture of real measured data, reflect plant’sgrowing process, its space occupation, and the location ofleaves, flowers or fruits. AMAP-GenesisTM plant gener-ator integrates the research results of AMAP plant growthmodeling [2] with its specific plant procedural growth en-gine. The tool allows a great richness of different plant ar-chitectural shapes at any growth stage. Software AMAP-OrchestraTM provides users necessary tools to design andvisualize a large-scale landscape project.

Second International Symposium on Plant Growth Modeling, Simulation, Visualization and Applications

0-7695-2851-1/07 $20.00 © 2007 IEEEDOI 10.1109/PMA.2006.44

323

Second International Symposium on Plant Growth Modeling, Simulation, Visualization and Applications

978-0-7695-2851-9/07 $20.00 © 2007 IEEEDOI 10.1109/PMA.2006.44

323

Authorized licensed use limited to: INSTITUTE OF AUTOMATION CAS. Downloaded on October 9, 2008 at 02:55 from IEEE Xplore. Restrictions apply.

Page 2: Image Based Real-Time and Realistic Forest Rendering and Forest …vision.mas.ecp.fr/Personnel/teboul/files/pma06_teboul.pdf · 2008. 10. 9. · texture mapping power of modern video

L-system was initially developed by A. Lindenmayer todescribe the growth process of living organisms based onfractal patterns. This syntactic method is used to describeplant growing process [9]. Xfrog [5] is a combination ofa rule-based approach with traditional geometric modelingtechniques, allowing easy generation of branching objects.Xfrog is also a convenient tool for interactive plant mod-eling. Onyx-tree is easy a professional knowledge basedsoftware for procedural modeling, design of vegetation.

2.2 Visualization of plants and forest

Polygon based rendering, point/line based rendering,volume rendering and image based rending are four basictechniques for fast plant rendering.

Polygon models are the basic representations of plant ge-ometry, and it is the result of mature modeling software [2].Several methods have been proposed in the past to addresspolygon decimation and compression [12] [10]. Most ofthese approaches are classified as three categories: multi-resolution modeling, level-of-detail algorithms, and geo-metric compression.

Point models and line models are efficient for renderingsmall polygons since the number of world-to-screen projecttransformations can be reduced. It is easy to perform visi-bility culling with these models, so they are efficient in therendering of plant community [4] [6]. The drawback of thisapproach exists in discontinuous shading transition due todiscrete sampling.

Volumetric texture and volume methods convert the ge-ometry into a series of parallel image slides. So it is moreefficient for interactive realistic image synthesis of repeti-tive geometry. It is geometric complexity independence [3][10]. But its resolution can not be high due to its memorycost. Volumetric texture [3] and volume rendering [7] arestrong for flight simulation, but not weak for navigation inforestry, since the geometry represented is so simple.

Imposter models are used to convert the complex geom-etry of a model into a single texture image. Its advantage isits geometric complexity independence [8] [11], so it is ef-ficient for rendering repetitive scene, like plant community[11]. The drawback of imposters is its lack of geometricdepth, so many layers of images, or many sets of images[1], are required to compensate.

A popular way for image-based rendering is billboards,which present an illusion of a complex geometry through2D cross images, so that the poor geometric depth is amelio-rated, and the geometric complexity is still low. The draw-back of a billboard is its weak parallax for close viewingand the illusion may vanish as soon as the billboard is seenfrom above. One difficulty of billboards resides in a mix-ture of alpha blending with depth buffer for a proper hiddenremoval, and with stencil buffer for shadows.

We would like to show that it is feasible to use three crossbillboards to realize a fast and realistic rendering of a bigforest in our software ForestRoam: Forest Rendering andSimulation with Image models. With a link to plant growthmodeling software, it is possible to simulate the growth ofa forest.

3 Key techniques

A set of three cross billboards (Figure 1), i.e. three staticorthogonal rectangles, are used to represent the geometryand material of a tree, so that they look like different 3D as-pects of the same object from different viewing directions.

Trees are rendered through alpha blending and depthblending to realize a proper transparency and hidden re-moval. All billboard images are with four channels. Alphachannel of a pixel is set as opaque if it represents the ge-ometry, and it is set transparent if it represents empty. Theblending order of the three billboards is from far to near.A billboard is selected to render if the angle between itsnormal and the viewing direction is smaller than a constantangle, 60 degree.

We use stencil buffer for the shadow on the plat groundof each tree with a mixture of shadow on the grass texture.In order to avoid the effect of object torsion due to poorimage direction nearly orthogonal to the viewing direction,different billboards are chosen according to the viewing di-rection and the lighting direction. Frustum clipping is per-formed for rendering acceleration.

Therefore, a real-time speed and realism in shading andshadow are all kept.

4 Technical advantage

The new techniques in this paper are integrated in soft-ware ForestRoam. It has the following technical features:

Alpha blending: depth test and alpha test are used torealize a proper hidden object removal, inside a tree or be-tween trees.

Shadows: The shadow rendering algorithm is realizedthrough a projective mapping of billboards on a planarground. This projection is mixed with ground texture.

Mipmaps: the software offers the choice of mipmaps,for different levels of details for the textures, which supportsanti-aliasing, soft shadows and smooth image transition ofdifferent frames in internal navigation.

Tree clipping: tree clipping for viewing frustum is per-formed to avoid rendering of tree out of the frustum. Clip-ping is realized with the viewing matrix.

Sorting: painter’s algorithm is realized with a sortingfrom far to near of all trees around the viewer. Thus the

324324

Authorized licensed use limited to: INSTITUTE OF AUTOMATION CAS. Downloaded on October 9, 2008 at 02:55 from IEEE Xplore. Restrictions apply.

Page 3: Image Based Real-Time and Realistic Forest Rendering and Forest …vision.mas.ecp.fr/Personnel/teboul/files/pma06_teboul.pdf · 2008. 10. 9. · texture mapping power of modern video

(a) Billboard X (b) Billboard Y (c) Billboard Z

Figure 1. A set of three cross billboards

transparency error of alpha blending is avoided on the sil-houette of an object due to texture image resizing from au-tomatic mipmaps. The order of objects is adjusted whenthe distance relative to the tree changes, so this rendering isview-dependent.

(a) Walking in a forest in the morning

(b) Walking in a forest at noon

Figure 2. The interface for walking in a forest

5 Software functions

This software has the following functions:Realism: each texture image is from plant model faithful

to botanic knowledge. Therefore, visual effect of tree archi-tecture looks natural and realistic. Shadows on the ground

Figure 3. Simulation of a forest at sunset

are shown. Real-time simulation of daytime elapsing is re-alized according to the change of the sunlight and that ofthe shadows on the ground.

Operation modes: Not only does the software enablesto render a forest, but it also allows navigation inside. Dif-ferent motion modes are included: flying over a forest, freewalk through a forest, or automatic drive in a forest.

Fast speed: for all these experiences, it is real-time for amoderated forest. Users can choose to display the trees withor without shadows on the ground between a high qualityand a high speed.

Plant distribution: trees are randomly distributed on theflat ground with a random value of rotation, so that the bill-board trees in the forest look natural.

Figure 4. Global rendering of a mature forest

6 Implementation

This software is written with C language supported byOpenGL. It is running in a Compaq Presario R300 PC with

325325

Authorized licensed use limited to: INSTITUTE OF AUTOMATION CAS. Downloaded on October 9, 2008 at 02:55 from IEEE Xplore. Restrictions apply.

Page 4: Image Based Real-Time and Realistic Forest Rendering and Forest …vision.mas.ecp.fr/Personnel/teboul/files/pma06_teboul.pdf · 2008. 10. 9. · texture mapping power of modern video

Table 1. Efficiency of the software ForestRoam according to different rendering parametersExperiment ID Clipping Sorting Mipmaps Rendering Static Shadow Mipmaps Shadow Milliseconds

(1) No No No No No 187(2) No No No Yes No 328(3) No No No No Yes 312(4) Yes No No No No 47(5) No No Yes No No 187(6) Yes Yes, 200 trees No No Yes 78(7) No Yes, 200 trees No No No 188(8) No Yes, 3400 trees No No No 1266

an Intel Pentium 4 CPU 2.80Ghz, ATI Mobility RADEON9000 IPG video card, 384 Mo of RAM. All billboards aregenerated from plant data of AMAP GenesisTM software,and the design of a forest is from AMAP .sce file throughAMAP LandmakerTM .

This technique is tested with three forest examples. Fig-ure 2 and Figure 3 show a young forest with white poplar,apple and holly trees. Four snapshot images have been syn-thesized with this software. Figure 2(a) is taken in an earlymorning, and Figure 2(b) is taken at noon time. Figure 3 issynthesized to simulate a forest at sunset. The total numberof trees in this example is 3400. All these shows that thistechnique can be used in two aspects: (1) realistic simula-tion of forests in different daytime, and (2) an immersivenavigation in a forest.

The efficiency of this software is shown with differentparameters in Table 1 for the forest in Figure 2 and Figure 3.The parameters include: (1). Clipping: view frustum clip-ping or not, (2). Sorting: tree sorting or not accompaniedby the number of closed trees to be sorted, (3). MipmapsRendering: Mipmaps images are used for shading or not,(4). Static Shadow: shadow generated from static images( not mipmaps images), (5). Mipmaps Shadow: Mipmapsimages are used for Shadow or not, (6). Milliseconds: mil-liseconds spent for each frame. This table shows that objectsorting can be a factor of big burden, and frustum clippingis a factor for acceleration.

Figure 4 shows a big forest of 16888 trees. Two speciesare included, Holly tree and Scot Pine trees are included.The ages of Holly trees used for this example are from 21to 23. The ages of Scot Pine trees here are from 23 to 25.The rendering speed is from 18 to 22 frames per seconds.

In order to show the application of this technique to for-est growth simulation, AMAP plant growth mechanism isapplied to the virtual forest in Figure 4. The ages of thesimulated Holly trees are expanded from 7 to 23, and theages of the simulated Scot Pine trees are expanded from 5to 25. Figure 5 shows the simulated growth the the virtualforest from its initial state to 5, 10, and 15 years later.

7 Conclusion and further work

This paper provides a new image based rendering ap-proach to visualize a virtual forest fast and realistically. Thekey point of this paper is the application of several tech-niques: alpha blending, mipmaps, stencil buffer, and objectdistance sorting. This approach is view-dependent, sincethe choice of a billboard and the rendering order of differ-ent objects are all dependent on the viewer.

This approach can be used for the visualization of themodels of forest, crops, landscape, and land use. It can alsobe used for virtual reality and education.

This work can be improved in the following aspects:

1. The geometry and the billboards are not consistent fora tree with a non-symmetric crown, so more imagesshould be used [11].

2. In order to have a better parallax, a full geometricmodel should be used to represent a close tree.

3. Multi-resolution billboards should be generated ac-cording to the topological structure of plants. It de-serve to construct billboards in different levels: sidebranch level, substructure level, and organ level.

4. Distance sorting is a time consuming process. BSP-tree should be used to have a faster distance sorting.

5. In order to make this approach applicable to the simu-lation of forest evolution in a fast way, it should be in-tegrated with plant growth modeling and forest growthmodeling.

Acknowledgement

Thanks to reviewers for their constructive suggestions.This work is supported by National Natural Science Foun-dation of China projects No. 60073007, 60473110, and30371157; by National High-Tech Research and Develop-ment 863 Plan of China under Grant No. 2006AA01Z301;by the French National Research Agency within project

326326

Authorized licensed use limited to: INSTITUTE OF AUTOMATION CAS. Downloaded on October 9, 2008 at 02:55 from IEEE Xplore. Restrictions apply.

Page 5: Image Based Real-Time and Realistic Forest Rendering and Forest …vision.mas.ecp.fr/Personnel/teboul/files/pma06_teboul.pdf · 2008. 10. 9. · texture mapping power of modern video

(a) Initial Growth State (b) Growth after 5 years

(c) Growth after 10 years (d) Growth after 15 years

Figure 5. Growth Simulation of a mixed forest of conifer and broad leaf trees.

NATSIM ANR-05-MMSA-45; and by the MOST Interna-tional collaboration project No. 2007DFC10740.

References

[1] S. Behrendt, C. Colditz, O. Franzke, J. Kopf, andO. Deussen. Realistic real-time rendering of landscapes us-ing billboard clouds. In Proceedings of Eurographics 2005,pages 507–516, 2005.

[2] P. de Reffye, C. Edelin, J. Francon, M. Jaeger, and C. Puech.Plant models faithful to botanical structure and develop-mentr. In SIGGRAPH ’88, volume 22, pages 151–158, 1988.

[3] P. Decaudin and F. Neyret. Rendering forest scenes in real-time. Computer Graphics Forum, pages 93–102, 2004. Proc.Symposium on Eurographics.

[4] O. Deussen, C. Colditz, M. Stamminger, and G. Drettakis.Interactive visualization of complex plant ecosystems. InProceedings of the IEEE Visualization Conference, pages219–226, 2002.

[5] O. Deussen, P. Hanrahan, B. Lintermann, R. Mech,M. Pharr, and P. Prusinkiewicz. Realistic modeling and ren-dering of plant ecosystems. In SIGGRAPH ’98, pages 275–286, 1998.

[6] G. Gilet, A. Meyer, and F. Neyret. Point-based rendering oftrees. In P. P. E. Galin, editor, Eurographics Workshop onNatural Phenomena, 2005.

[7] M. Jaeger and J. Teng. Tree and plant volume imaging - anintroductive study towards voxelized functional landscapes.In Proc. Plant Growth Modeling and Applications, pages169–181, 2003.

[8] A. Meyer, F. Neyret, and P. Poulin. Interactive rendering oftrees with shading and shadows. In Eurographics Workshopon Rendering, pages 183–196, 2001.

[9] P. Prusinkiewicz and A. Lindenmayer. The algorithmicbeauty of plants. Springer-Verlag, New York, 1990.

[10] I. Remolar, C. Rebollo, M. Chover, and J. Ribelles. Real-time tree rendering. In Proc. of Workshop on ComputerGraphics and Geometric Modeling, pages 173–180, 2004.

[11] J. Shade, D. Lischinski, D. H. Salesin, T. DeRose, andJ. Snyder. Hierarchical image caching for accelerated walk-throughs of complex environments. In SIGGRAPH ’96,pages 75–82, 1996.

[12] X. Zhang, F. Blaise, and M. Jaeger. Multiresolution plantmodels with complex organs. In Proceedings of ACM Sig-graph International Conference on Virtual Reality Contin-uum and Its Applications VRCIA 2006, pages 331–334.ACM Press, 2006.

327327

Authorized licensed use limited to: INSTITUTE OF AUTOMATION CAS. Downloaded on October 9, 2008 at 02:55 from IEEE Xplore. Restrictions apply.