Current Issue Cover
面向具有重复结构的大规模CAD模型的快速渲染

罗月童1,2, 周全1, 周俊1,2, 丁伟强1, 甘恮2, 吴斌2(1.合肥工业大学可视化与协同计算研究室, 合肥 230009;2.中国科学院核能安全研究所中子输运理论与辐射安全重点实验室, 合肥 230031)

摘 要
目的 基于普通个人计算机快速渲染大规模计算机辅助设计(CAD)模型仍然是个挑战。针对由少量基本对象按一定规律排布而成的大规模CAD模型——重复结构CAD模型,提出一种快速渲染方法,能够在个人计算机上的快速渲染大规模重复结构CAD模型。方法 该方法首先利用重复结构CAD模型的层次结构特征,结合现代GPU的Render-To-Texture的功能进行快速视锥裁剪,节约视锥裁剪时间;然后利用重复结构CAD模型中对象按规律布置的特点,仅对少量基本对象进行面片化,其他对象的面片模型在渲染时根据对象排布规律由基本对象的面片模型实时变换生成,解决大规模CAD模型内存需求过多的问题。结果 基于超级蒙卡核模拟软件系统SuperMC,使用典型重复结构模型——HM(hoogenboom-martin)、ADS(accelerator driven sub-critical system)、DCA(deuterium critical assembly)全堆芯CAD模型进行测试,HM、ADS、DCA模型分别由1 114 384,113 952和20 808个实体组成。测试结果表明,裁剪算法能大幅减少待渲染对象数量,渲染速度明显提高,且模型规模越大,本文方法优势越明显,在远视角的情况下提升效果最为突出,能提升3倍左右;结论 针对任意大规模CAD模型的快速渲染仍然是一个挑战,但本文针对重复结构CAD模型的特点,针对性地提出一套专用渲染策略,在个人计算机上实现大规模重复结构CAD模型的快速渲染。使用多个典型重复结构模型——反应堆全堆芯模型进行测试,测试结果表明了本文方法的有效性。
关键词
Rapid rendering for large-scale CAD model with repeated structure

Luo Yuetong1,2, Zhou Quan1, Zhou Jun1,2, Ding Weiqiang1, Gan Quan2, Wu Bin2(1.Visualization & Cooperative Computing, Hefei University of Technology, Hefei 230009, China;2.Key Laboratory of Neutronics and Radiation Safety, Institute of Nuclear Energy Technology, Chinese Academy of Sciences, Hefei 230031, China)

Abstract
Objective CAD(Computer Aided Design) is widely applied in many areas; however, rapidly rendering a large-scale CAD model on a commodity personal computer remains a challenge. Many researchers have been working on general-purpose rendering methods for large-scale models, and some have evaluated special-purpose rendering methods by utilizing the features of target models. The presented method belongs to special-purpose rendering methods. The method is designed to render a large-scale repeated-structure model, which is constructed by arranging several basic objects according to certain rules. Method Tree is often used to represent hierarchical CAD models. Two special nodes are defined to represent repeated-structure CAD models. One is used to represent basic objects, and the other is used for the "arrangement rule" of basic objects. A large-scale repeated-structure CAD model can thus be represented with a small-scale tree. CAD models cannot usually be rendered directly; they are to be converted into facets for rendering. However, the corresponding facet models for large-scale CAD models are extremely large to be stored and processed, which is a significant problem for large CAD model rendering. Repeated-structure CAD models are constructed by arranging few basic objects according to some rules. Therefore, the presented method solves the problem by generating and storing only the facets of basic objects, and the facets of all other objects are generated during the rendering process according to arrangement rules. Basic objects are less than the total objects in CAD models, and facets of basic objects are thus easy to generate and store. The running time of the view-frustum culling algorithm is proportional to facet number. For a large number of facets involved in large-scale CAD model rendering, the efficiency of the view-frustum culling algorithm is necessary to improve. Instead of processing facets directly, the presented method culls objects layer by layer by utilizing the hierarchical structure of repeated-structure CAD models. Accordingly, most objects can be processed in a high level, and only small part of objects is left to be processed in the facet level. The presented view-frustum culling algorithm is implemented by combining hierarchical structure features of the repeated structure CAD model and the render-to-texture functions of a modern GPU. The algorithm can select target objects rapidly, which is another contribution to rapid rendering. Result The presented method is implemented on the basis of ACIS, OpenGL, and HOOPS in Visual Studio 2010, and all testing is performed on a computer equipped with 3.20 GHz CPU, 4.0 GB RAM, NIVIDIA GeForce GT740 GPU, and Windows 7 operating system. The presented method is integrated into SuperMC (Multi-physics Coupling Analysis Modeling program), which is a self-developed nuclear simulation program. SuperMC is often used in processing full reactor core models, which are typical repeated-structure CAD models. Thus, three full reactor core CAD models, namely, HM, ADS, and DCA, are selected for testing, which consist of 1 114 384, 113 952, and 20 808 entities, respectively. For the three full reactor core models, the presented method performs best on the HM model and performs worst on the DCA model. HM is considerably larger than DCA. The presented method is designed for large-scale models. In comparison with the traditional rendering method, the presented method exhibits better performances on all the three models, it can achieve about three times rendering speed increase for far-view rendering. Although the presented method and the traditional method can achieve similar rendering qualities, the presented method can achieve a higher rendering rate, especially for far-view rendering. The test result demonstrates the effectiveness of the presented method. Conclusion The development of general-purpose rendering methods for large-scale CAD models remains a challenge. This paper presents a special-purpose rapid rendering method, which can render a large repeated-structure CAD model, according to the features of repeated-structure CAD models. The developed method is integrated into self-developed software SuperMC for application. Three full reactor core models based on SuperMC are used for testing. The presented method can achieve a good rendering quality and a high rendering rate than those of the traditional rendering method, which demonstrates the effectiveness of the presented method. Only "array-arrangement rule" is currently supported by the presented method; thus, to support more "arrangement rules" is our future work.
Keywords

订阅号|日报