Skip to content

Instantly share code, notes, and snippets.

@libjared
Last active December 12, 2023 08:35
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save libjared/9bd25f0e3f2dd1780a6f078d5d76473b to your computer and use it in GitHub Desktop.
Save libjared/9bd25f0e3f2dd1780a6f078d5d76473b to your computer and use it in GitHub Desktop.
how to use xiv character model for vrchat

This is gonna be long and I might not finish it but here's what I got. This shit is so long that if I get it down to a science I might make a program to automate it.

Overview

We will study your character stats, use FFXIV TexTools to export the model parts, Blender to fix it up....

Collecting data

Do you have your character appearance saved? It's not essential but it's very useful to have. It's in the form of a DAT. I hope you backed it up if you created them on an old PC. I'm not sure if you can resave it from an existing character. What I did was use the Shadowbringers Benchmark. I seem to remember there was a way to import your character from the base game but I can't remember. Anyway first you'll need to copy the character DAT to the benchmark folder.

  • Benchmark - \Documents\My Games\FINAL FANTASY XIV - A Realm Reborn (Benchmark)\FFXIV_CHARA_BENCH01.dat
  • Main game - \Documents\My Games\FINAL FANTASY XIV - A Realm Reborn\FFXIV_CHARA_01.dat

... where 01 is character appearance slot 1.

In the benchmark click start a new character, load appearance data, and select character slot. Now you can

Exporting Models/Textures

Install FFXIV TexTools. To export things, it also needs a program called assetcc2.exe from the Havok SDK, I got it from a youtube video, kinda sketchy, but it's not a free program so whaddya gunna do. (TODO link it here)

make sure to set all colors in the settings to full white, as the edits here will end up being more accurate

when you load your face and look at the rendered view, your face is solid black. materials are broken up into several channels:

  • diffuse
  • alpha
  • normal
  • specular
  • emissive

there are several problems with this.

  • the blender material sets alpha channel to 0 instead of reading from the alpha image file
  • what we recieved out of the tool was just BMPs representing these channels. Use GIMP to add layer mask from greyscale, replace base image with black, add alpha channel and save appending _channel.png to filename.

materials starting with X use the Y mesh:

  • fac_0 - eyes
  • fac_1 - head, ears, and scars
  • fac_2 - facial hair and elezen clasps

For every material, turn on backface culling, blend mode = alpha blend, turn off show backface (or else you'll see your teeth show through). Also for each, Normal = Normal Map and in Color row, click dot and add image texture from the normal BMP.

material diffuse? alpha? normal? specular? emissive?
fac_0 (eyes) Y n Y Y n
fac_1 (head) Y Y Y n n
fac_2 (facial hair) Y Y Y Y n

where it is n, the BMP file is solid black in the case of emissive or specular, or white in the case of alpha. Please note that the eye still has specular, it's just very dark grey, not solid black like it looks.

content tools?

copy the contents of HavokContentTools\bin to the dir where ffxiv tex tools exe lives, also assetcc2.exe

Eyes

So fucked up it needs its own section. what even are these things? Layers:

  • normal map, making up the radial lines in the iris
  • eye highlight (composed of one large dot, one small dot, and some very subtle reflections of windows)
  • "specular map", in quotes because it ends up just being an alpha channel for a solid black color, comprising the pupil
  • solid color (your character's chosen color)
@libjared
Copy link
Author

if gimp exports really pixelated alpha (alpha channel is 255 or 0 but nothing in between), switch from indexed color to rgb

@libjared
Copy link
Author

libjared commented Apr 1, 2020

For each mat, use the nodes editor to draw both color/alpha lines from the same image into the shader

@libjared
Copy link
Author

libjared commented Apr 2, 2020

finger bones were outside the model by 0.05m for some reason. I ended up completely redoing the hands as the bones aren't even remotely close.

@libjared
Copy link
Author

libjared commented Apr 2, 2020

in unity, only cutout mode works. a good alpha cutoff is 0.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment