Pure3d P3D

From XentaxWiki
Jump to: navigation, search

Back to index | Edit this page

P3D

  • Format Type : Archive
  • Endian Order : Little Endian
  • Signature : P3D


Format Specifications

// main chunk
4 bytes (char) - signature // "P3D\xFF"
4 bytes (uint32) - chunk size without subchunks  // always 12
4 bytes (uint32) - archive size / main chunk size

// subchunks 
num_of_subchunks *
{
   4 bytes (uint32) - chunk type   //   0x00 0x90 0x01 0x00 / 102400 - texture
                                   //   0x01 0x90 0x01 0x00 / 102401 - image
                                   //   etc.
   4 bytes (uint32) - chunk size without subchunks
   4 bytes (uint32) - chunk size with subchunks
   x bytes - chunk data   // it can contain other subchunks
}  

Subchunks Specifications

// Texture subchunk data
// 0x00 0x90 0x01 0x00 / 102400

1 byte (uint8) - filename length
32 bytes (char) - filename   // e.g. "C1L2A1-14_residentwindow1.tga"
4 bytes (uint32) - version  // e.g. 14000
4 bytes (uint32) - width
4 bytes (uint32) - height
4 bytes (uint32) - bpp
4 bytes (uint32) - alpha depth
4 bytes (uint32) - mipmaps count
4 bytes (uint32) - texture type  // e.g. 8
4 bytes (uint32) - usage  // e.g. 0
4 bytes (uint32) - priority // e.g. 0
x bytes - data


// Image subchunk data
// 0x01 0x90 0x01 0x00 / 102401

1 byte (uint8) - filename length
32 bytes (char) - filename   // e.g. "C1L2A1-14_residentwindow1.tga"
4 bytes (uint32) - version  // e.g. 14000
4 bytes (uint32) - width
4 bytes (uint32) - height
4 bytes (uint32) - bpp
4 bytes (uint32) - is_palettized flag
4 bytes (uint32) - has_alpha flag
4 bytes (uint32) - image format  // e.g. 10
x bytes - data


// ImageData subchunk data
// 0x02 0x90 0x01 0x00 / 102402

4 bytes (uint32) - image data size
x bytes - data


// Shader subchunk data
// 0x00 0x10 0x01 0x00 / 69632

1 byte (uint8) - filename length
32 bytes (char) - filename   // e.g. "pure3dReflectShader3"
4 bytes (uint32) - version  // e.g. 0
1 byte (uint8) - shader name length
x bytes (char) - shader name  // e.g. "environment"
4 bytes (uint32) - has_transparency flag
4 bytes (uint32) - vertex needs 
4 bytes (int32) - vertex mask
4 bytes (uint32) - params count
x bytes - data


// ShaderTextureParam subchunk data
// 0x02 0x10 0x01 0x00 / 69634

4 bytes (char) - parameter name // e.g. "TEX\x00" or "REFL"
1 byte (uint8) - filename length
32 bytes (char) - filename   // e.g. "pure3dReflectShader3"


// ShaderIntParam subchunk data
// 0x03 0x10 0x01 0x00 / 69634

4 bytes (char) - parameter name // e.g. "LIT\x00"
4 bytes (uint32) - parameter value

MultiEx BMS Script

Not written yet.

Notes and Comments

  • This file format occurs in games made by Radical Entertainment.
  • Whole P3D file may be compressed with custom LZ compression method.

Games

List of games using this file format:

  • Crash Mind Over Mutant (*.P3D)
  • The Simpsons Hit & Run (*.P3D)
  • The Simpsons: Road Rage (*.P3D)

Compatible Programs

See Also