Title: Surface Representations for High Performance Processing
1Surface Representations for High Performance
Processing
- Nathan A. Carr
- University of Illinois Urbana-Champaign
- Feb. 13, 2005
2Modern Processor Design (Pessimism and Optimism)
cache
- CPU (pessimism)
- Designed for the worst case
- Assumes programs are single threaded,
synchronous, with data dependencies - Lots of cache
- GPU (optimism)
- Designed for the best case
- Assumes programs are massively multi-threaded
with little/no communication between threads. - Little/no data dependencies
- Less cache more chip space dedicated to ALUs
AMD Athlon 64 FX die
Nvidia GeForce 6800 Ultra die
3Performance and Possibility
- NV40 (Geforce 6)
- 225 million xtors
- 450mhz
- Pentium 4 EE chip
- 175 million xtors
- 3.2 Ghz
Stream Programming Environments Hanrahan,
2004
4Ray-Engine (2002) A Hybrid Approach
- Idea Use GPU as a SIMD stream processor to
perform ray cast queries. - Paralleled work done at Stanford.(Purcell et al.
S02) - Approach Let CPU do what it does best, and the
GPU do what it does best
Monte-Carlo
Monte-Carlo Photon Mapping
Carr Hart. The Ray Engine Graphics Hardware
2002.
5Idea Build a Compiler
- Transform old source code into programs that
execute in this hybrid processor environment. - Not and easy task transformations are too complex
for compilers alone! - Need compiler, language, and programmer support!
- Requires Programmer Support
- Re-write code to extract parallelism
- Re-design algorithms to be parallel
- Develop new constructs that ease this
transformation for a wide range of applications.
6We know how to work with 2D images..
- Compression
- jpg, png, wavelets, etc..
- progressive transmission
- Memory Layout
- row order, tiled, Hilbert curve, etc..
- Filtering
- smoothing, sharpening, blur, emboss, edge
detection, etc.. - Numerical Simulation
- Solve PDEs on regular grid
- Use finite differencing to derive stencils to
solve PDEs - Graphics Hardware Support
- GPUs are specifically designed for working with
images.
7What about 3D surfaces ??
3D Surface Painting
Stable Fluids Simulation
Laplacian Smoothing
8A Reduction From Surfaces To Images
O??2
?3
9Challenges of Surface Parametrization
Authalic
Conformal
Mean-value
L2 single-chart
L2 multi-chart
Area Distortion Metric
oversampled
undersampled
0.5
2.0
1.0
10Geometry Images
- Store geometric information (x,y,z coordinates)
into a set of images - Original triangle mesh is no longer needed
- Connectivity is implicit
- Use conventional image processing toolbox for
- Compression
- Progressive Transmission
- Filtering
- GPU processing
Single-chart Geometry Images Gu et al. (SIGGRAPH
02)
Multi-chart Geometry Images Sander et al. (SGP
04)
11Images are Square/Rectangular
- Objective Decompose mesh into a set of face
clusters such that each face cluster - Is homeomorphic to a disc ( e.g. can be flattened
without fold-over) - Flattens with low distortion
- Forms a (nearly) rectangular shape when flattened
12Lloyds Algorithm and K-means Clustering
13The Growth Process
14Clipping, Centering, and Re-orientation
15Global Parametrization
- Visit each patch
- Assign discrete texel lengths to each shared
boundary segments
4
8
10
6
8
16Global Parametrization
- Choose patch aspect ratio
- Select four corners, and divide boundary segment
intervals
4
4
4
10
6
8
17Forcing Continuity
- Assign patch vertices to the boundary
- Force Patch into perfect rectangle
- Linear solve
- Guarantees and embedding with no fold-over
4
4
4
10
6
8
18Optimization
19Seamless Square Patches Meshes
20Compression and Storage
- Rectangular Multi-Chart Geometry Images
21Whats This Stuff Good For
- Texture Mapping
- Procedural Solid Texturing
- Compression
- Progressive Transmission
- Subsurface Scattering (Light Transport)
- Fluid Simulation
- 3D Surface Painting
- GPU Acceleration
223D Mesh Filtering on Graphics Hardware
- Filters (think PhotoShop)
- Smoothing ( Laplacian ), Sharpening, etc..
- Parametrized patch images provide a regular grid
over the surface - Just apply stencils to regular grid
- Use differential geometry to bias stencil weights
accounting for surface distortion. (Taubin,
Eurographics STAR 00, Meyer et al. VisMath 02)
23GPU Stable Fluid Simulation
- Fluid flow over surfaces
- Numerical solutions to PDEs derived from finite
difference equations - Most solvers require a regular grid
- Problem solved on arbitrary surfaces CPU
- Stam (SIGGRAPH 99)
- One Motivation fluid flow essential for
simulating natural media - Oil paint, watercolor, etc..
24Texture Atlas Generation
- Each flattened patch forms a chart
- For convenience, charts can be packed into a
single image - Trade-off Between
- Continuity
- Full texture space ultilization
chart
Texture Atlas
25Chart PackingMulti-Resolution Meshed Atlas (MMA)
26Step 3 Chart PackingMulti-Resolution Meshed
Atlas (MMA)
27Step 3 Chart PackingMulti-Resolution Meshed
Atlas (MMA)
28Surface Signal Balancing
- Optimize Texture Atlas for the signal being
stored - Balance MMA tree based on surface signal
importance - Optimize local charts parametrization
293D Painting Dynamic Re-Parametrization
Dynamic MMA Atlas
Static Atlas (Conformal)
Carr Hart. Painting Detail SIGGRAPH 04.
30GPU Painting
GPU
CPU
Model
Stroke Buffer
Depth Map
31Real-Time Subsurface Scattering
Links -uv offset -lod -scale factor
Carr et al. GPU Algorithms for Radiosity and
Subsurface Scattering, GH 2003.
32Limitations
- Quality of results are tied to the tessellation
of the input mesh - Low tessellation models
- Limited opportunity to choose parameterization to
better distribute surface samples. - Irregularly tessellation models
- Methods may fail to find clusters that
parameterize well into square/rectangular regions
33Thanks!
34A Call for Action!
- Need New Compiler Technology
- Need Language Designers
- Need New Parallel Algorithms
- Need Better Developer tools
- Need to get the word out
- Apply computational model to other problems
outside of graphics - Bio-informatics, computational biology
- Numerical Simulation and Computation