Skip to content

INP Data Interchange Format

Luna edited this page May 30, 2021 · 7 revisions

INP

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.

Format Layout

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.
Till EOF Texture Blob The texture blob section contains the texture blobs for this puppet ordered after their texture ID.

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

Texture Encoding

There's 3 supported texture formats in Inochi2D, which are the following:

ID Format
0 PNG - Portable Network Graphics (Lossy)
1 TGA - Truevision TGA (Lossless)
2 BC7 - BPTC Texture Compression (Lossy)
Clone this wiki locally