实时环境光照01

Real-Time Environment Mapping

  • Finishing up on shadows
    • Distance field soft shadows
  • Shading form environment lighting
    • The split sum approximation
  • Shadow from environment lighting

Why Distance Field Soft Shadows

1
2
3
4
5
6
7
8
9
From Tweets: @SebAaltonen

SDF ray-traced shadows are faster than shadow maps.
The only thing limiting Fortnite having 100% SDF shadows is the memory cost of having high res SDF per object and skinned characters. Thus they use 1 cascade for near shadows and SDF everywhere else.

-----------------------------

Our tech shows that SDF shadows also work fine for dense SDF geometry at close ranges too and beat rendering equiv 10M triangle mesh to 3 shadow cascades. Also SDF shadows look way better than raster shadows with proper penumbras and no acne / undesampling /peter panning.

1
2
3
4
5
6
7
8
摘自推特: @SebAaltonen

SDF 光线追踪阴影比阴影贴图更快。
限制 Fortnite 具有 100% SDF 阴影的唯一因素是每个对象和蒙皮角色具有高分辨率 SDF 的内存成本。 因此,他们使用 1 级联来处理近阴影和其他任何地方的 SDF。

-----------------------------------------

我们的技术表明,SDF 阴影也适用于近距离的密集 SDF 几何体,并且优于将 10M 三角形网格渲染到 3 个阴影级联。 此外,SDF 阴影看起来比具有适当半影且没有粉刺/去采样/彼得平移的光栅阴影更好。

Distance Functions

定义: 在空间中任何一点, 到物体表面的最小距离

有向距离场: 在物体内为负号, 物体外为正号

  • Usage 1.
    • Ray marching (sphere tracing) to perform ray-SDF intersection
    • Very smart idea behind this
    • The value of SDF == a "safe" distance around