Content uploaded by Matthias Trapp
Author content
All content in this area was uploaded by Matthias Trapp on Jan 02, 2019
Content may be subject to copyright.
Geometry Batching Using Texture-Arrays
Matthias Trapp, Jürgen Döllner
Hasso Plattner Institute, University of Potsdam, Germany
INTRODUCTION
Context: Rendering of Complex 3D Virtual Environments
Virtual 3D City Model of Boston: 5,680,317 Vertices + 864 Light Texture Maps
Context: Rendering of Complex 3D Virtual Environments
Colonia 3D: 1,768,374 Vertices + 204 Diffuse Texture Maps
What is Geometry Batching?
Forward Rendering:
▪GPU is SIMD processor: pipelined operations on primitive streams
▪High number of draw calls can stall pipeline and yield less efficiency [Wloka, 2003]
▪Geometry batching = Group rendering primitives to large primitive batches
N0
T0
N1
G0
T1
G1
N2
T2
G2
N3
T3
G3
N0
G0…G3
T0
T1T2
T3
Original 3D Scene Batched 3D Scene
3D Virtual Environments and Textures
Observations on 3D Virtual Environments:
▪Usually high geometric complexity
▪High amount of textures (e.g., facade texture or light maps)
Texture-Atlas Examples:
Light Map Texture Atlas Diffuse Texture Atlas Facade Texture Atlas
Causes of Batch-Size Limitations
Space vs. Quality Trade-off depends on:
▪Batch size b = number of primitives grouped within a geometry batch
▪Texture-atlas segmentation algorithm = how many primitive are covered by a texture atlas
▪Number of primitives limited by maximal texture resolution supported by hardware
Basic Idea of Texture-Array Batching:
1. Bin meshes and textures according to its type, resolution, and format
2. Combine binned texture to respective texture-arrays and store indirection mapping
3. Combine binned 3D meshes/batches to larger geometry batches
Single Textures Texture Atlas Texture Array
Batching using Texture-Arrays
Problem Statement:
1. Binning: How to pre-process 3D scene to create texture-array batches?
2. Storage: How to represent required data structures on GPU?
3. Rendering: How to resolve indirection during rending of texture-array batches?
Texture Atlases 2D Texture Array Final Rendering
APPROACH
Overview of Texture-Array Batching
Preprocessing Stage:
▪Extract 3D meshes and associated textures (A)
▪Generate texture-array batches (B)
Rendering Stage:
▪Upload batches and texture arrays to GPU
▪Rendering batches and sampling texture-arrays (C)
GPU-based Data Structures and Rendering
GPU-based Data Structures
Texture-array representation (TAi):
▪OpenGL and Direct3D: 2D texture arrays
Texture-array mapping representation (TAEi):
▪Constant uniform arrays / uniform buffers exceeds limits
▪Texture buffer objects to encode texture array entries
▪Space complexity:
Alternatives for representation of index mapping (TAM):
1. Indices for each texture unit as additional per-vertex attribute
2. Modification of UV texture coordinates by adding a component
Texture-Array Sampling (OpenGL)
RESULTS & DISCUSSION
Performance Test
Test Setups:
▪Setup 1: NVIDIA 8800 GTS, 640 MB VRAM (Athlon Dual Core 4200+, 2.21 GHz 2 GB RAM)
▪Setup 2: NVIDIA GTX 280, 1GB VRAM (Intel CoreDuo E 8400, 3GHz, 3.25 GB RAM)
Results:
Conclusions
Limitations:
▪Same as texture atlases: wrapping of texture coordinates (e.g., repeat or mirror)
Future Work:
▪Combine approach with sparse textures (OpenGL: GL_ARB_sparse_texture)
Summary:
▪Pre-processing algorithm for textures and texture arrays
▪Counterbalance hardware limitations texture resolutions for batching
▪Easy to implement (rapid prototyping and static scenes)