1 / 18

基于分片的大规模网格简化

基于分片的大规模网格简化. 可视化组 侯涛 2012-7-24. 简化思路 对网格进行分片,将大规模网格(数以千万、亿计的点和面片, GB 级别的网格)分成小片,对每一个分片进行 in-core 的简化。 In-core 简化使用 edge collapse (边收缩),因为它的简化效果比较好. 算法流程. 获取包围盒 创建二进制顶点文件. 根据包围盒对网格进行统一分割. 分别对分片进行 Edge Collapse 简化. 合并分片. 顶点数据的缓存策略. 缓存结点的数据结构 template <class ValType> class __CacheUnit

yovela
Download Presentation

基于分片的大规模网格简化

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 基于分片的大规模网格简化 可视化组 侯涛 2012-7-24

  2. 简化思路 • 对网格进行分片,将大规模网格(数以千万、亿计的点和面片,GB级别的网格)分成小片,对每一个分片进行in-core的简化。 • In-core简化使用edge collapse(边收缩),因为它的简化效果比较好 • 算法流程 获取包围盒 创建二进制顶点文件 • 根据包围盒对网格进行统一分割 • 分别对分片进行Edge Collapse简化 • 合并分片

  3. 顶点数据的缓存策略 • 缓存结点的数据结构 template <class ValType> class __CacheUnit { public: __CacheUnit<ValType> *bucket_prev; __CacheUnit<ValType> *bucket_next; __CacheUnit<ValType> *use_prev; __CacheUnit<ValType> *use_next; ValType val; unsigned int index; }; • 面片的索引具有一定的随机性,随机磁盘访问会导致效率明显下降。 • 本方法采用了least recent used缓存来缓存顶点 • 为了加快访问缓存中顶点的速度,使用哈希表来对顶点进行散列存储 • 存储结构 _____________ _____ _____ |bucket_head| ----> | | -> .. -> | | -> Null _____________ _____ _____ |bucket_head| ----> | | -> .. -> | | -> Null _____________ |bucket_head| ----> Null ... _____________ _____ _____ |bucket_head| ----> | | -> .. -> | | -> Null

  4. 分片与合并策略 • 现有的分片算法 • 基于对面片的分割 • 需要保持边界不被简化 • 必须多次简化 • 会带来重复的顶点 • 本分片策略 • 基于对顶点的分割 • 属于不同分片的面片而单独存储。 • 不用做不简化分片边界的限制 • 而只需要一次处理 • interiortriangle: • 位于分片内部的三角形 • boundary triangle: • 三个点至少有两个点分属于不同分片的三角形 • interiorvertex: • 位于分片内部的点 • boundary vertex: • 位于分片内部,邻接于Interior boundary triangle的点

  5. 分片文件格式 head ivs ibvs ebvs fs 头部:Interior vertex 数目 Interior boundary vertex 数目 Exterior boundary vertex 数目 Interior vertices: original id, x, y, z Interior boundary vertices: original id Exterior boundary vertices: original id, x, y, z Faces: 所有包含(可能包含其他分片的顶点)有当前分片中顶点的三角面片 orig id vx vy vy iv … orig id ibv … orig id vx vy vy ebv … fi fj fk f …

  6. 分片的简化与合并 • 简化后的interiorvertex和对应的interiortriangle,直接写入输出 • boundary vertex和其对应的originalid、output id用hash map保存起来 • 在将所有的分片简化完毕后读入boundary triangle文件,得出对应的退化三角形 • 不简化其他分片的顶点 patch vertex global bv id map output id output id iv global bf simplify bv simplified model degenerated bf simplify if

  7. 分片的示例 简化后的分片

  8. 边界的示意图

  9. 程序演示

  10. 简化结果与In-core算法的对比 • 5440个面片(左边为分片简化结果)

  11. 3590个面片

  12. 1655个面片

  13. Metro度量的结果

  14. 大规模网格的简化结果Lucy (f:28055742 -> 59967)

  15. xyzrgb_statuette(f:10000000-> 60000)

  16. 运行统计 • Lucy运行时间 第一次12.00 秒 第二次95.14 秒 每个分片的简化时间

  17. 改进工作 • 使用外部排序做第二次处理,看是否能加快访问时间 • 改进分片策略,使得每个分片大小尽量均匀,同时保持连通,减少边界面的个数。 • 使用分片的曲率来分配简化后面片或点的个数

  18. 其他工作 • 在IC项目中,由于需要打开装配体IGS文件,将Gems7.0中的IGS和相关模块移植到IC中。

More Related