Texture Editor - X-Hax/sa_tools GitHub Wiki
Texture Editor is a tool that can view and edit texture archives used in Sonic Adventure games. It can also be used to view individual texture files.
Supported formats
Archives: PVM, GVM, XVM, PRS (texture archives only), PAK, PVMX, PB
Textures: PVR, GVR, XVR, DDS, PNG/BMP/JPG/GIF
Using Texture Editor
Opening files
For ease of use, you can associate the supported file extensions with the program, which will make it open files on double click. Alternatively you can open texture files in SA Tools Hub, which will launch Texture Editor and make it open the selected file.
If you open an individual PVR, GVR or XVR file, the program will try to load all other textures in the same folder and display them as a list (as if they were all added to an archive).
Editing archives
Use the control on the left to navigate the texture list. The buttons at the bottom left are used to add, remove and sort textures in the archive. The panel on the right contains editable parameters applicable to the current texture format and a preview image.
Texture parameters
Index
is the texture ID on the list. It indicates the order in which textures appear in the archive. You can change the index by sorting textures using the "Up" and "Down" buttons at the bottom of the texture list.
Name
is a texture's individual name. Texture names are usually ignored in SADX.
Global Index
is a unique texture ID used in the games' texture caching system. The game checks the global index when it loads a new texture, and if a texture with the same global index is already loaded, the new texture is discarded and the previously loaded texture is reused.
Mipmap
is a flag that indicates that the texture includes smaller copies of itself to be displayed from a distance. This makes distant textures look smoother. Usually mipmaps should be enabled for level textures and disabled for UI textures. Depending on the texture format, Texture Editor can generate or remove the texture's built-in mipmaps when this flag is toggled.
No Alpha Test
is a flag used by textures in SA2's PAK archives. This flag disables Alpha Test and Z Write, which can make transparent textures blend better or worse depending on how the model using the texture is rendered.
Size
is used to view texture width and height. For textures in PVMX archives, you can override texture dimensions. This is commonly used to store the original dimensions of a non-HD UI texture when making an HD version of it to avoid stretching issues ingame. Actual Size
will display the texture's current (HD) dimensions.
Data Format
is the way the texture is represented in binary. It depends on the texture format, whether the texture is square or rectangular, and whether it is compressed or not.
Pixel Format
is the way and order in which the colors are stored the texture's binary data. Available pixel formats depend on the texture format.
Surface Flags
(SA2 PC only) are additional flags picked up by the game's renderer.
Texture preview
Use the slider to adjust the size of the preview. You can also enable or disable bilinear filtering in the program's Edit menu. Note: When enabled, the filtering is only applied to the preview, not the texture itself.
Import and export
The "Import..." button under the texture preview is used to replace the contents of the currently selected texture without adding a new texture. The "Export..." button is to save the selected texture as a PNG file. The "Save..." button is for saving individual textures in their original format (PVR, GVR, DDS etc.).
You can also import and export texture archives as folder texture packs using the File menu. Folder texture packs can be loaded by the SADX Mod Loader if they are placed in the mod's textures
folder.
Working with paletted textures
To be continued