Available online at www.sciencedirect.com

ScienceDirect

Procedia Computer Science 22 (2013) 1229 - 1238

17th International Conference in Knowledge Based and Intelligent Information and Engineering Systems -

KES2013

Rendering of wind effects in 3D landscape scenes

Margarita Favorskaya*, Anastasia Tkacheva

_Siberian State Aerospace University, 31 Krasnoyarsky Rabochy av., Krasnoyarsk, 660014 Russian Federation_

Abstract

Visualization of 3D landscape scenes is often used in architectural modeling systems, realistic simulators, computer virtual reality, and other applications. Wind is a common spread natural effect without which any scene would be unrealistic. Three algorithms for tree rendering under changeable wind parameters were developed. They have a minimal computational cost and simulate weak wind; mid-force wind, and storm wind. A 3D landscape scene is formed from a set of trees models that are generated from laser data and templates of L-systems. The user can tune the wind parameters and manipulate a modeling scene by using the designed software tool.

© 2013 The Authors. Published by Elsevier B.V.

Selection and peer-review under responsibility of KESInternational

Keywords: Wind rendering; laser scanning; L-system; mega-texture

1. Introduction

A landscape scene modeling is based on two different approaches: a full generation of scene by software tools and a realistic rendering of natural scene using laser data and aerial images. In any case, the rendering of natural scenes with vegetations is based on two kinds of models. As shown in survey of Zhang and Pang [1], the models for separate types of multi-level vegetation and co-influence models connecting with growing and stagnation of some plants under their life-cycle received the most propagation. The recent researches are focused on a geometry reduction technique in 2D or 3D spaces. Neubert et al. [2] represented an improved model of pruning in large botanical scenes. A 3D representation has the unchallengeable visualization advantages for the user. In literature, three main approaches of trees modeling exist: a rule-based generation, an interactive modeling, and an image-based modeling. The first approach was introduced by Lindenmayer [3] in 1968 (L-system) as the foundation of an axiomatic theory of biological development. It is often used in a computer graphic. The high level controlling the grammar-based procedural models was proposed by Talton et

* Corresponding author. Tel.: +7-391-291-9240; fax: +7-391-291-9147. E-mail address: favorskaya@sibsau.ru.

1877-0509 © 2013 The Authors. Published by Elsevier B.V. Selection and peer-review under responsibility of KES International doi: 10.1016/j.procs.2013.09.210

al. [4]. The second approach is based on 2D sketch models of trees with following 3D models creation. A technique of plant structures modeling using sketches was developed by Anastacio et al. [5]. Chen et al. [6] designed an original approach for a sketch-based tree modeling using markov random field. The third approach connects with a plant or a tree model creation from a set of images. If such shooting will be around the plant then a 3D plant model can be built. Reche et al. [7] used a set of photos for a volumetric reconstruction and an interactive rendering of trees. Some methods deal with a tree model reconstruction from a cloud of laser points. A heuristic-based modeling was proposed by Xu et al. [8]. Livny et al. [9] designed an automatic reconstruction of tree structures from the point clouds. The development of hybrid methods based on the existing approaches of trees modeling is an actual research task.

This paper provides the hybrid method based on laser data of tree representation, selection of tree template by using a visual aerial image, and modification of geometrical parameters for the required tree template. Tree templates are built as L-systems. They are stored in a special database. When a tree template is "fitted" under laser data, a space colonization algorithm for more realistic visualization of branches and leaves are used. In this research, it is suggested that a landscape scene has a uniform vegetation distribution with a middle density of trees in small part of forest. It is accepted that a modeling scene owns a complex structure with mountains and multi-level surfaces. A wind behavior near trees is a weak predictable process. Therefore the main task was to achieve the effect of maximum similarity and visibility for the user. Our contribution connects with more accurate trees modeling based on laser data and L-system and development of real-time algorithms of wind rendering according to desirable wind parameters.

The remainder of the paper is organized as follows. In Section 2, a brief description of the existing approaches for a wind rendering is presented. Section 3 describes the proposed basic tree modeling. Section 4 includes the algorithms for a wind rendering (weak wind, mid-force wind, and storm). A software tool description and examples of rendering are provided in Section 5. Conclusions are situated in Section 6.

2. Related Work

The rendering of dynamic effects of trees under natural wind is a common task in the outdoor modeling scenes but this task has not a unique satisfactory decision. In their researches, Habel et al. [10] and Akagi and Kitajima [11] considered wind effects near trees as a physical phenomenon. Chuang et al. [12] investigated tree motion textures under a wind field by harmonic oscillations. Another possibility of trees motion modeling connects with a filtering of white noise in the Fourier domain. One of serious attempts of tree animation based on physical fidelity was made by Zhang et al. [13]. The authors suggested the motion graph algorithm that includes a set of representative motions for each tree model. A motion is generated by inputting a sampling configuration based on three components:

• A set of physical parameters for each tree branch.

• An initial state of tree model.

• A time-varying local wind field around a tree model.

Also they proposed a dynamic vibration of wind over time to make the process more realistic. Such approach requires a great variety of templates for each kind of trees and wind conditions.

The technique of response function of branches to turbulent wind in a frequency domain and a branch motion by sampling 2D motion texture was presented by Habel et al. [14]. The key idea for a real-time performance was to calculate vertex displacements in a tree model. The hierarchical deformations of all parent branches can be explicitly performed inside the vertex shader. Each vertex is associated with an index into a texture, and four hierarchical levels of vertexes are simulated.

Fugmann et al. [15] proposed the anisotropic mathematical model to simulate the sway of a Scots pine tree in response to turbulent wind loading. The authors solved the differential equation of displacement of each conditional endpoint of segments for 0.2 m. A tree tilt was approximated by a cubic spline interpolation of

segment displacement provided by Eq. 1, where M is a mass matrix with sizes n x n whose elements are mj (i,j = 1, ..., 15), D is a damping matrix with sizes n x n and elements dj, K is a n x n stiffness matrix with elements kj, F is a n x 1 load vector with elements f, and z is a n x 1 trunk displacement vector with elements z.

Mz" + Dz' + Kz = F (1)

According to biomechanics foundations, Newson et al. [16] considered the soil-root-tree system and studied the influence of wind forces on such system. The authors assumed that a tree model is a combination of vertical (V), horizontal (H) and moment (M) loadings due to a self weight and a wind loading. The component of wind velocity field u(y) applying to a spatially variable horizontal load on a tree H(y) is estimated by Eq. 2 suggested by Peltola and Kellomaki [17], where pair is a fluid density, Cd is a drag coefficient, Afy) is a frontal area, u(y) is a wind horizontal velocity, y is a coordinate in XOY space.

H (y ) = ^fCdAf (y )u2 (y) (2)

The moment applied to a root of tree, may be separated into two components presenting by Eq. 3.

M = H.yw + V.xw (3)

This moment is tuned clockwise. Let us notice that Eq. 1 needs in large empirical data for estimation of spatially variable horizontal load on a tree by a known wind horizontal velocity u(y). There are four main rendering primitives which are used in computer graphics:

• Polygons. For forest rendering, it is the enough costly representation.

• Image-based primitives. An image-based rendering became the major technique for rendering realistic scenes. In spite of low cost of a single image, various images are required (with lighting, scaling, and animation conditions) only for one tree modeling. A high memory volume is needed for such approach.

• Volumetric and shader-based approach. Sometimes fuzzy primitives with a detailed merge in low scale can be interpreted as a natural tree. This approach is used in computer virtual reality.

• Point-based primitives. Such approach is based on reliable data of laser scanning. It is well known two types of forest laser scanning: from the Earth' surface and from helicopter or airplane equipped by special devices. In this research, a hybrid method based on a point-based approach for tree modeling and a shader-based

algorithm for trees animation under wind conditions was developed.

3. Tree Modeling Based on a Cloud of Laser Points and L-system

The restoration of trees view from a cloud of laser data by using a visual aerial image is a very complex task which sometimes has not a unique performance. The action of any laser scanners is based on a distance measure from the source of laser pulses to an opaque object. A beam creating by a laser transmitter is reflected from an object surface. When a reflected signal comes back into a scanner receiver, one can calculate a distance value by a time delay (pulse method) or a phase displacement (phase method) between the emitted pulse and the reflected pulse. If scanner coordinates and a pulse direction are known then 3D points coordinates of object from which a laser pulse was reflected may be determined. Laser pulses are generated with a frequency near 200 pulses per s by a complex 3D trajectory, and as a result a cloud of points which describes an object with a high accuracy is received. If a reflected pulse is a single then the Earth' surface or any opaque object lays on

this direction. If two (maximum three) reflected pulses along any beam are appeared then it will mean that any transparent object is situated before the Earth' surface or an opaque object. Laser data are the most reliable source of 3D coordinates into a scene. Trees are semitransparent objects. Therefore it is needed to separate primary laser pulses from secondary laser pulses. A methodology for detection secondary laser pulses (Earth' surface) and primary laser pulses (trees into a landscape scene) was proposed by Favorskaya et al. [18].

When a cloud of points concerning to tree SST is received, it is needed to separate this set into two subsets: a subset of crown points SSC and a subset of branches points SSB by using Eq. 4.

SST 3 SSC ^ SSs (4)

According to heuristic rules (different intensities of crown, trunk, and branches), empirical threshold values to separate subsets SSC and SSB from Eq. (4) can be determined. For restoration of tree geometry based on a cloud of points, additionally a stochastic grammar of Lindenmayer [3] and Space Colonization Algorithm (SCA) developed by Runions et al. [19] are applied. SCA interactively checks elements belonging to a geometric structure of tree and marks the real points of laser scanning. L-system is constructed according to a stochastic grammar representing by Eq. 5, where V is an alphabet, W is an axiom, PR is a set of productions, a function d : PR^(0,1) is a probability distribution. Such distribution converts a set of productions PR into a set of production probabilities. The sum of probabilities of all productions is equaled 1.

SGd =( V,W, PR, d) (5)

Favorskaya et al. [20] extended the stochastic grammar Eq. (5) applying the procedures of growing and aging of trees. An axiom W was specified by a set of initial parameters for a trunk generation. A growing procedure PRG was introduced for periodically restarting and recalculating parameters of all branches and trunk. Also a degenerating procedure PRD was represented for a periodically recall for deletion of separate tree branches. By using such procedures, a tree skeleton is built. Fig. 1 provides some examples of monopodial structures, sympodial structures, and ternary branching of trees.

The task is to select such structure of tree which will be maximally matched with laser and visual data. Visual data of trees crowns help to determine a kind of tree in automated mode by using the expert

recommendations. Also during branches modeling, Hermit curves were used to make a branching more realistic (Fig. 2). This procedure is applied to the main branches of tree.

Fig. 2. (a) line segments; (b) smoothing sharp transition by Hermit curves

SCA includes several steps:

• Step1. A detection for an initial point of trunk. From this point, the building of tree skeleton is begun.

• Step 2. A crown points matching. During iterations for each current node, a branch to the nearest point of crown is generated and matched in a tree model. A tree model may be rotated for better matching. Such iterations are finished when all crown points will be associated with branches, or number of iterations determined by the user will be accomplished.

• Step 3. A resampling of branches points.

• Step 4. A smoothing sharp transition of branches.

• Step 5. A leaves mapping. A skeleton of tree is covered by a leaves texture according to a tree template in a desirable scale. Such leaves textures may be previously prepared and chosen by the user from a texture library.

The example of tree modeling by using data of laser scanning and L-system paradigms is shown in Fig. 3.

Fig. 3. (a) a visual image of tree; (b) 3D cloud of laser data; (c) a modeling result

4. Algorithms of Wind Rendering in Landscape Scenes

Three basic wind rendering algorithms concerning to weak wind (Section 4.1), mid-force wind (Section 4.2), and storm rendering (Section 4.3) were developed. Storm hazard is enough rarely natural effect that may occur once during several years. Two other algorithms find more often applications into a landscape scenes modeling.

4.1. Weak Wind Rendering

A weak wind rendering is the enough simple procedure with random wind direction and minimum differences of leaves flicker. This effect is needed in a scene foreground and may be determined as a redrawing procedure of leaves texture on a tree skeleton. The flickering effect into a scene background is realized as a replacement of intensities of some random pixels concerning to leaves texture with a frequency 2 - 3 Hz. Such temporal periodicity can be simulated by using a generator of random values relatively pixels positions and pixels intensities.

In all three algorithms of wind rendering including a weak wind rendering, a mega-texture mapping is applied. It means that a landscape scene is covered by a single base texture with large sizes instead of a set of textures with small sizes. More detailed information about mega-texture mapping one can find in site [21]. Such technology is a very perspective approach for rendering in outdoor spaces and has the following statements:

• Mega-texture is stored in HDD (Hard Disk Device) and is loaded into RAM (Random Access Memory) when the detailed repainting of landscape scene is necessary. Such approach saves RAM resources essentially.

• The nearest foreground pixels are replaced by the highest quality texture with restricted sizes.

• The following pixels are replaced by the high quality texture with a usual resolution.

• The background pixels are the base texture with a decreased resolution.

Such technology was designed for a landscape texturing to improve a view range and higher realistic properties of modeling scene. A scene surface is divided on different Levels Of Details (LOD), and for each level the texture with required quality properties (clipmap) is designed. Usually it is enough 5 detailed levels. If clipmap sizes are 512 x 512 pixels then data of 512 x 512 x 5 x 4 « 5 Mb for 5 levels and 32 bit for each pixels (8 x 4 = 32 bit) are needed. Such calculation shows that the required volume of video RAM has very small values for repainting a landscape scene with the high quality and resolution.

The key property of such texturing approach connects with a texture loading into a video RAM only during virtual camera displacements, or with changes of a view point. When a virtual camera is moved then transitions of texture LODs are realized. If a view point displacement is higher a pre-determined threshold value then texture coordinates are recalculated. The main advantage of this technology is a possibility to work with small texture volumes that supports a high computer speed.

4.2. Rendering of Middle Speed Wind

For real-time application, a simulation model of wind influence on a tree is designed. In this case, a fractal model of tree is required that is not a model building from data of laser scanning. Three main steps are involved into such fast algorithm: building of tree skeleton, wind rendering, and adding of branches randomness and inertia.

The design of tree model based on fractal schema has the following simplifications. Let two vectors with known origins and directions exist. Triply new directions disposing them on some angle are calculated. The length of a new vector must be shorter of previous vectors (it is achieved by using a correction coefficient). The new position becomes the end of previous vector. Thereby the first vector is a trunk of a tree model from which

three branches are continued. The experiments show that the depth of recursion equaled to 7 is enough to simplify a tree model.

Wind rendering is a simulation of branches flexure caused by wind. It means that coordinates of "branch-vectors" ought to be recalculated. It is possible to calculate a rotation matrix around an axis passing through the origin of "branch-vector" and the normal to a direction of "wind-vector". But on seventh recursion level, such calculations will be too complex without a real-time execution.

The simple and less exact method was used under the assumption that a wind direction can not be vertical, and branch displacements are situated in one plane with "branch-vector" and "wind-vector". The task is to find displacements of "branch-vectors" ends along axes OX and OZ and to normalize the result so that the lengths of "branch-vectors" do not change. In such manner, the own oscillations of branches are simulated. Additionally the oscillations of supporting branches are considered. Finally coordinates of "branch-vectors" are recalculated. The trunk is considered as a stationary object that has a small tilt angle under a wind influence. Also the dependence between a thickness of branch and a branch flexure was used. Such correction coefficients are determined as tabulated values.

The adding of branches randomness and inertia is a necessary step for an acquisition of realistic effect. The wind randomness is well described by Perlin noise [22]. A Perlin noise generation is one of popular procedures for design of random procedural textures. The method consists in a composition of usual noises with difference frequencies and amplitudes inversely proportional to frequency. The branch inertia is the gradual position changes by an immediately changeable wind direction. For simulation of such effect, the branches positions do not changed but the inertial wind directions from frame to frame are corrected by a linear interpolation.

4.3. Storm Rendering

The storm damage is a hard prevented phenomenon. It may be estimated as a natural risk in a long time domain. A tree animation in environment of hurricane impacts was proposed by Singh et al. [23]. Usually the consequences of storm rendering are determined by the kinds of trees, their heights and state of roots, topography, climate, and soil properties. It is important to consider a tree model not only as a mechanical system which is exposed to horizontal component of strong wind force, but also as ecological system having its own shapes of trunk, branches, and crown. The effect of storm wind may be not only a branches break, but also an uprooting or a trunk break on a determined height.

Two scenarios of behavior may be suggested dependently from "vertical" or "horizontal" roots of a tree. The first model (with deep root system) considers a tree as a rigid column on the elastic base. The deviation angle 8 of such "column" is determined from Eq. 6, where P is a horizontal moment of wind, h is a point ordinate of application of force P, Q is a force moment of column weigh, l is a distance from root to a point ordinate of application of force P, J is an inertia moment of root system, c is a proportional coefficient.

Ph - Ql 9 + cJQ = 0 (6)

In Eq. 6, a simplifying condition 8 « sin 8 was made. A critical load value will be when P = 0 in Eq. 6. Therefore Eq. 7 provides a critical load Qc.

Qc = cJ/l (7)

Eq. 7 is right until a root system would not break from the Earth surface. If this process begins then Eq. 6 will become a nonlinear dependence.

The second model (with a non-deep root system) has another interpretation. Under a wind influence, a tree also tilts but in this case the gravity and the reaction force of root system are situated not in one plane. This model generates forces which aim is to return back a tree into a normal position. A tree tilt is less for the second model and achieves a maximum durability by 8 = 10 - 12°. In the first model, this parameter achieves approximately 30 - 35°. The approximate values of 8 (according to wind force, kind of tree, and tree height) are stored in database. For simulation effects, the procedures of uprooting or trunk break are randomly executed.

5. Software Tool and Experimental Results

Software tool "REWELS" (REndering of Wind Effects into Landscape Scenes) contains three main modules: a module of tree generation based on laser data and L-system, a module of 3D scene generation, and a rendering module which includes three developed algorithms of wind simulation in dependence of wind speed. The designed software tool has a possibility not only to tune wind parameters but also move, rotate, and scale the modeling scene. In Fig. 4, maximum tilts of tree models (on assumption that a wind direction is along axis OX) are shown by rendering of middle speed wind. Simplified fractal models of trees and real trees images with different wind speed from 0.3 m/s up to 21 m/s are represented in Figs. 4 a and 4 b respectively. The accuracy of rendering may be estimated only on a qualitative level based on the expert estimations. Such expert estimations are better for low-scaled landscape scenes.

Fig. 4. (a) fractal models of trees; (b) real images of trees

The modeling results of storm wind rendering are shown in Fig. 5.

For program realization, the graphical jet GLScene applying the library OpenGL as application programming interface in development environment RAD Studio 2010 was used. Some standard objects from the jet GLScene such as TGLCamera (a camera object), TGLSceneViewer (3D viewer object), TGLMaterialLibrary (a library of materials), TGLFreeForm (a static 3D model), and the others were applied.

Fig. 5. (a) maximum tilt of tree; (b) uprooting modeling

6. Conclusion

In this paper, the process of tree restoration by using laser data with a tree modeling based on L-system for more realistic view of modeling forest scene was investigated. Laser data were used to restore a view of Earth surface and natural objects into landscape scenes. The hybrid method based on laser data of tree, selection of tree template by using a visual aerial image, and modification of geometrical parameters of required tree template was designed. The mega-texture mapping was applied for a landscape texturing with increased view range and higher realistic properties of modeling scene. For rendering of wind effects, three basic algorithms of trees animation under weak wind, middle speed wind, and storm wind were developed. Owing to the stochastic structures of trees, all algorithms are the approximate procedures with maximum visual effect for the user.

Three main modules include into software tool "REWELS". There are a module of tree generation based on laser data and L-system, a module of 3D scene generation, and a wind rendering module. The software tool is based on the graphical jet GLScene (with applying the open library OpenGL) and own designed components.

References

[1] Zhang Q-L, Pang M-Y. A survey of modeling and rendering trees, In: Pan Z, Zhang X, Rhalibi AE, Woo W, Li Y, editors. Edutainment, Springer Link, Heidelberg, 2008, p. 757-764

[2] Neubert B, Pirk S, Deussenl O, Dachsbacher C. Improved Model- and View-Dependent Pruning of Large Botanical Scenes, Computer

Graphics Forum 2011;30(6):1708-1718.

[3] Lindenmayer A. Mathematical models for cellular interaction in development. J. of Theoretical Biology 1968;18(3):300-315.

[4] Talton JO, Lou Y, Lesser S, Duke J, Mech R, Koltun V. Metropolis procedural modeling. ACM Trans Graph 2011;30(11):1-14.

[5] Anastacio, F., Sousa, M.C., Samavati, F., Jorge J.A., 2006. "Modeling plant structures using sketches," 4th International Symposium on

Non-Photorealistic Animation and Rendering, ACM, p. 105-113.

[6] Chen X, Neubert B, Xu Y-Q, Deussen O, Kang SB, Sketch-based tree modeling using markov random field. ACM Trans Graph

2008;27(5):1-9.

[7] Reche, A., Martin, I., Drettakis G., 2004. "Volumetric reconstruction and interactive rendering of trees from photographs," ACM

SIGGRAPH 04, p. 720-727.

[8] Xu H, Gossett N, Chen B. Knowledge and heuristic-based modeling of laser-scanned trees. ACM Trans Graph 2007;26(4):19-31.

[9] Livny Y, Yan F, Olson M, Chen B, Zhang H, El-Sana J. Automatic reconstruction of tree skeletal structures from point clouds. ACM

Trans Graph 2010;29(151):1-8.

[10] Habel, R., Kusternig, A., Wimmer, M., 2009. "Physically guided animation of trees," Eurographics 2009 28(2), p. 523-532.

[11] Akagi Y, Kitajima K. Computer animations of swaying trees based on physical animation. Computers and Graphics 2006;30(4):529-539.

[12] Chuang Y-Y, Goldman DB, Zheng KC, Curless B, Salesin DH, Szeliski R. Animating pictures with stochastic motion textures. ACM Trans Graph 2005;24(3):853-860.

[13] Zhang L, Zhang Y, Jiang Z, Li L, Chen W, Peng Q. Precomputing data-driven tree animation. Comp Anim Virtual Worlds 2007;18:371-382.

[14] Habel, R., Kusternig, A., Wimmer, M., 2009. "Physically Guided Animation of Trees," Eurographics 2009 28(2), p. 523-532.

[15] Fugmann, H., Schindler, D., Mayer, H., 2009. "A dynamic tree sway model," 2nd International Conference Wind Effects on Trees, p. 269-275.

[16] Newson T., Sagi, P., Miller, C., Mitchell, S., 2009. "Application of yield surfaces in three-dimensional VHM load space to the stability of trees under wind loading," 2nd International Conference Wind Effects on Trees, p. 141-147.

[17] Peltola H, Kellomaki S. A mechanistic model for calculating windthrow and stem breakage at stand edge, Silva Fennica 1993;27:99-111.

[18] Favorskaya M, Zotin A, Danilin I, Smolentcheva S. Realistic 3D-modeling of Forest Growth with Natural Effect. In: Phillips-Wren G, Jain LC, Nakamatsu K, Howlett RJ, editors. Advances in Intelligent Decision Technologies in Smart Innovation, Systems and Technologies, Springer-Verlag Berlin Heidelberg, 2010, p. 191-199.

[19] Runions, A., Lane, B., Prusinkiewicz, P., 2007. "Modeling trees with a space colonization algorithm," Eurographics Workshop on Natural Phenomena, p. 63-70.

[20] Favorskaya M, Zotin A, Chunina A. Procedural Modeling of Broad-Leaved Trees under Weather Conditions in 3D Virtual Reality. In: Tsihrintzis GA, Virvou M, Jain LC, Howlett RJ, editors. Intelligent Interactive Multimedia Systems and Services in Smart Innovation, Systems and Technologies, Springer-Verlag Berlin Heidelberg, 2011, p. 51-59.

[21] OpenGL Performer Programmer's Guide: ClipTextures, Available online, at http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=bks&srch=&fname=/SGI_Developer/Perf_PG/sgi_html/ch15.html

[22] Perlin K. An Image Synthesizer. ACM SIGGRAPH 1985;19(3):287-296.

[23] Singh, P.A., Zhao, N., Chen, S.-C., Zhang, K., 2005. "Tree animation for a 3D interactive visualization system for hurricane impacts," IEEE International Conference on Multimeia and Expo, ICME 2005, p. 598-601.