Jump to content

Modifying textures: Difference between revisions

Fixed a broken link.
(Start writing Tutorial)
 
(Fixed a broken link.)
Tags: Mobile edit Mobile web edit
 
(15 intermediate revisions by 5 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, 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 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 47: Line 47:


:4) Play the game and see how your new texture maps look.
: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: https://web.archive.org/web/20160226055825/http://oni.bungie.org/forum/viewtopic.php?pid=19297#p19297, to be edited and completed)
[[Category:Modding tutorials]]
21

edits