<<

Tools for Procedural Generation of Plants in Virtual Scenes

Armando de la Re, Francisco Abad, Emilio Camahort, and M.C. Juan

Depto. Sistemas Inform´aticos y Computaci´on Universidad Polit´ecnica de Valencia 46022 Valencia, Spain

Abstract. Creating interactive graphics applications that present to the user realistic natural scenes is very difficult. Natural phenomena are very complex and detailed to model, and using traditional modeling tech- niques takes huge amounts of time and requires skilled artists to obtain good results. Procedural techniques allow to generate complex objects by defining a set of rules and selecting certain parameters. This allows to speed up the process of content creation and also allows to create objects on-the- fly, when needed. On-demand generation of scenes enables the authors to create potentially infinite worlds. This survey identifies the main features of the most used systems that implement procedural techniques to model plants and natural phenom- ena and discuss usability issues.

1 Introduction

Massive multiplayer games model huge environments where lots of players can exchange experiences. To obtain appealing landscapes and interesting game fields, modern games require lots of both geometric and texture assets. This pose a difficult problem since it is very expensive to create lots of different ob- jects, landscapes, characters and so on. It is common to reuse such content in the same game. Changing certain characteristics of the object (i.e., its color, its size) to increase the number of different objects in the game is usually detected by the user, thus reducing the realism of the game. The resources dedicated to create realistic models could be used to improve game play or include innovative features. Procedural content generation tech- niques appear to speed up the process of creating content. They are also able to generate content on-the-fly, thus reducing the space requirements. Recently, automatic content creation systems have been used, for example, to model buildings and cities [1,2], roads [3], buildings [4,5], houses [6], textures [7], vegetation [8,9] and sky [10]. Specifically for games, procedural systems have also been used to model 2D maps [11] and game levels [12]. Usually one of the requirements of games is to present realistic vegetation. This is a difficult goal because natural plants are complex organisms and dif- ferent factors define its shape and color. It is possible to model a realistic plant

G. Allen et al. (Eds.): ICCS 2009, Part II, LNCS 5545, pp. 801–810, 2009. c Springer-Verlag Berlin Heidelberg 2009 802 A. de la Re et al. with traditional methods, but it usually results in a huge geometric model, with lots of textures, and it is a time consuming task. Rendering complex models also requires applying some technique of LOD to reduce the actual number of poly- gons processed in the scene. Some procedural generation algorithms are able to generate multi resolution models [9] and some others are able to generate plants based on images [13]. This work focuses on currently available software applications that use pro- cedural generation algorithms to model plants. We describe the features of the most used applications, and we also study their usability. The rest of the article is structured as follows. First we talk about previous work on procedural content generation. The following section describes the main features of each surveyed system. We provide a table that compares each aspect of the applications. Conclusions and future work ends the paper.

2 Previous Work

The first procedural techniques were based on recursive functions, and were used to create fractal-like images. A fractal is a fragmented geometry shape, where each fragments is (approximately) a reduced copy of the whole shape (self-similarity). They cannot be classified in the traditional Euclidean geometric system, have a rich structure at arbitrarily small scales and have a Hausdorff dimension greater than its topological dimension. Some generation techniques use fractals to generate plants, rocks [14] and other natural phenomena [15]. Other procedural techniques are based on L-Systems [16]. L-Systems are a variation of formal grammars and are used to simulate the growth of plants, fractals and artificial life. They consist of a set of symbols that can be replaced, an axiom or initial state and a set of production rules. The L-System starts with the axiom that is replaced with the corresponding production rule. Then some parts of the rules are replaced with other rules and so on. The results are interpreted by the renderer as positions, orientations and stack structures. This kind of procedural technique is used to generate complex plants and other natural structures. Many authors have focused on procedural techniques for city generation [17]. We can find applications to generate cities in a terrain [1], organize and simu- late cities with procedural methods [2], create roads and streets [3], green areas, bridges,etc.Othersystemsmodelbuildings[4],houses[6],facades[5]...These systems have to create different buildings, but have to maintain a common look (for example, to model different buildings built around the same era with the same style). Kelly and McCabe [17] defined seven criteria to evaluate a proce- dural city generation system: realism, scale, variation of buildings and roads, required input to generate it, efficiency, control to modify the generation, and if it is generated in real time. Other authors have presented techniques for modeling realistic trees [8], re- ducing the polygon count of the plant model using procedural techniques [9], image-based modeling of plants [13] or animating plants [18]. Tools for Procedural Generation of Plants in Virtual Scenes 803

Fig. 1. FractTree allows to render sep- Fig. 2. Thepreviewandnavigationscreenof arately each stage of the derivation L-System4

3 Applications

3.1 FractTree [19] This application is one of the precursors in the generation of fractal plants. It creates only 2D models, and uses L-Systems and a step by step generation with detail for derivation rules shown in Figure 1. The application creates the plant replacing the symbols in the derivation with drawing primitives. It is a very simple program but it can be used to understand the basics of L-Systems.

3.2 L-System4 [20] It is also based on L-Systems, and generates detailed 3D plants and objects (see Figure 2). The navigation is somewhat restricted but it is enough to examine the object. One problem of this application is that the user has to know how L-Systems work to create or change one.

3.3 LStudio [21] LStudio provides several tools to create realistic plants as shown in Figure 3.a. It is based on a modified bracketed L-System to generate trunks, branches and the position of leaves, flowers and petals. These terminals are modeled in the interactive vector editor shown in Figure 3.b. This system is suitable to generate small plants like flowers, grass and bushes, rather than trees.

3.4 An Ivy Generator [22] It is a generator of Ivy plants that allows the user to decide where to grow them on an imported 3D scene by defining a seed. It has simple tools to change the 804 A. de la Re et al.

Fig. 3. a) Plant created with LStudio, and b) its editor for modeling leaves, flowers and petals

Fig. 4. An Ivy Generator example Fig. 5. Treegenerator GUI appearance of the plants but the results are very realistic. It takes into account the gravity and the capacity of the plant to grow to create climbing or hanging plants (Figure 4).

3.5 TreeGenerator [23] This application has a control panel to control the tree generation. Figure 5 shows the leaf editor. The resulting leaves look real when isolated, but groups of leaves do not look realistic. One of the causes is that the program has a limited number of recursion levels to generate branches and leaves. The tools to modify the tree and create different instances are also limited.

3.6 TreeMagik G3 [24] This tool provides a trunks, branches and roots generator. The foliage is provided by the program and it is rendered as a set of billboards. It generates very good results as shown in Figure 6. It is also able to generate a billboard of the entire tree. It provide textures for the trunk and leaves, and the user can add textures. Tools for Procedural Generation of Plants in Virtual Scenes 805

Fig. 6. Example of a tree generated by Fig. 7. Example generated with TreeMagikG3 Meshtree Studio

Fig. 8. Dryad generates trees quickly, but Fig. 9. The help system of Arbaro pro- they are not very realistic vides information about the parame- ters to control the generation

3.7 MeshTree Studio [25]

It produces very realistic trees but the user interface is not very user friendly and there is no help or tutorial. Once the initial learning curve is overcome, the user can generate very appealing trees with a low number of polygons. One restriction is that only generate .mesh files.

3.8 Dryad [26]

This is a freeware tree generator, but it is not open source. It provides an online gallery of trees that looks like a forest, where the user can select a tree and change its parameters. The properties of two different trees can be combined to create a new tree. The trees created by the users can be planted in the online gallery and shared with other users. A disadvantage of this system is that it only generates high resolution trees and they are not very realistic (Figure 8). 806 A. de la Re et al.

Fig. 10. Xfrog Graphical User Interface Fig. 11. Tree[d] produces good results but it is difficult to control variations

3.9 Arbaro [27]

This is the only Java-based system evaluated and generates good results. It is well documented, but its interface is not very friendly. It has some errors ex- porting trees. Figure 9 shows the flexibility to control parameters like number of levels, radius, division and curvatures of branches and trunk. It provides overlay graphics aids to help the user to understand each parameter.

3.10 SpeedTree [28]

It’s one of the most used and renown products in the creation of videogames that present natural scenes. It provides a powerful, complete, and efficient renderer, a modeler and real time generator. The scenes created with this engine are very realistic, and it has also been designed to be used in interactive systems. This is the most expensive system described in this survey, and we could not test it.

3.11 Xfrog [29]

It is similar to SpeedTree and it is also used in the videogame industry. It can generate very realistic scenes, with different objects and a wide variety of plants. It is more affordable than SpeedTree. Its learning curve is also very steep, and takes time to obtain a convincing tree.

3.12 Tree[d] [30]

It is very easy to create random trees and generates very realistic examples. It is difficult to modify or start a new one, and there is not many different type of trees. Tools for Procedural Generation of Plants in Virtual Scenes 807

4 Conclusions and Future Work

The purpose of this work was to study the current procedural generation sys- tems to model natural plants. We have classified this tools into several profiles, depending on the features of the systems and the requirements of the user: FractTree and L-System4 is suitable for students, since they help to learn and understand L-Systems. Speedtree and Xfrog are suitable for game and movie companies because they generate the most realistic trees, but at the expense of a steep learning curve and a high cost. L-Studio also creates realistic flower plants but it requires a lot of learning time. An Ivy Generator makes a scene or object look abandoned or alive because of the added Ivy plant, and because it is free, it can be used by everyone. Treemagik G3 and Tree[d] also generate good results and are cheap or free. Some systems can be used by 3D cartoon animators to generate trees. Dryad, TreeGenerator and L-System4 can generate cartooned trees instead of realis- tic plants. For the casual user FractTree, dryad, MeshTree studio, TreeGener- ator and An Ivy generator provide a lot of parameters to select and different results. Our group is currently developing a framework for procedural modeling of synthetic models. This tool will allow the user to select different techniques to generate geometry and textures inside the same environment. Summary

This section includes a table comparing the main features of each system. The features studied are: – 2D and 3D: Capacity to generate 2D and/or 3D objects. – IDE: Integrated editor to create the plants. – Definition Language: Input for plant definition. It can be LSys [] (bracketed L-Systems ) or GUI (Graphical User Interface). – Navigation: Navigation in the rendered scene (Zoom, move, rotation). – Geometry Generation: It can generate geometry. – Import, Export: file formats accepted by the application. – Released, Updated: First release and last update dates. – Derivation Control: Control of the derivation of plants. – Multiple Objects: Render multiple objects at the same time. – Object types: Objects that the system can work with. – Textures: Capacity to use textures in plant creation. – Purpose: Main purpose of the application. – Usability: Easy of use in a 1-10 scale (1 difficult, 10 easy). – Documentation: Quality of the documentation in a 0-10 scale (0 no docu- mentation, 1 poor, 10 complete and user friendly). – Debugging: Tools for debugging the generation process. – Modeling Speed: Time to create a target plant in each system. It could be from a blank project or modifying an existing example. The plant has these requirements: An initial branch (or trunk) and a separation in two branches, five derivations and medium-sized round leaves. 808 A. de la Re et al. - x x x 7 x b3d - 5 x $49.95 x 0 x No 2006 GUI several (obj, wrl) Trees Level control Demo Trees TreeMagik G3 - x x x 8 x - $0 & $49 - 4 x x 6 x No 2006 Instant update obj, 3ds, dxf GUI 1.3 & 2.0 Trees TreeGenerator Trees - x x obj x 9 x 0 x 3 x 2008 4 x 2007 x Level control Ivy Plants obj Freeware An Ivy Generator GUI 3D Objects x x x - - 8 x 0 2004 1999 x 10 2 L-Studio Botany Alg x - x rgb, tga, bmp - Freeware Plants . Lsys [] Plants Fractals - x x dxf L-System4 x 8 x dxf, bmp, jpeg 2004 0 2000 x 1 Freeware 2 x x Lsystems x dxf, Lsystems - Lsys [] FracTree x - x 10 EUR - bmp Shareware 1993 No - Fractal trees 6 Level control - Lsystems - 6 1 - x Lsys [] - Main characteristics of the surveyed applications. Legend for “Modeling Speed” row: : 1, fast using examples and knowing 2D 3D IDE Definition Language Navigation Geometry Generation Image Generation Import Export License Price Released Updated Derivation control Multiple objects Object types Textures Purpose Usability Documentation Debugging Modeling Speed Table 1. L-Systems; 2, very slow,modify; required 5, modifying very existing fast; examples; 6, 3, fast very but fast, export requires does an not external work; object; 7, 4, normal fast and to 8, we but could difficult not to test it Tools for Procedural Generation of Plants in Virtual Scenes 809 Instant update Tree[d] - x x GUI x x x - x, b3d 0 2002 2008 - - x Trees 5 0 5 Freeware Trees 8495, SpeedTree - x x GUI x x x several $ 2002 2009 x x x Plants 8 Trial, full Plants 400 $ 300/ alot XFrog - x x GUI x x x - png, jpg Trial, lite, full $ 1996 2002 x x Plants x Plants 9 10 2 ) l l m m continued Arbaro - x x GUI x x x x obj, povray, dxf 0 2003 2004 x - - Trees 5 6 Instant update 6 Freeware x ( Table 1. Dryad - x x GUI x x - - obj Freeware 0 2007 2008 - - - Trees 5 0 Instant update 5 Trees esh m MeshTree Studio - x x GUI x x - - . Freeware 0 2007 No x - Trees x Trees 6 0 Level control 7 entation etry Generation m m age Generation port m m 2D 3D IDE Definition Language Navigation Geo I I Export License Price Released Updated Derivation control Multiple objects Object types Textures Purpose Usability Docu Debugging Modeling Speed 810 A. de la Re et al.

References

1. Parish, Y.I.H., Muller, P.: Procedural modeling of cities. In: SIGGRAPH 2001, pp. 301–308 (2001) 2. Greuter, S., Parker, J., Stewart, N., Leach, G.: Real-time procedural generation of ‘pseudo infinite’ cities. In: GRAPHITE 2003, pp. 87–94 (2003) 3. Sun, J., Yu, X., Baciu, G., Green, M.: Template-based generation of road networks for virtual city modeling. In: ACM Symposium on Software and Technology, pp. 33–40 (2002) 4. Muller, P., Wonka, P., Haegler, S., Ulmer, A., Gool, L.V.: Procedural modeling of buildings. In: SIGGRAPH 2006, pp. 614–623 (2006) 5. Wonka, P., Wimmer, M., Sillion, F., Ribarsky, W.: Instant architecture. ACM Transactions on Graphics 22(3), 669–677 (2003) 6. Martin, J.: Procedural house generation: A method for dynamically generating floor plans. In: Symposium on interactive 3D Graphics and Games (2006) 7. Ebert, D., Musgrave, F., Peachey, D., Perlin, K., Worley, S.: Texturing and Mod- eling: A Procedural Approach, 3rd edn. Morgan Kaufmann, San Francisco (2002) 8. Weber, J., Penn, J.: Creation and rendering of realistic trees. In: SIGGRAPH 1995, pp. 119–128. ACM, New York (1995) 9. Lluch, J., Camahort, E., Viv´o, R.: Procedural multiresolution for plant and tree rendering. In: AFRIGRAPH 2003 (2003) 10. Roden, T., Parberry, I.: Clouds and stars: efficient real-time procedural sky ren- dering using 3d hardware. In: ACE 2005 Int. Conference on Advances in Computer Entertainment Technology, pp. 434–437 (2005) 11. Prachyabrued, M., Roden, T.E., Benton, R.G.: Procedural generation of stylized 2d maps. In: ACE 2007: Advances in Computer Entertainment Technology (2007) 12. Roden, T., Parberry, I.: Procedural Level Generation. In: Game Programming Gems 5, pp. 579–588. Charles River Media (2005) 13. Quan, L., Tan, P., Zeng, G., Yuan, L., Wang, J., Kang, S.B.: Image-based plant modeling. In: SIGGRAPH 2006, pp. 599–604 (2006) 14. Deix, W.: Real-time rendering of fractal rocks. In: Central European Seminar on Computer Graphics (2003) 15. Prusinkiewicz, P., Hammel, M.: A fractal model of mountains with rivers. In: Graphics Interface 1993 (1993) 16. Lindenmayer, A.: Mathematical models for cellular interaction in development, parts i and ii. Journal of Theoretical Biology 18, 280–315 (1968) 17. Kelly, G., McCabe, H.: A survey of procedural techniques for city generation. ITB Journal 14 (2006) 18. Prusinkiewicz, P., Hammel, M.S., Mjolsness, E.: Animation of plant development. In: SIGGRAPH 1993, pp. 351–360 (1993) 19. FracTree: http://archives.math.utk.edu/software/msdos/fractals/fractree 20. L-System4: http://www.geocities.com/tperz/L4Home.htm 21. LStudio: http://algorithmicbotany.org 22. An Ivy Generator: http://graphics.uni-konstanz.de/~luft/ivy_generator 23. TreeGenerator: http://www.treegenerator.com 24. TreeMagik G3: http://www.aliencodec.com/product_treemagik.php 25. MeshTree Studio: http://www.ogre3d.org/forums/viewtopic.php?t=25909 26. Dryad: http://dryad.stanford.edu 27. Arbaro: http://arbaro.sourceforge.net 28. SpeedTree: http://www.speedtree.com 29. Xfrog: http://www.xfrog.com/ 30. Tree[d]: http://www.frecle.net/forum/viewtopic.php?t=780