Improved blender plugin to import/export crossout formats (textures, models, animations, lands)
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| targem | ||
| tests | ||
| .gitignore | ||
| __init__.py | ||
| anim_export.py | ||
| anim_import.py | ||
| assets.blend | ||
| batch_convert.py | ||
| blender_worker.py | ||
| bone_fixer.py | ||
| coords.py | ||
| DUMPER.py | ||
| enumerated_techniques.xml | ||
| export_presets.py | ||
| land_export.py | ||
| land_import.py | ||
| LICENSE | ||
| material_import.py | ||
| material_shaders.py | ||
| mdf_export.py | ||
| model_export.py | ||
| model_import.py | ||
| paint_import.py | ||
| physics_export.py | ||
| README.md | ||
| slot_operators.py | ||
| specular_packer.py | ||
| targem_packer.py | ||
| texture_export.py | ||
io_targem_neko
Improved blender plugin to import/export crossout formats (textures, models, animations, lands)
Current Blender version: 5.0.1
Functions
- Import/Export textures
- Import/Export full model pipeline
- Import/Export animations
- Import/Export maps (.land / land.dat): terrain heightmap, ground textures blended via surfmap (BC7), props (props.mxml) and scene entities (scene.mxml)
Map import notes
- Set "Unpacked game folder" in addon preferences to the unpacked game root
(needed for prop models, ground textures from
assets/surfaces.mxmland def resolution fromgamedata/def/*.lua) - File > Import > Targem Landscape (.land), pick
<map>/land/land.dat - Headless regression test:
blender --background --factory-startup --python tests/bl_land_import.py -- maps_examples/bridge(game root is taken fromTARGEM_GAME_ROOTenv orFULL_UNPACK/next to the addon)
Map editing (land.dat + grass.dat)
Sidebar (N) > Targem tab after importing a map.
- New map: "New Targem Landscape" writes a flat
land.dat(size multiple of 64 cells, one ground surface fromassets/surfaces.mxml) plusland/colormap/surfmap.tfh/.tfd(BC7, all weights = base layer) and opens it. Save it as<map>/land/land.dat. - Own mesh: any mesh can be exported onto the grid of an existing land.dat — select it and use "Set Source land.dat"; heights are ray-cast onto that grid.
- Terrain: "Sculpt Landscape" enters Sculpt Mode (Draw raises, Ctrl+Draw lowers, Smooth, Grab to drag hills sideways). Edit Mode + proportional editing (O) works too. "Stretch Heights" scales the relief vertically (x2 = twice as high, 0.5 = flatter) around the lowest point / average / 0 / 3D cursor; in Edit Mode only the selection.
- Grass: every preset is a point-cloud object in "Map Grass". Make one active and run
"Grass Brush": LMB paints, Ctrl+LMB erases (active layer or all layers),
[]radius, Shift+[]density, RMB/Esc exit. "Add Grass Layer" creates a layer for any preset ofassets/grass.mxml. Points can also be deleted in Edit Mode. - Export: File > Export > Targem Landscape (or the button in the panel). Writes
land/land.datand<map>/grass.dat; originals are copied to*.bakonce.- Grid size, surface slots and surfmap are taken from the source land.dat (only heights change); normals/tangents and bounding boxes are recomputed.
- If vertices moved sideways, heights are resampled by ray casts onto the grid.
- Grass that stood on the terrain follows the new heights; grass on props is kept.
- Formats are documented in
targem/landscape.py. Headless test:blender --background --factory-startup --python tests/bl_land_export.py -- <map_dir>
TODO (updateable)
- Fix import bones
- Fix animation export
- Check car import function
- Refactor code
Installation
Pack in zip archive files and drop to blender window
If you need to import car designs, do this:
- Clone repo
- Run DUMPER.py
- Insert path to folder with unpacked game (gamedata + models folders should exist)
- Pack into zip