计算机应用 ›› 2016, Vol. 36 ›› Issue (7): 1954-1958.DOI: 10.11772/j.issn.1001-9081.2016.07.1954

• 虚拟现实与数字媒体 • 上一篇    下一篇

基于贪心优化策略的网格排布算法

娄自婷, 张亚萍   

  1. 云南师范大学 信息学院, 昆明 650500
  • 收稿日期:2015-12-07 修回日期:2016-03-21 出版日期:2016-07-10 发布日期:2016-07-14
  • 通讯作者: 娄自婷
  • 作者简介:娄自婷(1990-),女,云南昆明人,硕士研究生,主要研究方向:计算机图形学;张亚萍(1979-),女,云南临沧人,副教授,博士,主要研究方向:计算机图形学、并行计算。
  • 基金资助:
    国家自然科学基金资助项目(61262070,61462097)。

Mesh layout algorithm based on greedy optimization strategy

LOU Ziting, ZHANG Yaping   

  1. College of Information Science and Technology, Yunnan Normal University, Kunming Yunnan 650500, China
  • Received:2015-12-07 Revised:2016-03-21 Online:2016-07-10 Published:2016-07-14
  • Supported by:
    This work is partially supported by the National Natural Science Foundation of China (61262070,61462097).

摘要: 针对由存储带宽和数据访问速度导致的复杂数据集绘制性能低下等问题,提出了一种基于贪心优化策略的三角形排布算法,通过对绘制数据集进行重排以改善数据的空间局部性和时间局部性。该算法首先将顶点分为三类,根据改进的代价函数选择代价度量最小的顶点作为活动顶点;然后绘制(即输出)其所有未绘制的邻接三角形,并将相邻顶点压入缓存,算法迭代执行直到所有顶点的邻接三角形都绘制完成,得到重新排列后的三角形序列。实验结果表明,该算法不仅具备较高的顶点缓存命中率,还提高了渲染速度,减少了排序的时间,有效地解决了图形处理器的处理速度不断提升而数据访问速度严重滞后的问题。

关键词: 缓存优化, 网格排布, 贪心优化策略, 平均缓存失配率, 三维网格模型

Abstract: Concerning low rendering performance of complex data sets which is caused by the limited memory bandwidth and data access speed, a triangle mesh layout algorithm based on greedy optimization strategy was proposed, by rearranging the triangle sequences to improve spatial locality and temporal locality of data. Firstly, the vertices were divided into three categories, according to the improved cost function, the vertex with the minimum cost was chosen as currently active vertex. Then, all adjacent triangles which were not rendered were output, and the neighbors were pushed into buffer. The above steps were executed iteratively until adjacent triangles of all vertices were rendered. Finally, the rearranged triangle sequence was got. The experimental results show that the proposed algorithm can provide a higher vertex cache hit ratio, improve the rendering speed, and reduce the execution time of the sorting, which can effectively solve the problem of data access speed lagging behind the processing speed of Graphics Processing Unit (GPU) seriously.

Key words: cache optimization, mesh layout, greedy optimization strategy, Average Cache Miss Rate (ACMR), 3D mesh model

中图分类号: