6

Click here to load reader

RENDERING TERRAIN ON MOBILE DEVICES USING … fileVII-31 ISSN 2085-1944 RENDERING TERRAIN ON MOBILE DEVICES USING ADAPTIVE SUBDIVISION METHOD: DESIGN CONSIDERATION Siti Aida Mohd Isa1,

Embed Size (px)

Citation preview

Page 1: RENDERING TERRAIN ON MOBILE DEVICES USING … fileVII-31 ISSN 2085-1944 RENDERING TERRAIN ON MOBILE DEVICES USING ADAPTIVE SUBDIVISION METHOD: DESIGN CONSIDERATION Siti Aida Mohd Isa1,

VII-31 ISSN 2085-1944

RENDERING TERRAIN ON MOBILE DEVICES USING ADAPTIVE SUBDIVISION METHOD: DESIGN CONSIDERATION

Siti Aida Mohd Isa1, Mohd Shafry Mohd Rahim1, Ismail Mat Amin2, Daut Daman3 1Department of Computer Graphics & Multimedia,

2Department of Software Engineering, Faculty of Computer Science & Information System,

Universiti Teknologi Malaysia 81310 Skudai,

Johor Darul Takzim, Malaysia 3Faculty of Computing and Information Technology

King Abdul Aziz University Rabigh, Saudi Arabia

email : [email protected], [email protected], [email protected], [email protected]

ABSTRACT Rendering terrain on mobile devices for

visualization and GIS applications is tedious work. Simplifying the terrain mesh will create a simplified surface and improve the rendering speed. However in certain area such as mountainous area, it will not be effective. Thus it is important to create a smooth and accurate surface in mountainous area. One of the popular methods to create smooth surface in certain area of the mesh is to implement adaptive subdivision method. Since adaptive subdivision is the main focus of this research, the preliminary work of adaptive subdivision method are investigated and discuss about the main components of adaptive subdivision like selection criteria, subdivision scheme and crack handling. These components will be taken into consideration during the process of development of rendering terrain on mobile device with more accuracy. In this paper, general framework and future work of this study will be presented. Keywords: Adaptive subdivision, terrain rendering,

mobile devices. 1 INTRODUCTION

Terrain rendering has become an active research area in computer graphics. It is an important component for virtual scene in many applications including visualization and geographical information system (GIS) application. Through the advance technology of mobile devices, it is now possible to render terrain on such devices. In spite of the possibilities, rendering terrain on mobile devices arises many issues in terms of its devices and terrain data itself. Due to the large

terrain data and the lack of capabilities of mobile devices, simplifying the surface will contribute to faster rendering speed. However, in certain area with curvature such as in mountainous area, the technique to simplify the surface will not be very effective [1]. Thus, technique to smooth and preserve the accuracy of the surface is needed.

Subdivision can be summarized as a “smooth curve or surface as the limit of sequence of successive refinements” [2]. They provide simple operations to produce smooth surface from a given control mesh. It has the ability to handle arbitrary topology meshes that is one of the major advantages over traditional B-spline and NURBS [3]. The smoothness of the produced surface is varying depending on the subdivision rules or schemes used. Subdivision surfaces are well-established research in computer graphics and increasingly used in computer modelling and animation such as Geri’s Game, A Bug’ Life and Toy Story 2.

There are many subdivision schemes developed throughout recent years including Catmull and Clark (1978), Loop (1987), Butterfly (1990), Doo and Sabin (1998) and Kobbelt (2000). Table 1 shows the classification of most known subdivision schemes.

However, subdivision schemes are applied to the whole meshes and all meshes are refined at every level of subdivision which leads to a huge computational load in higher levels of subdivision [6]. Furthermore, with every level of subdivision, the size of mesh also grows exponentially thus effecting the rendering time and storage space. Moreover, the need of refinement is only in some regions particularly in mountainous area where curvatures change significantly. Towards this aim, adaptive subdivision method is applied. Adaptive subdivision is one of the common ways to create the

Page 2: RENDERING TERRAIN ON MOBILE DEVICES USING … fileVII-31 ISSN 2085-1944 RENDERING TERRAIN ON MOBILE DEVICES USING ADAPTIVE SUBDIVISION METHOD: DESIGN CONSIDERATION Siti Aida Mohd Isa1,

VII-32 The 6th International Conference on Information & Communication Technology and Systems

ISSN 2085-1944

same smooth surface as subdivision scheme with fewer triangles.

Table 1. Classification of Subdivision Schemes

Schemes Meshes Interpolating / Approximating

Refinement Rule

Limit Surface

Loop Triangular Approximating Face split C2

Catmull-Clark

Quadrilateral Approximating Face split C2

Mod. Butterfly

Triangular Interpolating Face split C1

Kobbelt Quadrilateral Interpolating Face split C1

Doo Sabin Quadrilateral - Vertex

Split C1

In this paper, we focus on several

components that need to be considered for rendering terrain on mobile devices using adaptive subdivision method to retain the accuracy of the terrain while attaining more smooth terrain model. Discussion of this paper is as follows: Section 2 explains the overview for adaptive subdivision method. Section 3 discusses several main components in adaptive subdivision. Section 4 provides the general framework for simple adaptive subdivision method in rendering terrain on mobile device. Followed by Section 5 that concludes this paper and state the future work for this research.

(a)Coarse (b) Fine (c) Adaptive

subdivision Figure 1. Example of coarse mesh with subdivision and adaptive

subdivision [incremental tri]

2 RELATED WORK

In this section, we will briefly review related work on adaptive subdivision method and its component is discussed. Generally, adaptive subdivision method consists of three main components; subdivision scheme, selection criteria and crack handling method.

Adaptive subdivision for Catmull-Clark and Doo-Sabin is presented by Muller in [5] which specifies whether a vertex of the chain or mesh

approximates sufficiently in his scheme. Error criterion is obtained by the distance of approximation of the vertex to the limit shape is measured and labelled if the vertices lie in the error range. The mesh that contains one or more of these labelled vertices is subdivided. Xu and Kondo [6] also proposed an adaptive subdivision scheme based on Doo-Sabin scheme using error estimation obtained from the angle of the normal vector of adjacent meshes. Adaptive subdivision for Loop scheme by Amresh et al. [7] used two selection criterions. The first method used angles between the normal of the face and its adjacent faces to determine whether subdivision is needed for that face in the next level or not. While the latter is based on user interaction where the user can specify the region of the mesh to be subdivided and automatically identify by watershed segmentation. An incremental subdivision method for triangle meshes proposed by Pakdel et al. can produce surface with proper connectivity and geometry while gradually change of level of detail from coarse to fine [8, 9]. This method used the same selection criterion as [7] and the scheme applied to Loop and Butterfly schemes.

Adaptively subdividing a certain mesh will produce cracks especially if it involves area with different level of details in the region that is subdivided and its surrounding area. Subdivision may fail and some artifacts will be produce if the cracks that occurred are not handled properly. To prevent cracks, Amresh et al. introduced a simple triangulation method, which bisects the face with lower subdivision level [7]. Inserting edge into the mesh called red-green triangulation method is a new method to remove cracks developed by Bank et al. [10]. The green triangulation is the face that the faces with one crack are bisected, while the red triangulation is faces with more than one cracks are quadrisect.

3 GENERAL FRAMEWORK

In this section we discuss on a general framework for rendering terrain on mobile devices using adaptive subdivision method (see Figure 4). The framework can be decomposed into two phases. The former phase is to generate suitable input while the latter consists of several process of adaptive subdivision method that aims to render the terrain surface on mobile device with more accuracy.

Most of the decisions for designing the framework are based on the previous works mainly in the rendering process which used adaptive subdivision method to refine mountainous area. In

Page 3: RENDERING TERRAIN ON MOBILE DEVICES USING … fileVII-31 ISSN 2085-1944 RENDERING TERRAIN ON MOBILE DEVICES USING ADAPTIVE SUBDIVISION METHOD: DESIGN CONSIDERATION Siti Aida Mohd Isa1,

Rendering Terrain on Mobile Devices using Adaptive Subdivision Method: Design Consideration -Siti Aida Mohd Isa

VII-33

ISSN 2085-1944

order to obtain suitable results, several raw data (in raster form) is digitized in the pre-processing phase to generate Digital Terrain Model (DTM).

Figure 4. General Framework

In rendering process, adaptive subdivision method will be used to refine certain area especially in mountainous area. The process consists of several steps including choice of subdivision scheme, the area to subdivide and crack handling. For the process of detecting which regions of the mesh to be subdivided, most of previous works determine either by the application or specified directly by the user. Due to the need to emphasise

part of a region with a mountainous criteria by increasing the detail of that area, control over the level of detail of the model is decided by Degree of Interest (DoI) function. The DoI function for each vertex, edge, or face on the triangle mesh is computed and these DoI values are compared to a certain threshold value to decide whether subdivision steps are required or not. The face on the triangle is subdivided if the DoI is bigger than the threshold value otherwise it is not. For example, if the adjacent faces have an angle higher than the threshold value of 30 degrees the face are subdivided or else it is not subdivided as shown in Figure 5.

Figure 5. DoI value of adjacent faces is higher than the threshold value of 30 degrees are subdivided [11]

After selecting the area, the mesh is

subdivided using Modified Butterfly subdivision scheme, which is a triangle based-algorithm. The algorithm consists of rule to compute the E-vertices. Although Loop and Catmull-Clark can produce more pleasing surface as had been revealed in Table 1, Modified Butterfly can reproduce the shape more closely than other schemes [1]. Furthermore, the system requires exact interpolation of the initial mesh to retain the accuracy of the mesh as closely to the real mesh.

Subdividing a certain area of the mesh leads to connectivity inconsistencies such as cracks. Cracks occurred due to repositioning odd vertices on the edges shared by faces at different subdivision levels in the subdivision process. As shown in Figure 3, the neighbouring vertices surrounding the subdivide faces is incomplete and when they are repositioned a crack is created.

Pre-processing

Digitize Data

Convert to TIN Structure File Format

RAW Data

Detect area to be subdivide using normal

angle between surface

The selected area is subdivide using Modified Butterfly scheme

Crack which occurred will be handled using Simple triangulation

Rendering Process

Subdivide the selected region

Data Loading

Selection Criteria

Crack Handling

Page 4: RENDERING TERRAIN ON MOBILE DEVICES USING … fileVII-31 ISSN 2085-1944 RENDERING TERRAIN ON MOBILE DEVICES USING ADAPTIVE SUBDIVISION METHOD: DESIGN CONSIDERATION Siti Aida Mohd Isa1,

VII-34 The 6th International Conference on Information & Communication Technology and Systems

ISSN 2085-1944

Figure 3. Different level of detail between subdivided region and

its neighbour produce cracks [8]

Cracks that occurred must be removed from

the mesh since subdivision algorithm depends on the connectivity of the mesh. To remove cracks, Simple triangulation method proposed by [7] Amresh, Farin and Razdan (2003) is applied. In simple triangulation method, the neighbouring faces of the subdivide face is splits into two, three or four faces depending on the number of odd vertices. A bisection of the face with lower subdivision depth will remove the crack occurred on each odd vertex as shown in Figure 6.

Figure 6. Adaptive subdivision with simple triangulation method

to remove cracks [8]

4 IMPLEMENTATION

Experiment was conducted for loading and rendered DTM data that is in a Triangulated Irregular Network (TIN) based format on mobile device environment.

4.1 Experimental Setup

This experiment used C++ as programming language and OpenGL ES as 3D graphic API for 3D rendering and effects while mobile device to be use as a testing environment is HTC TyTN II Windows Mobile Pocket PC Smartphone. The terrain data that are used as an input is an aerial image of Sungai Kinta region, Perak, Malaysia, near the Banjaran Titiwangsa obtained from Jabatan Ukur dan Pemetaan Negara (JUPEM). Before the

data can be used as an input, it needs to be process into a TIN based format.

4.2 Data Loading

Terrain surface will be represented as triangulated mesh in 3D space during the development of terrain rendering on mobile device. The generation of Digital Terrain Model (DTM) and triangulated mesh of the terrain surface enables the extraction of vertex points for each of these images. The vertex points obtained are then rearranged into a TIN based file format and stored in a text file.

Figure 7. Vertices points arrangement in a TIN structure [8]

The text file is then loaded into the device where the prototype is installed. The prototype will load the data into memory line by line after the

initialization. The proposed methods for rendering process are still being implemented. Figure 8 shows

Vertex: 676 0: -4 8.6183769 4 1: -3.68 10.2897911 4 2: -3.36 11.47515795 4 3: -3.04 12.37283325 4 4: -2.72 13.2545212 4 5: -2.4 13.87226255 4 6: -2.08 14.0485977 4 7: -1.76 14.3841614 4 8: -1.44 14.5953308 4 9: -1.12 14.1391449 4 10: -0.8 13.29046785 4 11: -0.48 12.0485779 4 12: -0.16 11.2659691 4 13: 0.16 10.4524002 4 14: 0.48 9.8124771 4 15: 0.8 9.28485795 4 16: 1.12 8.9396637 4 17: 1.44 8.54887695 4 18: 1.76 8.09271395 4 … Face: 1302 0: 0 26 27 1: 0 27 1 2: 1 27 28 3: 1 28 2 4: 2 28 29 5: 2 29 3 6: 3 29 30 7: 3 30 4 8: 4 30 31 9: 4 31 5 10: 5 31 32 11: 5 32 6 12: 6 32 33 13: 6 33 7 14: 7 33 34 15: 7 34 8 16: 8 34 35 17: 8 35 9 18: 9 35 36 19: 9 36 10 …

Page 5: RENDERING TERRAIN ON MOBILE DEVICES USING … fileVII-31 ISSN 2085-1944 RENDERING TERRAIN ON MOBILE DEVICES USING ADAPTIVE SUBDIVISION METHOD: DESIGN CONSIDERATION Siti Aida Mohd Isa1,

Rendering Terrain on Mobile Devices using Adaptive Subdivision Method: Design Consideration -Siti Aida Mohd Isa

VII-35

ISSN 2085-1944

the terrain data rendered on mobile device after the loading process.

Figure 8. Terrain data rendered on the mobile device [12].

5 CONCLUSION

In this paper a framework of rendering terrain on mobile device using adaptive subdivision for creating smooth terrain surface is presented. Based on previous research, three main components need to be considered during the process of development, which are the selection criteria, subdivision scheme for refinement and crack handling. Modified Butterfly scheme is the most preferable choice for refinement of the mesh since it reproduces the shape that is more closely to the real terrain mesh. The proposed selection and subdivision methods are believed to be able to render terrain on mobile device with great precision in mountainous area thus bringing great benefit in the development of mobile device games and applications. In future work, the prototype will be extended for rendering process based on GPU.

ACKNOWLEDGMENT

The author wishes to convey their innermost gratitude and appreciation to Malaysian Ministry of Science, Technology and Innovation (MOSTI) under ScienceFund grant (01-01-06-SF0387) for providing financial support of this research.

REFERENCES [1] Wen J, Zhu B and Wang F (2008) Real-time

rendering of large terrain on mobile device. In The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences. vol. XXXVII. Part B5. Beijing.

[2] Zorin D and Schr¨oder P (2000) Subdivision for modeling and animation. ACM SIGGRAPH Course Notes 2000: New York University Caltech.

[3] Theoharis T, Papaioannou G, Platis N and Patrikalakis N M (2008) Graphics & Visualization: Principles and Algorithms, Wallesley.

[4] DeRose T, Kass M, and Truong T (1998) Subdivision surfaces in character animation. Proceedings of the 25th Annual Conference on Computer Graphics and Interactive Techniques. 32: pp. 85–94.

[5] Muller H, and Jaeschke R (1998) Adaptive subdivision curves and surfaces in Proceeding Computer Graphics International. pp. 48-58.

[6] Xu Z, and Kondo K (2005) Adaptive refinement in subdivision surfaces. Proceedings of Eurographics. Computer Graphics Forum, pp. 239-242.

[7] Amresh A, Farin G, and Razdan A (2001) Adaptive subdivision schemes for triangular Meshes. Hierarchical and Geometrical Methods in Scientific Visualization, pp. 319-327.

[8] Pakdel H R, and Samavati F (2004) Incremental adaptive loop subdivision. Proceedings of International Conference on Computational Science and Its Applications. 3045: pp. 237-246.

[9] Pakdel H R, and Samavati F (2007) Incremental Subdivision for triangle meshes. Int. J. Computational Science and Engineering 3(1).

[10] Bank R E, Sherman A H, and Weiser A (1983) Some refinement algorithms and data structures for regular local mesh refinement, in Scientific Computing, R. Stepleman, et al., Editors. IMACS/North-Holland, pp. 3-17.

[11] Isenberg T, Hartmann K, and K¨onig H (2003) Interest value driven adaptive subdivision. In Simulation and Visualisierung, T. Schulze, S. Schlechtweg, and V. Hinz, Editors. SCS European Publishing House, pp. 139-149.

[12] Isa, S A M, Rahim M S M, Daman D and Kasmuni M D (2010) Rendering process of digital terrain model on mobile devices. Advances in Multimedia - An International Journal (AMIJ) 1(1).

Page 6: RENDERING TERRAIN ON MOBILE DEVICES USING … fileVII-31 ISSN 2085-1944 RENDERING TERRAIN ON MOBILE DEVICES USING ADAPTIVE SUBDIVISION METHOD: DESIGN CONSIDERATION Siti Aida Mohd Isa1,

Rendering Terrain on Mobile Devices using Adaptive Subdivision Method: Design Consideration -Siti Aida Mohd Isa

VII-36

ISSN 2085-1944

[This page is intentionally left blank]