Go to file
2023-11-05 17:38:08 +08:00
BMap fix fatal error about bmap. continue writing py bmap binding 2023-11-05 17:38:08 +08:00
BMapBindings fix fatal error about bmap. continue writing py bmap binding 2023-11-05 17:38:08 +08:00
CodeGen rename BM3dEntity to BM3dObject in BMap. continue writing python bmao binding. fix doc 2023-11-05 10:44:11 +08:00
Documents rename BM3dEntity to BM3dObject in BMap. continue writing python bmao binding. fix doc 2023-11-05 10:44:11 +08:00
IronPad fix x64 compile error. add arm support in IronPad 2023-10-29 12:36:03 +08:00
LibCmo fix x64 compile error. add arm support in IronPad 2023-10-29 12:36:03 +08:00
Tools update gitignore 2023-11-02 20:27:57 +08:00
Unvirt add transparent column fixer code and finish bmap load/save 2023-10-29 10:27:35 +08:00
.gitattributes move some document into here 2023-02-04 22:21:18 +08:00
.gitignore update gitignore 2023-11-02 20:27:57 +08:00
CONTRIBUTING.md finish linux related code writting. remove all offensive content. 2023-03-26 20:32:13 +08:00
libcmo21.sln create BMap project and copy-paste previous mesh convertion code 2023-09-21 13:47:30 +08:00
LibRef.props use stb as default image codec 2023-09-06 15:17:39 +08:00
LICENSE Intro project. Change license back to MIT. 2023-03-26 21:03:22 +08:00
README.md write binding code 2023-11-02 10:53:16 +08:00

libcmo21

The Library for CMO (also accept NMO, VMO and NMS) File Read/Write. Also the Minimalist Virtools Environment.
Write with one Library and Load Virtools File Everywhere.

Status

This is a long time project.
This project welcome everyone's contribution, except the employee of Dassault, which created Virtools.

Introduction

The aim of this project is creating a universal library which can read / write CMO files or any other Virtools files without any Virtools dependencies.
This project will not link any original Virtools dynamic library. So this project can be ported to any platform if the compiler supports.
This project only involving specific Virtools version, 2.1. Other Virtools versions are not considered by this project.
This project is based on reverse work of CK2.dll, VxMath.dll and CK2_3D.dll. The program unvirt created by Luigi Auriemma, which is licensed by GPL-v2, also help my work.

The difference between this project and other Virtools libraries, is that we are not focusing on re-creating the whole Virtools engine. We only focus on the Virtools files RW, and we only just implement a minimalist Virtools environment for achieving this.

Goals

The ultimate goals of this project are:

  • Create a library which can read Virtools file and do not limited on x86 platform by original Virtools implement.
  • Create a universal dynamic library for Ballance Map file loading.
    • Create a Python binding for the loader. And allow user can export Ballance Map from Blender on Linux platform natively.
    • Create a C# binding for the loader to enable that I can load Ballance Map in Godot on Linux / Android platform natively.

There is still a long way to go. But I will try my best.

Project Layout

  • LibCmo: Core library. It is a static library. Link to your program freely because I don't want to process export table things.
  • IronPad: A tiny Crashpad like static library. Used by Unvirt and BMap. Report crash log and coredump only on Windows (Because I assume all Linux users have capacity to enable coredump and deliver it to developer.).
  • Unvirt: Interactive Virtools file viewer. Can provide more detail than Luigi Auriemma's unvirt but only can accept version limited Virtools file (< 4.0 I guess).
  • BMap: A dynamic library which is specific for Ballance Map loading by using LibCmo.

Contributions

However, not all contribution will be accepted. Just like I said, we create Minimalist Virtools Environment. The basic RW functions is enough. We do not accept complex function implementations.
There are 3 lists which indicate our accept guideline.

Wanted Features

These features will be accepted as soon as possible.

  • The bug fix of any existing code.

Not Urgent Features

These features are in plan, but not urge to merge.

  • The CK_ID remap system of Reader.
  • CK3dEntity hierarchy system.
  • Other CK classes implementations.
  • Non-Virtools 2.1 implementations.

Don't Care Features

These features explicitly will not be merged.

  • Run Virtools file.
  • Plugin system.

Compile

This project require:

  • The compiler supporting C++20
  • Littile-endian architecture system.
  • zlib
  • stb (For image read / write)
  • iconv (non-Windows system required)

It can be compiled on Windows via sln file. You should set up LibRef.props when using sln file to build this project on Windows.
You also can use CMake file to compile this project on Linux or anything else platform. However CMake may not be updated in time because I develop this project on Windows frequently.