Using wavelets on the XBOX360 For current and future games San Francisco, GDC 2008 Mike Boulton Senior Software Engineer Rare/MGS

Slides:



Advertisements
Similar presentations
Grey Level Enhancement Contrast stretching Linear mapping Non-linear mapping Efficient implementation of mapping algorithms Design of classes to support.
Advertisements

WSCG 2007 Hardware Independent Clipmapping A. Seoane, J. Taibo, L. Hernández, R. López, A. Jaspe VideaLAB – University of A Coruña (Spain)
Environment Mapping CSE 781 – Roger Crawfis
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
Spherical Harmonic Lighting of Wavelength-dependent Phenomena Clifford Lindsay, Emmanuel Agu Worcester Polytechnic Institute (USA)
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
ABC HFG JKLW OPQR NTU VS YZ.
Texture Visual detail without geometry. Texture Mapping desire for heightened realism.
Week 9 - Wednesday.  What did we talk about last time?  Fresnel reflection  Snell's Law  Microgeometry effects  Implementing BRDFs  Image based.
Efficient Sparse Voxel Octrees
Precomputed Local Radiance Transfer for Real-time Lighting Design Anders Wang Kristensen Tomas Akenine-Moller Henrik Wann Jensen SIGGRAPH ‘05 Presented.
Master Thesis Lighting and materials for real-time game engines
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 18: Precomputation-Based Real-Time Rendering Ravi Ramamoorthi
Multimedia Data Introduction to Image Processing Dr Mike Spann Electronic, Electrical and Computer.
Shadow Silhouette Maps Pradeep Sen, Mike Cammarano, Pat Hanrahan Stanford University.
Fractal Image Compression
3D Graphics Processor Architecture Victor Moya. PhD Project Research on architecture improvements for future Graphic Processor Units (GPUs). Research.
Page 1 CS Department Parallel Design of JPEG2000 Image Compression Xiuzhen Huang CS Department UC Santa Barbara April 30th, 2003.
Object Detection and Tracking Mike Knowles 11 th January 2005
Microprocessors Introduction to ia64 Architecture Jan 31st, 2002 General Principles.
Fast Global-Illumination on Dynamic Height Fields
B + -Trees (Part 1). Motivation AVL tree with N nodes is an excellent data structure for searching, indexing, etc. –The Big-Oh analysis shows most operations.
Introduction to Wavelets
A Theory of Locally Low Dimensional Light Transport Dhruv Mahajan (Columbia University) Ira Kemelmacher-Shlizerman (Weizmann Institute) Ravi Ramamoorthi.
1 Computer Science 631 Lecture 4: Wavelets Ramin Zabih Computer Science Department CORNELL UNIVERSITY.
The Story So Far The algorithms presented so far exploit: –Sparse sets of images (some data may not be available) –User help with correspondences (time.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
Pre-computed Radiance Transfer Jaroslav Křivánek, KSVI, MFF UK
Efficient Irradiance Normal Mapping Ralf Habel, Michael Wimmer Institute of Computer Graphics and Algorithms Vienna University of Technology.
CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps.
Lecture 3 : Direct Volume Rendering Bong-Soo Sohn School of Computer Science and Engineering Chung-Ang University Acknowledgement : Han-Wei Shen Lecture.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Textures.
Interactive Time-Dependent Tone Mapping Using Programmable Graphics Hardware Nolan GoodnightGreg HumphreysCliff WoolleyRui Wang University of Virginia.
-Global Illumination Techniques
Real-Time Rendering Digital Image Synthesis Yung-Yu Chuang 01/03/2006 with slides by Ravi Ramamoorthi and Robin Green.
1 Rendering Geometry with Relief Textures L.Baboud X.Décoret ARTIS-GRAVIR/IMAG-INRIA.
Multimedia Data Introduction to Image Processing Dr Sandra I. Woolley Electronic, Electrical.
An Efficient Representation for Irradiance Environment Maps Ravi Ramamoorthi Pat Hanrahan Stanford University SIGGRAPH 2001 Stanford University SIGGRAPH.
Real-Time Relighting Digital Image Synthesis Yung-Yu Chuang 1/10/2008 with slides by Ravi Ramamoorthi, Robin Green and Milos Hasan.
Real-time Shading with Filtered Importance Sampling Jaroslav Křivánek Czech Technical University in Prague Mark Colbert University of Central Florida.
Tone Mapping on GPUs Cliff Woolley University of Virginia Slides courtesy Nolan Goodnight.
1 Real-time visualization of large detailed volumes on GPU Cyril Crassin, Fabrice Neyret, Sylvain Lefebvre INRIA Rhône-Alpes / Grenoble Universities Interactive.
B + -Trees. Motivation An AVL tree with N nodes is an excellent data structure for searching, indexing, etc. The Big-Oh analysis shows that most operations.
All-Frequency Shadows Using Non-linear Wavelet Lighting Approximation Ren Ng Stanford Ravi Ramamoorthi Columbia SIGGRAPH 2003 Pat Hanrahan Stanford.
Characteristic Point Maps Hongzhi Wu Julie Dorsey Holly Rushmeier (presented by Patrick Paczkowski) Computer Graphics Lab Yale University.
Quick survey about PRT Valentin JANIAUT KAIST (Korea Advanced Institute of Science and Technology)
BUMP-MAPPING SET09115 Intro to Graphics Programming.
SIGGRAPH 2010 Course: Physically Based Shading Models in Film and Game Production SIGGRAPH 2010 Physically Based Shading Models in Film and Game Production.
Emerging Technologies for Games Deferred Rendering CO3303 Week 22.
Digital Media Lecture 5: Vector Graphics Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Page 1KUT Graduate Course Data Compression Jun-Ki Min.
All-Frequency Shadows Using Non-linear Wavelet Lighting Approximation Ren Ng Stanford Ravi Ramamoorthi Columbia Pat Hanrahan Stanford.
© Copyright 3Dlabs, Page 1 - PROPRIETARY & CONFIDENTIAL Virtual Textures Texture Management in Silicon Chris Hall Director, Product Marketing 3Dlabs.
Light Animation with Precomputed Light Paths on the GPU László Szécsi, TU Budapest László Szirmay-Kalos, TU Budapest Mateu Sbert, U of Girona.
Working Group « Pre-Filtering »
Computer Graphics Imaging
Real-time environment map lighting
ATEC Procedural Animation
ATCM 3310 Procedural Animation
B+-Trees.
Chapters VIII Image Texturing
Data Representation.
Researchlab 4 Presentation
Computer Animation Texture Mapping.
Virtual Memory Hardware
Procedural Animation Lecture 6: Mapping
ATCM 6317 Procedural Animation
Image Coding and Compression
Presentation transcript:

Using wavelets on the XBOX360 For current and future games San Francisco, GDC 2008 Mike Boulton Senior Software Engineer Rare/MGS

Introduction Fixed compression methods such as DXT are becoming antiquated Distribution of data “density” becoming less uniform as complexity increases Why can’t compression efforts be focused where it matters most? Wavelets can help!

What are wavelets? Wavelets are mathematical functions formed from scaled and translated copies of a few basis functions The advantage is their ability to localize functions in both frequency and space – Fourier just frequency – “Point basis” just space There are lots of common wavelet bases

Why 2D Haar? This talk will focus on 2D Haar wavelets Haar is the simplest basis set – In general, this means more basis terms and/or blocky artefacts – But also easiest to implement – “Blocky” nature of bases is less of a problem for operations such as integration What do the wavelets look like?

2D Haar continued... Three basis wavelet functions, plus ‘solid’ scaling function – White represents +1, black -1

The wavelet advantage Local coverage allows windowed changes – Compared with spherical harmonics, which have global cover – This means that local changes only involve local bases Mip-map chains not required for image decompression Truly variable compression – Can focus efforts where it counts

Usage examples Real-time shader image decompression Lighting Static shadow maps Displacement maps over large areas Easy dynamic texture packing Geometry representations...many more!

Talk focus Real-time shader image decompression – Real-time on XBOX360 GPU – 500Hz+ for full-screen 720p monochrome decompression Double-product integration for relighting – Real-time (ish!) on XBOX360 GPU Other applications – E.G. geometry representation – If time!

Real-time image decompression Image broken up into 16x16 texel blocks Each block compressed into wavelet sub-tree Texture at 1/16 th resolution stores scaling coefficient and offset to start of sub-tree Why? – Decompression performance should be independent of main image resolution – Each sub-tree fits inside a texture cache tile, so no traversal cache thrashing – Can unroll traversal loop in shader for perf. gain

Real-time image decompression continued... Given a (u,v) coordinate, pixel shader traverses appropriate sub-tree for final value Mip-map chain not required – Obtained as by-product of traversal Intermediate memory not required – All decompression performed directly in the pixel shader Dynamic predication works well – Good vector coherency if minification avoided

Real-time image decompression continued... How is the wavelet tree represented? – Stored breadth-first in a line texture – Multiple ways to pack the data – Example: ARGB8 {r, g, b} stores windowed wavelet basis coefficients {a} stores linear offset to child of node, if one exists – If no child exists, we jump to an “empty” node Wait for the rest of the pixel vector to finish – Can use wider data formats E.g. U16, F32

Real-time image decompression continued... Uncompressed with mipmaps 1578fps

Real-time image decompression continued... Wavelet compressed, cut-off 0.05, 579fps

Real-time image decompression continued... Wavelet compressed, cut-off 0.08, 622fps

Real-time image decompression continued... Notice how areas of high contrast have their detail preserved, and areas of lower contrast are “smoothed” out Can use a different notion of importance!

Real-time image decompression continued... Has advantages over fixed DXT-like compression schemes: – Can be lossless in areas you need it to be Particularly important for “data” textures, such as SH coefficients – Will do a much better job for images with areas of low contrast Again, higher-order SH terms are a good example But most surface-parameterised data is likely to be like this – Can use “focus” ability to increase the area of parameterisation

Real-time image decompression continued... (Video)

Double-product integration Another good application is relighting – Work by [Ng, Ramamoorthi and Hanrahan] – Diffuse BRDF We represent both the transfer function (with cosine) and the environment as wavelet trees in a texture

Double-product integration continued... Here we need to traverse only the intersection of both trees – So if one is simple, should get good performance Parallel GPU traversal needs to know how to “jump over” bits of either tree not contained in the intersection – If a node has a child, store linear offset to sibling or ancestor (could be root) – Then we can jump over whole child branch if the other tree has no children at that point

Double-product integration continued... Performance is a function of the size of the intersection between both trees – Plus other factors such as cache behaviour Loads of other interesting ideas – Transfer function wavelet trees have a tendency to be quite similar in localised patches – Clustering scheme would help further – Could store “representative” tree for each patch, and then a (smaller) “residual” tree per texel of patch

Double-product integration continued... (Video)

Other applications Wavelets can be used to define surface deformations – As a “dynamic” displacement map Can keep memory overhead constant by removing oldest high-frequency terms for new deformation terms Windowed nature of wavelets makes applying localised deformations simple Can easily modify e.g. moment of inertia