本文已被:浏览 2246次 下载 974次
投稿时间:2019-01-02 修订日期:2019-03-30
投稿时间:2019-01-02 修订日期:2019-03-30
中文摘要: 为了在较低的时间开销下生成高质量的软阴影,提出一种快速的百分比靠近软阴影(percentage closer soft shadows,PCSS)绘制算法。该算法基于百分比靠近软阴影算法,首先使用多尺度阴影图技术对阴影图进行预处理,同时去除其中对阴影图查询贡献较小的像素,降低预处理的开销;然后基于快速遍历方法,使用一种有效的采样方式,对部分搜索区域进行采样,并利用采样信息提高快速遍历结果的准确性;接着设计一种复用方案,对于多个相似像素组成的相似像素组,只对其中一个被称为代表像素的像素进行耗时的计算,组内其它像素复用代表像素的计算结果,降低了计算总量,提升算法性能。最后对生成的软阴影进行模糊处理,使其边缘更为平滑。此外,通过对比不同设置下的实验结果,确定出较为合理的参数。为验证算法的有效性和通用性,使用随机生成的场景进行测试,并与主流算法进行对比,对比指标为软阴影质量和算法运行时间。实验结果表明,该算法在保证软阴影质量的条件下,拥有更高的性能,并且虚拟场景中阴影部分所占比例越大,性能提升越大。
Abstract:In order to generate high quality soft shadows with low time cost, a fast rendering algorithm of percentage closer soft shadows was proposed. Based on the technology of percentage closer soft shadows, a multi-scale shadow map was used to preprocess the shadow map. By removing those pixels that contributed less to queries about shadow map, the cost of preprocessing was reduced. Based on the fast traversal algorithm, an effective sampling mode was used to sample search area thus improved the accuracy of traversal results by utilizing sampling information. And then, a reuse scheme was exploited. In the scheme, only one representative pixel was calculated for a group of similar pixels, and the other pixels in the group reused the calculation result of the representative pixel, which reduced the amount of calculation and thus improved the performance of algorithm. Finally, soft shadows were blurred to get more smooth edges. In addition, to determine appropriate parameters, a series of experiments were conducted. In order to verify the validity and versatility of the algorithm, several randomly generated scenarios were used for test and the comparisons with the mainstream algorithms were conducted. The comparison indexes were the quality of soft shadows and the running time of algorithms. The experimental results showed that the proposed algorithm has higher performance while ensuring the quality of soft shadows. Furthermore, the larger proportion of shadows virtual scenes has, the greater performance improvement the proposed algorithm gains.
keywords: soft shadows percentage closer soft shadows (PCSS) multi-scale shadow map fast traversal pixel reuse
文章编号:201900003 中图分类号:TP391 文献标志码:
基金项目:国家自然科学基金项目(61773270)
作者 | 单位 | |
朱敏 | 四川大学 计算机学院, 四川 成都 610065 | 王建华,E-mail:yishiliucaihua@163.com |
王建华 | 四川大学 计算机学院, 四川 成都 610065 | |
李晓伟 | 四川大学 计算机学院, 四川 成都 610065 | |
田伟 | 四川大学 计算机学院, 四川 成都 610065 |
作者简介:朱敏(1971-),女,教授,博士.研究方向:智能信息处理.E-mail:zhumin@scu.edu.cn
引用文本:
朱敏,王建华,李晓伟,田伟.快速百分比靠近软阴影绘制算法[J].工程科学与技术,2019,51(4):140-146.
ZHU Min,WANG Jianhua,LI Xiaowei,TIAN Wei.Fast Percentage Closer Soft Shadows[J].Advanced Engineering Sciences,2019,51(4):140-146.
引用文本:
朱敏,王建华,李晓伟,田伟.快速百分比靠近软阴影绘制算法[J].工程科学与技术,2019,51(4):140-146.
ZHU Min,WANG Jianhua,LI Xiaowei,TIAN Wei.Fast Percentage Closer Soft Shadows[J].Advanced Engineering Sciences,2019,51(4):140-146.