Modifying textures: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (cat.d)
m (updating part about max. texture size (is that right? PCs still can't get to 1024x1024?))
Line 12: Line 12:
   
   
'''Modify TXMP'''
'''Modify TXMP'''
:1) Currently, the size of Oni's texture maps are small, you can increase the resolution to a maximum of 256x256 pixels.
:1) Currently, many of Oni's texture maps are 64x64, or 128x128; unmodded, Oni supports textures up to 256x256, but the current patched version of Oni for Windows supports 512x512, and the patched version of Oni for Mac OS X supports up to 1024x1024.
:2) Use your favorite graphic editor to make your changes.
:2) Use your favorite graphic editor to make your changes.
   
   

Revision as of 14:35, 22 December 2008

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, many of Oni's texture maps are 64x64, or 128x128; unmodded, Oni supports textures up to 256x256, but the current patched version of Oni for Windows supports 512x512, and the patched version of Oni for Mac OS X supports up to 1024x1024.
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.

TXMP & XML

Extracting a texture with -extract:xml produces an xml file and one or more tga files. The xml file will contains texture options like format and flags and a list of tga file names. More than one tga file is produced for animated textures and the filenames look like TXMPsmoke_001.tga, TXMPsmoke_002.tga etc.
Using the -create option with such an xml file will produce a normal TXMP.oni file but without the need to specify additional parameters on the command line like with -create:txmp. This comes in handy if you want to edit a bunch of textures:
  • put all the xml and tga files in a single directory
  • edit tga image files as you need
  • in the directory you can run the command: onisplit -create oni *.xml to create all TXMP.oni files in the subdirectory oni.
Tip:
The exported xml file does not contain the witdh and height of the texture, this is obtained from the tga file. If you resize the tga file the texture will be resized too.