In order to solve the problem of rendering Depth Of Field (DOF) in Virtual Reality (VR) system, an improved post-processing algorithm of DOF based on Graphics Processing Unit (GPU) was proposed. First, the scene at full resolution was rendered to an offscreen buffer, and the linear depth of each pixel was output to the alpha channel of the buffer. Then, the fully-rendered scene was downsampled into 1/16 of the original size. Next, the downsampled scene was blurred by running the image through two passes of a separable Gaussian filter, and stored as a texture. Finally, the two textures were blended according to the linear depth of each pixel in the size of Circle of Confusion (CoC). The algorithm was applied in a virtual roaming scene and a good simulation of real-time DOF effect was achieved. The experimental results show that the algorithm has improved some problems in the traditional post-processing filter algorithm, such as poor continuity and brightness diffusion, and it meets the demand of real-time interaction in VR.
曹彦珏, 安博文, 李启明. 基于后处理的实时景深模拟与应用[J]. 计算机应用, 2015, 35(5): 1439-1443.
CAO Yanjue, AN Bowen, LI Qiming. Real-time simulation and application of depth-of-field based on post-processing. Journal of Computer Applications, 2015, 35(5): 1439-1443.
[1] ZOU X, SUN J, HE H, et al. The development and prospects of virtual reality [J]. Journal of System Simulation, 2004, 16(9): 1905-1909. (邹湘军,孙健,何汉武,等.虚拟现实技术的演变发展与展望[J].系统仿真学报,2004,16(9):1905-1909.) [2] POTMESIL M, CHAKRAVARTY I. A lens and aperture camera model for synthetic image generation[C]// Proceedings of the 8th Annual Conference on Computer Graphics and Interactive Techniques. New York: ACM, 1981: 297-305. [3] WU J, ZHENG C, HU X, et al. Survey of rendering techniques for depth-of-field effect[J]. Journal of Image and Graphics, 2011, 16(11): 1957-1966.(吴佳泽,郑昌文,胡晓惠,等.景深效果绘制技术综述[J].中国图象图形学报,2011,16(11):1957-1966.) [4] SOLER C, SUBR K, DURAND F, et al. Fourier depth of field[J]. ACM Transactions on Graphics, 2009, 28(2): 1-12. [5] LEE S, KIM G J, CHOI S. Real-time depth-of-field rendering using anisotropically filter mipmap interpolation[J]. IEEE Transactions on Visualization and Computer Graphaics, 2009, 15(3): 453-464. [6] SCHEUERMANN T. Advanced depth of field[C/OL].[2014-06-20]. http://ati.amd.com/ developer/gdc/Scheuermann_DepthOfField.pdf, 2004. [7] ZHOU Q, PENG J, DAI S, et al. Programmable GPU based real-time simulation of depth of field[J]. Journal of System Simulation, 2006,18(8):2219-2221. (周强,彭俊毅,戴树岭,等.基于可编程图形处理器的实时景深模拟[J].系统仿真学报,2006,18(8): 2219-2221.) [8] YU W, ZHANG Y. Simplified algorithm for post-processing fast depth of field effect[J]. Computer Applications and Software, 2009,26(10): 215-217.(余伟,张扬.简化的后处理快速景深效果[J].计算机应用与软件,2009,26(10):215-217.) [9] LI Z, LI W. Improved post-process depth of field[J]. Computer Engineering and Design, 2013, 34(4):1313-1317. (李泽昇,李武林.改进的后置处理景深算法[J].计算机工程与设计,2013,34(4):1313-1317.) [10] LEE S, EISEMANN E, SEIDEL H P. Depth of field rendering with multiview synthesis[J]. ACM Transactions on Graphics, 2009, 28(5): 1-6. [11] ZHAO D, CHEN Y, LI Q, et al. Luminance and depth based real-time depth of field rendering algorithm[J]. Journal of System Simulation, 2012, 24(8):1612-1617. (赵东阳,陈一民,李启明,等.一种基于亮度和深度信息的实时景深渲染算法[J].系统仿真学报,2012,24(8):1612- 1617.) [12] HUANG L, LU G, HE M, et al. Real-time depth-of-field simulation on GPU [J]. Application Research of Computers, 2008, 25(10): 3045-3047.(黄蓝枭,卢光辉,何明耘,等.基于GPU的实时景深模拟[J].计算机应用研究,2008,25(10): 3045-3047.)