Talk:Modifying textures
Jump to navigation
Jump to search
Export/Import textures
To export a single TXMP
onisplit -extract:png txmp_dir ..\GameDataFolder\level0_Final\TXMPBOSS1talking.oni
To export all the TXMP files:
onisplit -extract:png txmp_dir ..\GameDataFolder\level0_Final.dat
TGA and DDS are also supported using -extract:tga and -extract:dds.
To import image files:
onisplit -create:txmp ..\GameDataFolder\level0_Final [options] source_image_file
where options can be
-nouwrap - set the "U wrapping disabled" flag -nowwrap - set the "V wrapping disabled" flag -format:bgr555 (or dxt1) for most of the stuff -format:bgr32 for skyboxes -format:bgra4444 for transparent/reflective stuff (in a couple of places bgra5551 is used but probably it's not big deal if bgra4444 is used instead) -genmipmaps - generate mipmaps if they are not already present in the source file and if the source file is not dxt1 compressed
Example:
onisplit -create:txmp ..\GameDataFolder\level0_Final -format:bgr555 -genmipmaps tga\concrete.tga
To batch process a folder of image files:
onisplit -create:txmp ..\GameDataFolder\level0_Final -format:bgr555 -genmipmaps tga\*.tga
source_image_file can be dds or tga. "Color indexed" and "black and white" tga files are not supported currently. Other image file formats (png, jpg, bmp, tif) may work depending on Mono/.NET support for them. onisplit will automatically prepend TXMP to the output file name if the source file name does not start with TXMP already.
For TXMP files that contain envmaps:
onisplit -create:txmp ..\GameDataFolder\level0_Final -format:bgra4444 -genmipmaps -envmap:envmapname imagefile.tga
The envmap name can have the TXMP prefix but it is added automatically if missing.