离散余弦变换 傅里叶变换_线性变换余弦的实时多边形光阴影

离散余弦变换 傅里叶变换_线性变换余弦的实时多边形光阴影

离散余弦变换 傅里叶变换

 Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt
埃里克·海兹(Eric Heitz),乔纳森·杜普(Jonathan Dupuy),斯蒂芬·希尔(Stephen Hill)和大卫·诺贝尔特(David Neubelt)

ACM SIGGRAPH 2016

ACM SIGGRAPH 2016

动机 (Motivation)

Shading with area lights adds a great deal of realism to CG renders. However, it requires solving spherical equations that make it challenging for real-time rendering. In this project, we develop a new spherical distribution that allows us to shade physically based materials with polygonal lights in real-time.

区域灯光阴影为CG渲染增加了很多真实感。 但是,它需要求解球面方程,这给实时渲染带来了挑战。 在此项目中,我们开发了一种新的球形分布,该分布使我们可以使用多边形光实时着色基于物理的材料。

为什么多边形光阴影很复杂? (Why is polygonal-light shading complicated?)

Shading with polygonal lights requires integrating the BRDF over the polygonal domain covered by the light.

使用多边形光源进行着色需要将BRDF集成到光源覆盖的多边形区域上。

离散余弦变换 傅里叶变换_线性变换余弦的实时多边形光阴影

Despite polygonal lights being theoretically one of the simplest lighting models, they are challenging in real-time rendering for two main reasons:

尽管从理论上讲多边形照明是最简单的照明模型之一,但它们在实时渲染方面仍具有挑战性,主要有两个原因:

  • Problem 1: Integrating parametric spherical distributions over spherical polygons is difficult in general, even with the simplest distributions.

    问题1:即使具有最简单的分布,通常也很难在球形多边形上积分参数化球形分布。
  • Problem 2: State-of-the-art physically based material models are not simple distributions; they have sophisticated shapes with anisotropic stretching and skewness that need to be represented for the material to appear realistic.

    问题2:基于物理的最新材料模型不是简单的分布; 它们具有带有各向异性拉伸和偏斜度的复杂形状,需要使它们表现出真实的材质。

线性变换余弦 (Linearly Transformed Cosines)

To overcome these problems, we introduce Linearly Transformed Cosines (LTCs), a new kind of spherical distribution that covers a wide variety of spherical shapes and can be analytically integrated over arbitrary polygons.

为了克服这些问题,我们引入了线性变换余弦(LTC),这是一种新型的球形分布,它涵盖了多种球形形状,并且可以分析集成到任意多边形上。

定义 (Definition)

Our idea is to start from a simple clamped cosine distribution and apply a linear transformation to its direction vectors. This allows for controlling the properties of the shape of the distribution, such as roughness, anisotropy, and skewness.

我们的想法是从简单的钳位余弦分布开始,并将线性变换应用于其方向向量。 这允许控制分布形状的属性,例如粗糙度,各向异性和偏斜度。

cosine (base shape)
离散余弦变换 傅里叶变换_线性变换余弦的实时多边形光阴影
余弦(基本形状)
roughness anisotropy skewness
离散余弦变换 傅里叶变换_线性变换余弦的实时多边形光阴影
离散余弦变换 傅里叶变换_线性变换余弦的实时多边形光阴影
粗糙度 各向异性 偏度
离散余弦变换 傅里叶变换_线性变换余弦的实时多边形光阴影

BRDF近似 (BRDF approximation)

Thanks to the variety of spherical shapes they cover, Linearly Transformed Cosines can closely approximate physically based BRDFs. Below is an example of how a GGX BRDF (left) can be approximated with a LTC (right) for varying incident directions.

由于它们所覆盖的球形形状多种多样,因此线性变换余弦可以非常接近基于物理的BRDF。 下面是一个示例,说明如何使用LTC(右)来近似GGX BRDF(左)以改变入射方向。

离散余弦变换 傅里叶变换_线性变换余弦的实时多边形光阴影

Of course, the approximation is not perfect, but it efficiently recovers the main features of the BRDF for different roughness and incidence configurations.

当然,这种近似并不是完美的,但是对于不同的粗糙度和入射配置,它可以有效地恢复BRDF的主要特征。

多边形积分 (Polygonal integration)

Thanks to their linear invariant properties, integrating a LTC over a polygon is equivalent to integrating the original clamped cosine distribution over the polygon transformed by the inverse linear transformation: it is just the irradiance (form factor) of the transformed polygon for which a closed form expression is available!

由于它们的线性不变性,在多边形上积分LTC等效于在通过逆线性变换变换的多边形上积分原始钳位余弦分布:这只是变换后的多边形的照度(形状因子),其闭合形式表达式可用!

LTC-polygon integral ..equivalent to.. cosine-polygon integral
离散余弦变换 傅里叶变换_线性变换余弦的实时多边形光阴影
离散余弦变换 傅里叶变换_线性变换余弦的实时多边形光阴影
analytic solution!
LTC-多边形积分 ..相当于.. 余弦多边形积分
离散余弦变换 傅里叶变换_线性变换余弦的实时多边形光阴影
分析解决方案!

其他性质 (Other properties)

With the same idea, we can use any spherical distribution as a base shape to create a new family of spherical distributions with parametric roughness, elliptic anisotropy and skewness. If the original distribution has an analytic expression, normalization, integration over spherical polygons, and importance sampling, then these properties are inherited by the linearly transformed distributions.

出于相同的想法,我们可以使用任何球形分布作为基本形状来创建具有参数粗糙度,椭圆各向异性和偏斜度的新球形分布家族。 如果原始分布具有解析表达式,归一化,在球形多边形上的积分以及重要性采样,则这些属性将由线性变换的分布继承。

资料下载 (Downloads)

演示地址

翻译自: https://blogs.unity3d.com/2016/05/26/real-time-polygonal-light-shading-with-linearly-transformed-cosines/

离散余弦变换 傅里叶变换