Modifying textures

From OniGalore
Revision as of 18:08, 16 April 2008 by EdT (talk | contribs) (Start writing Tutorial)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Here are some brief instructions on how to modify the texture maps. You might want make new skins for a character or even a new outfit for Konoko!

Extract TXMP (Texture maps)

1) You will need to cd (change directory in the terminal) to the edition/install folder.
2) To extract all the TXMP use the following command:
onisplit -extract:png destination_directory_for_image_files level0_Final.dat
For example:
PC users: onisplit -extract:png ..\..\TXMPfiles ..\..\GameDataFolder\level0_Final.dat (Or you can use -extract:tga to get the files in Targa format)
Mac users: mono onisplit.exe -extract:tga ../../TXMPfiles ../../GameDataFolder/level0_Final.dat (Mac users must use the Targa format .tga)
3) Now all the TXMPs from Oni (over 2,000) will be located in the Oni/TXMPfiles

Modify TXMP

1) Currently, the size of Oni's texture maps are small, you can increase the resolution to a maximum of 256x256 pixels.
2) Use your favorite graphic editor to make your changes.

Create TXMP*.oni files

1) Once again, you will need to cd (change directory in the terminal) to the edition/install folder.
2) For most image files you can use the following command:
PC: onisplit -create:txmp destination_directory options source_image_file
Mac: mono onisplit.exe -create:txmp destination_directory options source_image_file
The 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.
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
-envmap - envmap used for reflectivity
Here is an example
PC: onsplit -create:txmp dest_dir -format:bgr555 -genmipmaps TXMPSTR_EASY_1%2FSTRbicepR.tga
Mac: mono onisplit.exe -create:txmp dest_dir -format:bgr555 -genmipmaps TXMPSTR_EASY_1%2FSTRbicepR.tga
To batch process a folder you can use this command;
PC: onisplit -create:txmp dest_dir -format:bgr555 -genmipmaps folder_of_images\*.tga
Mac: mono onisplit.exe -create:txmp dest_dir -format:bgr555 -genmipmaps folder_of_images/*.tga
For image files that use an envmap (Such as Striker armor, Ninja armor, Elite armor, Konoko's face, weapons), you will need to include the name of the envmap:
PC: onisplit -create:txmp dest_dir -format:bgra4444 -genmipmaps -envmap:envmapname imagefile.tga
Mac: mono onisplit.exe -create:txmp dest_dir -format:bgra4444 -genmipmaps -envmap:envmapname imagefile.tga
3) Once you have created the TXMP*.oni file, you will need to put it in the level0_Final folder and then recompile the level.
4) Play the game and see how your new texture maps look.