-
-
Notifications
You must be signed in to change notification settings - Fork 49
INP Data Interchange Format
Luna edited this page Nov 19, 2022
·
7 revisions
INP stands for Inochi Puppet, and is a VRM/glTF like format for interchanging Inochi2D puppet data.
Note: As new features are added to Inochi2D this format is subject to change.
Note: All numbers are encoded in Big Endian.
Length (bytes) | Contents | Notes |
---|---|---|
8 | TRNSRTS\0 |
The magic bytes for an INP file, these need to be there to tell the INP loader that it's an INP file. (Trans Rights!) |
4 | JSON Payload Length | Length of the JSON Payload |
Payload Length | JSON Data | The internal JSON data that contains all the model data. |
8 | TEX_SECT |
Texture Section header |
4 | Texture Count | The amount of textures stored in the Texture Section |
Till Texture Blob End | Texture Blob | The texture blob section contains the texture blobs for this puppet ordered after their texture ID. |
8 | EXT_SECT |
(OPTIONAL) Optional EXTended Vendor Data section for app provided settings for the puppet. |
4 | Payload Count | (If EXT exists) Amount of JSON payloads that are in this EXT section. |
Till EXT Section End | EXT Section Blob | (If EXT exists) The EXT section blob of this EXT section |
Every Texture entry in the Texture Blob have the following encoding
Length (bytes) | Contents | Notes |
---|---|---|
4 | Texture Payload Length | Length of the Texture Payload |
1 | Texture Encoding Type | A byte defining what texture encoding is in use. See Texture Encoding section. |
Payload Length | Texture Data | Texture Data |
Length (bytes) | Contents | Notes |
---|---|---|
4 | Name Length | Length of EXT Payload name |
Name Length | Name | The name of the EXT payload |
4 | Payload Length | Length of the EXT payload |
Payload Length | Payload | The JSON contents of the EXT Payload |
There's 3 supported texture formats in Inochi2D, which are the following:
ID | Format |
---|---|
0 | PNG - Portable Network Graphics (Lossless) |
1 | TGA - Truevision TGA (Lossless) |
2 | BC7 - BPTC Texture Compression (Lossy) |