MCPcopy Index your code
hub / github.com/SkaceKamen/wot-model-converter

github.com/SkaceKamen/wot-model-converter @v2.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.1 ↗ · + Follow
114 symbols 328 edges 21 files 13 documented · 11%

Browse by type

Functions 94 Types & classes 20
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

World of Tanks Model Converter

Converts World of Tanks models to wavefront obj format.

Notes

  • script only parse diffuse textures
  • all primitive groups are packed into one single obj file at this time
  • skinned weight can be extracted but not supported by wavefront obj. Another branch for FBX/DAE exporter would be necessary.
  • support new primitives variant used in WoT v0.9.12+ HD models.
  • model mirroring is adapt to standard WG models. Results for models built by other parties are not guaranteed.

Additional credits (not mentioned on github)

Thanks to Phux_and_the_Wheel_Bearing (AKA Coffee_), from whose code this script originates

Usage

Script requires .primitives and .visual files (or .primitives_processed and .visual_processed in case of WoT 0.9.10+) of model to create obj (and mtl) file. You can either specify only primitives file and script will assume visual file is in same folder with same name, but different extension, or you can specify path to visual file separatedly. Script can compress result obj and mtl files using zlib.

usage: convert-primitive.py [-h] [-v VISUAL] [-o OBJ] [-m MTL] [-t TEXTURES]
                            [-sx SCALEX] [-sy SCALEY] [-sz SCALEZ]
                            [-tx TRANSX] [-ty TRANSY] [-tz TRANSZ] [-c] [-nm]
                            [-nvt] [-nvn]
                            input

Converts BigWorld primitives file to obj.

positional arguments:
  input                 primitives file path (wildcard accepted)

optional arguments:
  -h, --help            show this help message and exit
  -v VISUAL, --visual VISUAL
                        visual file path
  -o OBJ, --obj OBJ     result obj path
  -m MTL, --mtl MTL     result mtl path
  -t TEXTURES, -t TEXTURES
                        path to textures
  -sx SCALEX, --scalex SCALEX
                        X scale
  -sy SCALEY, --scaley SCALEY
                        Y scale
  -sz SCALEZ, --scalez SCALEZ
                        Z scale
  -tx TRANSX, --transx TRANSX
                        X transform
  -ty TRANSY, --transy TRANSY
                        Y transform
  -tz TRANSZ, --transz TRANSZ
                        Z transform
  -c, --compress        Compress output using zlib
  -nm, --nomtl          don't output material
  -nvt, --novt          don't output UV coordinates
  -nvn, --novn          don't output normals

Example

convert-primitive.py -o Hull.obj Hull.primitives

will output 'Hull.obj' with all model data and 'Hull.mtl' with materials

convert-primitive.py -f collada -o Hull.dae Hull.primitives

will output 'Hull.dae'

convert-primitive.py *.primitives_processed

will process all primitives_processed files and output .obj under current folder.

Requirements

Python 2.7 - 3.5

Core symbols most depended-on inside this repo

Shape

Method 75
Class 20
Function 19

Languages

Python100%

Modules by API surface

wot/ModelReader.py20 symbols
wot/PackageReader.py17 symbols
wot/XmlUnpacker.py15 symbols
wot/SpaceReader.py15 symbols
wot/TreesReader.py8 symbols
wot/chunks/table.py7 symbols
wot/ModelWriter.py7 symbols
wot/ColladaModelWriter.py6 symbols
wot/chunks/utility.py5 symbols
wot/chunks/bwsg.py3 symbols
wot/__init__.py3 symbols
wot/chunks/wgsd.py1 symbols

For agents

$ claude mcp add wot-model-converter \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page