Modifying textures
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) Make a folder for the textures to go into ("tex_folder" below).
- 2) You will need to 'cd' (change directory in the terminal) to AE/AEInstaller/vanilla/.
- 3) To extract all the TXMPs, use the following command:
- onisplit -extract:png tex_folder level0_Final.dat
- For example:
- PC users: onisplit -extract:png tex_folder level0_Final.dat (Or you can use -extract:tga to get the files in Targa format)
- Mac users: mono onisplit.exe -extract:png tex_folder level0_Final.dat
- 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 macOS supports up to 1024x1024.
- 2) Use your favorite graphic editor to make your changes.
Create TXMP*.oni files 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.
- options for <Flags> (more than one are separated by a double space) : None HasMipMaps DisableUWrap DisableVWrap AnimUseLocalTime AnimBackToBack AnimRandom AnimIgnoreGlobalTime ShieldEffect InvisibilityEffect DaodanEffect
- options for <Format> : ARGB4444 / RGB555 / ARGB5551 / RGB888 / DXT1
- 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 width and height of the texture, this is obtained from the tga file. If you resize the tga file the texture will be resized too.
Reflective textures
- Keep in mind, Oni simulates reflectivity using textures and alpha channels.
- To see how a reflective texture is made, extract TXMPSTR_HARD_1%2FSTRchest.oni as XML. You will get a TGA and XML file.
- Open the TGA file in a photo editor and it has an alpha channel. The alpha channel determines what part of the texture is reflective. Black in the alpha channel means no reflectivity, gray to white is increasing amounts of reflectivity.
- Now in the XML file, there are 2 properties you will be concerned with:
- <Format>ARGB4444</Format>
- <EnvMap>TXMPstrikerarmor</EnvMap>
- The <Format> is how the texture will be saved. In this case, the striker's chest texture was originally saved with an alpha channel. Now there are 3 formats that can have an alpha channel:
- ARGB4444 = 4,096 colors, alpha 16 colors
- ARGB5551 = 32,768 colors, alpha 2 colors
- ARGB8888 = 16,777,216 colors, alpha 256 colors (Note: this one requires the Oni engine to be patched and not many have the patched version)
- The <EnvMap> refers to what texture is used to simulate reflectivity. There are 4 envmap files that are used for characters:
- TXMPstrikerarmor
- TXMPenvksface
- TXMPenvksarmor
- TXMPSUPER_REFLECT
- You might want to extract this file as xml to see its properties.
- Once you make your texture that has an alpha channel, use the XML file to convert it back to .oni file.
(from here: http://oni.bungie.org/forum/viewtopic.php?pid=19297#p19297, to be edited and completed)