Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
3Dc
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Algorithm == Surface normals are three-dimensional vectors of unit length. Because of the length constraint only two elements of any normal need to be stored. The input is therefore an array of two-dimensional values. Compression is performed in 4Γ4 blocks. In each block the two components of each value are compressed separately. For each block, each of the two components have a palette of 8 values to choose from. The palettes are generated from two values representing the start and end of a line and the other six values being generated as linear combinations of the start and end values. Compression is natively achieved by finding the lowest and highest values of the 16 pixels to be compressed and storing each of those as an 8-bit quantity. Individual elements within the 4Γ4 block are then stored with 3-bits each, representing their position on an 8 step linear scale from the lowest value to the highest. Each pixel's 3-bit value (the palette index) would be chosen by choosing the palette entry with the minimum distance from the original values. Total storage is 128 bits per 4x4 block once both source components are factored in. In an uncompressed scheme with similar 8-bit precision, the source data is 32 8-bit values for the same area, occupying 256 bits. The algorithm therefore produces a 2:1 [[data compression|compression]] ratio. The compression ratio is sometimes stated as being "up to 4:1" as it is common to use 16-bit precision for input data rather than 8-bit. This produces compressed output that is literally 1/4 the size of the input but it is not of comparable precision.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)