SlideShare a Scribd company logo
Hierarchical Z-Buffer Occlusion Culling
    – Generating Occlusion Volumes

                                Author : Nick Darnell
                                       ncsoft 이재윤




              http://cafe.naver.com/shader
| Goal




         http://cafe.naver.com/shader
| About the HZB-OC




              By 가내수공
              업!




           http://cafe.naver.com/shader
| About the HZB-OC




           http://cafe.naver.com/shader
| About the HZB-OC




           어떻게?




           http://cafe.naver.com/shader
| About the HZB-OC




           http://cafe.naver.com/shader
| About the HZB-OC




Bounding mesh의 가장 가까운 점과 depth buffer 의 값을 비교


                http://cafe.naver.com/shader
| About the HZB-OC


       Occluder를 만들

    Auto generating system

           이 필요함


           http://cafe.naver.com/shader
| Overview
1. Find all the voxels inside a mesh

2. Find the densest voxel in the volume

3. Expand a box from 2 until collide with surface

4. Repeat 2-3 until some terminal condition

5. Filter small/useless box

6. Use a CSG to merge the created boxes

                   http://cafe.naver.com/shader
| Focus on
• Conservativeness
  – Occluder가 mesh의 surface를 넘어가면 안됨
• Simplicity
  – 당연하게도, Occluder mesh는 적은 triangle로 구성
• Volume conservation
  – 간단한 모양이지만, original mesh 와 비슷해야 함
• Dynamic
  – 게임에는 움직이는 커다란 occluders 혹은 파괴 가능한
    wall이 존재


                http://cafe.naver.com/shader
Step 1:
| Voxelization
• [Schwarz 2010] 참고1)

• Solid / Surface voxelization                                            n
                                                           P+dP    V0
• Overlap test
                                                       B           T
  – Condition                                                 V1          V2
                                             P
     1) T를 포함한 평면이 B와 overlap

     2) xy, yz, xz 평면에 proj. 한 T와 B가 overlap


                1) Fast Parallel Surface and Solid Voxelization on GPUs
                        http://cafe.naver.com/shader
Step 1:
| Voxelization
• For the condition 1)




     • n : T’s normal, c : critical point
  and check below




                          http://cafe.naver.com/shader
Step 1:
| Voxelization
• For the condition 2)
  – Utilize edge functions [Pineda 1988]




                     http://cafe.naver.com/shader
Step 2:
| Find the highest density voxel
• 다음 step인 box expansion과 iteration 하며
  – Mesh의 가장 내부에 있는 point 를 계산

  – Empty voxel도 검색
    • Empty voxel : Box expansion시 box에 의해 enclosed된 voxel




                    http://cafe.naver.com/shader
Step 3:
| Box expansion
• 이전 step에서 찾은 densest voxel의 위치에 13 크
 기의 box 생성

• Iterative 하게 각 방향으로 box 확장

• AAB는 Non-right angle model에 최적화되지 않
 음 -> OBB로의 가능성



              http://cafe.naver.com/shader
Step 4:
| Repeat step 2-3
• 종료 조건
 – Mesh volume이 정해진 % 이하로 남았을 때

 – 마지막으로 생성한 box가 확장된 크기가 전체 volume
   에 비해 정해진 % 이하일 때

 – 최대 box 개수를 미리 설정

 – 등등..



             http://cafe.naver.com/shader
Step 5:
| Filter boxes
• 자기는 안 썼지만 쓰면 좋을 수도 있다는..

• 사용한 Stopping condition에 따라 다양하게 적용
 가능
  – Condition엔 부합하지만 너무 작은 box 들을 제거

  – 등등..




                 http://cafe.naver.com/shader
Step 6:
| Merge boxes with CSG
• Constructive Solid Geometry




       Union          Difference                 Intersection



• Real-time CSG in Game Development Tools.

                  http://cafe.naver.com/shader
| Results




            http://cafe.naver.com/shader

More Related Content

PPTX
10_Raytracing Introduction
PDF
Subdivision theory
PPTX
Around the World in 80 Shaders
PPTX
Implements Cascaded Shadow Maps with using Texture Array
PPTX
SPU Assisted Rendering
PPTX
Calibrating Lighting and Materials in Far Cry 3
PPTX
A Bizarre Way to do Real-Time Lighting
PPTX
Hierachical z Map Occlusion Culling
10_Raytracing Introduction
Subdivision theory
Around the World in 80 Shaders
Implements Cascaded Shadow Maps with using Texture Array
SPU Assisted Rendering
Calibrating Lighting and Materials in Far Cry 3
A Bizarre Way to do Real-Time Lighting
Hierachical z Map Occlusion Culling

Similar to Hierarchical z buffer occlusion culling (20)

PDF
[IGC2018] 유영천 개발자 - Voxel기반 네트워크 게임 최적화기법
PDF
Voxel based game_optimazation_relelase
PDF
Voxelizaition with GPU
PDF
빠른 렌더링을 위한 오브젝트 제외 기술
PDF
Sw occlusion culling
PPTX
[박민근] 3 d렌더링 옵티마이징_2
PDF
Modern gpu optimize
PDF
Modern gpu optimize blog
PPTX
실전프로젝트 정서경 양현찬
PPTX
5강 알파와알파소팅
PPTX
크게, 아름답게,빠르게, 일관되게 만들기: Just Cause 2 개발에서 배운 교훈들 (GPU Pro)
PDF
[GEG1] 3.volumetric representation of virtual environments
PDF
Volumetric Fog
PDF
[Kgc2013] 모바일 엔진 개발기
PDF
Unity Surface Shader for Artist 04
PDF
NDC2016 프로젝트 A1의 AAA급 캐릭터 렌더링 기술
PDF
Real-time near-field global illumination based on a voxel model
PPTX
[0312 조진현] good bye dx9
PDF
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
PDF
2017 12 09_데브루키_리얼타임 렌더링_입문편(3차원 그래픽스[저자 : 한정현] 참조)
[IGC2018] 유영천 개발자 - Voxel기반 네트워크 게임 최적화기법
Voxel based game_optimazation_relelase
Voxelizaition with GPU
빠른 렌더링을 위한 오브젝트 제외 기술
Sw occlusion culling
[박민근] 3 d렌더링 옵티마이징_2
Modern gpu optimize
Modern gpu optimize blog
실전프로젝트 정서경 양현찬
5강 알파와알파소팅
크게, 아름답게,빠르게, 일관되게 만들기: Just Cause 2 개발에서 배운 교훈들 (GPU Pro)
[GEG1] 3.volumetric representation of virtual environments
Volumetric Fog
[Kgc2013] 모바일 엔진 개발기
Unity Surface Shader for Artist 04
NDC2016 프로젝트 A1의 AAA급 캐릭터 렌더링 기술
Real-time near-field global illumination based on a voxel model
[0312 조진현] good bye dx9
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
2017 12 09_데브루키_리얼타임 렌더링_입문편(3차원 그래픽스[저자 : 한정현] 참조)
Ad

Hierarchical z buffer occlusion culling

  • 1. Hierarchical Z-Buffer Occlusion Culling – Generating Occlusion Volumes Author : Nick Darnell ncsoft 이재윤 http://cafe.naver.com/shader
  • 2. | Goal http://cafe.naver.com/shader
  • 3. | About the HZB-OC By 가내수공 업! http://cafe.naver.com/shader
  • 4. | About the HZB-OC http://cafe.naver.com/shader
  • 5. | About the HZB-OC 어떻게? http://cafe.naver.com/shader
  • 6. | About the HZB-OC http://cafe.naver.com/shader
  • 7. | About the HZB-OC Bounding mesh의 가장 가까운 점과 depth buffer 의 값을 비교 http://cafe.naver.com/shader
  • 8. | About the HZB-OC Occluder를 만들 Auto generating system 이 필요함 http://cafe.naver.com/shader
  • 9. | Overview 1. Find all the voxels inside a mesh 2. Find the densest voxel in the volume 3. Expand a box from 2 until collide with surface 4. Repeat 2-3 until some terminal condition 5. Filter small/useless box 6. Use a CSG to merge the created boxes http://cafe.naver.com/shader
  • 10. | Focus on • Conservativeness – Occluder가 mesh의 surface를 넘어가면 안됨 • Simplicity – 당연하게도, Occluder mesh는 적은 triangle로 구성 • Volume conservation – 간단한 모양이지만, original mesh 와 비슷해야 함 • Dynamic – 게임에는 움직이는 커다란 occluders 혹은 파괴 가능한 wall이 존재 http://cafe.naver.com/shader
  • 11. Step 1: | Voxelization • [Schwarz 2010] 참고1) • Solid / Surface voxelization n P+dP V0 • Overlap test B T – Condition V1 V2 P 1) T를 포함한 평면이 B와 overlap 2) xy, yz, xz 평면에 proj. 한 T와 B가 overlap 1) Fast Parallel Surface and Solid Voxelization on GPUs http://cafe.naver.com/shader
  • 12. Step 1: | Voxelization • For the condition 1) • n : T’s normal, c : critical point and check below http://cafe.naver.com/shader
  • 13. Step 1: | Voxelization • For the condition 2) – Utilize edge functions [Pineda 1988] http://cafe.naver.com/shader
  • 14. Step 2: | Find the highest density voxel • 다음 step인 box expansion과 iteration 하며 – Mesh의 가장 내부에 있는 point 를 계산 – Empty voxel도 검색 • Empty voxel : Box expansion시 box에 의해 enclosed된 voxel http://cafe.naver.com/shader
  • 15. Step 3: | Box expansion • 이전 step에서 찾은 densest voxel의 위치에 13 크 기의 box 생성 • Iterative 하게 각 방향으로 box 확장 • AAB는 Non-right angle model에 최적화되지 않 음 -> OBB로의 가능성 http://cafe.naver.com/shader
  • 16. Step 4: | Repeat step 2-3 • 종료 조건 – Mesh volume이 정해진 % 이하로 남았을 때 – 마지막으로 생성한 box가 확장된 크기가 전체 volume 에 비해 정해진 % 이하일 때 – 최대 box 개수를 미리 설정 – 등등.. http://cafe.naver.com/shader
  • 17. Step 5: | Filter boxes • 자기는 안 썼지만 쓰면 좋을 수도 있다는.. • 사용한 Stopping condition에 따라 다양하게 적용 가능 – Condition엔 부합하지만 너무 작은 box 들을 제거 – 등등.. http://cafe.naver.com/shader
  • 18. Step 6: | Merge boxes with CSG • Constructive Solid Geometry Union Difference Intersection • Real-time CSG in Game Development Tools. http://cafe.naver.com/shader
  • 19. | Results http://cafe.naver.com/shader