Skip to content
forked from scurest/iqm2glb

Convert Inter-Quake Models to glTF

Notifications You must be signed in to change notification settings

andyjh92/iqm2glb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Python script to convert Inter-Quake Model .iqm files to glTF .glb.

Version support: IQM 2; glTF 2.0; GLB 2.

Usage

CLI

python iqm2glb.py INPUT.iqm [OUTPUT.glb]

If OUTPUT.glb is given, it will be over-written.

Python

import iqm2glb

with open('INPUT.iqm', 'rb') as f:
    iqm = f.read()

glb = iqm2glb.iqm2glb(iqm)
# glb.gltf contains the JSON
# glb.buffer contains the BIN
# You can modify them now if you like

with open('OUTPUT.glb', 'wb') as f:
    glb.write(f)

You can provide options with iqm2glb(iqm, options). Look at DEFAULT_OPTIONS in the source code for a list of available options.

The converter is a single file with no dependencies outside the standard library, so just drop it wherever you want it.

About

Convert Inter-Quake Models to glTF

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%