real-time global illumination techniques

Post on 13-Jan-2015

3.705 Views

Category:

Technology

7 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

TRANSCRIPT

Real-Time Global Illumination Techniques

이장호 jangho.lee@gmail.com

KASA Open Seminar, 2011.06.12

개요

Global Illumination 소개

Real-Time / for Games

Indirect Lighting(Inter-reflections) Techniques– SSGI, RSM, SII, IR, ISM, CLPV

토의 및 결론

Global Illumination

Direct Illumination + Indirect Illumination

Offline Techniques– Radiosity– Ray Tracing– Photon Mapping

Cornell Box, 실제, 렌더링, 차이 [cu98]

Local Illumination vs Global Illumination

Local Illumination Global Illumination

Direct, Indirect Illumination

Direct Illumination

Direct + Indirect Illumination, Shrek2

Indirect Illumination

GI Equation

x

ω r Li

θ

n

[sc09]

L

Radiosity

Radiosity = 단위 시간, 단위 면적당 에너지

Patch 단위, Form Factor에 의해 면적당 에너지 계산, 누적

Diffuse-Diffuse Interaction 만 고려

Radiosity Patches Form Factor

Ray Tracing

시야에서 광선 추적 (Reverse, View Dependent)

Hit Object 마다 Lighting 계산, Reflected or Refracted로 확장

Path Tracing으로 Indirect Lighting 구현 가능

Ray Tracing (Reflected, Refracted, Shadowed)

Eye

Screen

Refracted

Reflected

Shadowed

Light

Photon Mapping

Light로부터 방출된 Photon 저장, Path Tracing으로 Rendering

2 Pass: Photon Tracing, Rendering

Caustics, Sub-Surface Scattering 등에 빠른 계산

Photon Visualization Rendering

Real-Time?

2011년 기준 상용 하드웨어, 상용 제품– PC, XBox360, PS3

Pre-Computed + Direct Illumination이 대세

기존 GI 알고리즘의 직접 적용– 실시간 Ray Tracing은 데모 수준– 실시간 Radiosity는 단순화된 씬으로 가속, Enlighten/BF3– Offline Renderer에 도움을 주는 역할

Indirect Illumination에 특화된 적용– Diffuse Inter-reflection– 1 Bounce

Lighting in Games

Static Light & Static Geometry– Lightmap

Dynamic Light & Static Geometry– PRT

Static Light & Dynamic Geometry– Irradiance Volumes (Point Light Cloud)

Dynamic Light & Dynamic Geometry– SSGI– RSM, SII– IR, ISM– CLPV

SSGI

Screen Space Global Illumination [ssdo09]

SSAO(SSDO)를 Indirect Illumination으로 확장

D.I. 이후, 인접 Pixel을 간접 광원으로 사용

1 Bounce

SSAO 대비 약 30% 추가 비용– SSAO: 58fps– SSGI: 40fps– 1024 x768, N=16– nVidia 8800 GTX

SSDO SSGI

SSGI

Result

SSGI

SSAO와 동일한 장단점

화면 복잡도와 무관한 성능

잘못된 Occlusion: Depth, 각도

지역적: 반경 이상의 간접광 표현 못함

잘못된 Visibility: 각도 변화 잘못된 Occlusion: Depth

RSM

Reflective Shadow Maps [rsm05]

Shadow Map을 Indirect Light Source로 활용

Shadow Map이므로, Light의 Occlusion을 내포

1 Light source, 1 Bounce

RSM 생성을 제외하고, 화면 복잡도와 무관, 동일한 성능

RSM

Light 시점에서 RSM 생성, Depth(Position), Normal, Flux

각 픽셀을 Light Source로 간주

Depth Position Normal Flux: Bright + Color

Light 시점에서 생성된 RSM

RSM

Fragment Shader(PS)에서 Indirect Illumination 계산

x의 Indirect Lighting 계산시 참조하는 RSM

모든 픽셀을 누적

RSM

Gathering– Potentially Important Samples– polor 좌표계, st(uv)

월드 분포의 거리가 RSM에서의 분포와 비례 면적당 Weight

RSM

Result– 9.1fps, 512 x 512, N=224, nVidia FX4000

Light 시점에서 생성된 RSM

최종 렌더링 결과

Splatting Indirect Illumination

RSM을 Gathering이 아닌 Shooting [sii07]

Deferred Shading

Instant Radiosity와 유사, Occlusion이 고려되진 않음

Importance Sampling

Instant Radiosity

VPL(Virtual Point Lights) 기반 [ir97][ir08]

VPL을 생성하여 Direct, Indirect Light Source로 활용

Light에서 VPL생성 VPL로부터 Illumination 계산

Instant Radiosity

Result

최종 렌더링 VPL 배치

Instant Radiosity

Light Occlusion– Shadow Map을 이용– 쉽지만, 비싼 비용

각 VPL당 Shadow Maps

Instant Radiosity

VPL Distribution– Path Tracing와 유사– Shadow를 포함한 VPL의 누적

1차 바운스

4차 바운스

렌더링 결과누적

Imperfect Shadow Maps

Instant Radiosity 기반 [ism08]

Indirect Lighting은 매우 부드럽게 변함

VPL의 기여도는 매우 작음

Imperfect Shadow Maps

Low Quality Depth Maps로 충분– Point-Based Rendering으로 Depth Map 생성

Imperfect Shadow Maps

Point-Based Depth Maps을 이용한 렌더링

Pull-Push Hole Filling은 인접 Depth를 이용한 평균

Imperfect Shadow Maps

Result– nVidia 8800GTX

Imperfect Shadow Maps

Result: Bounce– 1024 x 1024, nVidia 8800GTX

14.0fps, 1024 VPL 7.5fps, +256 VPL(bounce) 5.5fps, +256 VPL(bounce) * 2

Imperfect Shadow Maps

Result: Comparison

ISM, 11fps, 256^2, 8k VPL Path Tracing, hours

CLPV

Cascaded Light Propagation Volumes [clpv09] [clpv10a] [clpv10b]

Propagation Volumes– lit surfaces 샘플링, 2차 라이트 소스– 3D Grid 안에 Clustering– 각각의 셀에 전파

RSM 3D Cell에 Clustering 전파

CLPV

Sampling– RSM 기반 샘플링 Depth

NormalsNormals

AlbedoAlbedo

RSMLit Surfel 샘플링

CLPV

Clustering

3D Cell에 Clustering

CLPV

Propagation

VPL

VPL

VPL

RSM Radiance Volume Clustering정규화된 Grid Cell에 SH로 표현

인접 Cell에 전파, 반복

CLPV

Propagation

0 Iterations, only Injection

CLPV

Propagation

4 Iterations after Injection

CLPV

Propagation

6 Iterations

CLPV

Propagation

8 Iterations

CLPV

DepthDepthDepthDepth

NormalsNormalsNormalsNormals

AlbedoAlbedoAlbedoAlbedo

DepthDepth

NormalsNormals

AlbedoAlbedo

CLPV

Cascaded– Multi-Resolution Approach– Cascaded Shadow Maps와 유사– 근접한 곳에 더 디테일한 정보– 렌더링시에 해상도별 동시 참조

3단계 Cascaded LPV

CLPV

Global Illumination Off

CLPV

Global Illumination On / 1 LPV

CLPV

Global Illumination On / 3 LPVs

CLPV

높은 성능– 32^3 Grid, 8 Iterations, 1280 x 720– GTS250 2.4ms (RSM 256 x 256)– Xbox360 2.4ms (RSM 128 x 128)– PS3 3.0ms (RSM 128 x 128)– Frame Skipping 및 Camera 변화에 따른 조절로 1~2ms 수준 최적화

GPU Friendly

안정적인 결과– Scene 복잡도 무관– Flicker-Free

토의 및 결론

Lighting Keywords– Lightmap– Image Based Lighting– Deferred Lighting– Real-Time GI

환경, 품질, 성능에 따라 선택, 혼용

GI로 수렴될 것으로 예상?!

참고 문헌

[cu98] The Cornell Box http://www.graphics.cornell.edu/online/box/

[sc09] Real-Time Global Illumination for Dynamic Scenes, Siggraph Course, Carsten Dachsbacher, Jan Kautz, 2009

[ssdo09] Approximating Dynamic Global Illumination in Screen Space, Tobias Ritschel, Thorsten Grosch, Hans-Peter Seidel, I3D, 2009

[rsm05] Reflective shadow maps, Carsten Dachsbacher and Marc Stamminger, I3D, 2005

[sii07] Splatting Indirect Illumination, Carsten Dachsbacher and Marc Stamminger, 2007

참고 문헌

[ir97] Instant radiosity, Alexander Keller, SIGGRAPH, 1997

[ir08] Instant Radiosity An Approach for Real-Time Global Illumination, Martin Kinkelin and Christian Liensberger, 2008

[ism08] Imperfect shadow maps for efficient computation of indirect illumination, Tobias Ritschel et al., SIGGRAPH Asia, 2008

[clpv09] Light Propagation Volumes in CryEngine 3, Anton Kaplanyan, SIGGRAPH Course, 2009

[clpv10a] Real-time Diffuse Global Illumination in CryENGINE 3, Anton Kaplanyan, SIGGRAPH Course, 2010

[clpv10b] Cascaded Light Propagation Volumes for Real Time Indirect Illumination, Anton Kaplanyan and Carsten Dachsbacher, I3D, 2010

top related