EvilEngine/PIPT
PIPT | |
---|---|
Pipe Info Table | |
Type | Binary |
Games used | Battle for Bikini Bottom The SpongeBob SquarePants Movie |
Source code | xModel.h |
The pipeline information table contains additional material information for level objects. The asset consists of an array of entries, each with rendering information for an entire MODL asset or a single mesh within it.
Format
The file starts with an int which defines the amount of entries, then each entry has the following layout, being 0x0C bytes long in BFBB and 0x10 in Movie:
struct xModelPipeInfo
{
unsigned int ModelHashID;
unsigned int SubObjectBits;
unsigned int PipeFlags;
unsigned int unknown; // only present in Movie
};
Offset | Variable | Description |
---|---|---|
0x00 | ModelHashID | MODL ID |
0x04 | SubObjectBits | Specifies which RW atomics in the model to apply this pipe info entry to. Each bit is an on/off state for an atomic, starting with the last atomic as the least significant bit (0x1) and ending with the first atomic as the most significant bit.
For example, if a model has 4 atomics:
When a pipe entry should be applied to all atomics, this is usually set to 0xFFFFFFFF. |
0x08 | PipeFlags | Bitfield of various rendering flags. The layout is the following (left side is most significant, right side is least significant):
AAAA AAAA BBBB CCCD EEEE FFFF GGHH IIJJ
|
0x0C | unknown | Only present in Movie. |
RwBlendFunction
- 0 - N/A
- 1 - Zero
- 2 - One
- 3 - Source Color
- 4 - Inverse Source Color
- 5 - Source Alpha
- 6 - Inverse Source Alpha
- 7 - Destination Alpha
- 8 - Inverse Destination Alpha
- 9 - Destination Color
- 10 - Inverse Destination Color
- 11 - Source Alpha Saturated
Movie Model Asset ID
One important detail in the PIPT asset in Movie Game is that, in some of the entries, the model Asset ID will be a hash of the model's name without the .dff extension at the end, being different from if it were hashed from the name with .dff. This can be noted in Industrial Park's PIPT editor in which some of the PIPT entries refer to the model's name without .dff at the end:
It's unknown why this was done this way and whether having the entry reference a hash with .dff at the end will work or not.