Matthias Trapp , Jürgen Döllner Hasso-Plattner-Institute, University of Potsdam, Germany 9 th  June 2008 University of Manchester Efficient Representation of Layered Depth Images for Real-time Volumetric Tests
Motivation: Volumetric Tests … determine if a 3D point is  inside or outside a given volume Areas of application: Generalized clipping, Rendering with hybrid styles, 3D magic lenses,… Characteristics: Volume representation = LDI Test performed in shader program Applicable in real-time
LDI Representation of Solid Meshes
Depth-Peeling to 3D Textures Algorithm for LDI creation: Setup orthographic projection, adjust near/far planes Determine depth complexity of shape Create and initialize 3D texture (LDI) Depth-peel shape: Render-to-texture (into slice of 3D texture) Use linear depth buffer values GLSL fragment shader for 2 nd  depth test (SM4)
Volumetric Parity Test (VPT) Algorithm “ to determine if a point is  inside  or  outside a complex 3D volume represented by an LDI” Given:  arbitrary 3D point:   Requested:  Boolean parity: Solution: Transformation into LDI texture space: Perform  ray-marching  through depth maps
Ray-Marching through LDI Texture Space Algorithm: Construct ray  R : Sample form each slice: Compare depth values:
Shader Implementation (GLSL)
Limitations of Current Representation Memory Consumptions: 3D texture size:  resolution 2  * d   Usually sparsely utilized Depth-Peeling Performance: Depends on depth complexity of shape Ray-Marching Performance: Depends on number of texture samples So far:  d  samples per ray  necessary Goals: Minimal texture size:  Cropping, Compression Minimal peeling passes:  Viewpoint Selection Minimal texture samples per test:  Compression
Outline – Next Topics Preprocessing Pipeline: Overview  Viewpoint Selection Bounding Box Calculation & Cropping LDI Compression Algorithm Performance Results Limitations & Future Work Conclusions
Preprocessing Pipeline: Overview 5 Step process involves GPU and  CPU: Viewpoint selection  (O DP  ) Depth-peeling to 3D texture  (LDI)   Calculate axis-aligned bounding box  (AABB LDI  ) Perform cropping  (LDI Crop  ) Compress cropped texture  (LDI Comp  )
Viewpoint Selection Find viewpoint for LDI creation based on: Minimal depth complexity:  d Maximal texture coverage:  o Determine camera orientation Altering viewpoint on bounding sphere Determine and store in list : Depth complexity Altered camera orientation Texture coverage Sort list to obtain result
Bounding Box Calculation & Cropping
Compressing Depth Ranges Depth Ranges: Group depth values:  d i  = 0,…,d-1 DR j  = (S j ,E j  ), j = 0,…,d/2   Interval  [S j , E j  ], S j  = d 2j  , E j  = d  2j+1  denotes inside of volume Lossless Compression Idea: Sequential align all depth ranges of a Ray  R Fetch start ( S j  )  and end ( S j  )  with single instruction DR 0 DR 1
Compression Algorithm – Overview  Two-phase process: Extract  depth ranges from 3D texture into intermediate representation Pack  depth ranges from intermediate representation into 2D texture
Compression - Extract Phase Create intermediate representation: Prepare data structure for pack phase Read-back LDI from GPU Create 4 arrays from LDI: Index Segments ( IS offset,  IS ranges  ) Range Segments ( RS start ,  RS end )
Compression - Pack Phase Pack arrays into 2D texture Texture format: Luminance-Alpha Float point precision: unclamped values Texture resolution: Store successively: IS offset  , RS start   in luminance  channel IS ranges  , RS end  in alpha channel Issues: 2D texture format introduces unwrapping step in decompression Better: 1D texture, but resolution limited to 8192 pixel Possible Solution: Uniform Buffer (NVIDIA G80) + Geometry Shader
VPT for Compressed LDI
Performance Results 23,232 34,344 2,903 6,146 768 994 #Vertex 0.58 0.32 0.39 0.58 1.44 1.78 C ration 1,835,528 1,089,288 1,204,352 3,317,888 3,011,058 3,742,848 M comp 3,143,880 3,358,720 3,026,688 5,683,200 2,097,152 2,097,152 M crop 9.265 12.187 8.469 7.172 3.085 2.532 t view 25.875 73.078 2.156 25.766 0.187 0.187 t peel 0.125 0.078 0.09 0.219 0.297 0.437 t comp 0.2 0.313 0.234 0.203 0.078 0.077 t crop 12 18 16 12 6 2 d max 6 10 8 6 2 2 d min Knot Hebe Cow Potato Complex Sphere
Limitations & Future Work Limitations: Specific approach for depth ranges Too much instruction for decompression Small compression ratio 1:2-3 GPU & CPU (hybrid) approach Future Work: Toward a complete GPU implementation: (Bounding box calculation, cropping, compression) Main Goal: enable preprocessing in real-time New filtering concepts necessary to compensate undersampling / alaising artefacts
Conclusions Efficient LDI Representation trough: Automatic viewpoint selection Fast bounding box calculation & cropping Lossless LDI compression  Decompression algorithm applicable in shader Compression Characteristics: Ratio 1:2-3 (common for lossless compression) Effective for non-convex meshes with high depth complexity Compression should be avoided for symmetric convex meshes Preprocessing, no real-time performance Future Work: Implementation fully GPU-based
Questions ? Contact: Matthias Trapp [email_address] Computer Graphics Systems Group Prof. Dr. Jürgen Döllner www.hpi.uni-potsdam.de/3d Researchgroup 3D-Geoinformation www.3dgi.de

Efficient LDI Representation (TPCG 2008)

  • 1.
    Matthias Trapp ,Jürgen Döllner Hasso-Plattner-Institute, University of Potsdam, Germany 9 th June 2008 University of Manchester Efficient Representation of Layered Depth Images for Real-time Volumetric Tests
  • 2.
    Motivation: Volumetric Tests… determine if a 3D point is inside or outside a given volume Areas of application: Generalized clipping, Rendering with hybrid styles, 3D magic lenses,… Characteristics: Volume representation = LDI Test performed in shader program Applicable in real-time
  • 3.
  • 4.
    Depth-Peeling to 3DTextures Algorithm for LDI creation: Setup orthographic projection, adjust near/far planes Determine depth complexity of shape Create and initialize 3D texture (LDI) Depth-peel shape: Render-to-texture (into slice of 3D texture) Use linear depth buffer values GLSL fragment shader for 2 nd depth test (SM4)
  • 5.
    Volumetric Parity Test(VPT) Algorithm “ to determine if a point is inside or outside a complex 3D volume represented by an LDI” Given: arbitrary 3D point: Requested: Boolean parity: Solution: Transformation into LDI texture space: Perform ray-marching through depth maps
  • 6.
    Ray-Marching through LDITexture Space Algorithm: Construct ray R : Sample form each slice: Compare depth values:
  • 7.
  • 8.
    Limitations of CurrentRepresentation Memory Consumptions: 3D texture size: resolution 2 * d Usually sparsely utilized Depth-Peeling Performance: Depends on depth complexity of shape Ray-Marching Performance: Depends on number of texture samples So far: d samples per ray necessary Goals: Minimal texture size: Cropping, Compression Minimal peeling passes: Viewpoint Selection Minimal texture samples per test: Compression
  • 9.
    Outline – NextTopics Preprocessing Pipeline: Overview Viewpoint Selection Bounding Box Calculation & Cropping LDI Compression Algorithm Performance Results Limitations & Future Work Conclusions
  • 10.
    Preprocessing Pipeline: Overview5 Step process involves GPU and CPU: Viewpoint selection (O DP ) Depth-peeling to 3D texture (LDI) Calculate axis-aligned bounding box (AABB LDI ) Perform cropping (LDI Crop ) Compress cropped texture (LDI Comp )
  • 11.
    Viewpoint Selection Findviewpoint for LDI creation based on: Minimal depth complexity: d Maximal texture coverage: o Determine camera orientation Altering viewpoint on bounding sphere Determine and store in list : Depth complexity Altered camera orientation Texture coverage Sort list to obtain result
  • 12.
  • 13.
    Compressing Depth RangesDepth Ranges: Group depth values: d i = 0,…,d-1 DR j = (S j ,E j ), j = 0,…,d/2 Interval [S j , E j ], S j = d 2j , E j = d 2j+1 denotes inside of volume Lossless Compression Idea: Sequential align all depth ranges of a Ray R Fetch start ( S j ) and end ( S j ) with single instruction DR 0 DR 1
  • 14.
    Compression Algorithm –Overview Two-phase process: Extract depth ranges from 3D texture into intermediate representation Pack depth ranges from intermediate representation into 2D texture
  • 15.
    Compression - ExtractPhase Create intermediate representation: Prepare data structure for pack phase Read-back LDI from GPU Create 4 arrays from LDI: Index Segments ( IS offset, IS ranges ) Range Segments ( RS start , RS end )
  • 16.
    Compression - PackPhase Pack arrays into 2D texture Texture format: Luminance-Alpha Float point precision: unclamped values Texture resolution: Store successively: IS offset , RS start in luminance channel IS ranges , RS end in alpha channel Issues: 2D texture format introduces unwrapping step in decompression Better: 1D texture, but resolution limited to 8192 pixel Possible Solution: Uniform Buffer (NVIDIA G80) + Geometry Shader
  • 17.
  • 18.
    Performance Results 23,23234,344 2,903 6,146 768 994 #Vertex 0.58 0.32 0.39 0.58 1.44 1.78 C ration 1,835,528 1,089,288 1,204,352 3,317,888 3,011,058 3,742,848 M comp 3,143,880 3,358,720 3,026,688 5,683,200 2,097,152 2,097,152 M crop 9.265 12.187 8.469 7.172 3.085 2.532 t view 25.875 73.078 2.156 25.766 0.187 0.187 t peel 0.125 0.078 0.09 0.219 0.297 0.437 t comp 0.2 0.313 0.234 0.203 0.078 0.077 t crop 12 18 16 12 6 2 d max 6 10 8 6 2 2 d min Knot Hebe Cow Potato Complex Sphere
  • 19.
    Limitations & FutureWork Limitations: Specific approach for depth ranges Too much instruction for decompression Small compression ratio 1:2-3 GPU & CPU (hybrid) approach Future Work: Toward a complete GPU implementation: (Bounding box calculation, cropping, compression) Main Goal: enable preprocessing in real-time New filtering concepts necessary to compensate undersampling / alaising artefacts
  • 20.
    Conclusions Efficient LDIRepresentation trough: Automatic viewpoint selection Fast bounding box calculation & cropping Lossless LDI compression Decompression algorithm applicable in shader Compression Characteristics: Ratio 1:2-3 (common for lossless compression) Effective for non-convex meshes with high depth complexity Compression should be avoided for symmetric convex meshes Preprocessing, no real-time performance Future Work: Implementation fully GPU-based
  • 21.
    Questions ? Contact:Matthias Trapp [email_address] Computer Graphics Systems Group Prof. Dr. Jürgen Döllner www.hpi.uni-potsdam.de/3d Researchgroup 3D-Geoinformation www.3dgi.de