TRIs are a quite the niche topic in Skyrim modding and there aren't exactly a lot of resources on them so I figured I might as well publish this here. It's still somewhat of a WIP and I'd appreciate feedback, especially if things are unclear. I'm planning to add sections on Creating TRIs from scratch and Creating Expression-TRIs for unique head shapes later.

This guide requires at least some Blender and knowledge and won’t explain basic shortcuts or navigation for the most part.

Requirements:


TRI Basics:

This is the structure of a head model in Skyrim. There is some variance to the naming conventions in the files so pay close attention to them - this is just the gist of it. Each of these models has a primary .NIF mesh that stays untouched, which is deformed in ingame sliders according to what's found in their corresponding morph TRIs. Morphs are stacking and they form the final shape of the character's head. (Taken from Nuska's original guide)

TRIs also have the limitation of having to match the exact vertex count and order of their target mesh. If this is not the case bugs can range from exploding meshes to straight up CTDs. In this guide I'll work around this limitation by creating a Dummy TRI in Blender and generating the actual morphs using Outfit Studio.

When editing the "Expressions"-TRI you'll notice a lot of duplicate morphs, i.e. MoodHappy and DialogueHappy. As the name already implies the latter is used during dialogue and limits lip movement to a minimum to prevent jittering/clipping when an NPC is talking. This should be kept in mind when editing these particular morphs.

Depending on your edits you may also have to adjust "Overlay"-TRIs, such as brows, scars and beards. This process can be automatically done using Outfit Studio and I will show how to do it in this guide, however it still increases the workload, especially on males due to the massive amount of beard TRIs. Eyes will always have to be adjusted manually as automatically conforming them will cause deformations on the eyeball.

Getting started:
First install the Blender Addons. Open the user preferences and head over to the Addons tab.
There press the install button on the upper right and navigate to the downloaded addons. Activate them using the checkbox on the left


Tweaking an existing TRI in Blender:
Find the TRI that you want to edit, if editing vanilla TRIs you will need to extract them first by using a tool like BAE.
In this guide I’ll edit the femalehead.tri from Expressive Facial Animation, so to get started I need to import those into Blender under File>Import>Import a TRI File.
The morphs will be located as Shape Keys inside the Object Data Properties.

To be able to do symmetrical work on the mesh I need to prepare it first by merging overlapping vertices, as Blender is not able to properly mirror them. This is especially an issue when working around UV seams. To do this, I enter Edit Mode, select all vertices and hit M>By Distance. The default value of 0.1 should be enough to catch most of the relevant vertices.
At this point the TRI will no longer be usable in Skyrim because of the difference in vertex count so I will refer to it as "Dummy TRI" from now on.

In my case, I want to edit the MoodHappy, so with that selected I again enter Edit Mode, select all vertices, use Snap to Symmetry and turn on mirroring along the X axis. Please note that this only needs to be done for morphs that are supposed to be symmetrical and will otherwise break the morph, such as MoodDisgusted.
I’d also advise against using the Symmetrize option as it will damage already existing morphs.



For the actual morph edits I recommend turning on Proportional Editing and depending on the area alternating between the default setting and Connected Only.
For the sake of this guide I want my changes to be very visible so I am replacing the original smile with a wide grin. I also edit the brow area a little and turn them into a slight frown.

Once I am done making my changes I exit Edit Mode and export the Dummy TRI via File>Export>Export a TRI File.



Preparing the TRI in Outfit Studio:
Open Outfit Studio and import the original TRI (not the Dummy) file via Import>From TRI (Head) and delete the original sliders.
Outfit Studio seems to be unable to load UVs for certain TRIs, corrupting them in the process and causing instant CTD. The only ones I'm aware of are Niroku's femalehead*.tris from EFA and EFM. For EFA use this TRI instead of the original one.


After that import the Dummy TRI, right click the newly added shape and click Set Reference. It will now be highlighted in green. Then hit Ctrl+Shift+C to open the Conform All dialogue. The conforming needs to be as precise as possible, so set Search Radius to 0 and Max Vertex Targets to 1.


You can test the morphs by moving around the sliders. If you notice any vertices that aren’t moving as intended increase the Search Radius in 0.1 increments.
If everything looks correct, right-click the newly conformed shape and export it via Export>To TRI (Head).


In my case, I’m overwriting the already existing femalehead.tri from EFA with this new one.
The TRI is now ready for in-game testing.

Conforming Overlays to the new TRI:
After confirming that the new morph is working you may notice clipping areas with eyebrows and scars. They are using separate TRI files that will need to be conformed to the new morph.
For female characters there are 3 overlay TRIs:
FemaleHeadMaskLeftside.tri
FemaleHeadMaskRightside.tri
FemaleHeadBrows.tri



In my case I have made edits to the brow area causing slight clipping. This can be fixed by using Outfit Studio similarly to the previous step.

This time I import the 3 overlay TRIs into Outfit Studio and delete all sliders. After that I import the previously created FemaleHead.tri, set it as reference and again conform all TRIs using the same settings as before.


This time I can export the TRIs using File>Export>To TRI (Head). This will export all shapes as separate TRIs in a directory of my choice and allows me to create several TRIs at once. Using these new TRIs I overwrite the original ones from EFA.


The brows are now correctly moving into a slight frown and the clipping is gone.

Article information

Added on

Edited on

Written by

cuyima

6 comments

  1. timstertimster
    timstertimster
    • member
    • 4 kudos
    @cuyima what a fantastic and informative tutorial, thank you so much for taking the time to write this!

    I’ve wanted to make a custom head mesh for ages but could never figure out how to sort out the tri stuff.

    I have a question: 
    how exactly do I need to conform the custom mesh? I got confused about what’s reference and why delete sliders? For example, I am using femaleHeadBreton as my modeling reference in blender to create my custom head mesh. After I export it as tri, there would not be any sliders, right?

    Am I supposed to import the Bethesda femaleHeadBreton.tri and set it as reference, and then import my custom head, and then select that new custom head and “conform” it?

    Does the conforming process create all the sliders automatically and if I export the file, does this create all of the tri files the game expects? 

    And what about the chargen.tri? I’m still lost on what to do, do I export a special tri for that?

    My end goal is to arrive at something that functions just like the popular High Poly Head in the end, so it can be used in racemenu and used by NPCs. 

    thank you
  2. lazyradly
    lazyradly
    • premium
    • 168 kudos
    Really appreciate this! This is definitely a better process than the way I've been working on. Did not realize you could transfer the morphs onto the original head mesh through Outfit Studio.
  3. TheDethToad
    TheDethToad
    • supporter
    • 10 kudos
    I was wondering if this could be used to add .tri to something like ears I've added to custom race. Been making a custom race and it's about time I get their ears to be all expressive and stuff.
    1. lazyradly
      lazyradly
      • premium
      • 168 kudos
      It is certainly possible, but only for Skyrim and Fallout 4 as far as I know. Since they use the exact same TRIs for facial animations for their CharGen.
  4. smokeybear187
    smokeybear187
    • premium
    • 19 kudos
    CBBE?
    1. cuyima
      cuyima
      • premium
      • 426 kudos
      always