VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Texture.

Slides:



Advertisements
Similar presentations
Normal Map Compression with ATI 3Dc™ Jonathan Zarge ATI Research Inc.
Advertisements

Geometry Compression Michael Deering, Sun Microsystems SIGGRAPH (1995) Presented by: Michael Chung.
CS-378: Game Technology Lecture #9: More Mapping Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica.
Other DVR Algorithms and A Comparison Jian Huang, CS 594, Spring 2002.
Siggraph/Eurographics Workshop on Graphics Hardware 2001
Interactive High-Quality Volume Rendering on Flexible Consumer Graphics Hardware Klaus Engel, Martin Kraus, Thomas Ertl Visualization and Interactive Systems.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
The Programmable Graphics Hardware Pipeline Doug James Asst. Professor CS & Robotics.
CSE 589 Applied Algorithms Spring 1999 Image Compression Vector Quantization Nearest Neighbor Search.
Final Gathering on GPU Toshiya Hachisuka University of Tokyo Introduction Producing global illumination image without any noise.
Graphics File Formats. 2 Graphics Data n Vector data –Lines –Polygons –Curves n Bitmap data –Array of pixels –Numerical values corresponding to gray-
Losslessy Compression of Multimedia Data Hao Jiang Computer Science Department Sept. 25, 2007.
Roger Cheng (JPEG slides courtesy of Brian Bailey) Spring 2007
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Fast vector quantization image coding by mean value predictive algorithm Authors: Yung-Gi Wu, Kuo-Lun Fan Source: Journal of Electronic Imaging 13(2),
Realtime 3D Computer Graphics Computer Graphics Computer Graphics Software & Hardware Rendering Software & Hardware Rendering 3D APIs 3D APIs Pixel & Vertex.
Under the Hood: 3D Pipeline. Motherboard & Chipset PCI Express x16.
CS559-Computer Graphics Copyright Stephen Chenney Image File Formats How big is the image? –All files in some way store width and height How is the image.
Interactive Visualization of Volumetric Data on Consumer PC Hardware: Introduction Daniel Weiskopf Graphics Hardware Trends Faster development than Moore’s.
Slide title In CAPITALS 50 pt Slide subtitle 32 pt iPACKMAN – High-Quality, Low Complexity Texture Compression for Mobile Phones Jacob Strom Ericsson Tomas.
VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Volume Graphics - Advanced Klaus Engel Volume.
Department of Physics and Astronomy DIGITAL IMAGE PROCESSING
GODIAN MABINDAH RUTHERFORD UNUSI RICHARD MWANGI.  Differential coding operates by making numbers small. This is a major goal in compression technology:
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
GPU Programming Robert Hero Quick Overview (The Old Way) Graphics cards process Triangles Graphics cards process Triangles Quads.
Definitions Spectral Elements – data structures that contain information about data at points within each geometric entity. Finite elements only hold information.
CS 395 T Real-Time Graphics Architectures, Algorithms, and Programming Systems Spring’03 Vector Quantization for Texture Compression Qiu Wu Dept. of ECE.
: Chapter 12: Image Compression 1 Montri Karnjanadecha ac.th/~montri Image Processing.
Graphics Hardware 2002 Saarbrücken September 1-2, 2002 Adaptive Texture Maps Martin Kraus and Thomas Ertl VIS Group, Universität Stuttgart.
IMAGE COMPRESSION USING BTC Presented By: Akash Agrawal Guided By: Prof.R.Welekar.
Interactive Time-Dependent Tone Mapping Using Programmable Graphics Hardware Nolan GoodnightGreg HumphreysCliff WoolleyRui Wang University of Virginia.
Marching Cubes: A High Resolution 3D Surface Construction Algorithm William E. Lorenson Harvey E. Cline General Electric Company Corporate Research and.
© De Montfort University, Vector and Bitmapped graphics Howell Istance School of Computing De Montfort University.
Computer Concepts 2014 Chapter 8 Digital Media. 8 Chapter Contents  Section B: Bitmap Graphics  Section C: Vector and 3-D Graphics Chapter 8: Digital.
Tone Mapping on GPUs Cliff Woolley University of Virginia Slides courtesy Nolan Goodnight.
Image Compression Fasih ur Rehman. Goal of Compression Reduce the amount of data required to represent a given quantity of information Reduce relative.
Hardware-accelerated Rendering of Antialiased Shadows With Shadow Maps Stefan Brabec and Hans-Peter Seidel Max-Planck-Institut für Informatik Saarbrücken,
Advances in digital image compression techniques Guojun Lu, Computer Communications, Vol. 16, No. 4, Apr, 1993, pp
Image Compression Based On BTC-DPCM And It ’ s Data-Driven Parallel Implementation Author : Xiaoyan Yu 、 Iwata, M. Source : Image Processing, ICIP.
Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data.
Vector Quantization CAP5015 Fall 2005.
COMP135/COMP535 Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 2 Lecture 2 – Digital Representations.
11/5/2002 (c) University of Wisconsin, CS 559 Last Time Local Shading –Diffuse term –Specular term –All together –OpenGL brief overview.
JPEG.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Hardware Accelerated Volume Rendering Using PC Hardware CSE564 Final Demo Evan Closson.
Ray Tracing using Programmable Graphics Hardware
Digital Media Dr. Jim Rowan ITEC 2110 Chapter 3. Roll call.
Pre-Integrated Volume Rendering: Past, Present, Future
High-Quality Pre-Integrated Volume Rendering Using Hardware Accelerated Pixel Shading Klaus Engel, Martin Kraus, Thomas Ertl Visualization and Interactive.
Graphics and Image Data Representations 1. Q1 How images are represented in a computer system? 2.
Non-Photorealistic Rendering FORMS. Model dependent Threshold dependent View dependent Outline form of the object Interior form of the object Boundary.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Texture Mapping Greg Humphreys University of Virginia CS 445, Fall 2003.
Computer Graphics Lesson 2 July 12, 2005 Image Formats What are some formats you are familiar with? There are 4 basic image format types: Uncompressed.
Computer Engg, IIT(BHU)
GPU Architecture and Its Application
Graphics and image data representation
Ying Zhu Georgia State University
Hardware-Based Cell Projection
Graphics Processing Unit
Normal Map Compression with ATI 3Dc™
Chapter III, Desktop Imaging Systems and Issues: Lesson IV Working With Images
Introduction to Computer Graphics with WebGL
© University of Wisconsin, CS559 Fall 2004
Dr. Jim Rowan ITEC 2110 Chapter 3
Dr. Jim Rowan ITEC 2110 Chapter 3
RADEON™ 9700 Architecture and 3D Performance
Predictive Grayscale Image Coding Scheme Using VQ and BTC
Presentation transcript:

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Texture Compression Martin Kraus Visualization and Interactive Systems Group, Stuttgart

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Texture Compression: Overview Contents: Requirements for texture compression S3 Texture Compression (S3TC) Vector Quantization (VQ) Implementing VQ texture compression with programmable graphics hardware Application: Volume Visualization

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Requirements for Texture Compression Encoding/compression of texture maps: – Maximize compression rates, – Minimize information loss, – User-defined trade-off. Access/decompression of texture maps: – Fast random access, – Simple decompression algorithm.

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) S3 Texture Compression (S3TC) A.k.a. DXTC in Microsoft’s DirectX API. OpenGL extension: EXT_texture_compression_s3tc. Hardware implementation in several graphics chips, e.g. – NVIDIA GeForce series, – ATI Radeon 7500.

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) S3 Texture Compression (S3TC) S3TC for RGB texture: Each block of 4 x 4 RGB pixels is encoded in 64 bits: Each 2-bit pixel code specifies the color of one pixel: color0color116 2-bit codes 16 bits (5+6+5 for RGB) 16 bits 32 bits (16 x 2 bits per pixel) pixel code0123 color0 > color1 color0color10.33 color color color color1 color0 <= color1 color0color10.5 color color1 black

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) S3 Texture Compression (S3TC) Compression ratio in this case: original RGB data of 4x4 block: 4 x 4 x 3 = 48 bytes compressed data: 64 bits = 8 bytes 6 : 1 ratio More variants for RGBA data. Advantages: – Simple encoding/decoding, – Data-independent. Disadvantages: – Moderate compression ratios, – Block-artifacts, inappropriate for non-smooth data, – Fixed compression scheme.

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Vector Quantization (VQ) Well established lossy compression technique, e.g. image formats with color palettes. See [Gersho 1992] for details about VQ. Apart from palettes seldom employed for texture maps in hardware, e.g. PowerVR architecture. Frequently employed for texture maps in software [Ning 1992, Levoy 1996].

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Vector Quantization (VQ) Image formats with palettes specify for each pixel one index into a color palette (= codebook) C1 C2 C0 C1 C0 C1 C0 index data palette (codebook) decoded data C0C1C2 012

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Vector Quantization (VQ) Instead of one 3-D vector for the RGB color of one pixel, we can also encode 12-D vectors for the RGB colors of 2x2 pixels: A1B1A2B2 C1D1C2D2 A0B0A1B1 C0D0C1D1 codebook A0B0A1B1A2B2 C0D0C1D1C2D2 012 index datadecoded data

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Vector Quantization (VQ) Compression ratio in this case: original RGB data of 2x2 block: 2 x 2 x 3 = 12 bytes index data for codebook of length 256: 1 byte 12 : 1 ratio Advantages: – Higher compression ratios, – Less compression artifacts, – Length of codebook determines quality & comp. ratio. Disadvantages: – Expensive encoding (codebook generation). – Less simple decoding.

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Implementing VQ with Prog. Graphics HW 2D texture lookup with bilinear interpolation: – Nearest-neighbor texture lookup of up to 4 indices, – Nearest-neighbor dependent texture lookup of 4 entries of the codebook, – Bilinear interpolation. Too expensive for current programmable graphics hardware. But: nearest-neighbor 2D texture lookup can be implemented with per-pixel operations of current graphics hardware, i.e. ATI Radeon 8500.

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Implementing VQ with Prog. Graphics HW Nearest-neighbor 2D texture lookup with VQ: – Lookup of index: Nearest-neighbor 2D texture lookup at (s,t) – Lookup in codebook: Nearest-neighbor, dependent 2D texture lookup at (s’,t’) – How to compute (s’,t’) ? index data t index 1 s code- book A0B0A1B1A2B2 C0D0C1D1C2D2 s’ t’ color D1

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Implementing VQ with Prog. Graphics HW Computation of (s’,t’) for codebook lookup: – Dim. of index data: N s x N t – Dim. of codebook: N c – Compute (s 0,t 0 ) : s 0 = floor ( s * N s ) / N s t 0 = floor ( t * N t ) / N t – Scale offset from (s 0,t 0 ) to (s,t) and add index : s’ = ( s - s 0 ) * N s / N c + index / N c t’ = ( t - t 0 ) * N t index data t index 1 s code- book A0B0A1B1A2B2 C0D0C1D1C2D2 s’ t’ color D1 t0t0 s0s0

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Implementing VQ with Prog. Graphics HW How to implement a formula like s 0 = floor ( s * N s ) / N s t 0 = floor ( t * N t ) / N t s’ = ( s - s 0 ) * N s / N c + index / N c t’ = ( t - t 0 ) * N t Note: N c, N s, and N t are constants; thus, 1 / N s, 1 / N t, 1 / N c, N s / N c are also constants. => Apart from floor only sums and products!

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Implementing VQ with Prog. Graphics HW Implementation of floor ( s * N s ) : 1-D functions can be implemented with 1-D textures. Apart from an addition this is a 1-D texture map for the identity function using nearest-neighbor interpolation! floor ( s * N s ) s * N s

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Implementing VQ with Prog. Graphics HW DirectX Pixel Shader 1.4 code, only for illustration tex r0,t0.xy // r0.r = index lookup (s,t) texcrd r1,t0 // r1.r = s, r1.g = t tex r2,t2.x // r2.r = s0 = floor(s * Ns) / Ns tex r3,t3.x // r3.r = t0 = floor(t * Nt) / Nt sub r2.r,r1,r2.r // r2.r = s – s0 sub r2.g,r1,r3.r // r2.g = t – t0 mul r2,r2,c1 // r2.r = (s – s0) * Ns / Nc // r2.g = (t – t0) * Nt mul r1,r0,c2 // r1.r = index / Nc // r1.g = 0 add r1,r2,r1 // r1.r = (s – s0) * Ns/Nc + index/Nc // r1.g = (t – t0) * Nt phase tex r1,r1.xy // dependent codebook lookup mov r0,r1 // set output color

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Application: Volume Visualization Approach works also with 3-D textures! It may be employed for texture-based volume visualization [Cabral 1994]. Nearest-neighbor interpolation is often acceptable for large volumes. Instead of 2 x 2 pixels, use 2 x 2 x 2 voxels. With a codebook of length 256, a RGBA- volume is reduced to bytes = 16 MBytes, i.e. it fits easily into texture memory. See [Kraus 2002] for more details.

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Application: Volume Visualization

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) Discussion Texture compression with vector quantization on programmable graphics hardware is possible. But: Only with nearest-neighbor interpolation. Main advantage compared to built-in texture compression: Programmer is in control!

VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Texture Compression (Martin Kraus) References [Cabral 1994] Brian Cabral, Nancy Cam, and Jim Foran. Accelerated Volume Rendering and Tomographic Reconstruction Using Texture Mapping Hardware. In Proceedings of 1994 Symposium on Volume Visualization, pages [Gersho 1992] Allen Gersho and Robert M. Gray. Vector Quantization and Signal Compresssion. Kluwer Academic Publiushers, Boston, [Kraus 2002] Martin Kraus and Thomas Ertl. Adaptive Texture Maps. In Proceedings of SIGGRAPH/Eurographics Workshop on Graphics Hardware [Levoy 1996] Marc Levoy and Pat Hanrahan. Light Field Rendering. In Proceedings of SIGGRAPH ’96, pages [Ning 1993] Paul Ning and Lambertus Hesselink. Vector Quantization for Volume Rendering. In Proceedings of 1992 Workshop on Volume Visualization, pages 69-74, 1992.