Users browsing this thread: 42 Guest(s)
(Another) Zelda Ripping Project!
(06-28-2022, 03:46 PM)Alvare Wrote: Yup. Everything you said checks out. Something I've been dealing with as well. Encoding on Majora's Mask seems to be different and botched on a large portion of areas.
As well as something more unique of an issue.. Gomez. The Grim reaper boss from the Stone Temple, which is one of my favorite enemy designs.
Can't be extracted correctly either. Still to this day. :(

Damn that sucks. The Gomez boss really was a stylish design.

So here's my question now: The encoding on certain MM3D files are botched... But the CMB Viewer program is able to open, display, and export all of the ZSI files that the CMB importer for Blender wasn't able to. Termina Field being the most obvious example.

CMB Viewer is definitely doing something to be able to get past the encoding issue. So it absolutely must be possible.

Hmm...

I just looked at the files again in HxD to see if I could find a pattern. The files that do open have a lot of "00" empty bytes in them, where as the Termina Field file doesn't. I also noticed that it starts with a header like this:

Code:
LzS��a���
� ��ZSI    ShUn�jenkins

The first letters being "LzS". And looking at the github page N3DSCmbViewer, noted at the bottom is this:

Quote:LZSS decompression code adapted from C++ code by ShimmerFairy
 
So I'm guessing that some of these files are compressed using this "LzSS" compression algorithm, and that explains the "LzS" header before the "ZSI". So CmbViewer is able to load these because it has code that is able to use LZSS to decompress these files first.

Compression would also explain the lack of empty "00" byes in those files. A quick search yields that LZSS is a common known compression algorithm: https://go-compression.github.io/algorithms/lzss/

The code that CMBViewer uses is here: https://github.com/xdanieldzd/N3DSCmbVie...er/LZSS.cs

I don't know C# well enough to do anything with that. I tried finding some stand-alone LZSS decompressors, but they just don't seem to exist -- any google search just led to sites like StackExchange where people were discussing implementations for LZSS in code. But nothing that's really "end user friendly."

I was able to find a few Python examples, but couldn't get them to run. And the PIP install for LZSS library failed for me for some reason.

---

(UPDATED: 2023-03-30)

It sucks that all of these tools each seem to be missing 1 or 2 vital components to make a single wholly functional tool. And they're all missing different parts of the puzzle.

Blender 2.79 CMB Importer: github.com/MeltyPlayer/OoT3D-Importer
  • Imports perfectly.
  • Preserves UVs, Vertex Colors, vertex alphas, bones, materials, everything.
  • Only works in a very specific older version of Blender 2.79.
  • Extracted texture files don't have ".png" extensions, which is a slight annoyance to work with.
  • EDIT: PNG issue above is only with an older version by MLG. Most recent version is by MeltyPlayer - make sure to use that version!
  • You have to manually separate the CMB from a ZSI file. Which is tedious. (sort of solved, see below)
  • It can't read compressed CMB/ZSI files. (sort of solved, see below)
  • There's no simple tool to just decompress a ZSI file.

JamesO2's ZSI Scene Decompressor: github.com/JamesO2x/Py-MM3D-LZSS-decompressor-to-CMB
  • I've created a tool that can decompress and extract ZSI files.
  • Works as of (2022-11-04) using Python 3.
  • Bulk converts ZSI scene files to CMB format, and also removes LZSS compression.
  • Works on "scene" files, probably doesn't work with "actors" (not tested)
  • Tested with MM3D and OoT3D
  • Does not convert models to FBX or other standard format, only to grezzo's CMB format.
  • So this Python script combined with the Blender 2.79 CMB Importer is now currently the best option for scene ripping.

Fin Model Utility: github.com/MeltyPlayer/FinModelUtility
  • Basically automates everything (extract RomFS, rip models, auto-converts them to FBX and GLTF)
  • Works with OoT3D, but I can't get it to work with MM3D at all.
  • Now works with MM3D
  • It seems to only convert the "actors" and completely ignore the "scenes" folder. So its only currently good for characters, not environments.
  • It automatically exports all the "actor" files into both an FBX and GLTF format. The FBX includes all animations too!
  • Can export models individually, or in bulk.

CMB Viewer (not recommended)
  • Simple to use, quickly load of ZSI files with one-click.
  • But the Collada export messes up the UVs badly, and doesn't apply bones correctly.
  • No options for other exports, or even just to extract CMB from ZSI files.
  • No batch/bulk converting process, so converting to Collada is tedious.
  • Blender's Collada importer is also pretty broken anyway, and doesn't import Vertex Alpha data properly.
  • This tool is no longer recommended.
  • Other tools work better now. But if you want a simple, quick, and dirty model rip (that lacks accuracy) then this is an OK tool.

---

Which is why I sorta just bodged together my own solution using a combination of tools and my own scripts. Specifically, I used:
  • My own Python script to bulk decompress the ZSI files into a CMB format: https:/github.com/JamesO2x/Py-MM3D-LZSS-decompressor-to-CMB
  • The MeltyPlayer blender 2.79 importer: https://github.com/MeltyPlayer/OoT3D-Importer
  • My own AHK script to bulk import CMB files using the above (because I could not figure out a way to automate this with Blender's python, likely due to how the addon was coded) and save them as 2.79 Blend files.
  • Appending the 2.79 Blend files into Blender 3.1, to take advantage of the newer tools and material features.
  • Export to whatever game engine/format you need.

In summation:
  • Fin Model Utility rips all the characters and their animations.
  • My hacky solution above rips all the scenes.

It seems like the Fin Model Utility is the only tool getting regular updates now. Eventually, I imagine it will be able to do everything.
Reply
Thanked by:


Messages In This Thread
(Another) Zelda Ripping Project! - by JerseyXS97 - 01-18-2016, 02:52 PM
RE: (Another) Zelda Ripping Project! - by Alvare - 03-18-2016, 05:10 AM
RE: (Another) Zelda Ripping Project! - by kamishi - 03-29-2016, 04:19 PM
RE: (Another) Zelda Ripping Project! - by xdaniel - 06-10-2016, 06:09 AM
RE: (Another) Zelda Ripping Project! - by Guy - 07-20-2016, 09:05 PM
RE: (Another) Zelda Ripping Project! - by Guy - 07-24-2016, 02:55 AM
RE: (Another) Zelda Ripping Project! - by Guy - 07-29-2016, 03:03 AM
RE: (Another) Zelda Ripping Project! - by Guy - 01-13-2017, 11:50 PM
RE: (Another) Zelda Ripping Project! - by Guy - 01-15-2017, 11:38 PM
RE: (Another) Zelda Ripping Project! - by Guy - 01-24-2017, 10:44 PM
RE: (Another) Zelda Ripping Project! - by Kosmil - 01-29-2017, 12:03 PM
RE: (Another) Zelda Ripping Project! - by Guy - 01-29-2017, 02:42 PM
RE: (Another) Zelda Ripping Project! - by Kosmil - 01-29-2017, 05:14 PM
RE: (Another) Zelda Ripping Project! - by Guy - 01-30-2017, 03:40 AM
RE: (Another) Zelda Ripping Project! - by Kosmil - 01-30-2017, 04:34 AM
RE: (Another) Zelda Ripping Project! - by Guy - 02-04-2017, 04:55 PM
RE: (Another) Zelda Ripping Project! - by Euden - 02-09-2017, 04:58 AM
RE: (Another) Zelda Ripping Project! - by Euden - 02-17-2017, 06:01 PM
RE: (Another) Zelda Ripping Project! - by Euden - 02-17-2017, 09:55 PM
RE: (Another) Zelda Ripping Project! - by Euden - 02-19-2017, 10:28 AM
RE: (Another) Zelda Ripping Project! - by Euden - 02-23-2017, 03:16 PM
RE: (Another) Zelda Ripping Project! - by Euden - 02-27-2017, 04:00 PM
RE: (Another) Zelda Ripping Project! - by xiexe - 03-09-2017, 01:57 AM
RE: (Another) Zelda Ripping Project! - by xiexe - 03-09-2017, 10:10 AM
RE: (Another) Zelda Ripping Project! - by ravio - 03-12-2017, 01:39 AM
RE: (Another) Zelda Ripping Project! - by ravio - 03-12-2017, 05:26 AM
RE: (Another) Zelda Ripping Project! - by Nepfan - 03-14-2017, 06:57 AM
RE: (Another) Zelda Ripping Project! - by ravio - 03-14-2017, 07:53 AM
RE: (Another) Zelda Ripping Project! - by Nepfan - 03-14-2017, 10:22 AM
RE: (Another) Zelda Ripping Project! - by Nepfan - 03-14-2017, 11:08 AM
RE: (Another) Zelda Ripping Project! - by ravio - 03-15-2017, 10:19 AM
RE: (Another) Zelda Ripping Project! - by Sabi96 - 03-15-2017, 02:39 PM
RE: (Another) Zelda Ripping Project! - by ravio - 03-16-2017, 12:49 AM
RE: (Another) Zelda Ripping Project! - by ravio - 03-16-2017, 01:08 PM
RE: (Another) Zelda Ripping Project! - by ravio - 03-17-2017, 12:12 AM
RE: (Another) Zelda Ripping Project! - by zSydor - 03-20-2017, 08:56 PM
RE: (Another) Zelda Ripping Project! - by ravio - 03-21-2017, 01:07 AM
RE: (Another) Zelda Ripping Project! - by XPS - 03-22-2017, 09:31 PM
RE: (Another) Zelda Ripping Project! - by digivee - 03-25-2017, 01:30 AM
RE: (Another) Zelda Ripping Project! - by Guy - 03-26-2017, 11:03 AM
RE: (Another) Zelda Ripping Project! - by zSydor - 03-25-2017, 03:04 PM
RE: (Another) Zelda Ripping Project! - by zSydor - 03-26-2017, 11:32 AM
RE: (Another) Zelda Ripping Project! - by XPS - 03-27-2017, 08:52 PM
RE: (Another) Zelda Ripping Project! - by digivee - 03-28-2017, 05:01 PM
RE: (Another) Zelda Ripping Project! - by digivee - 03-29-2017, 12:45 PM
RE: (Another) Zelda Ripping Project! - by zSydor - 04-02-2017, 05:43 PM
RE: (Another) Zelda Ripping Project! - by Grizzly - 04-03-2017, 11:50 AM
RE: (Another) Zelda Ripping Project! - by thatrs - 04-04-2017, 06:22 AM
RE: (Another) Zelda Ripping Project! - by Makoto - 04-24-2017, 07:21 AM
RE: (Another) Zelda Ripping Project! - by zSydor - 04-24-2017, 04:31 PM
RE: (Another) Zelda Ripping Project! - by zSydor - 04-24-2017, 08:02 PM
RE: (Another) Zelda Ripping Project! - by zSydor - 04-24-2017, 09:13 PM
RE: (Another) Zelda Ripping Project! - by Atlanta - 04-27-2017, 02:45 PM
RE: (Another) Zelda Ripping Project! - by Relt - 04-29-2017, 05:07 AM
RE: (Another) Zelda Ripping Project! - by Relt - 05-03-2017, 12:20 PM
RE: (Another) Zelda Ripping Project! - by Euden - 05-02-2017, 07:55 AM
RE: (Another) Zelda Ripping Project! - by SPG - 05-12-2017, 10:20 PM
RE: (Another) Zelda Ripping Project! - by zSydor - 05-14-2017, 06:46 PM
RE: (Another) Zelda Ripping Project! - by Kasuto - 05-18-2017, 04:10 AM
RE: (Another) Zelda Ripping Project! - by Pingus! - 06-06-2017, 05:49 PM
RE: (Another) Zelda Ripping Project! - by Dazz - 06-06-2017, 06:50 AM
RE: (Another) Zelda Ripping Project! - by sws - 06-10-2017, 12:50 PM
RE: (Another) Zelda Ripping Project! - by Orel67 - 06-11-2017, 07:24 AM
RE: (Another) Zelda Ripping Project! - by sws - 06-12-2017, 11:55 AM
RE: (Another) Zelda Ripping Project! - by sws - 06-12-2017, 03:28 PM
RE: (Another) Zelda Ripping Project! - by Atimix - 06-21-2017, 09:41 PM
RE: (Another) Zelda Ripping Project! - by caysao1 - 06-24-2017, 10:32 AM
RE: (Another) Zelda Ripping Project! - by caysao1 - 06-25-2017, 06:03 PM
RE: (Another) Zelda Ripping Project! - by jeston - 06-26-2017, 02:38 PM
RE: (Another) Zelda Ripping Project! - by Guy - 06-24-2017, 10:37 PM
RE: (Another) Zelda Ripping Project! - by caysao1 - 07-01-2017, 11:19 AM
RE: (Another) Zelda Ripping Project! - by Euden - 08-30-2017, 04:27 AM
RE: (Another) Zelda Ripping Project! - by Ogalon - 01-05-2018, 03:52 AM
RE: (Another) Zelda Ripping Project! - by Xetera - 01-06-2018, 07:32 PM
RE: (Another) Zelda Ripping Project! - by keanine - 01-22-2018, 04:37 PM
RE: (Another) Zelda Ripping Project! - by Chirz - 03-18-2018, 02:06 AM
RE: (Another) Zelda Ripping Project! - by Euden - 10-15-2019, 04:26 AM
RE: (Another) Zelda Ripping Project! - by TheFip - 10-20-2019, 03:55 AM
RE: (Another) Zelda Ripping Project! - by radzo73 - 02-04-2020, 06:55 PM
RE: (Another) Zelda Ripping Project! - by AJD-262 - 09-21-2020, 03:09 AM
RE: (Another) Zelda Ripping Project! - by AJD-262 - 09-23-2020, 08:04 PM
RE: (Another) Zelda Ripping Project! - by AJD-262 - 09-23-2020, 08:24 PM
RE: (Another) Zelda Ripping Project! - by AJD-262 - 09-23-2020, 08:30 PM
RE: (Another) Zelda Ripping Project! - by AJD-262 - 09-23-2020, 08:57 PM
RE: (Another) Zelda Ripping Project! - by AJD-262 - 09-23-2020, 09:34 PM
RE: (Another) Zelda Ripping Project! - by AJD-262 - 09-23-2020, 09:58 PM
RE: (Another) Zelda Ripping Project! - by AJD-262 - 09-24-2020, 01:06 PM
RE: (Another) Zelda Ripping Project! - by AJD-262 - 10-25-2020, 08:17 PM
RE: (Another) Zelda Ripping Project! - by Joschka - 10-29-2020, 04:05 PM
RE: (Another) Zelda Ripping Project! - by AJD-262 - 10-29-2020, 07:07 PM
RE: (Another) Zelda Ripping Project! - by Ryuzaki - 12-01-2020, 10:56 AM
RE: (Another) Zelda Ripping Project! - by KeyXu - 03-18-2021, 05:35 AM
RE: (Another) Zelda Ripping Project! - by nephpoo - 03-26-2021, 07:10 PM
RE: (Another) Zelda Ripping Project! - by Alvare - 07-25-2021, 08:17 AM
RE: (Another) Zelda Ripping Project! - by Hbot - 08-10-2021, 12:57 PM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 03-30-2023, 09:20 PM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 03-30-2023, 10:51 PM
RE: (Another) Zelda Ripping Project! - by Alvare - 09-25-2021, 04:44 AM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 06-01-2022, 03:18 PM
RE: (Another) Zelda Ripping Project! - by scurest - 06-01-2022, 10:59 PM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 06-02-2022, 06:16 AM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 06-02-2022, 10:02 AM
RE: (Another) Zelda Ripping Project! - by Alvare - 06-16-2022, 03:22 AM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 06-18-2022, 10:59 PM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 06-20-2023, 04:50 PM
RE: (Another) Zelda Ripping Project! - by scurest - 06-20-2022, 05:19 PM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 06-20-2022, 07:51 PM
RE: (Another) Zelda Ripping Project! - by Alvare - 06-27-2022, 11:46 PM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 06-28-2022, 02:03 PM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 06-28-2022, 03:14 PM
RE: (Another) Zelda Ripping Project! - by Alvare - 06-28-2022, 03:46 PM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 06-28-2022, 06:06 PM
RE: (Another) Zelda Ripping Project! - by Alvare - 06-29-2022, 12:03 AM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 06-29-2022, 01:37 AM
RE: (Another) Zelda Ripping Project! - by Alvare - 06-29-2022, 07:20 AM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 06-29-2022, 12:56 PM
RE: (Another) Zelda Ripping Project! - by Alvare - 06-29-2022, 01:30 PM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 06-29-2022, 02:36 PM
RE: (Another) Zelda Ripping Project! - by Alvare - 06-29-2022, 04:26 PM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 06-29-2022, 04:37 PM
RE: (Another) Zelda Ripping Project! - by Alvare - 07-03-2022, 04:59 AM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 10-29-2022, 12:38 PM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 11-04-2022, 11:23 AM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 01-04-2023, 06:51 PM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 03-31-2023, 06:44 PM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 04-01-2023, 01:28 PM
RE: (Another) Zelda Ripping Project! - by Makoto - 05-02-2023, 02:49 PM
RE: (Another) Zelda Ripping Project! - by Makoto - 05-11-2023, 11:25 PM
RE: (Another) Zelda Ripping Project! - by Makoto - 05-14-2023, 03:43 AM
RE: (Another) Zelda Ripping Project! - by Makoto - 05-18-2023, 07:07 AM
RE: (Another) Zelda Ripping Project! - by Hbot - 05-24-2023, 01:05 AM
RE: (Another) Zelda Ripping Project! - by Makoto - 06-03-2023, 12:55 PM
RE: (Another) Zelda Ripping Project! - by Yeadude - 06-05-2023, 03:53 PM
RE: (Another) Zelda Ripping Project! - by Hybryda - 07-09-2023, 11:18 AM
RE: (Another) Zelda Ripping Project! - by Hybryda - 07-12-2023, 08:37 AM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 07-20-2023, 10:56 AM
RE: (Another) Zelda Ripping Project! - by Hybryda - 07-20-2023, 11:26 AM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 07-20-2023, 11:32 AM
RE: (Another) Zelda Ripping Project! - by Hybryda - 07-20-2023, 12:24 PM
RE: (Another) Zelda Ripping Project! - by JamesO2 - 07-20-2023, 12:33 PM
RE: (Another) Zelda Ripping Project! - by Hybryda - 07-20-2023, 12:47 PM
RE: (Another) Zelda Ripping Project! - by Qw2 - 07-14-2023, 11:31 AM
RE: (Another) Zelda Ripping Project! - by Hybryda - 07-17-2023, 06:39 AM
RE: (Another) Zelda Ripping Project! - by Makoto - 07-18-2023, 06:25 AM
RE: (Another) Zelda Ripping Project! - by Hybryda - 07-18-2023, 07:27 AM
RE: (Another) Zelda Ripping Project! - by Hybryda - 07-18-2023, 02:03 PM

Forum Jump: