CMDL (Tropical Freeze): Difference between revisions

no edit summary
>Aruki
>Aruki
No edit summary
Line 233: Line 233:
=== GPU ===
=== GPU ===


The GPU section contains raw buffer data that's fed to the GPU. It's essentially just a giant blob with all the vertex and index buffers laid out next to each other. The tricky part is, all the buffer data is LZSS-compressed, and not only is the metadata required to decompress it is stored in the pak, rather than in the model files themselves, but that metadata is also the only way to distinguish the different buffers from each other (especially the index buffers, since they have no count value you can use to calculate the size of the buffer).
The GPU section contains raw buffer data that's fed to the GPU. It's essentially just a giant blob with all the vertex and index buffers laid out next to each other. The tricky part is, all the buffer data is [[LZSS Compression|LZSS-compressed]], and the metadata needed to decompress it is stored in the pak rather than in the files themselves; not only that, but that metadata is also the only way to distinguish the different buffers from each other.


As such, this section can't be read correctly if the model file is unpacked and completely left as-is; it needs to be either read directly from the pak, or the metadata needs to be included in the file in some way. A good unpacker should append the metadata to the end of the file.
As such, this section can't be read correctly if the model file is unpacked and completely left as-is; it needs to be either read directly from the pak, or the metadata needs to be added to the file in some way. A good unpacker should append the metadata to the end of the file; a pre-decompressed file needs the buffer sizes or offsets inserted into the file data somewhere.
 
Note: Page explaining the compression algorithm and how to decompress it is coming soon.


== PAK Metadata ==
== PAK Metadata ==
Anonymous user