| 摘要: |
| 碰撞检测是3D虚拟服装中的重要环节,而在布料和人体模型的分辨率比较高的情况下,常规的碰撞检测算法往往无法达到实时.使用深度图像进行实时的连续碰撞检测,并结合法线图像进行碰撞响应.首先从指定的摄像机为人体预先渲染生成前后部深度图像与法线图像;然后对于要检测碰撞的布料质点,计算其深度值,并将其位置变换到图像空间,然后根据图像空间坐标从深度图像中读取深度值,通过与质点的深度值进行比较即可判断质点是否与人体碰撞,若发生碰撞,则通过修改的DDA直线光栅化算法在质点前一步与后一步位置确定的深度图像坐标区间内搜索插值参数,该插值参数用来计算碰撞接触点以及接触点处的法线,以支持连续碰撞响应.实验结果表明,该算法的预处理速度快,在布料和人体的分辨率都比较高的情况下也可以获得实时的碰撞检测与响应. |
| 关键词: 布料仿真 虚拟服装 基于图像的碰撞检测 碰撞响应 虚拟试衣,深度图,法向图,修正的DDA扫描线光栅化 |
| DOI: |
| 分类号: |
| 基金项目:国家自然科学基金(61173124, 61170318, 61332017) |
|
| Image-Based Detection and Response of Continuous Fast Collision Between Cloth and Human Body |
|
LIN Ling1, ZHANG Ming-Min1, PAN Zhi-Geng2, QIU Kai-Jia1
|
|
1.Digital Media & Interaction Research Center, Hangzhou Normal University, Hangzhou 311121, China;2.Institute of Information Science and Engineering, Hangzhou Normal University, Hangzhou 310012, China
|
| Abstract: |
| Collision detection is a key step in 3D virtual clothing, and it is difficult to be made real-time using generic collision detection algorithms with relatively high resolution of cloth and human body. This paper exploits depth and normal maps to efficiently detect and resolve collisions between cloth and body. First, body mesh is rendered from prepositioned cameras to generate depth and normal maps. Secondly, the depth of cloth node is computed and then the node is transformed to depth image space. Thirdly, depth is retrieved from the depth map according to the image coordinate of the cloth node and it is compared with the node's depth to determine whether collision happens or not. Lastly, if collision happens, an interpolation parameter is determined by searching the depth image space in the coordinate interval determined by the cloth node positions in previous and current integration step using a modified DDA line rasterization algorithm, and the interpolation parameter is later used to compute the contact point and contact normal which is necessarily for continuous collision response. Experimental results show that the algorithm takes little time in the preprocessing step and is able to provide real-time collision detection and response even when the resolution of cloth mesh and human body is relatively high. |
| Key words: cloth simulation virtual clothing image-based collision detection collision response virtual try-on, depth map, normal map, modified DDA line rasterization |