從三維圖形物件產生隱涵曲面
Generating Implicit Field Functions from 3D Objects
計畫編號: NSC 93-2213-E-110-026
執行期間: 93 年 8 月 1 日 至 94 年 7 月 31 日
主持人:李宗南 教授 國立中山大學資訊工程系
一、中文摘要 本計劃我們提出一種從三角型模型轉換 成隱函數模型的方法,其主要概念是將三 角型模型利用二元空間分割樹(Binary space–partitioning tree)做點與面的 空間分割以建立一個階層式的架構,在這 個階層式架構中的每一個葉節點(leaf node),我們建立一個相對應的隱函數, 這 個 隱 函 數 是 用 基 因 演 算 法 ( Genetic Algorithm)來產生的。而階層式架構中的 中間節點(internal node)部分是利用接 合運算子(Blending Operators)來做接 合,使其平滑且連續。因為我們所提出的 方法只儲存少數幾個隱函數,所以可以大 幅度的縮減資料量,又因為採用基因演算 法可以避免了傳統轉換所需要的大量複雜 運算。這樣的技術有許多方面的應用,例 如資料適配(data fitting)、資料壓縮、科學 上的視覺表示(scientific visualization)、交談 模型建立(interactive modeling), 電腦遊戲 等。 關鍵字:隱含表面函數,軟性物體, 線性 追蹤函數,掃瞄物件Abstract
This project presents a new method to translate the triangles mesh model into the implicit functions model. The main concept is to use the binary space-partitioning tree to divide the points and patches in the triangle mesh model to create a hierarchical structure. For each leaf node in this hierarchical structure, we would generate a corresponding implicit function. These implicit functions are generated by the genetic algorithm. And the internal nodes in this hierarchical structure are blended by the blending operators. The blending operators make the surface become smooth and continual. The method we proposed reduces the data in a
large amount because we only save the coefficients of the implicit surface. And the genetic algorithm can avoid the high computing complexity.
Keywords: Soft object, implicit functions
二、緣由與目的
In recent years, though the hardware improves very quickly, to create a 3D model is not so easy work done by hand. Now, most models are created by the 3D scan system. It is very powerful and convenient, but there is a serious problem: the huge amount of the data points. The data points can be millions or even billions. So many data points are hard to be operated by the personal computer or workstation. The drawback makes the general model – Triangle mesh model hard to be used in the applications. More and more researchers pay attention to the implicit functions model (abbreviate to IFM) for a major advantage – the implicit surface functions offer a nature and easy way to construct a complex object [7]. Following the definition of implicit function:
Given n distinct points (xi, yi, zi), where i from 1 to
n, on a surface P in R3, find a surface P’ that is acceptable approximation to P.
We can generate a function to express an object theoretically, which can effectively reduce the amount of data. [3]
Implicit surface functions have been widely applied in computer graphics modeling, computer graphics animation, computer assisted surgery, computer vision, and artificial intelligence. There are many researches about implicit surfaces, also known as “Soft objects”, “Blobbies”, or “Metaballs”. In [13], the authors described a method to apply solid textures onto implicit surfaces. Though the implicit surface functions have many advantages, the polygon meshes model is still the most popular model.
)! 3 ( 1 0 R C a a a L n+ ∈ ⎩ ⎨ ⎧ ≥ ≤ + + 0 , ,q r p n r q p
That makes many researches focus on translation from the implicit surfaces model to the polygon meshes model. However, there are only some researchers focus on the inverse translation. Recently, a few researchers [1, 15] studied about this kind of translation. Most studies use Radial Basis Functions (RBF) to generate the implicit surfaces function. But RBF has a main disadvantage that is the implicit surfaces generated by RBF may be too complex. Here, we propose a method to generate implicit surfaces that can greatly reduce the complexity.
In our proposed method, we use the BSP tree to generate hierarchical organization for a number of triangle patches not for each triangle patch. And we use the genetic algorithm (GA) to generate implicit functions. The method we proposed can provide a simple and useful process to generate the corresponding simple implicit functions.
三、研究方法與成果
In our approach, we develop techniques for converting the polygonal meshes model into the implicit representation model. We design a method to model the surface implicitly with a function . If the function makes all the points in the point set and let be a set of points to satisfy the equation
) , , (x y z IFM IFM P 0 ) , , (x y z = IFM
then is the implicit representation of .The main problem raised here is how to
generate the function ? Therefore our
proposed method would focus on it.
IFM
0
P
IFM
In our purposed method, we use the BSP tree structure to construct a hierarchical system and use Genetic Algorithm to generate implicit functions for each leaf node. For each implicit function, we blend one function with its neighboring descendent node until all functions are combined to become an object or a single model.
But in our proposed method, we use the quadratic equation with three unknown quantities to be our basis function:
[ 1] ) , , ( 1 0 0 1 1 0 0 1 0 0 0 1 0 )! 3 ( ! 3 z y x z y x z y x z y x z y x C a a a z y x IFM n n p q r n L L M − ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = + where , , , , ! 3 and
The N factorial polynomial would determine any kinds of curved surface. For each leaf node, created by the BSP tree method, it needs to find a corresponding . In other words, we have to find a
corresponding vector for
each leaf node. Thus we choose the length of as a gene and create genes
( ) at random to be used as
initial genes. It is the better IFM that we hope to get can close to the original curved surface. So, the fitness function we design is as follows: ) , , (x y z IFMi ) , , , ( ( 3)! ! 3 1 0 C a a a L n+ C(3n! 3)! + gen N gen N g g g1, 2,..., 2 ) (Xmesh X IFM dist F = ∑ − .
We calculate the fitness function
value of each gene. If
all , we begin the reproduction process. ) ( i value g F T g Fvalue( i)>
In the reproduction process, there is an important rule: the gene, which has the smaller , would have the more probability to be chosen. The chosen probability of is denoted as and value F i g Prep(gi)
∑
= = gen N i value i i value i rep g F g F g P 1 ( ) 1 ) ( 1 ) (According to the Prep , we reproduced
gen
N
×
2
1 genes and kept
gen
N
×
2
1 original
Carry on the crossover process. There are three types of crossover process: Single Crossover, Two-points Crossover, and Mask Crossover. The proposed method uses the mask crossover. We randomly choose some chromosome(s) in the random position(s) of two random genes and exchange the chromosome(s) with each other. Based on
, we repeat the crossover process.
cro
P
In the proposed method, is not fixed and has the minimum and maximum value. starts with minimum value and increases when optimum maintains some generations and does not change until reaches the maximum value. As the optimum decreases,
returns to the minimum value. Then according to , we choose some gene(s), and change some of its chromosome(s). These changed gene(s) are called mutative gene(s). These mutative gene(s) avoids the local optimum solutions.
mut P mut P mut P value F mut P value F mut P mut P
Finally, we return to calculate the for the new genes. If is still bigger than
valuse
F Fvaluse
T , repeat the reproduction,
crossover, and mutation processes until . If , we stop the GA process and the gene that has the smallest is the corresponding IFM of the leaf node. Repeat the GA process to generate the IFMs of other leaf nodes until all leaf nodes have the corresponding IFMs.
T
Fvalue < Fvalue <T
valuse
F
After generating all IFMs, we start to blend the generated IFMs. We use the second method in [7]: Field functions with adjustable inner and outer radii. To every IFM produced by the leaf nodes, its potential field size is determined according to its space size. The user inputs the percentage, from which the length of each node one can determine the blending range of the nodes. Then, we blend the IFMs from leaf to the root and get the result.
The results show that the compression rate can be as high as 100 and average is
about 60 under 1% of error.
四. 計劃成果自評
The method we proposed has some innovations, contributions and advantages. We have proposed a translation from the triangle mesh model to a set of quadratic equations with three unknown quantities. The quadratic equations, we called IFMs, are simple and efficient and can avoid complexity computing that the traditional translation needed. These IFMs decrease the need of a large amount of data size.
The main concept in the proposed method is to use GA process to find some approximate quadratic equations to represent the source triangle meshes. Because of the characteristics of GA, we can find a good result in a few generations. Though the process of GA needs to take some time, it is still a good algorithm because it is a pre-process, we can do it once and use the result quickly to render the screen.
五、參考文獻
1. S. Akkouche and E. Galin, “Adaptive Implicit Surface Polygonization Using Marching Triangles,” Computer Graphics Forum, Vol 20, Issue, June 2001
2. J. F. Blinn, “A Generalization of Algebraic Surface Drawing,” ACM Trans. Graphics, Volume 1, Issue 3, p.p. 235 – 256, July 1982.
3. P. Bourke, “Implicit Surfaces,”
http://astronomy.swin.edu.au/~pbourke/mo delling/implicitsurf/, July 1997
4.J. C. Carr, R. K. Beatson, J. B. Cherrie, T. J. Mitchell, W. R. Fright and B. C. McCallum, “Reconstruction and Representation of 3D Objects with Radial Basis Functions,” ACM SIGGRAPH 2001, p.p.12 – 17, 2001.
5. D. Hearn and M. P. Baker, “Computer Graphics, C version,” published by Prentice Hall, Inc, ISBN: 0-13-530924-7, p.p.305 – 404, 1997.
6. P. C. Hsu and C. Lee, “The Scale Method for Blending Operations in Functionally
Based Constructive Geometry,” Computer Graphics Forum, 22(2), p.p. 143 – 158, 2003.
7. P. C. Hsu, “Blending Operations with Blending Range Controls in Implicit Surfaces,” Dissertation of Graduate School of National Sun Yat-Sen University, Taiwan, R.O.C., 2003.
8. A. Pasko, and V. Savchenko, “Blending operations for the Functionally based Constructive Geometry,” CSG 94 Conference Proceedings, 1994.
9. K. Perlin., “Hypertexture,” SIGGRAPH Computer Graphics 23(3), 1989.
10. G. Turk and James F. O’Brien, “Shape Transformation Using Variation Implicit Function,” Proceedings of the 26th Annual Conference on Computer graphics and interactive techniques, July 1999.
11. Alan Watt, “3D Computer Graphics,” published by Addison-Wesley Publishing Company Inc., ISBN: 0-201-39855-9, p.p. 51 – 56, 2000.
12. T. H. Wu, “Dynamic Point Rendering and Compact Representations for 3D Models with Multiple Radial Basis Function (RBF) Surfaces,” Master’s Thesis of Graduate School of National Chung-Keng University, Taiwan, R.O.C., July 2002.
13. G. Wyvill, C. McPheeters, and B. Wyvill, “Solid Texture of Soft Objects,” CG International '87 on Computer graphics, June 1987.
14. G. Wyvill, and B. Wyvill, “Field Functions for Implicit Surfaces,” The Visual Computer, Volume 5, p.p. 75 – 82, March 1989.
15. B. Wyvill, P. Jeep, K. van Overveld and G. Wyvill, “Subdivision Surfaces for Fast Approximate Iimplicit Polygonization,” Computer Science Technical Reports, 2000-671-23, December 2000.