Modifying textures: Difference between revisions

Fixed a broken link.
m (/cat)
(Fixed a broken link.)
Tags: Mobile edit Mobile web edit
 
(8 intermediate revisions by 3 users not shown)
Line 2: Line 2:
   
   
'''Extract TXMP''' (Texture maps)
'''Extract TXMP''' (Texture maps)
:1) You will need to cd (change directory in the terminal) to the edition/install folder.
:1) Make a folder for the textures to go into ("tex_folder" below).
:2) To extract all the TXMP use the following command:
:2) You will need to 'cd' (change directory in the terminal) to AE/AEInstaller/vanilla/.
:onisplit -extract:png destination_directory_for_image_files level0_Final.dat
:3) To extract all the TXMPs, use the following command:
:onisplit -extract:png tex_folder level0_Final.dat


:For example:
: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)
: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:tga ../../TXMPfiles ../../GameDataFolder/level0_Final.dat (Mac users must use the Targa format .tga)
: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
:3) Now all the TXMPs from Oni (over 2,000) will be located in the Oni/TXMPfiles
   
   
'''Modify TXMP'''
'''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.
: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.
:2) Use your favorite graphic editor to make your changes.
   
   
'''Create TXMP*.oni files'''
'''Create TXMP*.oni files'''
:1) Once again, you will need to cd (change directory in the terminal) to the edition/install folder.
For most image files you can use the following command:
:2) For most image files you can use the following command:
:PC: onisplit -create:txmp destination_directory options source_image_file
:PC: onisplit -create:txmp destination_directory options source_image_file
:Mac: mono onisplit.exe -create:txmp destination_directory options source_image_file
:Mac: mono onisplit.exe -create:txmp destination_directory options source_image_file
Line 28: Line 28:
:-format:bgr555 (or dxt1) for most of the stuff
:-format:bgr555 (or dxt1) for most of the stuff
:-format:bgr32 for skyboxes
:-format:bgr32 for skyboxes
:-format:bgra4444 for transparent/[[Mirror#Environment_mapping|reflective stuff]] (in a couple of places bgra5551 is used but probably it's not big deal if bgra4444 is used instead)
:-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
:-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
:-envmap - envmap used for reflectivity
Line 60: Line 60:


:Tip:
: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.
: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: https://web.archive.org/web/20160226055825/http://oni.bungie.org/forum/viewtopic.php?pid=19297#p19297, to be edited and completed)
 
[[Category:Modding tutorials]]
[[Category:Modding tutorials]]
21

edits