Editing PVR
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
[[Category:Software]]<noinclude>[[Category:Main]]</noinclude> | [[Category:Software]]<noinclude>[[Category:Main]]</noinclude> | ||
<div style="color: #ffffff; background-color: #505652; border: 1px solid #808000; padding: 5px; {{box-shadow|4px|4px|8px|#b0b090}}"> | <div style="color: #ffffff; background-color: #505652; border: 1px solid #808000; padding: 5px; {{box-shadow|4px|4px|8px|#b0b090}}"> | ||
Line 10: | Line 8: | ||
== Features == | == Features == | ||
*PVRTC supports both opaque (RGB) and translucent (RGBA) textures (unlike other formats such as S3TC that require a dedicated, larger form to support full alpha channels). | *PVRTC supports both opaque (RGB) and translucent (RGBA) textures (unlike other formats such as S3TC that require a dedicated, larger form to support full alpha channels). | ||
Line 18: | Line 14: | ||
== File format == | == File format == | ||
The PVR (.pvr) format ( | The PVR (.pvr) format (PowerVR SDK REL_3.5) (Sony uses a custom header) consists of: | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
|- | |- | ||
| style="background-color:#505652; color:#FFFFFF;" |'''Header'''<br />52 bytes | | style="background-color:#505652; color:#FFFFFF;" |'''Header'''<br />52 bytes | ||
| style="background-color:#505652; color:#FFFFFF;" |'''Meta Data (optional)'''<br />variable | | style="background-color:#505652; color:#FFFFFF;" |'''Meta Data (optional)'''<br />variable | ||
| style="background-color:#505652; color:#FFFFFF;" |'''Texture Data'''<br />variable | | style="background-color:#505652; color:#FFFFFF;" |'''Texture Data'''<br />variable | ||
Line 54: | Line 50: | ||
| 0x14 || 0x04 || 00 00 00 00 || 0 || '''Channel Type:''' | | 0x14 || 0x04 || 00 00 00 00 || 0 || '''Channel Type:''' | ||
|- | |- | ||
| 0x18 || | | 0x18 || 0x08 || 00 01 00 00 || 256 || '''Height:''' width of the texture stored in the texture data, in pixels. | ||
|- | |- | ||
| 0x1C || 0x04 || 00 01 00 00 || 256 || '''Width:''' width of the texture stored in the texture data, in pixels. | | 0x1C || 0x04 || 00 01 00 00 || 256 || '''Width:''' width of the texture stored in the texture data, in pixels. | ||
|- | |- | ||
| 0x20 || 0x04 || 01 00 00 00 || 1 || '''Depth:''' depth of the texture stored in the texture data, in pixels | | 0x20 || 0x04 || 01 00 00 00 || 1 || '''Depth:'''depth of the texture stored in the texture data, in pixels. | ||
|- | |- | ||
| | | 0x24 || 0x04 || 01 00 00 00 || 1 || '''Num. Surfaces:'''number of surfaces within the texture array. | ||
|- | |- | ||
| | | 0x28 || 0x04 || 01 00 00 00 || 1 || '''Num. Faces:'''number of faces in a cube map. | ||
|- | |- | ||
| | | 0x2C || 0x04 || 00 00 00 00 || 0 || '''Meta Data Size:''' allows for the creator of a PVR to store custom information within the PVR file relating to the storage. | ||
|- | |- | ||
|} | |} | ||
==== Pixel Format ==== | ==== Pixel Format ==== | ||
Line 251: | Line 243: | ||
is a four byte identifier (consisting of single byte characters or integers) whose value, combined with the value of ‘Key’, is used to determine how ‘Data’ should be handled.<br /> | is a four byte identifier (consisting of single byte characters or integers) whose value, combined with the value of ‘Key’, is used to determine how ‘Data’ should be handled.<br /> | ||
The values {‘P’, ‘V’, ‘R’, 0} to {‘P’, ‘V’, ‘R’, 255} (and their numerical equivalents) are reserved and must not be used except as described in Pre-defined Medata Data section.<br /> | The values {‘P’, ‘V’, ‘R’, 0} to {‘P’, ‘V’, ‘R’, 255} (and their numerical equivalents) are reserved and must not be used except as described in Pre-defined Medata Data section.<br /> | ||
==== Pre-defined Medata Data ==== | ==== Pre-defined Medata Data ==== | ||
Line 264: | Line 258: | ||
|- | |- | ||
| ‘P’, ‘V’, ‘R’, 3 || 0 || Variable || An array of integers describing the position and sizes of each texture within a texture atlas.<br /> <small>Each sequence of four integers represents the information for a single texture within the atlas and appear in the order:</small> | | ‘P’, ‘V’, ‘R’, 3 || 0 || Variable || An array of integers describing the position and sizes of each texture within a texture atlas.<br /> <small>Each sequence of four integers represents the information for a single texture within the atlas and appear in the order:</small> | ||
1. X Position | |||
2. Y Position | |||
3. Width | |||
4. Height | |||
|- | |- | ||
| ‘P’, ‘V’, ‘R’, 3 || 1 || 8 || Specifies that the file contains normal map information.<br /> | | ‘P’, ‘V’, ‘R’, 3 || 1 || 8 || Specifies that the file contains normal map information.<br /> | ||
Line 311: | Line 305: | ||
is an unsigned 32bit integer representing the size of ‘Data’ in bytes. | is an unsigned 32bit integer representing the size of ‘Data’ in bytes. | ||
==== Data ==== | ==== Data Size ==== | ||
is an array of user defined information of size determined from ‘Data Size’ of a data type and purpose determined from the value of ‘FourCC’ and ‘Key’. | is an array of user defined information of size determined from ‘Data Size’ of a data type and purpose determined from the value of ‘FourCC’ and ‘Key’. | ||
=== Texture Data === | === Texture Data === | ||
Line 323: | Line 313: | ||
*http://web.onetel.net.uk/~simonnihal/assorted3d/fenney03texcomp.pdf PVRTC algorithm: Texture Compression using Low-Frequency Signal Modulation | *http://web.onetel.net.uk/~simonnihal/assorted3d/fenney03texcomp.pdf PVRTC algorithm: Texture Compression using Low-Frequency Signal Modulation | ||
*http://blog.imgtec.com/powervr/understanding-powervr-series5xt-pvrtc-pvrtc2-and-texture-compression-part-6 overview | *http://blog.imgtec.com/powervr/understanding-powervr-series5xt-pvrtc-pvrtc2-and-texture-compression-part-6 overview | ||