SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Real-Time
Near-Field Global Illumination
Based on a Voxel Model

             발표 : 이재윤, ncsoft
목표
• Near-field global illumination
목표
• With voxelization
장점?
• Cost가 geometry complexity 와 무관

• 빠른 voxelization 기술이 많이 존재

• Screen-space GI 의 artifact 제거
  – Blocker나 sender가 화면에서 사라지면 해당 lighting
    효과도 사라지는 현상
Voxelization
• 은 무엇?


  다수의 Geometric entities로 구성된 scene




          3차원 regular grid space
Voxelization
• 종류
 – Binary voxelization
    • Cell이 Geometry를 표현 하는지 아닌지에 대한 정보만 저장

 – Multi-valued voxelization
    • Material이나 normal등의 추가정보도 cell에 함께 저장

 – Boundary voxelization
    • Object의 surfaces만 표현

 – Solid voxelization
    • Object의 내부까지 채워진 형태로 표현
Voxelization
• 본 논문에선…
 – Texture atlas라는 기법을 이용한 voxelizaiton 적용
   • Boundary voxelization의 일종

   • Binary(2D Tex) / multi-valued(3D Tex) 모두 적용 가능

   • Obj의 형태에 제한이 없음

   • 원본 Obj에 미리 uv mapping이 되어있어야 함
전체 알고리즘
3D model


Texture atlas


Fill voxel grid


Render all voxel
Texture atlas
• Texture atlas 란?
  – 여러 sub texture 들을 포함한 큰 texture

  – Rendering 시 Draw call 감소
                                      Pros.
  – Texture state switching 감소

  – 사용을 위한 uv의 변경이 필요
                                      Cons.
  – Texture tiling 불가
Texture atlas
• With Depth peeling
  – Peeling?




  – 즉, depth의 level 을 기준으로 껍질을 깐다!!
Texture atlas
           nearest
동일 layer



동일 depth
Texture atlas
• 추가 정보
 – Atlas texture에 해당 pixel의 original world position
   추가
    • Voxel이 생성될 위치
Voxel grid
• Mip-map의 level에 따라 resolution은 변하지만
 depth 수(bit 수)는 변하지 않음
  – Depth 보존 -> 정확한 depth traversal
Voxel grid
• 생성
 – Atlas texture의 texel을 읽어옴

 – 해당 texel의 world pos.를 grid에서의 위치로
  projection

 – 3D좌표에서 계산해 낸 depth에 대응하는 bit 을 1로
  setting
Voxel grid
• 생성
    – Mip-map : 주변 4-texel의 OR 연산으로 생성
         • Mip-map을 이용한 hierarchical traversal을 위해




resolution
Voxelization performance
• Voxelization

 Voxel-grid resolution   Time (ms)   Vertices   Atlas resolution
       642 x 128           0.21        24k           2242
      1282 x 128           0.27        65k           3682
      2562 x 128           0.60       285k           7682
      5122 x 128           1.22       790k           12802
Ray-voxel intersection test
• Indirect lighting 시 필요
  – 각 voxel 별로 sample direction에 대한 one bound
    voxel 계산

• Octree 탐색과 유사
Ray-voxel intersection test
1. Traversal start : scene에서 ray의 시작지점

2. Start voxel을 포함하는 texel의 BB 생성

3. BB와 ray의 충돌검사로 ray의 시작/끝 점 계산
  = ray bitmask

4. Ray bitmask 와 voxel의 bitmask와의 재귀적 충
  돌검사
Ray-voxel intersection test
 – 검사조건
   • 충돌(O) : Mip-map--

   • 충돌(X) : Mip-map++,

            Ray의 시작 점을 BB와의 마지막 충돌 점으로 이동

 – 종료조건
   • Ray의 길이 == 0 || hit point 존재

 – 시작 mip-map level : 사용자 지정 가능
Ray-voxel intersection test
Ray-voxel intersection test
Ray-voxel intersection test
Ray-voxel intersection test
Ray-voxel intersection test
Ray-voxel intersection test
Ray-voxel intersection test
Near-field indirect illumination
• Reflective Shadow Map(RSM) 생성
  – Light space 에서 보이는 pixel이 one-bound light
   source

  – Light position에서의 각 픽셀의 Direct Luminance,
   position, normal 값 저장
Near-field indirect illumination
• For Indirect light
   – Receiver x에서 최대 반지름 r에 대해 N개의 Ray 계산

   – ray당 1pass씩 여러 패스로 계산하는 것이 속도 향상

   – Ray별로 first intersection point 계산
      • Intersection voxel에서 direct radiance 𝐿i 계산

      • back-proj.에 의해 RSM에서의 Hit point의 𝐿i 값 추출 가능
Near-field indirect illumination
• 𝐿i 의 validation 조건
  – Hit-point의 3D 위치와 RSM상의 위치의 거리 < ε
     • ε = max(υ, s/cos(α) * z/znear)

     • υ: voxelization discretization

     • s: RSM pixel size

     • α: normal orientation
Near-field indirect illumination

               𝜌 𝑋    𝑁
                           𝐿 𝑖 𝑋, 𝜔 𝑖 cos 𝜃
       𝐿0   𝑋 ≈ 𝜋
                 𝑁               𝑃(𝜔 𝑖 )
                     𝑖=0
Near-field indirect illumination
Diffuse BRDF at X                    𝜔 𝑖 중 visible 한 hit-point의 radiance


                       𝜌 𝑋     𝑁
                                    𝐿 𝑖 𝑋, 𝜔 𝑖 cos 𝜃
               𝐿0   𝑋 ≈ 𝜋
                         𝑁                𝑃(𝜔 𝑖 )
                              𝑖=0
                                                       N sample direction

                                        𝑃(𝜔 𝑖 ) = cos 𝜃 / 𝜋
                                        𝜃 = surface normal과 𝜔 𝑖 의 각
                               𝑁
                        𝜌 𝑋
               𝐿0   𝑋 ≈             𝐿 𝑖 𝑋, 𝜔 𝑖 cos 𝜃
                          𝑁
                              𝑖=0
결과
• 측정환경
 – GTX 570(1280MB RAM)

 – Indirect light 계산을 위한 blur filter 사용
결과
결과
결과
결과
결과
결론
• Voxel기반의 GI 기법 제시
  – Real-time near-field illumination 가능

  – Interactive GI 가능

• 새로운 atlas-based voxelization 제시
  – 더불어 개선된 ray-voxel 충돌검사 제시
|감사합니다.

Weitere ähnliche Inhalte

Andere mochten auch

Unity3D Developer Network Study 3rd
Unity3D Developer Network Study 3rdUnity3D Developer Network Study 3rd
Unity3D Developer Network Study 3rdCody Yun
 
09_Voxel rendering
09_Voxel rendering09_Voxel rendering
09_Voxel renderingnoerror
 
10_무한 평면과 놀기
10_무한 평면과 놀기10_무한 평면과 놀기
10_무한 평면과 놀기noerror
 
Gpg 1.13 ~ 1.14
Gpg 1.13 ~ 1.14Gpg 1.13 ~ 1.14
Gpg 1.13 ~ 1.14sj k
 
옥트리의 구축
옥트리의 구축옥트리의 구축
옥트리의 구축sj k
 
Game programing gems 4.11
Game programing gems 4.11Game programing gems 4.11
Game programing gems 4.11Sehyeon Nam
 
[Gpg2권 박민근] 4.4 압축된 축 정렬 경계상자 트리
[Gpg2권 박민근] 4.4 압축된 축 정렬 경계상자 트리[Gpg2권 박민근] 4.4 압축된 축 정렬 경계상자 트리
[Gpg2권 박민근] 4.4 압축된 축 정렬 경계상자 트리MinGeun Park
 
[박민근] 3 d렌더링 옵티마이징_3 공간분할
[박민근] 3 d렌더링 옵티마이징_3 공간분할[박민근] 3 d렌더링 옵티마이징_3 공간분할
[박민근] 3 d렌더링 옵티마이징_3 공간분할MinGeun Park
 
Game programing gems 3.4 3.6
Game programing gems 3.4 3.6Game programing gems 3.4 3.6
Game programing gems 3.4 3.6Sehyeon Nam
 
Game programing gems 4.17
Game programing gems 4.17Game programing gems 4.17
Game programing gems 4.17Sehyeon Nam
 
06_게임엔진구성
06_게임엔진구성06_게임엔진구성
06_게임엔진구성noerror
 
천만 사용자를 위한 AWS 아키텍처 보안 모범 사례 (윤석찬, 테크에반젤리스트)
천만 사용자를 위한 AWS 아키텍처 보안 모범 사례 (윤석찬, 테크에반젤리스트)천만 사용자를 위한 AWS 아키텍처 보안 모범 사례 (윤석찬, 테크에반젤리스트)
천만 사용자를 위한 AWS 아키텍처 보안 모범 사례 (윤석찬, 테크에반젤리스트)Amazon Web Services Korea
 

Andere mochten auch (12)

Unity3D Developer Network Study 3rd
Unity3D Developer Network Study 3rdUnity3D Developer Network Study 3rd
Unity3D Developer Network Study 3rd
 
09_Voxel rendering
09_Voxel rendering09_Voxel rendering
09_Voxel rendering
 
10_무한 평면과 놀기
10_무한 평면과 놀기10_무한 평면과 놀기
10_무한 평면과 놀기
 
Gpg 1.13 ~ 1.14
Gpg 1.13 ~ 1.14Gpg 1.13 ~ 1.14
Gpg 1.13 ~ 1.14
 
옥트리의 구축
옥트리의 구축옥트리의 구축
옥트리의 구축
 
Game programing gems 4.11
Game programing gems 4.11Game programing gems 4.11
Game programing gems 4.11
 
[Gpg2권 박민근] 4.4 압축된 축 정렬 경계상자 트리
[Gpg2권 박민근] 4.4 압축된 축 정렬 경계상자 트리[Gpg2권 박민근] 4.4 압축된 축 정렬 경계상자 트리
[Gpg2권 박민근] 4.4 압축된 축 정렬 경계상자 트리
 
[박민근] 3 d렌더링 옵티마이징_3 공간분할
[박민근] 3 d렌더링 옵티마이징_3 공간분할[박민근] 3 d렌더링 옵티마이징_3 공간분할
[박민근] 3 d렌더링 옵티마이징_3 공간분할
 
Game programing gems 3.4 3.6
Game programing gems 3.4 3.6Game programing gems 3.4 3.6
Game programing gems 3.4 3.6
 
Game programing gems 4.17
Game programing gems 4.17Game programing gems 4.17
Game programing gems 4.17
 
06_게임엔진구성
06_게임엔진구성06_게임엔진구성
06_게임엔진구성
 
천만 사용자를 위한 AWS 아키텍처 보안 모범 사례 (윤석찬, 테크에반젤리스트)
천만 사용자를 위한 AWS 아키텍처 보안 모범 사례 (윤석찬, 테크에반젤리스트)천만 사용자를 위한 AWS 아키텍처 보안 모범 사례 (윤석찬, 테크에반젤리스트)
천만 사용자를 위한 AWS 아키텍처 보안 모범 사례 (윤석찬, 테크에반젤리스트)
 

Ähnlich wie Real-time near-field global illumination based on a voxel model

Build Lightmap system
Build Lightmap systemBuild Lightmap system
Build Lightmap systemJaesik Hwang
 
Voxel based game_optimazation_relelase
Voxel based game_optimazation_relelaseVoxel based game_optimazation_relelase
Voxel based game_optimazation_relelaseYEONG-CHEON YOU
 
[IGC2018] 유영천 개발자 - Voxel기반 네트워크 게임 최적화기법
[IGC2018] 유영천 개발자 - Voxel기반 네트워크 게임 최적화기법[IGC2018] 유영천 개발자 - Voxel기반 네트워크 게임 최적화기법
[IGC2018] 유영천 개발자 - Voxel기반 네트워크 게임 최적화기법강 민우
 
제노블레이도 2 ray marching을사용한 구름 표현
제노블레이도 2 ray marching을사용한 구름 표현제노블레이도 2 ray marching을사용한 구름 표현
제노블레이도 2 ray marching을사용한 구름 표현민웅 이
 
[GEG1] 3.volumetric representation of virtual environments
[GEG1] 3.volumetric representation of virtual environments[GEG1] 3.volumetric representation of virtual environments
[GEG1] 3.volumetric representation of virtual environments종빈 오
 
Depth buffershadow
Depth buffershadowDepth buffershadow
Depth buffershadowMoonLightMS
 
[1023 박민수] 깊이_버퍼_그림자_1
[1023 박민수] 깊이_버퍼_그림자_1[1023 박민수] 깊이_버퍼_그림자_1
[1023 박민수] 깊이_버퍼_그림자_1MoonLightMS
 
[1023 박민수] 깊이_버퍼_그림자
[1023 박민수] 깊이_버퍼_그림자[1023 박민수] 깊이_버퍼_그림자
[1023 박민수] 깊이_버퍼_그림자MoonLightMS
 
Real-Time Global Illumination Techniques
Real-Time Global Illumination TechniquesReal-Time Global Illumination Techniques
Real-Time Global Illumination TechniquesJangho Lee
 
Convolutional neural networks
Convolutional neural networksConvolutional neural networks
Convolutional neural networksHyunjinBae3
 
120427 celluar texture
120427 celluar texture120427 celluar texture
120427 celluar textureCARROTCG
 
Hierarchical z buffer occlusion culling
Hierarchical z buffer occlusion cullingHierarchical z buffer occlusion culling
Hierarchical z buffer occlusion cullingJaeyun Lee
 
Anomaly Detection based on Diffusion
Anomaly Detection based on DiffusionAnomaly Detection based on Diffusion
Anomaly Detection based on Diffusionssuserbaebf8
 
실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬현찬 양
 
[0212 박민수]환경 매핑
[0212 박민수]환경 매핑[0212 박민수]환경 매핑
[0212 박민수]환경 매핑MoonLightMS
 
Screen space reflection
Screen space reflectionScreen space reflection
Screen space reflectionBongseok Cho
 
포인트 셰도우
포인트 셰도우포인트 셰도우
포인트 셰도우Sukwoo Lee
 

Ähnlich wie Real-time near-field global illumination based on a voxel model (20)

Build Lightmap system
Build Lightmap systemBuild Lightmap system
Build Lightmap system
 
Voxel based game_optimazation_relelase
Voxel based game_optimazation_relelaseVoxel based game_optimazation_relelase
Voxel based game_optimazation_relelase
 
[IGC2018] 유영천 개발자 - Voxel기반 네트워크 게임 최적화기법
[IGC2018] 유영천 개발자 - Voxel기반 네트워크 게임 최적화기법[IGC2018] 유영천 개발자 - Voxel기반 네트워크 게임 최적화기법
[IGC2018] 유영천 개발자 - Voxel기반 네트워크 게임 최적화기법
 
제노블레이도 2 ray marching을사용한 구름 표현
제노블레이도 2 ray marching을사용한 구름 표현제노블레이도 2 ray marching을사용한 구름 표현
제노블레이도 2 ray marching을사용한 구름 표현
 
[GEG1] 3.volumetric representation of virtual environments
[GEG1] 3.volumetric representation of virtual environments[GEG1] 3.volumetric representation of virtual environments
[GEG1] 3.volumetric representation of virtual environments
 
Bump Mapping
Bump MappingBump Mapping
Bump Mapping
 
Gpg study5.5
Gpg study5.5Gpg study5.5
Gpg study5.5
 
Depth buffershadow
Depth buffershadowDepth buffershadow
Depth buffershadow
 
[1023 박민수] 깊이_버퍼_그림자_1
[1023 박민수] 깊이_버퍼_그림자_1[1023 박민수] 깊이_버퍼_그림자_1
[1023 박민수] 깊이_버퍼_그림자_1
 
[1023 박민수] 깊이_버퍼_그림자
[1023 박민수] 깊이_버퍼_그림자[1023 박민수] 깊이_버퍼_그림자
[1023 박민수] 깊이_버퍼_그림자
 
Real-Time Global Illumination Techniques
Real-Time Global Illumination TechniquesReal-Time Global Illumination Techniques
Real-Time Global Illumination Techniques
 
Convolutional neural networks
Convolutional neural networksConvolutional neural networks
Convolutional neural networks
 
120427 celluar texture
120427 celluar texture120427 celluar texture
120427 celluar texture
 
Hierarchical z buffer occlusion culling
Hierarchical z buffer occlusion cullingHierarchical z buffer occlusion culling
Hierarchical z buffer occlusion culling
 
Anomaly Detection based on Diffusion
Anomaly Detection based on DiffusionAnomaly Detection based on Diffusion
Anomaly Detection based on Diffusion
 
7_조명.pptx
7_조명.pptx7_조명.pptx
7_조명.pptx
 
실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬
 
[0212 박민수]환경 매핑
[0212 박민수]환경 매핑[0212 박민수]환경 매핑
[0212 박민수]환경 매핑
 
Screen space reflection
Screen space reflectionScreen space reflection
Screen space reflection
 
포인트 셰도우
포인트 셰도우포인트 셰도우
포인트 셰도우
 

Real-time near-field global illumination based on a voxel model

  • 1. Real-Time Near-Field Global Illumination Based on a Voxel Model 발표 : 이재윤, ncsoft
  • 4. 장점? • Cost가 geometry complexity 와 무관 • 빠른 voxelization 기술이 많이 존재 • Screen-space GI 의 artifact 제거 – Blocker나 sender가 화면에서 사라지면 해당 lighting 효과도 사라지는 현상
  • 5. Voxelization • 은 무엇? 다수의 Geometric entities로 구성된 scene 3차원 regular grid space
  • 6. Voxelization • 종류 – Binary voxelization • Cell이 Geometry를 표현 하는지 아닌지에 대한 정보만 저장 – Multi-valued voxelization • Material이나 normal등의 추가정보도 cell에 함께 저장 – Boundary voxelization • Object의 surfaces만 표현 – Solid voxelization • Object의 내부까지 채워진 형태로 표현
  • 7. Voxelization • 본 논문에선… – Texture atlas라는 기법을 이용한 voxelizaiton 적용 • Boundary voxelization의 일종 • Binary(2D Tex) / multi-valued(3D Tex) 모두 적용 가능 • Obj의 형태에 제한이 없음 • 원본 Obj에 미리 uv mapping이 되어있어야 함
  • 8. 전체 알고리즘 3D model Texture atlas Fill voxel grid Render all voxel
  • 9. Texture atlas • Texture atlas 란? – 여러 sub texture 들을 포함한 큰 texture – Rendering 시 Draw call 감소 Pros. – Texture state switching 감소 – 사용을 위한 uv의 변경이 필요 Cons. – Texture tiling 불가
  • 10. Texture atlas • With Depth peeling – Peeling? – 즉, depth의 level 을 기준으로 껍질을 깐다!!
  • 11. Texture atlas nearest 동일 layer 동일 depth
  • 12. Texture atlas • 추가 정보 – Atlas texture에 해당 pixel의 original world position 추가 • Voxel이 생성될 위치
  • 13. Voxel grid • Mip-map의 level에 따라 resolution은 변하지만 depth 수(bit 수)는 변하지 않음 – Depth 보존 -> 정확한 depth traversal
  • 14. Voxel grid • 생성 – Atlas texture의 texel을 읽어옴 – 해당 texel의 world pos.를 grid에서의 위치로 projection – 3D좌표에서 계산해 낸 depth에 대응하는 bit 을 1로 setting
  • 15. Voxel grid • 생성 – Mip-map : 주변 4-texel의 OR 연산으로 생성 • Mip-map을 이용한 hierarchical traversal을 위해 resolution
  • 16. Voxelization performance • Voxelization Voxel-grid resolution Time (ms) Vertices Atlas resolution 642 x 128 0.21 24k 2242 1282 x 128 0.27 65k 3682 2562 x 128 0.60 285k 7682 5122 x 128 1.22 790k 12802
  • 17. Ray-voxel intersection test • Indirect lighting 시 필요 – 각 voxel 별로 sample direction에 대한 one bound voxel 계산 • Octree 탐색과 유사
  • 18. Ray-voxel intersection test 1. Traversal start : scene에서 ray의 시작지점 2. Start voxel을 포함하는 texel의 BB 생성 3. BB와 ray의 충돌검사로 ray의 시작/끝 점 계산 = ray bitmask 4. Ray bitmask 와 voxel의 bitmask와의 재귀적 충 돌검사
  • 19. Ray-voxel intersection test – 검사조건 • 충돌(O) : Mip-map-- • 충돌(X) : Mip-map++, Ray의 시작 점을 BB와의 마지막 충돌 점으로 이동 – 종료조건 • Ray의 길이 == 0 || hit point 존재 – 시작 mip-map level : 사용자 지정 가능
  • 27. Near-field indirect illumination • Reflective Shadow Map(RSM) 생성 – Light space 에서 보이는 pixel이 one-bound light source – Light position에서의 각 픽셀의 Direct Luminance, position, normal 값 저장
  • 28. Near-field indirect illumination • For Indirect light – Receiver x에서 최대 반지름 r에 대해 N개의 Ray 계산 – ray당 1pass씩 여러 패스로 계산하는 것이 속도 향상 – Ray별로 first intersection point 계산 • Intersection voxel에서 direct radiance 𝐿i 계산 • back-proj.에 의해 RSM에서의 Hit point의 𝐿i 값 추출 가능
  • 29. Near-field indirect illumination • 𝐿i 의 validation 조건 – Hit-point의 3D 위치와 RSM상의 위치의 거리 < ε • ε = max(υ, s/cos(α) * z/znear) • υ: voxelization discretization • s: RSM pixel size • α: normal orientation
  • 30. Near-field indirect illumination 𝜌 𝑋 𝑁 𝐿 𝑖 𝑋, 𝜔 𝑖 cos 𝜃 𝐿0 𝑋 ≈ 𝜋 𝑁 𝑃(𝜔 𝑖 ) 𝑖=0
  • 31. Near-field indirect illumination Diffuse BRDF at X 𝜔 𝑖 중 visible 한 hit-point의 radiance 𝜌 𝑋 𝑁 𝐿 𝑖 𝑋, 𝜔 𝑖 cos 𝜃 𝐿0 𝑋 ≈ 𝜋 𝑁 𝑃(𝜔 𝑖 ) 𝑖=0 N sample direction 𝑃(𝜔 𝑖 ) = cos 𝜃 / 𝜋 𝜃 = surface normal과 𝜔 𝑖 의 각 𝑁 𝜌 𝑋 𝐿0 𝑋 ≈ 𝐿 𝑖 𝑋, 𝜔 𝑖 cos 𝜃 𝑁 𝑖=0
  • 32. 결과 • 측정환경 – GTX 570(1280MB RAM) – Indirect light 계산을 위한 blur filter 사용
  • 38. 결론 • Voxel기반의 GI 기법 제시 – Real-time near-field illumination 가능 – Interactive GI 가능 • 새로운 atlas-based voxelization 제시 – 더불어 개선된 ray-voxel 충돌검사 제시