XML:TRMA: Difference between revisions
Jump to navigation
Jump to search
m (correcting prev/next types in nav header) |
m (copy-edit) |
||
Line 1: | Line 1: | ||
{{ XML_File_Header | prev=TRIG | type=TRMA | next=TRSC | name=Texture Map Array}} | {{ XML_File_Header | prev=TRIG | type=TRMA | next=TRSC | name=Texture Map Array}} | ||
==General information== | |||
* The | * The XML on this page is compatible with OniSplit '''v0.9.61.0'''. | ||
* TRMA files are stored '' | * TRMA files are stored locally in level''x''_Final.dat, but are globalized in the AE. | ||
* | * These files are used by [[XML:ONCC|ONCCs]] to look up the textures for a character's 3D mesh ([[XML:TRBS|TRBS]]). | ||
* | * A character model has 19 body parts so there are also 19 texture links in the TRMA. | ||
* | * The order of the TRMA links is determined by the mesh hierarchy in the [[XML:TRIA|TRIA]]. | ||
==Example== | |||
TRMAkonoko002_high_texture_generic.xml: | |||
TRMAkonoko002_high_texture_generic.xml | |||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
<Oni> | <Oni> | ||
Line 39: | Line 37: | ||
</Oni> | </Oni> | ||
The TXMP links always contain a '/' character, as seen above, because the original resources were grouped in subfolders. The actual TXMP file use a "%2F" to encode the "/", e.g. "TXMPIteration001%2FKS_pelvis.oni". | |||
==VBS code for Mod Tool== | |||
This snippet gets the file path, width and height of all textures of the selected character. Could be [[Mod_Tool/Scripting#Write_text_file|extended to write XML]] for a TRMA and TXMP generator. | |||
if selection.count > 0 then | if selection.count > 0 then | ||
' any part could be selected, let's find the root body part | ' any part could be selected, let's find the root body part |
Latest revision as of 14:52, 30 March 2021
TRMA : Texture Map Array | ||
---|---|---|
XML
TRIG << Other file types >> TRSC |
General information
- The XML on this page is compatible with OniSplit v0.9.61.0.
- TRMA files are stored locally in levelx_Final.dat, but are globalized in the AE.
- These files are used by ONCCs to look up the textures for a character's 3D mesh (TRBS).
- A character model has 19 body parts so there are also 19 texture links in the TRMA.
- The order of the TRMA links is determined by the mesh hierarchy in the TRIA.
Example
TRMAkonoko002_high_texture_generic.xml:
<?xml version="1.0" encoding="utf-8"?> <Oni> <TRMA id="0"> <Textures> <Link>TXMPIteration001/KS_pelvis</Link> <Link>TXMPIteration001/KS_thigh_horiz</Link> <Link>TXMPIteration001/KS_calf_nobknee</Link> <Link>TXMPIteration001/KS_foot</Link> <Link>TXMPIteration001/KS_thigh_horiz</Link> <Link>TXMPIteration001/KS_calf_nobknee</Link> <Link>TXMPIteration001/KS_foot</Link> <Link>TXMPIteration001/KS_mid</Link> <Link>TXMPIteration001/KS_chestpack</Link> <Link>TXMPIteration001/KS_neck</Link> <Link>TXMPIteration001/KS_face</Link> <Link>TXMPIteration001/KS_shoulder</Link> <Link>TXMPIteration001/KS_bicep</Link> <Link>TXMPIteration001/KS_wrist</Link> <Link>TXMPIteration001/ks_fist</Link> <Link>TXMPIteration001/KS_shoulder</Link> <Link>TXMPIteration001/KS_bicep</Link> <Link>TXMPIteration001/KS_wrist</Link> <Link>TXMPIteration001/ks_fist</Link> </Textures> </TRMA> </Oni>
The TXMP links always contain a '/' character, as seen above, because the original resources were grouped in subfolders. The actual TXMP file use a "%2F" to encode the "/", e.g. "TXMPIteration001%2FKS_pelvis.oni".
VBS code for Mod Tool
This snippet gets the file path, width and height of all textures of the selected character. Could be extended to write XML for a TRMA and TXMP generator.
if selection.count > 0 then ' any part could be selected, let's find the root body part SelectNeighborObj selection(0), 4 ' get all members including the pelvis set bodyparts = selection(0).FindChildren( , , siMeshFamily) for each member in bodyparts logmessage "object name: " & member.name if not typename(member.Material.CurrentImageClip) = "Nothing" then logmessage "texture: " & member.Material.CurrentImageClip.source.filename.value 'logmessage "material: " & member.Material.name 'logmessage "shader: " & member.Material.shaders(0).name logmessage "X: " & member.Material.CurrentImageClip.source.Parameters("XRes").Value logmessage "Y: " & member.Material.CurrentImageClip.source.Parameters("YRes").Value end if logmessage "----------------------------------------------------------" next logmessage "counted body parts: " & bodyparts.count end if