Available online at www.sciencedirect.com

SciVerse ScienceDirect

Procedía Engineering 15 (2011) 40142 - 4146

Procedía Engineering

www.elsevier.com/Iocate/procedia

Advanced in Control Engineeringand Information Science

An Algorithm of Surface Subdivision Based on Texture

Feature

Gang Xu, Rubo Geng a*

Training Departmen, Xuzhou Air Force Academy, Xuzhou 221000,China

Abstract

In order to reduce the complexity of the mesh mode and accelerate the processing in real-time virtual reality environment, an algorithm is put forward to implementing the triangle splitting based on the feature values of elevation texture in the surfaces. The triangle mesh model is redefined including vertex, the topological structure and the surface texture map information. The algorithm provides a method to subdivide surfaces based on the feature values of elevation texture in the surfaces and the binary-tree of triangle. The results show that the data structure of binary-tree is designed for the triangle mesh subdivision, and multi-resolution mesh structure is achieved. Experiments indicate that the algorithm can solve difficult technical problems such as large-scale modeling and realtime drawing of geometric objects in the virtual city.

© 2011 Published by Elsevier Ltd. Selection and/or peer-review under responsibility of [CEIS 2011]

Keywords: Surface subdivision; Texture feature; Triangle mesh; Binary-tree; Geometrical object

1. Introduction

Surface subdivision algorithm is widely used in such fields as 3d surface shaping, multiple resolution analysis and computer graphics. And in recent years, the algorithm has become the hot research in the surface modeling technology. Traditional algorithms focus on the point and plane splitting of surface according its geometrical attributes such as position, tangent, normal, gradient and curvature. And the

* Corresponding author. Tel.: +186-113113935951.

E-mail address: xgeml@163.com

1877-7058 © 2011 Published by Elsevier Ltd. doi:10.1016/j.proeng.2011.08.777

adopted methods includes vertex-based energy distribution, wavelet analysis and fitting error[1-4]. Different from the traditional method, the plane splitting of the algorithm in the paper is based on the elevation texture feature value of the surface, surface subdivision is conducted on the feature value image mapped onto the surface, with different regions of the mesh mode represented by different resolutions. Regions approaching the feature value are described with more triangles while the others are described with less triangles, which reduces the complexity of the mesh mode and accelerates the processing, and with no effect on spatial geometrical features.

2. Principle of surface subdivision algorithm

In the 3-D space, surface is presented as 3d model, but its DEM data is equivalent to 2-D gray image generated by mapping at the slicing height according to the height filed or DEM data. Where the brightness has little change is the continuous smooth region of surface while the place where the brightness has more changes is a continuous convex-concave region, or a non-continuous region with sharp features such as crease and inflexion point [5]. The gray image edge feature value can describe the obvious brightness change of a certain region of the gray image. The idea of the surface subdivision algorithm is based on the tessellation of meshes around the "feature value" in the 3-D space.

2.1. Thr redefinition of t/iengule/ mrsh model

Triangle mesh is not only a piecewise linear surface in which triangles in the 3-D space are connected through edges and Vertexes, but consists of texture image information. Therefore we define mesh M as a triple, M=(K,V,U),

In which

U ={u1,•••, um}, ui e R2 is the coordinate of pixels in a 2-D texture image

V ={v1,•••, vm}, vi e R3, the position of vertex of mesh M in the 3-D space

And K is the simplicial complex to represent network topology. A simplicial complex includes a group of simplex, in which {1}--{m} is called vertex, marked as P; {i, j} is called edge, marked as L; {ij,k}, called triangular plane, is marked as T. Each edge of the triangle can be included in at most two triangles and one vertex can only be corresponded to one texture coordinate.

2.2. Extraction of thr rlrvetion trxtu/r fretu/r velur

By detecting the edge of the elevation texture image with the image processing technology, extract the edge feature value curve of the image. The gray section plane of the texture image region is generally considered as a step, that is, a gray value changes sharply from a small number to a large one. Therefore derivation method can be used for its detection.

p/ / dx = f (X, y) - f (x -1, y) J)

|3/ / dy = / (x, y) - / (x, y -1) Mathematically, the step caused by gray value change can be expressed as gradient. For easy calculation, template operator is generally used for convolution to calculate the gradient. Among many different template operators put forward at present [6], in this paper Canny operator is used, in which the first difference convolution template is:

<p1( m, n ) = f ( m, n ) OH j( x, y ) <p2(m, n) = f (m, n)DH2 (m, n) m, n) = -Jç12(m, n) + <p22(m, n)

* ta„ - ! ^2( m , n ) (pl(m, n)

r.3. Process of surface subdivision

The subdivision of the mesh model is aimed to increase the LOD and the LOD embodies such characteristics as fluctuation and sharpness. Based on the characteristics, the number of the triangular meshes to draw can be automatically adjusted. The basic algorithm is: first pre-generate a regular mesh M0, map the image with elevation texture feature values into the texture coordinate U0 of the mesh, and after the mesh subdivision for n time, get the sequence M=M0^M1^M2-"^-Mn , Let T be an triangle in M obtained by the subdivision of M0 for i times. The splitting of T is shown as in Figure 1.

^-'Pi (a)

Fig. 1. Subdivision of a triangle

Through the above splitting process of triangle plane, we can get the binary tree subdivision layer structure as shown in Fig.2. The final drawing result of this depth mesh model is the leaf in a certain layer Mx or the root without any subtree.

■ Ti .

■ T2 .

Fig. 2. Subdivision layer structure

The simplification process of surface is the inverse process of subdivision with no need to judge the splitting situation of the triangle edge. Simplification can be reached only by deleting the subtrees and leaves of the M triangle mesh in a certain layer.

But there still exist such problems such as the extracted boundary having several intersection points with the triangle mesh edge and how to determine the direction of the triangle normal after subdivision. These problems restrict the effect of mesh subdivision. So it is needed to subdivide and draw the mesh according to a certain rule to obtain a better result.

• (1) To keep the direction of the triangle normal unchanged before and after splitting and avoid the drawing gap, the drawing of new triangles should be in the same direction with the root triangle. For example: if the drawing direction of triangle T is P1PjPk, then the drawing direction of T1 and T2 should

be PiP1Pk and P1PjPk respectively.

• (2) There may be several intersection points between the triangle mesh edge and the feature value curve. To make the triangle split as evenly as possible, the intersection point nearest to the middle of the triangle mesh edge is taken as the inserting point, namely, the inserting point P should satisfy up = {|Mp-0.5 X (Mi+M7-)|>min.

• The plane is to split according to the drawing direction of the triangle. For instance, the drawing direction of the triangle T in Figure-1 is PpjPk, then the splitting should be in the sequence of edge {i, j>, {j, k>, {k, i>.

• (3) The plane should be split along the connecting line between the inserting point and the vertex of the newly split triangle. As shown in Figure-l(b), the triangle T2 is split along the connecting line between the inserting point P2 and the vertex P1 of the newly split triangle T2 instead of the vertex P; of the triangle T.

• (4) From Figure-2, it can be concluded that the deeper the layer is, the more precise the subdivision degree is. The increasing quantity of the drawn triangle mesh will lead to the decrease in efficiency. Thus the surface subdivision should not be limitless. In the practical programming, the testing program x = { fFS(Mx) > FS >max should be given. Namely, when the display efficiency is satisfied, the display quality should be increased as greatly as possible. fFS() is applied to test the display efficiency of the mesh Mx, and FS is a preset display efficiency constant. For example, in this paper the display efficiency takes 30 frames per second as a dividing line; x stands for the maximum subdivision mesh depth of the multi-layer mesh model. In the practical program running, according to the given FS value, x can automatically adjust its mesh drawing depth through surface subdivision and simplification.

3. Example and test

Geometrical object model is one expression of the geometrical objects such as buildings and bridges, independent of terrain. Geometrical objects are usually of enormous number and vary greatly. As for those geometrical object models requiring a great deal of details, such as models of relief sculpture or trees, individual creation approaches can be employed. However, for shapes as simple as building groups, large-scale individual modeling is unrealistic. The algorithm in this paper can realizes large scale object modeling as well as its testing.

The model is run on a computer with PIV 1.8GHz, 256MB memory and Geforce 364MB display card, in a 800*600 window, with 45o horizontal angle and the error less than 2 pixels; the initial data is 30 X 30 X 2=1800 regular meshes; the distance from the viewpoint to the ground varies in a certain range, and FS= 30 frames/second, the testing results of the performance, such as the typical subdivision speed and terrain drawing speed are shown in Table 1. And when FS — 30frames/second, the effect of M3 is illustrated in Figure 3.

(a) Elevation feature value texture image (b) Triangular mesh with subdivision (c) Effect of large scale object with texture

Fig. 3. Subdivision layer structure

The test data in Table 1 and subdivision effect in Figure 3 show that when FS=30 frame/second, M2 can describe clearly the 3-D positional relationship and basic geometrical features of the building complex and the display efficiency can reach 32 frame/second. The evident variations of display effect in Model M0 to M2 indicate a quick constringency in the geometrical features. Therefore it can satisfy the demands of modeling large-scale geometric objects by real-time drawing on PC.

Table 1. Test data

M1 Triangle(pieces) Drawing speed(fps) Surface subdivision time(ms) Mesh simplification time(ms) Display effect

M 1800 96 16 very bad

Mi 4518 85 31 110 bad

M2 12008 32 63 1297 better

M3 34632 11 187 1797 better

M4 99400 4 562 9984 better

M5 230796 2 1344 better

4. Conclusion

The paper introduces surface elevation texture analysis into polygonal mesh technology and puts forwards a new algorithm for subdividing surface based on elevation texture feature values. The principle of the arithmetic is simple and easy to be implemented by programming. Meanwhile the effect of the 3-D drawing can clearly describe geometrical mesh features, basic shape and spatial position of 3-D models. The display efficiency and surface subdivision speed can satisfy the requirements of real-time model drawing. In Example, the problems of building large-scale surface feature models and real-time model drawing have been settled, which provides an effective solution to the key technology of large-scale geometrical object modeling in virtual city and 3-D geographical information system.

References

[1] Wu J H, Liu W J, Wang T R, Zhao J B. A fitting algorithm of subdivision surface from noising and dense triangular meshes. Journal of Software, China, Vol.18 No.2, February 2007, pp.442-452.

[2] Deng Ye, Fang Weining, Tian Shengcai. A real-time rendering method of 3D terrain in visual simulation system. Journal of Beijing Jiaotong Universty, China, Vol. 34 No. 4, 2007, pp. 124-127.

[3] Zhao X D, Yan X B, Shen Y M. High-quality constrained delaunay triangulation based on GIS. Geography and Geo-Information Science, China, Vol. 26 No. 5, 2010, pp.24-28.

[4] Li G Q, Ma W Y, Bao H. Fitting system using loop subdivision surfaces with sharp features. Journal of Computer-Aided Design & Computer Graphics, China, Vol. 17 No.6, June 2005, pp.1179-1185.

[5] Liu Y C, Bai Y Q, Chang G. The construction method of geometric objects in 3D terrain. Computer Application, China, Vol. 21 No. 5, 2009, pp.29-32.

[6] Huo H T, Ling X Z, He W. Digital image processing. Beijing: Beijing polytechnic university press, China, 2008, pp. 155162.