0% found this document useful (0 votes)
7 views18 pages

Texture Compression

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views18 pages

Texture Compression

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PlayStation 2
PlayStation 2
Developers Conference
March 2001

Silicon Valley Conference Center


March 7 – 9, 2001
Texture Compression

Mike Dean
Mark Breugelmans
SCEE Technology Group

Texture Compression  2001 SCEA CONFIDENTIAL Slide # 2


Agenda

! Maximizing texture efficiency

! Two-pass texture compression

! IPU compression

! Comparisons and conclusions

Texture Compression  2001 SCEA CONFIDENTIAL Slide # 3


Maximizing Texture Efficiency
! 4 MB GS RAM
" Frame buffers, antialiasing
" Z buffer
" Textures - can expect to get ~1.5 MB

! 20 MB/frame bandwidth to GS
" Overheads: DMA arbitration, tags
" Vertex properties
" Streamed textures - can expect to get ~3-4
MB per frame
Texture Compression  2001 SCEA CONFIDENTIAL Slide # 4
Maximizing Texture Efficiency

! Make the megabytes go further by


effective use of:
" 4- or 8-bit palettes
" Tiled textures
" Multi-pass (detail map) textures

! Choose compression technique according


to perception of texture quality

Texture Compression  2001 SCEA CONFIDENTIAL Slide # 5


Maximizing Texture Efficiency

! Monochrome textures can compress well using


4-bit CLUTs

" …but not all textures are monochrome!

Texture Compression  2001 SCEA CONFIDENTIAL Slide # 6


Maximizing Texture Efficiency

! The eye is very sensitive to changes in


luminance

" Restricting range gives noticeable artifacts


" Use GS bilinear filter to interpolate luminance from a
much lower resolution
Texture Compression  2001 SCEA CONFIDENTIAL Slide # 7
Maximizing Texture Efficiency

! A detail map (at low-bit depth) can be applied to


the interpolated low-resolution image

" Sum of data sizes of low resolution image + detail


map can be lower than the combined image
" Detail map could make use of tiling
Texture Compression  2001 SCEA CONFIDENTIAL Slide # 8
Maximizing Texture Efficiency

! Changes in luminance are most noticeable for


darker colors

! This can affect method of color reduction

Texture Compression  2001 SCEA CONFIDENTIAL Slide # 9


Two-pass Compression
Color map
1/16 size

8-bit CLUT up to
32-bit RGBA

Detail map
full-size
Original 24-bit 2-bit or 4-bit
or 32-bit image grayscale

Texture Compression  2001 SCEA CONFIDENTIAL Slide # 10


Two-pass Compression

!
! Detail map CLUT
distribution should be
concentrated around
2.0
center
" Usually,
" Usually, interpolated
interpolated
color
color map
map is
is not
not far
far
wrong
wrong 1.0
" Eye
" Eye is
is sensitive
sensitive to
to
subtle
subtle changes
changes inin
luminance
luminance 0.0

!
! Original
Original pixel/color
pixel/color map
map
pixel
pixel == alpha
alpha multiply
multiply value
value
which
which isis mapped
mapped to to CLUT
CLUT

Texture Compression  2001 SCEA CONFIDENTIAL Slide # 11


Two-pass Compression
2-bit Luminance Textures
CLUT 1
x x 0 0
x x 0 1
x x 1 0
x x 1 1

CLUT 2
0 0 x x
0 1 x x
1 0 x x
1 1 x x

4-bit image
Texture Compression  2001 SCEA CONFIDENTIAL Slide # 12
Two-pass Compression

Decompressing the Texture

! Draw low resolution color map normally

! Draw detail map with alpha multiply

! Two alternatives for detail map drawing

" Decompress to a new texture first


" Draw directly using two passes

Texture Compression  2001 SCEA CONFIDENTIAL Slide # 13


Two-pass Compression

Decompressing the Texture

! Color map can serve as a low-res mipmap


texture
" Detail map need not be transferred if not
necessary
" Detail map can be faded in using the CLUT

Texture Compression  2001 SCEA CONFIDENTIAL Slide # 14


IPU Compression

! Will compress images into a smaller space


than the two-pass technique

! But…
" Awkward path: RAM to IPU to RAM to GS
" Uncompressed image must be sent to the GS
so doesn’t save GS bandwidth

Texture Compression  2001 SCEA CONFIDENTIAL Slide # 15


IPU Compression

! Not generally suitable for in-game texture


use

! But…
" Can be effective for stashed-away sets of
images: loading screens, menu artwork, etc.
" Could unpack the detail and color maps
ahead of time

Texture Compression  2001 SCEA CONFIDENTIAL Slide # 16


Comparisons
! Original image: 128x128 @ 32-bit = 64 KB

! Compressed image

" Color map: 32x32 @ 32-bit = 4 KB


" Detail map: 128x128 @ 4-bit = 8 KB
" Sum: 12 KB
" With 2-bit detail map sum = 8 KB

! (IPU compression: 4KB at Q=~4)

Texture Compression  2001 SCEA CONFIDENTIAL Slide # 17


Conclusions
! ~3-4 MB available per frame for streamed
textures

! This stream can hold > 5 times as many


textures using a 2-pass compression
scheme

! IPU can be used for texture compression,


but only for limited applications

Texture Compression  2001 SCEA CONFIDENTIAL Slide # 18

You might also like