Changes

754 bytes added ,  12:30, 11 February 2014
no edit summary
Line 248: Line 248:  
Every texture format has its texture data divided into 8x8 tiles. See [[SMDH#Icon_graphics|SMDH]] for more information.
 
Every texture format has its texture data divided into 8x8 tiles. See [[SMDH#Icon_graphics|SMDH]] for more information.
 
ETC1 is a compressed texture format which compresses blocks of 4x4 pixels into u64s. These u64 are traditionally stored in big endian; however, nintendo's implementation stores them in little endian. ETC1 textures are stored in 8x8 tiles; decompressed 4x4 therefore have to be organized accordingly. See [https://gist.github.com/smealum/8897237] for implementation example.
 
ETC1 is a compressed texture format which compresses blocks of 4x4 pixels into u64s. These u64 are traditionally stored in big endian; however, nintendo's implementation stores them in little endian. ETC1 textures are stored in 8x8 tiles; decompressed 4x4 therefore have to be organized accordingly. See [https://gist.github.com/smealum/8897237] for implementation example.
 +
 +
 +
== Skeleton data ==
 +
 +
Skeleton data is stored in an array. Each entry is 0xE0 bytes in length and organized this way :
 +
 +
 +
{| class="wikitable"
 +
|-
 +
! Offset
 +
! Length
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x4
 +
| Offset (self relative) to name symbol
 +
|-
 +
| 0x8
 +
| 0x4
 +
| Joint ID
 +
|-
 +
| 0xC
 +
| 0x4
 +
| Parent joint ID
 +
|-
 +
| 0x10
 +
| 0x4
 +
| Signed offset (self-relative) to parent joint
 +
|-
 +
| 0x2C
 +
| 0xC
 +
| Angle vector (floats, x, y, z)
 +
|-
 +
| 0x38
 +
| 0xC
 +
| Position vector (floats, x, y, z)
 +
|-
 +
| 0x44
 +
| 0x30
 +
| Transformation matrix (4x3)
 +
|-
 +
| 0x70
 +
| 0x30
 +
| Identity matrix ? (4x3)
 +
|}
 +
 +
Each entry stores the joint transformation data twice; once as angle/position vectors and once as a transformation matrix. Each entry also stores a second matrix which appears to always be identity. (?)
    
== CANM ==
 
== CANM ==
    
CANMs are used to store skeletal animation data.
 
CANMs are used to store skeletal animation data.
373

edits