OniSplit: Difference between revisions
(adding EdT's tutorial from the forum) |
(→Download Links: adding links myself :-p) |
||
Line 47: | Line 47: | ||
===Download Links=== | ===Download Links=== | ||
< | * [http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit_v0.8.15.zip Latest version of OniSplit]<br> | ||
* [ftp://www.go-mono.com/archive/1.2.6/macos-10-universal/6/MonoFramework-1.2.6_6.macos10.novell.universal.dmg Latest version of mono (requires OS X 10.4+)] |
Revision as of 18:10, 5 February 2008
OniSplit, written by Neo, is an integral part of the Anniversary Edition and an essential modding tool on its own. It does the work of splitting and recombining Oni's data files. But it also does much more such as extracting and creating TXMP files and M3GM files.
Export/Import for TXMP files
To extract all the TXMP files:
onisplit -extract:png destination_directory_for_image_files level0_Final.dat
TGA and DDS are also supported using -extract:tga and -extract:dds.
To import image files:
onisplit -create:txmp destination_directory [options] source_image_file
where options can be -nouwrap - set the "U wrapping disabled" flag -nowwrap - set the "V wrapping disabled" flag -format:bgr32, -format:bgra32, -format:bgr555, -format:bgra5551, -format:bgra4444, -format:dxt1 - the texture format to generate -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 imported -format:bgr32 -genmipmaps tga\concrete.tga
To batch process a folder of image files:
onisplit -create:txmp imported -format:bgr32 -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 dest_dir -genmipmaps -envmap:envmapname imagefile.tga
The envmap name can have the TXMP prefix but it is not required, it is added automatically if missing.
Export/Import for Wavefront OBJ files
Named M3GMs and (unfortunately unnamed) M3GM contained in ONWC files can be exported to obj file format:
onisplit -extract:obj dest_dir M3GMnotfound.oni onisplit -extract:obj dest_dir ONWCw1_tap.oni
Or for a total export:
onisplit -extract:obj dest_dir level0_Final.dat
Importing obj files:
onisplit -create:m3gm dest_dir TCTF_Shotgun.obj
For importing obj files the obj file must only contain triangles so when exporting a model from a 3D design tool it needs to be triangulated. If the obj file uses more than one texture then only one will be taken into consideration. If the obj file does not contain a texture or someone wants to use a different one then the texture name to be used can be specified with -tex option:
onisplit -create:m3gm dest_dir -tex:TCTF_Shotgun TCTF_Shotgun.obj
Just like in -envmap option case the texture name can start with TXMP but it is not required. Note that in both -envmap and -tex cases a .oni file is not created for the specified texture. The .oni file for that texture must be create separately.
To see a list of all the commands available in OniSplit:
OniSplit -help
Note: For Mac users the command is:
mono onisplit.exe
mono is a command-line package that must be installed first.