Skip to content
forked from vtubing/moc3

A library for reading models from binary .moc3 files

License

Notifications You must be signed in to change notification settings

bungaku-moe/moc3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

moc3 Latest Version

What is it?

A binary loader for .moc3 files. It has been tested and is able to load the following versions of this data format:

  • v3.0
  • v3.3
  • v4.0 (though this version did not seem to be any different than v3.3)
  • v4.2
  • v5.0

It can correctly identify all sections of these versions, and load all the relevant data into meaningful data types like ArtMesh, Part, Deformer, etc.

How do I obtain this majestic tool?

Run the following Cargo command in your project directory (assuming you have cargo-edit installed):

cargo add moc3

Or add the following line to your Cargo.toml (in the [dependencies] array):

moc3 = "^ 0.2"

How do I use it?

use moc3::Model;
use std::io::Read;

fn main() {
  let moc3 = std::fs::read("./path/to/some.moc3").unwrap();
  let model = Model::read(moc3).unwrap();
  println!("{model:#?}");
}

How was this made?

  • Carefully, without using or referencing any code or libraries from the format vendor.
  • The ImHex highlighting patterns from the MOC3ingbird Exploit (CVE-2023-27566) was instrumental in understanding this format.
  • The discovery process for undocumented binary formats is described here.

License

moc3 is available under the MIT License. See LICENSE.txt for the full text.

While the license is short, it's still written in fancy lawyer-speak. If you prefer more down-to-earth language, consider the following:

  • tl;drLegal has a simple visual summary available here.
  • FOSSA has a more in-depth overview available here.

About

A library for reading models from binary .moc3 files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%