Convert 3D models from OBJ format to KMZ for use in ATAK.
- OBJ to DAE format convertion (using Assimp library) and packaging to KMZ format
- Automatic ground detection and alignment using RANSAC plane fitting (using pyRANSAC-3D)
- Georeferencing support with UTM coordinates (using pyproj)
- ATAK compatibility
git clone https://github.com/mykyta-nikiforov/obj2kmz-converter.git
cd obj2kmz-converter
# Create virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate
pip install -e .
# Or use pipx for global installation
pipx install -e . && pipx ensurepathYou'll need Assimp installed:
Ubuntu/Debian:
sudo apt-get install libassimp-dev assimp-utils python3-pip python3-venv
# Optional, for global installation
sudo apt-get install pipxMacOS:
brew install python assimp
# Optional, for global installation
brew install pipxBasic conversion:
obj2kmz OBJ_FILE GEO_FILE OUTPUT_PATHArguments:
OBJ_FILE- Path to the 3D model file (.obj format)GEO_FILE- Path to the georeferencing file (.txt with UTM coordinates)OUTPUT_PATH- Path where the converted KMZ file will be saved
obj2kmz e211ba81-0deb-4f26-abb6-faa10f174d93/texturing/textured_model_geo.obj \
e211ba81-0deb-4f26-abb6-faa10f174d93/georeferencing/georeferencing_model_geo.txt \
output/model.kmzYour georeferencing file should contain UTM coordinates:
WGS84 UTM 35N
418574 5345544
--no-textures- Skip texture files for smaller output--heading DEGREES- Model rotation around Z-axis (default: 180)--tilt DEGREES- Model rotation around X-axis (default: -90)--roll DEGREES- Model rotation around Y-axis (default: 0)--verbose- Enable detailed logging
# Lightweight version
obj2kmz model.obj georef.txt output.kmz --no-textures
# Custom orientation
obj2kmz model.obj georef.txt output.kmz --heading 90 --tilt -45docker build -t obj2kmz .
docker run --rm \
-v $(pwd)/e211ba81-0deb-4f26-abb6-faa10f174d93:/app/input \
-v $(pwd)/output:/app/output \
obj2kmz \
/app/input/texturing/textured_model_geo.obj \
/app/input/georeferencing/georeferencing_model_geo.txt \
/app/output/model_normal.kmz.objfile - Your 3D model.mtlfile - Material definitions (same directory as OBJ)- Texture files - PNG/JPG images referenced by MTL
georeferencing_model_geo.txt- UTM coordinates