CN100583160C - A physical distortion method based on details coding and reconstruction - Google Patents

A physical distortion method based on details coding and reconstruction Download PDF

Info

Publication number
CN100583160C
CN100583160C CN200710176097A CN200710176097A CN100583160C CN 100583160 C CN100583160 C CN 100583160C CN 200710176097 A CN200710176097 A CN 200710176097A CN 200710176097 A CN200710176097 A CN 200710176097A CN 100583160 C CN100583160 C CN 100583160C
Authority
CN
China
Prior art keywords
normal vector
deformation
model
coding
physical deformation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN200710176097A
Other languages
Chinese (zh)
Other versions
CN101261741A (en
Inventor
赵沁平
梁晓辉
车英慧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CN200710176097A priority Critical patent/CN100583160C/en
Publication of CN101261741A publication Critical patent/CN101261741A/en
Application granted granted Critical
Publication of CN100583160C publication Critical patent/CN100583160C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

A physical deformation method based on detail coding and reconstruction includes: (1) at the pre-treating stage, self adaptive predigestion is carried out on an original fine gridding model so as to build a basic gridding expression; the generated basic gridding is used for the calculation of physical deformation during operation; (2) detail coding is carried out based on the position and the normal vector of the basic gridding to the top point of fine gridding; (3) at the operation stage, physical deformation calculation is carried out on the basic gridding model; (4) the fine gridding model is reconstructed according to the basic gridding model and the detail coding after deformation and finally realistic drafting is carried out. By adopting the physical deformation method based on detail coding and reconstruction of the invention, the user can interactively simulate the elastic deformation process of a complex object only by simply appointing the material parameters of the object; the geometrical detail of the surface of the object can be better maintained under the premise of ensuring the deformation quality of the object.

Description

一种基于细节编码及重构的物理变形方法 A physical deformation method based on detail encoding and reconstruction

技术领域 technical field

本发明属于计算机虚拟现实和计算机图形学技术领域,特别是计算机动画中基于物理的物体变形技术。The invention belongs to the technical field of computer virtual reality and computer graphics, in particular to the physics-based object deformation technology in computer animation.

背景技术 Background technique

长期以来,物体变形始终是计算机图形学领域的研究热点,现实世界中有许多物体是柔软的、可变形的,因此物体变形的模拟在计算机动画、计算机辅助设计、视频游戏和手术仿真等领域都有着广泛的应用。For a long time, object deformation has always been a research hotspot in the field of computer graphics. In the real world, many objects are soft and deformable. Therefore, the simulation of object deformation is widely used in computer animation, computer-aided design, video games and surgical simulation. Has a wide range of applications.

在计算机图形学领域,现有的实现物体变形的方法主要分为两类:基于几何的方法和基于物理的方法。基于几何的方法将控制点集的目标位置或微分属性作为约束条件,通过几何运算将物体调整为预想的姿态或形状。如传统的自由变形技术通过操纵控制框架来使物体发生变形,其基本思路是将要变形的物体线形地嵌入控制框架中,并假设物体和控制框架由同一种材料做成,移动控制顶点使控制框架产生变形,物体也随之产生变形。自由变形技术非常直观,算法效率高,但它不能很好地保持物体表面的几何细节。为了更好地解决这个问题,学者们提出了多分辨率网格编辑技术。该技术将原始模型分解为一个模型序列,序列中的每个模型都代表原始模型的一个不同频率下的版本,这样原始模型就可表示为一个基础模型和附加的一系列细节编码。用户可以在较低频率的模型上进行交互,通过重建技术将细节编码在变形后的较低频率的模型上重建,即可获得最终的变形效果。基于微分属性的网格编辑技术是最近两年比较热的网格编辑方法,它将传统的改变物体空间坐标的问题转化为对物体网格局部几何微分属性的操纵。基于此方法,用户只需采用很少的编辑操作即可实现网格的高效编辑,避免多分辨率技术所必需的模型分解工作,并且在变形过程中能较好地保持表面几何细节。总体来说,基于几何的方法往往不依据物理学原理,设计者根据对真实物理世界的直观感觉来改变物体的形状,这使得它虽然计算速度快,但逼真度不高,需要设计者反复调整。In the field of computer graphics, existing methods for realizing object deformation are mainly divided into two categories: geometry-based methods and physics-based methods. Geometry-based methods take the target position or differential properties of the control point set as constraints, and adjust the object to the expected pose or shape through geometric operations. For example, the traditional free deformation technology deforms the object by manipulating the control frame. The basic idea is to embed the object to be deformed into the control frame linearly, and assume that the object and the control frame are made of the same material, and move the control vertices to make the control frame Deformation occurs, and the object deforms accordingly. The free-form deformation technique is very intuitive and the algorithm is efficient, but it cannot preserve the geometric details of the object surface very well. In order to better solve this problem, scholars have proposed multi-resolution grid editing technology. This technique decomposes the original model into a model sequence, each model in the sequence represents a version of the original model at a different frequency, so that the original model can be expressed as a basic model and an additional series of detail codes. Users can interact on the lower frequency model, and the details are encoded on the deformed lower frequency model by reconstruction technology to reconstruct the final deformation effect. The mesh editing technology based on differential attributes is a relatively hot mesh editing method in the past two years, which transforms the traditional problem of changing the spatial coordinates of objects into the manipulation of local geometric differential attributes of object meshes. Based on this method, users only need to use few editing operations to realize efficient mesh editing, avoid model decomposition work necessary for multi-resolution technology, and better maintain surface geometric details during deformation. Generally speaking, the geometry-based method is often not based on the principles of physics. The designer changes the shape of the object according to the intuitive feeling of the real physical world, which makes it fast in calculation, but the fidelity is not high, requiring repeated adjustments by the designer. .

基于物理的方法遵循客观的物理规律对物体进行变形计算,更容易对变形对象进行合理的控制,真实感强,但计算代价高昂,多应用于动画、视频游戏和虚拟手术等领域。目前广泛采用的物理变形方法是将可变形物体视为连续性固体,采用有限元法(finite elementmethod)数值求解其本构方程。有限元法更符合真实的物理规律,然而计算代价高昂,在最新的消费级图形硬件上一般只能实时模拟具有几百个单元的物体变形。Pentland等人(参见A Penland,J Williams.Good vibrations:model dynamics for graphics and animation.In:Procof the 16th annual conference on Computer graphics and interactive techniques.New York:ACM Press,1989,215-222)引入的模态分析法(modal analysis)较大地简化了计算工作量。它利用类似频域分析的思路,通过预计算并存储物体的固有模态,将微分方程组转换为一组互不耦合的方程,实时计算每个模态的模态坐标,利用线性叠加的方法得到结点位移。但方法的缺点是:实时性差,不易保留复杂物体的弹性。The physics-based method follows the objective physical laws to calculate the deformation of the object, which makes it easier to control the deformed object reasonably, and has a strong sense of reality, but the calculation cost is high, and it is mostly used in animation, video games and virtual surgery and other fields. The physical deformation method widely used at present is to treat the deformable object as a continuous solid, and use the finite element method (finite element method) to numerically solve its constitutive equation. The finite element method is more in line with the real physical laws, but the calculation cost is high. On the latest consumer graphics hardware, it can generally only simulate the deformation of objects with hundreds of elements in real time. The model introduced by Pentland et al. (see A Penland, J Williams. Good vibrations: model dynamics for graphics and animation. In: Procof the 16th annual conference on Computer graphics and interactive techniques. New York: ACM Press, 1989, 215-222) The modal analysis greatly simplifies the computational workload. It uses an idea similar to frequency domain analysis to convert the differential equations into a set of uncoupled equations by pre-calculating and storing the natural modes of the object, and calculates the modal coordinates of each mode in real time, using the method of linear superposition Get the node displacement. But the disadvantage of the method is: the real-time performance is poor, and it is not easy to preserve the elasticity of complex objects.

总的来说,基于几何的变形方法计算速度快,较适合实时交互应用,但逼真度不够;基于物理的方法,特别是有限元法逼真度高,但计算代价高昂,在目前的消费级图形硬件上尚无法实时模拟复杂物体的变形。In general, the geometry-based deformation method has fast calculation speed and is more suitable for real-time interactive applications, but its fidelity is not enough; the physics-based method, especially the finite element method, has high fidelity, but the calculation cost is high. It is not yet possible to simulate the deformation of complex objects in real time on hardware.

发明内容 Contents of the invention

本发明的技术解决问题:克服现有技术的不足,提供一种实时的、能够保留复杂物体几何细节的基于细节编码及重构的物理变形方法,该方法用户只需简单指定物体的材质参数,即可交互模拟复杂物体的弹性变形过程,在保证物体的变形质量的前提下较好地保持物体表面的几何细节。The technical problem of the present invention is to overcome the deficiencies of the prior art and provide a real-time physical deformation method based on detail coding and reconstruction that can retain the geometric details of complex objects. In this method, the user only needs to simply specify the material parameters of the object. It can interactively simulate the elastic deformation process of complex objects, and better maintain the geometric details of the object surface under the premise of ensuring the deformation quality of the object.

本发明采用的技术方案是:一种基于细节编码及重构的物理变形方法,其特点在于:The technical solution adopted in the present invention is: a physical deformation method based on detail coding and reconstruction, which is characterized in that:

(1)在预处理阶段,对原始的精细网格模型进行自适应的简化以建立其基网格表示,生成的基网格供运行时物理变形计算使用;(1) In the preprocessing stage, the original fine mesh model is adaptively simplified to establish its base grid representation, and the generated base grid is used for runtime physical deformation calculations;

(2)基于基网格对精细网格顶点的位置及法向量进行细节编码;(2) Encode the position and normal vector of the vertices of the fine grid based on the base grid;

(3)在运行时阶段,对基网格模型进行物理变形计算;(3) In the runtime stage, perform physical deformation calculation on the base grid model;

(4)根据变形后的基网格模型和细节编码重构精细网格模型,最后进行真实感绘制。(4) Reconstruct the fine mesh model according to the deformed base mesh model and detail coding, and finally perform realistic rendering.

本发明的原理:在预处理阶段,本发明使用自适应的网格简化算法对原始的精细网格模型进行简化,从而得到基网格模型。Principle of the present invention: In the preprocessing stage, the present invention uses an adaptive grid simplification algorithm to simplify the original fine grid model, thereby obtaining the base grid model.

为了充分保留原始网格模型表面的局部细节特征并在变形后进行恢复,本发明给出了一种细节编码方法,该方法分为顶点位置编码和顶点法向量编码两部分:In order to fully preserve the local detail features of the original mesh model surface and restore them after deformation, the present invention provides a detail encoding method, which is divided into two parts: vertex position encoding and vertex normal vector encoding:

(1)顶点位置编码.对于精细网格模型上的任一顶点p,其位置的细节编码可由以下三元组构成:(q,Nq,h),其中q为顶点p在基网格上的对应点,Nq代表q点的法向量,而h代表p和q两点间距离。注:出于稳定性考虑,通常希望记录局部特征的向量长度尽可能短,因此要求位于基网格的对应点q的法向量方向指向p点。(1) Vertex position coding. For any vertex p on the fine grid model, the detailed coding of its position can be composed of the following triples: (q, N q , h), where q is the vertex p on the base grid The corresponding point of , N q represents the normal vector of point q, and h represents the distance between two points p and q. Note: For the sake of stability, it is usually hoped that the length of the vector recording local features is as short as possible, so the normal vector direction of the corresponding point q located in the base grid is required to point to point p.

基于上述定义,p点的位置可以表示为p=q+h·NqBased on the above definition, the position of point p can be expressed as p=q+h·N q .

(2)顶点法向量编码.对于精细网格模型上的任一顶点p,其法向量的细节编码可由以下三元组构成:(q,Rq,Nlocal),其中q为顶点p在基网格上的对应点,Rq代表q点所在的局部空间到世界空间的变换矩阵,Nlocal代表p点在该局部空间的法向量方向,如图2所示。(2) Vertex normal vector encoding. For any vertex p on the fine grid model, the detailed encoding of its normal vector can be composed of the following triples: (q, R q , N local ), where q is the vertex p in the base For the corresponding point on the grid, R q represents the transformation matrix from the local space where point q is located to world space, and N local represents the normal vector direction of point p in the local space, as shown in Figure 2.

这里将p点的法向量映射到q点所在的局部空间,并假设在变形过程中该法向量在局部空间内保持不变,记为Nlocal,该值可在预计算过程中求得;Rq是q点所在的局部空间到世界空间的变换矩阵,由q点的法向量N、切向量T和副法向量B确定,如下式所示:Here, the normal vector of point p is mapped to the local space where point q is located, and it is assumed that the normal vector remains unchanged in the local space during the deformation process, denoted as N local , and this value can be obtained during the pre-computation process; R q is the transformation matrix from the local space where the q point is located to the world space, which is determined by the normal vector N, the tangent vector T and the subnormal vector B of the q point, as shown in the following formula:

RR == TT xx BB xx NN xx TT ythe y BB ythe y NN ythe y TT zz BB zz NN zz

本发明在运行阶段,首先需对基网格模型进行物理变形计算,使用了模态分析法进行物理变形,用户可根据需求进行适当调整。模态分析法的本质就是对弹性物体变形系统的动力方程进行解耦操作,使其成为一组以模态坐标及模态参数描述的独立方程,以便求出系统的模态坐标乃至结点位移。在变形模拟过程中,只需处理那些变形效果明显的模态即可,一般来说,要想比较真实的表现物体变形效果,大概需要50个模态左右,因此模态分析法可有效地减少计算量。In the running stage of the present invention, it is first necessary to calculate the physical deformation of the base grid model, using the modal analysis method for physical deformation, and the user can make appropriate adjustments according to requirements. The essence of the modal analysis method is to decouple the dynamic equation of the elastic object deformation system, making it a set of independent equations described by modal coordinates and modal parameters, in order to obtain the modal coordinates and even the node displacement of the system . In the process of deformation simulation, it is only necessary to deal with the modes with obvious deformation effects. Generally speaking, about 50 modes are needed to show the deformation effect of objects more realistically, so the modal analysis method can effectively reduce the Calculations.

本发明在利用模态分析法计算物体变形时,首先预先求得物体的模态矩阵和相应的特征值并进行存储;在变形阶段,求解物体的模态坐标,之后计算出物体各个结点的位移即可。在基于变形后的基网格模型进行精细网格模型重构时,对于精细网格顶点p,其基网格对应点q变形后的新位置和新法向量均很容易计算得到,分别记为q′和Nq′。由于假设在变形过程中,细节编码中的h和Nlocal始终保持不变,因此点p变形后的新位置p′可通过公式p′=q′+h·Nq′得到;点p变形后的新法向量Np′可通过公式Np′=Rq′Nlocal得到。When using the modal analysis method to calculate the deformation of the object, the present invention first obtains the modal matrix and corresponding eigenvalues of the object in advance and stores them; in the deformation stage, the modal coordinates of the object are calculated, and then the Just move. When the fine grid model is reconstructed based on the deformed base grid model, for the fine grid vertex p, the new position and new normal vector of the corresponding point q of the base grid after deformation are easy to calculate, denoted as q ' and N q' . Since it is assumed that h and N local in detail coding remain unchanged during the deformation process, the new position p′ after point p deformation can be obtained by the formula p′=q′+h·N q′ ; after point p deformation The new normal vector N p' of can be obtained by the formula N p' = R q' N local .

本发明与现有技术相比的优点在于:基于物理的物体变形方法计算代价高昂,目前即使采用模态分析法来加速物理方程的求解仍无法实时模拟复杂几何物体的形变过程;另一方面,在计算机动画、视频游戏等应用领域,人们并不关注于精确的力学仿真结果,在满足实时的前提下实现尽可能逼真的变形效果才是关键。本发明将原始的精细网格模型划分为较为简单的基网格模型和细节编码两部分,通过对基网格模型进行精确的物理变形计算从而使得物体的整体变形效果符合真实物理规律,效果自然;利用细节编码对变形后物体的表面细节进行重构,较好地恢复了物体的表面细节特征,使得本方法适合应用于复杂几何物体。总而言之,本发明变形速度快,对于复杂几何物体的变形完全可以满足实时需要。变形计算符合真实物理规律,效果自然。Compared with the prior art, the present invention has the advantages that: the calculation cost of the physics-based object deformation method is high, and even if the modal analysis method is used to accelerate the solution of the physical equation, it is still unable to simulate the deformation process of complex geometric objects in real time; on the other hand, In computer animation, video games and other application fields, people do not pay attention to accurate mechanical simulation results, and the key is to achieve as realistic deformation effects as possible under the premise of satisfying real-time. The invention divides the original fine grid model into two parts, the relatively simple base grid model and the detail code, and performs accurate physical deformation calculation on the base grid model so that the overall deformation effect of the object conforms to the real physical law, and the effect is natural ; Using detail coding to reconstruct the surface details of the deformed object, the surface detail features of the object are better restored, making this method suitable for complex geometric objects. In a word, the deformation speed of the present invention is fast, and the deformation of complex geometric objects can fully meet the real-time requirements. The deformation calculation conforms to the real physical law, and the effect is natural.

附图说明Description of drawings

图1为本发明细节保持变形方法主要流程图;Fig. 1 is the main flowchart of the present invention's details keeping deformation method;

图2为本发明的法向量编码的示意图;Fig. 2 is the schematic diagram of normal vector coding of the present invention;

图3为本发明实例的原始bunny精细网格模型;Fig. 3 is the original bunny fine grid model of the example of the present invention;

图4为本发明实施例简化后的bunny基网格模型;Fig. 4 is the simplified bunny base grid model of the embodiment of the present invention;

图5为本发明实施例变形后的bunny基网格模型;Fig. 5 is the deformed bunny base grid model of the embodiment of the present invention;

图6为本发明实施例变形后的bunny精细网格模型。FIG. 6 is a deformed bunny fine mesh model according to an embodiment of the present invention.

具体实施方式 Detailed ways

下面结合实施例对本发明进行详细说明。The present invention will be described in detail below in conjunction with examples.

实施例:对Stanford大学提供的bunny模型进行细节保持的变形计算。如图3所示,Bunny原始网格模型顶点数为35022。Example: Perform detail-preserving deformation calculation on the bunny model provided by Stanford University. As shown in Figure 3, the number of vertices in Bunny's original mesh model is 35022.

如图1,本发明包括预处理阶段和运行时阶段两个部分共四个步骤,具体如下:As shown in Fig. 1, the present invention comprises four steps in total of two parts of preprocessing stage and runtime stage, specifically as follows:

第一步:基网格生成。The first step: base grid generation.

本发明要求对原始的精细网格模型进行自适应的简化以建立其基网格表示,生成的基网格供运行时物理变形计算使用。本发明采用M Garland,P S Heckbert.Surface simplification usingquadric error metric.In:Proc of the 24th Annual Conference on Computer Graphics and interactiveTechniques International Conference on Computer Graphics and Interactive Techniques.New York:ACM Press,1997,209-216中提供的网格简化算法对精细网格模型进行简化,图4给出了对原始bunny模型简化后得到的基网格模型,其顶点数为2981。The present invention requires adaptive simplification of the original fine grid model to establish its base grid representation, and the generated base grid is used for runtime physical deformation calculation. The present invention adopts M Garland, P S Heckbert. Surface simplification using quadric error metric. In: Proc of the 24th Annual Conference on Computer Graphics and interactive Techniques International Conference on Computer Graphics and Interactive Techniques. New York: ACM Press, 1997, 6 The mesh simplification algorithm provided simplifies the fine mesh model. Figure 4 shows the base mesh model obtained after simplifying the original bunny model, and its number of vertices is 2981.

第二步:基于基网格对精细网格顶点的位置及法向量进行细节编码。Step 2: Based on the base grid, the position and normal vector of the vertices of the fine grid are encoded in detail.

如图2所示,精细网格上的任一顶点p进行细节编码的过程如下:As shown in Figure 2, the process of detail encoding for any vertex p on the fine grid is as follows:

(1)查找点p在基网格上的对应三角形。按照点到三角形的最小距离原则,即计算点p到基网格所有三角形的距离,以其中距离最小者作为对应三角形。(1) Find the corresponding triangle of point p on the base grid. According to the principle of the minimum distance from point to triangle, that is, calculate the distance from point p to all triangles in the base grid, and take the one with the smallest distance as the corresponding triangle.

(2)在对应三角形内部查找对应点q。由于要求对应点q的法向量方向指向点p,因此点q应满足(p-q)×Nq=0。其中q点位置和法向量可分别由对应三角形的各顶点位置和法向量双线性插值得到。具体计算时采用多维迭代法在三角形区域内查找(p-q)×Nq的最小值以求得对应点q。(2) Find the corresponding point q inside the corresponding triangle. Since the direction of the normal vector corresponding to the point q is required to point to the point p, the point q should satisfy (pq)×N q =0. Wherein, the position and normal vector of point q can be obtained by bilinear interpolation of each vertex position and normal vector of the corresponding triangle respectively. In the specific calculation, the multidimensional iterative method is used to find the minimum value of (pq)×N q in the triangular area to obtain the corresponding point q.

(3)记录点q位置,点q的法向量Nq以及p和q两点间距离h进行位置细节编码;记录q点所在的局部空间到世界空间的变换矩阵Rq,点p在该局部空间的法向量方向Nlocal进行法向量细节编码。(3) Record the position of point q, the normal vector N q of point q, and the distance h between two points p and q for position detail encoding; record the transformation matrix R q from the local space where point q is located to world space, and point p is in this local The normal vector direction N local of the space encodes the normal vector details.

重复上述步骤(1)-(3),直至对精细网格上的所有顶点都完成细节编码。Repeat the above steps (1)-(3) until all vertices on the fine mesh are encoded with details.

第三步:对基网格模型进行物理变形计算。Step 3: Perform physical deformation calculation on the base grid model.

使用模态分析法计算物理变形的具体过程如下:The specific process of calculating the physical deformation using the modal analysis method is as follows:

(1)弹性物体动力方程可表示为: M u . . + C u . + Ku = F , 其中u、

Figure C20071017609700082
和ü分别是系统结点的位移向量、速度向量和加速度向量;F是系统所受的诸如碰撞或用户输入而产生的外力向量;M、C和K分别是系统的质量矩阵、阻尼矩阵和刚度矩阵。根据基网格模型的有限元网格,计算物体的总体质量矩阵M和刚度矩阵K,阻尼矩阵C=c1K+c2M,其中c1和c2为Rayleigh阻尼常数;物体的总体质量矩阵M和刚度矩阵K可由相关的有限元分析软件计算得到。(1) The dynamic equation of an elastic object can be expressed as: m u . . + C u . + Ku = f , where u,
Figure C20071017609700082
and ü are the displacement vector, velocity vector and acceleration vector of the system nodes respectively; F is the external force vector generated by the system such as collision or user input; M, C and K are the mass matrix, damping matrix and stiffness of the system respectively matrix. According to the finite element grid of the base grid model, calculate the overall mass matrix M and stiffness matrix K of the object, and the damping matrix C=c 1 K+c 2 M, where c 1 and c 2 are Rayleigh damping constants; the overall mass of the object Matrix M and stiffness matrix K can be calculated by relevant finite element analysis software.

(2)由用户指定确定系统的初始状态,如各顶点的初始位置u0和初始速度

Figure C20071017609700083
(2) The initial state of the system is specified by the user, such as the initial position u 0 and initial velocity of each vertex
Figure C20071017609700083

(3)根据公式MΦΛ=KΦ对总质量矩阵M和刚度矩阵K进行特征值分解,计算相应的模态、特征值Φ及特征值矩阵Λ,去掉特征值过大的模态。使用数学工具或者专业的矩阵计算库进行计算,如在Matlab里可使用eigs命令计算得到。(3) Decompose the eigenvalues of the total mass matrix M and stiffness matrix K according to the formula MΦΛ=KΦ, calculate the corresponding modes, eigenvalues Φ and eigenvalue matrix Λ, and remove the modes with too large eigenvalues. Use mathematical tools or a professional matrix calculation library to perform calculations, such as using the eigs command in Matlab to calculate.

(4)令z=Φ-1·u,g=ΦT·F,则弹性物体的动力方程可简化为对角等式: Λ · z + ( α 1 Λ + α 2 I ) · z . + z . . = g , 这里z看作在模态坐标中表示的值,F是系统所受的诸如碰撞或用户输入而产生的外力向量,I为单位矩阵,u为顶点位置。(4) Let z=Φ -1 ·u, g=Φ T ·F, then the dynamic equation of the elastic object can be simplified into a diagonal equation: Λ · z + ( α 1 Λ + α 2 I ) · z . + z . . = g , Here z is regarded as the value expressed in the modal coordinates, F is the external force vector generated by the system such as collision or user input, I is the identity matrix, and u is the position of the vertex.

(5)每帧通过数值求解步骤4中的二次微分方程 Λ · z + ( α 1 Λ + α 2 I ) · z . + z . . = g , 计算模态坐标z的新值。(5) Each frame numerically solves the quadratic differential equation in step 4 Λ · z + ( α 1 Λ + α 2 I ) &Center Dot; z . + z . . = g , Computes a new value for the modal coordinate z.

(6)根据u=u0+Φ·z更新各顶点位移u,如果模拟尚未完成,则返回步骤5,否则结束。图5给出了bunny基网格模型的物理变形效果,本例中所施的合力位于bunny的嘴部,所保留的模态数为24,基网格变形所需计算时间约为5ms。(6) Update the displacement u of each vertex according to u=u 0 +Φ·z, if the simulation has not been completed, return to step 5, otherwise end. Figure 5 shows the physical deformation effect of the bunny base grid model. In this example, the resultant force applied is located at the mouth of the bunny, and the number of retained modes is 24. The calculation time required for base grid deformation is about 5ms.

第四步:根据变形后的基网格模型和细节编码重构精细网格模型。Step 4: Reconstruct the fine mesh model based on the deformed base mesh model and detail codes.

精细网格顶点p进行细节重构的过程如下:The process of detailed reconstruction of fine mesh vertex p is as follows:

(1)依据物理变形后的基网格模型计算基网格对应点q变形后的新位置和(1) According to the base grid model after physical deformation, calculate the new position and

(2)新法向量,分别记为q′和Nq′,其中q′=αa′+βb′+γc′和Nq′=αNa′+βNb′+γNc′,其中a′、b′和c′为点p所对应三角形三个顶点变形后的新位置,Na′、Nb′和Nc′为三个顶点变形后的新法向量,均可通过物理变形计算得到。(2) New normal vectors, denoted as q′ and N q′ respectively, where q′=αa′+βb′+γc′ and N q′ =αN a′ +βN b′ +γN c′ , where a′, b ' and c' are the new deformed positions of the three vertices of the triangle corresponding to point p, and N a' , N b' and N c' are the new normal vectors of the three vertices after deformation, all of which can be obtained through physical deformation calculation.

(3)通过公式p′=q′+h·Nq′计算点p变形后的新位置p′;h为细节编码中的距离编码。(3) Calculate the new position p' of the point p after deformation by the formula p'=q'+h·N q' ; h is the distance code in the detail code.

(4)通过公式Np′=Rq′Nlocal计算点p变形后的新法向量Np′;其中Rq′为变形后的新变换矩阵,可通过变形后q’点的法向量和切向量得到,具体公式为R′q=[T′qB′qN′q],T′q=a′-b′,Nq′如步骤2所示计算,B′q=T′q×N′q,Nlocal为细节编码中的法向量编码值。(4) Calculate the new normal vector N p' after deformation of point p through the formula N p' = R q' N local ; where R q ' is the new transformation matrix after deformation, and the normal vector and tangent of point q' after deformation can be calculated The vector is obtained, the specific formula is R' q = [T' q B' q N' q ], T' q = a'-b', N q' is calculated as shown in step 2, B' q = T' q × N′ q , Nlocal is the normal vector encoding value in detail encoding.

(5)重复上述步骤,直至重构出精细网格上的所有顶点,随后将精细网格模型的顶点位置及法向量等信息送入帧缓存进行真实感绘制。(5) Repeat the above steps until all vertices on the fine mesh are reconstructed, and then send information such as vertex positions and normal vectors of the fine mesh model to the frame buffer for realistic rendering.

图6给出了变形后的bunny精细网格模型效果图,对比图3和图5可以看出,本文提出的细节编码及重构方法较好地恢复了物体表面的细节特征。Bunny变形及重构所需的总时间为21.5ms,渲染帧率达到46.7fps,完全可以满足实时需要。Figure 6 shows the rendering of the deformed bunny fine mesh model. Comparing Figure 3 and Figure 5, it can be seen that the detailed encoding and reconstruction method proposed in this paper can better restore the detailed features of the object surface. The total time required for Bunny's deformation and reconstruction is 21.5ms, and the rendering frame rate reaches 46.7fps, which can fully meet the real-time needs.

Claims (4)

1, a kind of physical deformation method based on details coding and reconstruct is characterized in that:
(1) at pretreatment stage, original fine grid blocks model is simplified generation base net lattice model, the base net lattice model of generation calculates for the operation phase physical deformation and uses;
(2) based on the base net lattice model position and the normal vector on fine grid blocks summit carried out details coding;
Described process of carrying out details coding is as follows:
A. search the corresponding triangle of arbitrary summit p on the base net lattice on the base net lattice model, calculation level p is to all leg-of-mutton distances of base net lattice, with its middle distance reckling as corresponding triangle;
B. at described corresponding triangle internal searching corresponding point q, require the normal vector direction of corresponding point q to point to arbitrary summit p, corresponding point q satisfies (p-q) * N q=0, wherein: N qBe normal vector, the position of corresponding point q and normal vector N qObtain by leg-of-mutton each vertex position of correspondence and normal vector bilinear interpolation respectively;
C. write down the position of corresponding point q, make the normal vector N of these corresponding point q qAnd arbitrary summit p and corresponding point q distance between two points h carry out the position details coding, and the local space at record corresponding point q place is to the transformation matrix R of world space q, to the normal vector direction N of arbitrary summit p at this local space LocalCarry out the normal vector details coding;
D. repeat above-mentioned a-c step, until details coding is all finished on all summits on the fine grid blocks;
(3) stage when operation, adopt modal analysis method to carry out physical deformation to the base net lattice model and calculate;
(4), carry out the sense of reality at last and draw according to the details coding reconstruct fine grid blocks model in base net lattice model behind the physical deformation in the step (3) and the step (2).
2, the physical deformation method based on details coding and reconstruct according to claim 1 is characterized in that: the employing modal analysis method in the described step (3) carries out the performing step that physical deformation calculates:
(1), calculates the oeverall quality matrix M and the stiffness matrix K of object, damping matrix C=α according to the finite element grid of base net lattice model 1K+ α 2M, wherein α 1And α 2Be the Rayleigh damping constant;
(2) determine the original state of system, comprising: the initial position u on each summit 0And initial velocity
Figure C2007101760970002C1
(3) according to formula M Φ Λ=K Φ gross mass matrix M and stiffness matrix K are carried out characteristic value decomposition, calculate corresponding mode, eigenwert Φ and eigenvalue matrix Λ, remove the mode of eigenwert greater than the given threshold range of user;
(4) make z=Φ -1U, g=Φ TF, Λ · z + ( α 1 Λ + α 2 I ) · z · + z · · = g , The value of z in modal coordinate, representing, F is suffered the importing and the outer force vector of generation such as collision or user of system, and I is a unit matrix, and u is a vertex position;
(5) every frame is by the second differential equation in the numerical solution step (4) Λ · z + ( α 1 Λ + α 2 I ) · z · + z · · = g , The new value of compute mode coordinate z;
(6) according to u=u 0+ Φ z upgrades each top displacement u, does not finish as yet if physical deformation calculates, and then returns step (5), otherwise finishes.
3, the physical deformation method based on details coding and reconstruct according to claim 1 is characterized in that: the method for the reconstruct of fine grid blocks model in the described step (4) is as follows:
(1) according to reposition and new normal vector after the calculating of the base net lattice model behind the physical deformation base net lattice corresponding point q distortion, is designated as q ' and N respectively Q ', wherein: q '=α a '+β b '+γ c ' and N Q '=α N A '+ β N B '+ γ N C ', a ', b ' and the c ' reposition after by the vertex deformation of some p corresponding Atria, N A ', N B 'And N C 'It is the new normal vector after three vertex deformation;
(2) by formula p '=q '+hN Q 'Reposition p ' after the arbitrary summit p distortion of calculation level, h is the range coding in the details coding;
(3) by formula N P '=R Q 'N LocalNew normal vector N after the calculation level p distortion P ', wherein: R Q 'Be the new transformation matrix after the distortion, can obtain that formula is R ' by the normal vector and the tangent vector of distortion back q ' point q=[T ' qB ' qN ' q], T ' q=a '-b ', N Q 'Shown in step (2), calculate, B q / = T q ′ × N q ′ , N LocalBe the normal vector encoded radio in the details coding;
(4) repeat above-mentioned steps (1)-(3), until all summits that reconstruct on the fine grid blocks.
4, the physical deformation method based on details coding and reconstruct according to claim 2 is characterized in that: described method of searching corresponding point q is: suppose that the corresponding triangle of p point is that (c), its vertex scheme vector is respectively N to Δ for a, b a, N bAnd N c, then triangle is inner a bit can be expressed as arbitrarily: q=α a+ β b+ γ c, and alpha+beta+γ=1 wherein, corresponding normal vector can be expressed as: N q=α N a+ β N b+ γ N c, the normal vector direction of the corresponding point q on the base net lattice is pointed to arbitrary summit p, so corresponding point q point satisfies following formula: and (p-q) * N q=0, adopt the multidimensional process of iteration in delta-shaped region, to search (p-q) * N when specifically calculating qMinimum value in the hope of corresponding point q.
CN200710176097A 2007-10-19 2007-10-19 A physical distortion method based on details coding and reconstruction Expired - Fee Related CN100583160C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200710176097A CN100583160C (en) 2007-10-19 2007-10-19 A physical distortion method based on details coding and reconstruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200710176097A CN100583160C (en) 2007-10-19 2007-10-19 A physical distortion method based on details coding and reconstruction

Publications (2)

Publication Number Publication Date
CN101261741A CN101261741A (en) 2008-09-10
CN100583160C true CN100583160C (en) 2010-01-20

Family

ID=39962181

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200710176097A Expired - Fee Related CN100583160C (en) 2007-10-19 2007-10-19 A physical distortion method based on details coding and reconstruction

Country Status (1)

Country Link
CN (1) CN100583160C (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509356A (en) * 2011-11-10 2012-06-20 杭州电子科技大学 Detail-kept geometrical model deformation method using grid subdivision
CN105069826B (en) * 2015-08-26 2018-06-29 中国科学院深圳先进技术研究院 The modeling method of elastomeric objects amoeboid movement
WO2017031718A1 (en) 2015-08-26 2017-03-02 中国科学院深圳先进技术研究院 Modeling method of deformation motions of elastic object
CN105261056A (en) * 2015-11-06 2016-01-20 北京航空航天大学 Object deformation sequence completion method based on modal space subdivision strategy
CN109801367B (en) * 2019-02-25 2023-01-13 广西大学 Grid model characteristic editing method based on compressed manifold mode
CN111859763B (en) * 2020-07-27 2024-08-30 上海圣之尧智能科技有限公司 Finite element simulation method, system and medium

Also Published As

Publication number Publication date
CN101261741A (en) 2008-09-10

Similar Documents

Publication Publication Date Title
CN105302974B (en) A kind of real-time cutting simulation method of flexible article analyzed based on finite element and time-varying modal
Qin et al. Dynamic catmull-clark subdivision surfaces
Teran et al. Adaptive physics based tetrahedral mesh generation using level sets
CN100583160C (en) A physical distortion method based on details coding and reconstruction
Kobourov et al. Non-Eeuclidean spring embedders
CN101719284B (en) Method for physically deforming skin of virtual human based on hierarchical model
Barbič et al. Subspace self-collision culling
Qin et al. Dynamic NURBS swung surfaces for physics-based shape design
Jin et al. General constrained deformations based on generalized metaballs
Abu Rumman et al. Position‐based skinning for soft articulated characters
CN110889893A (en) 3D model representation method and system for expressing geometric details and complex topology
CN105427360A (en) Error-controllable CAGE sequence representation algorithm for dynamic grid
Nienhuys et al. Supporting cuts and finite element deformation in interactive surgery simulation
CN101169871A (en) HLOD preprocessing method for real-time rendering of large-scale static scenes
Chang et al. A new solid subdivision scheme based on box splines
Bender et al. Adaptive cloth simulation using corotational finite elements
CN103793552A (en) Real-time dynamic generating method for local particle spring model with deformed soft tissues
Allegre et al. The hybridtree: Mixing skeletal implicit surfaces, triangle meshes, and point sets in a free-form modeling system
Velho Mesh simplification using four-face clusters
Metaxas et al. Efficient shape representation using deformable models with locally adaptive finite elements
Cheng et al. Design and analysis of optimization methods for subdivision surface fitting
Chen et al. Skeleton-driven surface deformation through lattices for real-time character animation
Yang et al. 3D shape metamorphosis based on T-spline level sets
Combaz et al. Painting folds using expansion textures
CN109801367B (en) Grid model characteristic editing method based on compressed manifold mode

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100120

Termination date: 20131019