机构地区: 清华大学软件学院
出 处: 《计算机应用》 2010年第12期32-36,共5页
摘 要: 基于微平面理论的双向反射分布函数(BRDF)材质模型都需要一个分布函数表示微平面法向的分布概率密度,现有的分布函数大都是用数学公式表示的。用公式表示的分布函数往往不够直观,而且种类较少。提出一种新的、直接从灰度纹理生成分布函数的方法。该方法生成的分布函数不仅可以替代公式表示的分布函数,而且还可以创造出一些新的材质。首先对一张灰度纹理进行均匀采样提取一个二维灰度值表,并把表项下标和微平面法向的方向建立映射关系,用表项中存放的灰度值作为该法向的概率密度值。用BRDF计算物体颜色时需要在分布函数中进行微平面法向的采样,提出在表格化的分布函数中进行随机采样和重点采样的算法。最后通过设计灰度纹理构造分布函数,实现了一些特殊的材质效果。 Microfacet-based Bidirectional Reflectance Distribution Functions(BRDFs) use distribution functions to describe microfacets' orientaions.Common distribution functions are mostly formula based,which are neither intuitive nor expressive.This paper presented a novel distribution generation method based on grayscale textures.The proposed approach is more flexible than previous methods and can generate distributions not only for replacing existing formula-based distribution functions,but also for creating new materials.First,an input grayscale texture was uniformly sampled to generate a tabular distribution function.Then,for this distribution function,a random sampling algorithm and an importance sampling algorithm were proposed.Finally,several interesting new materials created by designing input grayscale textures were showed.