Exporting from TexTools - rgd87/XIVGuide GitHub Wiki

1. Exporting from TexTools


TexTools vs Penumbra

If you're relatively new to the game you may never have heard about TexTools (https://www.ffxiv-textools.net), but it was the original way of installing mods onto the game.

For modding we'll need TexTools.

Textools & Penumbra interoperability

Originally TexTools modified the game files, but since Dawntrail it's possible to use a penumbra mod as a container for TexTools changes. You can skip this for now, but it is important if you'll be doing any actual modding, so here's how to set it up. It will allow you to immediately view your changes inside the game.

Extracting the game models

In the simplest form just open TexTools, find the item you want, select the race/gender model you need, press the leftmost eye button to view it and then Save as > FBX

TexToolsExport

Understanding the game files

This is boring stuff about XIV specifics you can skip for now, but it can clear up a lot of confusion eventually

You'll often encounter names like c0201e0937, that means Midlander Female (c0201), item id 0937.

Here's a full list of prefixes for each race/gender:

c0101 - Midlander Male
c0201 - Midlander Female
c0301 - Highlander Male
c0401 - Highlander Female
c0501 - Elezen Male
c0601 - Elezen Female
c0701 - Miqo'te Male
c0801 - Miqo'te Female
c0901 - Roegadyn Male
c1001 - Roegadyn Female
c1101 - Lalafell Male
c1201 - Lalafell Female
c1301 - Au Ra Male
c1401 - Au Ra Female
c1501 - Hrothgar Male
c1601 - Hrothgar Female
c1701 - Viera Male
c1801 - Viera Female

Racial models form sort of an ancestry tree. With clever math models can rescale on the fly to fit different races without requiring a separate unique model.
Here's the full tree:

RacialScalingTree

What that results in is that we have 4 families of bodies:

Females: MidlanderF -> MiqoF, AuRaF, ElezenF, VieraF, RoeF, HighlanderF, HrothgarF
Males: MidlanderM -> MiqoM, AuRaF, ElezenF, VieraM
Huge Males: RoeM -> HrothM
And Lalas

Where are my base body models?

Even when you wear nothing in the game you actually fallback to a special naked item called SmallClothes. There's also another version of it called SmallClothes (NPC), as you might have guessed it's the same but for npcs. And the third "naked" item is The Emperor's New set, these ones are actual real items in the game.

When you install Gen3/Bibo etc base bodies, what they do is replace those items with custom models.

Ok, but where are the textures?

They aren't tied to SmallClothesn, but instead stored on another special mesh you can find at Character > Body > (YourRaceTextureParent) > Textures
Body textures are also often shared, like models, but different.

On females there are 5 groups of body textures:
Hyur Midlander Female -> Hyur Midlander Female, Miqo'te Female, Elezen Female
Hyur Highlander Female -> Hyur Highlander Female, Roegadyn Female
Au Ra Female (Raen, Body 0001) -> Au Ra Female (Raen)
Au Ra Female (Xaela, Body 0101) -> Au Ra Female (Xaela)
Hrothgar Female -> Hrothgar Female
Viera Female -> Viera Female

So if you want to edit Roegadyn Female's body textures, you should actually edit Highlander textures and so on.

Hair

For each race the hair models are unique, their textures though are most often shared, on shared hairstyles. So If you can't find textures on the hair mesh for your race you'll find them on Midlanders.

About Textures

XIV uses several sets of texture types for different things like hair, skin and gear.
All of them are described in TexTools reference doc, see Shader Reference Table https://docs.google.com/spreadsheets/d/1kIKvVsW3fOnVeTi9iZlBDqJo6GWVn6K6BCUIRldEjhw/edit?gid=1406279597

But briefly, if you're new to 3D, the main two textures types you need to worry about are Normal and Diffuse.
Diffuse is a base color texture. For body it's where you tattoos go, the color of your lips and skin.
In the game diffuse body color then gets additionally shifted by your char's skin tone.
Normal Maps - https://youtu.be/r0vwaqVF_V8

Dawntrail ColorSetting

On gear instead of Diffuse, you'll also find mysterious "Mask" and "ID" textures. But as you can see from the reference, they're actually multiple different grayscale maps packed into R/G/B/A channels of an image.
For gear, _mask is this:

R - Specular Intensity Multiplier
G - Roughness
B - Ambient Occlusion

Ok, but what's in charge of color on gear then? ColorSets on materials is a table of 32 possible Paints or 16 pairs of them that can be applied to an item. ColorSets
They also control what gets dyed and how. Dyes in game basically override some of these rows recoloring the gear.

How the game knows which area is what then?
From that _id or Index map. In the R channel on the index map you'll see areas painted with different shades of grey. That's how the game designates the areas that will be associated with certain row

#000000 = Row 1
#AAAAAA = Row 2
...
#EEEEEE = Row 15
#FFFFFF = Row 16

PummelersVestID_R (Pic. R channel of an Index Map)

You probably noticed that each numeric row contains a pair of colors, A & B. These color pairs are blended between each other, and what controls the amount of blending done is Index map's G channel. As the color value increases from black to white it gets closer to B color and farther from A image
(Pic. G channel of an Index Map)

Why DDS is good and PNG is bad

  1. Alpha channel, retaining that explicit Alpha channel in the normal maps is very important for editing, it's not always used for opacity. At least use TGA
  2. Compression, DDS format supports Block Compression and it is lossy, so you lose a bit of quality every time you compress, but that only means you shouldn't compress over and over again while editing.
    The game's .tex format is probably some kind of wrapper around DDS.
    But in short, when you import compressed DDS, textures are actually taking a lot less space, you absolutely should use it.
    Insane mod filesizes happen because people don't use compression.
  3. MipMaps(?), another feature of DDS and you really need them if you want to avoid horrible aliased look.
    image
    Note: Since Dawntrail you can use BC7 8bpp Fine (Linear, DX11+)

DDS Plug-in for Photoshop: https://gametechdev.github.io/Intel-Texture-Works-Plugin/
TexTools 3.0 also can convert to DDS on import, if you're going this route use TGA for as intermediate format.

Image Channels

And I want to reiterate again, that if you'll be touching textures in almost any capacity you got to be able to work with separate R/G/B channels of an image.
How to do it in Krita
How to do it in Photoshop