1、 本科毕业论文 题 目: 三维服装试衣系统 碰撞检测及响应的研究与实现 姓 名: 学 院:软件学院 系:软件工程 专 业:软件工程 年 级: 学 号: 指导教师: 职称: 年 月本科毕业论文 三维服装试衣系统 碰撞检测与响应的研究与实现 I 摘要 三维服装试衣系统是基于虚拟现实技术的一个重点实验项目,而碰撞检测及响应是该系统的一个重要组成部分。 碰撞主要分为两个部分:一是衣片与人体的碰撞,二是衣片的自碰撞。衣片与人体的碰撞检测,其目的为根据不同体型,设定 衣片与人体的最佳距离,以及为碰撞响应提供先决条件。衣片的自碰撞检测,是根据衣片的悬垂等性质来模拟真实的衣服皱褶等现象。 本文先描述对衣片进行
2、碰撞前的准备工作,包括:三角网格划分、添加弹簧等。 接着对布料与球体的碰撞进行研究,并将其改进成前后两个衣片与人体的碰撞检测及响应。首先对衣片及人体进行包围盒划分,其采用的方法为基于 AABB 包围盒划分;接着控制衣片的运动,使之逐渐向人体靠近;最后检查到衣片和人体的碰撞,并进行碰撞响应。本文进一步的对碰撞后的前后衣片进行缝合,使之成为一件完整的衣服。最后将缝合后的衣片整合在 同一个数组中,以便今后对衣片添加纹理、风吹等真实效果。 综上所述,本论文对碰撞检测及响应的整个流程进行整合概括,对每一步骤所用到的算法进行分析试验,并且最终将分开的衣片合成完整的衣服,使之穿在人体上,已达到 模拟 现实的
3、虚拟结果。 关键词: 三维试衣系统 碰撞检测及响应 衣片缝合 本科毕业论文 三维服装试衣系统 碰撞检测与响应的研究与实现 II Abstract 3D garment-fitting system is a focus of pilot project that based on virtual reality technology, and the collision-checking and response is an important component of this system. Collision includes two parts: one is the collisio
4、n between cloth and body; the other is the self-collision of cloth. The first one sets up a best distance between the cloth and the body for different somatotypes, and provides pre-conditions for collision-response. The second one, according to cloths overhanging phenomena, simulates the real cloth.
5、 At first, this paper describes the prepare work for collision-checking, such as triangle gridding partition, adding springs and so on. Then we study the collision principle between sphere and the cloth, and improve it onto a collision between a body and two cloth which before and after it. At the f
6、irst step, they (both body and cloth) are required to be partitioned by AABB boxes. Second, we have to control the cloth moving to the body .At last, the system checks whether the cloth comes into collision with the body. If it happens, the system carries out the collision-response immediately. Furt
7、hermore, this paper describes the processes of cloth-stitching after collision so that they can become integrative clothes. Then, the system puts all the particles of cloth into an array so as to add texture, wind and other real natural effect. To sum up, this paper generalizes the entire processes
8、of the collision-checking and response, analyzes the algorithm used on each step, and finally puts the clothes which are made up by several separate clothes on the model. This imitation is a vivid virtual reality effect. Keywords: 3D garment-fitting system collision-checking and response cloth-stitc
9、hing 本科毕业论文 三维服装试衣系统 碰撞检测与响应的研究与实现 III 目录 第一章 引言 . 7 第二章 衣片划分研究 . 8 2.1 第一步 衣片网格划分 . 8 2.2 第二步 衣片添加弹簧 . 10 2.3 第三步 衣片包围盒划分 . 11 2.4 第四步 人体包围盒划分 . 11 2.5 第五步 衣片向人体运动 . 11 2.6 实验效果图 . 11 第三章 建立层次包围盒 . 13 3.1 层次包围盒概念 . 13 3.2 层次包围盒约束条件 . 13 3.3 层次包围盒算法分类 . 13 3.3.1 包围球 Sphere. 14 3.3.2 方向包围盒 OBB. 14 3.
10、3.3 沿坐标轴的包围盒 AABB. 14 3.3.4 三种包围盒算法比较与抉择 . 15 3.4 AABB 包围盒存储优化 . 15 3.4.1 AABB 树的构造 . 16 3.4.2 优化方法 . 16 3.4.3 优化后结果 . 17 3.4.4 人体 AABB 树 . 17 第四章 碰撞检测 . 18 4.1 衣片与人体碰撞检测 . 18 4.1.1 碰撞检测原理 . 18 4.1.2 基于 AABB 层次包围盒树的碰撞检测算法实现 . 19 4.1.3 碰撞检测两大步骤 . 19 4.2 衣片自碰撞检测 . 20 4.2.1 自碰撞检测由来与原理 . 21 4.2.2 自碰撞检测的
11、算法实现 . 22 本科毕业论文 三维服装试衣系统 碰撞检测与响应的研究与实现 IV 4.3 实验效果图 . 24 4.3.1 未进行碰撞检测 . 24 4.3.2 碰撞检测后 . 25 第五章 碰撞响应 . 26 5.1 碰撞响应定义 . 26 5.2 碰撞响应分析 . 26 5.3 碰撞响应实现方法 . 26 5.4 碰撞响应效果图 . 27 5.5 实验效果图 . 27 第六章 衣片缝合 . 28 6.1 衣片缝合原理 . 28 6.2 衣片缝合步骤 . 28 6.3 衣片缝合的算法实现 . 29 6.4 实验效果图 . 30 第七章 总结与展望 . 31 7.1 总结 . 31 7.2
12、 展望 . 31 致 谢 . 32 参考文献 . 33 附 录 . 34 本科毕业论文 三维服装试衣系统 碰撞检测与响应的研究与实现 V Contents Chapter One Introduction. 7 Chapter Two Research in Cloth Gridding . 8 2.1 Step Gridding Partition of Cloth . 8 2.2 Step Adding Springs on Cloth . 10 2.3 Step Boxes Partition of Cloth. 11 2.4 Step Boxes Partition of Body .
13、 11 2.5 Step Cloth Moving Close to Body . 11 2.6 Some Pictures of Experiment Result . 11 Chpater Three Building Delamination Boxes . 13 3.1 Notion of Delamination Boxes . 13 3.2 Obligation Condition of Delamination Boxes . 13 3.3 Different Sorts of Delamination Boxes Arithmetic. 13 3.3.1 Sphere Box
14、. 14 3.3.2 OBB Box. 14 3.3.3 AABB Box . 14 3.3.4 Comparision and Choise Among These Three Sorts . 15 3.4 Optimizion of AABB Boxs Storage . 15 3.4.1 Structure of AABB Tree. 16 3.4.2 The Optimizion Method . 16 3.4.3 Result After Optimizion . 17 3.4.4 The AABB Tree of body . 17 Chapter Four Collision-C
15、hecking . 18 4.1 Collision-Checking Between Cloth and Body . 18 4.1.1 Theory of Collision-Checking . 18 4.1.2 Arithmetic Realization of Collision-Checking by AABB Box . 19 4.1.3 Two Steps of Collision-Checking . 19 4.2 Self-Collision of Cloth . 21 4.2.1 Origin and Theory of Self-Collision . 21 4.2.2
16、 Arithmetic Realization of Self-Collision . 22 本科毕业论文 三维服装试衣系统 碰撞检测与响应的研究与实现 VI 4.3 Some Pictures of Experiment Result . 24 4.3.1 Results Before Collision-Checking. 24 4.3.2 Results After Collision-Checking . 25 Chapter Five Collision Response . 26 5.1 Definition of Collision Response . 26 5.2 Analy
17、sis of Collision Response . 26 5.3 Realization Method of Collision Response. 26 5.4 Results of Collision Response . 27 5.5 Some Pictures of Experiment Result . 27 Chapter Six Cloth-Stitching . 28 6.1 Theory of Cloth-Stitching . 28 6.2 Steps of Cloth-Stitching . 28 6.3 Arithmetic Realization of Cloth-Stitching . 29 6.4 Some Pictures of Experiment Result . 30 Chapter Seven Summary and Prospect . 31 7.1 Summary . 错误 !未定义书签。 7.2 Prospect . 错误 !未定义书签。 Acknowledgements .