Please wait a minute...
J4  2012, Vol. 46 Issue (7): 1301-1306    DOI: 10.3785/j.issn.1008-973X.2012.07.023
计算机技术﹑电信技术     
基于CUDA的细分曲面阴影体算法
赵杰伊,唐敏,童若锋
浙江大学 计算机科学与技术学院,浙江 杭州 310027
CUDA based shadow volume algorithm for subdivision surfaces
ZHAO Jie-yi, TANG Min, TONG Ruo-feng
College of Computer Science and Technology, Zhejiang University, Hangzhou 310027, China
 全文: PDF  HTML
摘要:

为了在虚拟现实、电脑游戏等图形应用中更快速生成和实时绘制细分曲面的阴影,提出采用CUDA架构的GPU阴影体生成算法.该算法采用基于CUDA的曲面细分算法,通过CUDA共享内存结构使表面细分过程更加高效.采用基于CUDA的阴影体算法产生阴影轮廓线以及拉伸出阴影体.通过基于CUDA的流式缩减算法对阴影体数组进行压缩.通过优化CUDA和OpenGL的互操作,将绘制过程从以往算法的3步减少为2步.该算法在具有CUDA硬件的标准PC上进行测试.实验结果表明,与之前的GPU的算法相比,该算法可以生成更复杂细分曲面的阴影体,阴影体数组占用显存空间降低到2%以下,并可获得高达4倍的绘制速度提升.

Abstract:

 A new GPU based shadow volume generation algorithm based on CUDA structure was proposed for fast generation and real-time rendering of shadow of subdivision surfaces in computer games and virtual reality applications. The algorithm introduces CUDA-based surface subdivision algorithm. Generation of surface subdivisions can run faster by using shared memory structure.  CUDA-based shadow volume algorithm was introduced to generate the shadow silhouette line and extrude the shadow volume. CUDA-based stream reduction algorithm was introduced to reduce the shadow volume array. An optimized interoperation between CUDA and OPENGL was introduced to simplify the rendering step of the algorithm from three steps to two steps. Implemented on a standard PC with CUDA hardware, experiments show that the algorithm can generate the shadow volume of more complex subdivision surfaces compared with former GPU-based ones. The algorithm needs smaller video memory for the shadow volume array to less than 2%, and the rendering performance can gain acceleration up to more than four times.

出版日期: 2012-07-01
:  TP 391.7  
基金资助:

国家自然科学基金资助项目(61170140); 浙江省自然科学基金资助项目(Y1100069, Y1100018).

通讯作者: 唐敏,男,副教授.     E-mail: tang_m@zju.edu.cn
作者简介: 赵杰伊(1984-),男,博士生,从事计算机图形学的研究. E-mail: su27@zju.edu.cn
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
RSS
作者相关文章  

引用本文:

赵杰伊,唐敏,童若锋. 基于CUDA的细分曲面阴影体算法[J]. J4, 2012, 46(7): 1301-1306.

ZHAO Jie-yi, TANG Min, TONG Ruo-feng. CUDA based shadow volume algorithm for subdivision surfaces. J4, 2012, 46(7): 1301-1306.

链接本文:

http://www.zjujournals.com/eng/CN/10.3785/j.issn.1008-973X.2012.07.023        http://www.zjujournals.com/eng/CN/Y2012/V46/I7/1301

[1] 唐敏,童若锋,董金祥. 基于GPU的曲面自适应细分[J]. 浙江大学学报:工学版,2008, 42(7): 1145-1149.
TANG Min, TONG Ruofeng, DONG Jinxiang. Graphics processing units based adaptive subdivision [J]. Journal of Zhejiang University: Engineering Science, 2008, 42(7) : 1145-1149.
[2] SHIUE L J, JONES I, PETERS J. A realtime GPU subdivision kernel [J]. ACM Transactions on Graphics (TOG), 2005, 24(3):1010-1015.
[3] SCHWARZ M, STAMMINGER M. Fast GPUbased adaptive tessellation with CUDA [J]. Computer Graphics Forum, 2009, 28(2): 365-374.
[4] WILLIAMS L. Casting curved shadows on curved surfaces [J]. ACM SIGGRAPH Computer Graphics, 1978, 12(3): 270-274.
[5] CROW F C. Shadow algorithms for computer graphics [J]. ACM SIGGRAPH Computer Graphics, 1977, 11(2): 242-248.
[6] EVERITT C, KILGARD M. Practical and robust stencil shadow volumes for hardware accelerated rendering [R]. Austin: NVIDIA Corporation, 2002.
[7] BRABEC S, SEIDEL H. Shadow volumes on programmable graphics hardware [J]. Computer Graphics Forum, 2003, 22(3): 433-440.
[8] TANG M, DONG J X. Geometry imagebased shadow volume algorithm for subdivision surfaces [C]∥Computer Graphics International. Petrópolis, Brazil: [s.n.], 2007: 21-28.
[9] TANG M, DONG J X, CHOU S C. Realtime shadow volumes for subdivision surface based models [C]∥Computer Graphics International. Hangzhou: [s.n.], 2006: 538-545.
[10] KIRK D. Nvidia CUDA software and GPU parallel computing architecture[C]∥The 6th International Symposium on Memory Management. New York: ACM, 2007.
[11] BLELLOCH G. Prefix sums and their applications [R]. Pittsburgh: Carnegie Mellon University, 1990.
[12] HORN D. Stream reduction operations for GPGPU applications [M]. [S.l.]: Wesley, 2005: 573-589.
[13] CLARA S. NVIDIA CUDA programming guide [M]. Santa Clara: NVIDIA, 2010.
[14] CHRIS K. DirectX 11: learn the latest tricks [C]∥ ACM SIGGRAPH ASIA. New York: ACM, 2010.
[15] STONE J, GOHARA D, SHI G. OpenCL: a parallel programming standard for heterogeneous computing systems [J]. Computing in Science and Engineering, 2010, 12(3): 66-73.

[1] 沈晔, 李敏丹, 夏顺仁. 计算机辅助乳腺癌诊断中的非平衡学习技术[J]. J4, 2013, 47(1): 1-7.
[2] 沈晔 ,李敏丹,夏顺仁. 计算机辅助乳腺癌诊断中的非平衡学习技术[J]. J4, 2013, 47(1): 1-7.
[3] 徐进, 张树有, 费少梅. 基于自适应粒子群的产品再制造拆卸规划[J]. J4, 2011, 45(10): 1746-1752.
[4] 解利军, 王彦妮, 张帅. 基于改进粒子群算法的体绘制传递函数设计[J]. J4, 2010, 44(8): 1466-1472.
[5] 马进, 李锋, 李建华. 分布式数据挖掘中基于扰乱的隐私保护方法[J]. J4, 2010, 44(2): 276-282.
[6] 盛文露, 唐任仲, 刘运通. 基于本体的饰品创新设计过程知识服务建模[J]. J4, 2009, 43(12): 2268-2273.
[7] 刘肖健, 孙守迁, 陈实. 基于图像的编织产品三维图案结构映射[J]. J4, 2009, 43(8): 1367-1371.