Jump to content

[Skyrim LE/SSE] Skin Partitions - Nif to CK


Hana

Recommended Posts

Skyrim armor or clothing meshes use Skin Partitions to divide up the mesh into related body parts. This information can be found under the BSDismemberSkinInstance node of the NiTriShape (BSTriShape for SSE) in NifSkope and in the Armor and ArmorAddon records in the CK.

A Skin Partition is where a mesh is partitioned into submeshes such that each vertex of a submesh is influenced only by a limited and fixed number of bones. Huh? Ok, a skin partition is a collection of vertices ruled by certain bones.

These partitions are further defined by "Body Parts". Biped slots, Body slots, Armor slots, body part, partition, all mean the same thing. In Skyrim they are a virtual representation of any skinned/rigged mesh.

The Body Parts represent all the biped slots that can be used in the making of armor/clothing/jewelry, etc. A full list of all the body parts (or biped slots or nodes) can be found here;  http://www.creationkit.com/Biped_Object. (I don't guarantee it's complete). There's also a list that can be seen in NifSkope if you hover over BSDismemberBodyPartType.

 

NifSkope;

Every NiTriShape (BSTriShape for SSE), or object, in a skinned mesh requires a Partition. The number of partitions is dependent on how the mesh is set up but must have at least 1 Skin Partition.

Some pictures will help. Looking at the malebody_1.nif in NifSkope we can see the Skin Partitions defined under BSDismemberSkinInstance of it's NiTriShape.

Spoiler

nif001.thumb.jpg.df29b7910e9194b12fc375c686811382.jpg

You can see there are 3 Partitions in this mesh. If we expand the 3 partitions further we find the body parts.

nif002.thumb.jpg.363568a387144d42ef9d3c9da6350549.jpg

 

The human body in Skyrim uses 3 partitions, and any armor/clothing made for it will require at least 1 of these partitions to match.

Let's look at these partitions more closely. You can see them in NifSkope by looking at the NiSkinPartion block (does not work for SSE nifs).

Spoiler

nif003.jpg.c1b452a5173661097cb12d72ecbdc63e.jpg

This confirms what we already know - that there are 3 Skin Partitions in this mesh. But how do I know what's what? Highlight the first "Skin Partition Blocks". This is the SBP_32_Body partition. See the yellow highlighted vertices? All those related vertices of your armor will be influenced by this partition.

nif004.thumb.jpg.98f60c1045bc0bfb784c90a5cb5a8ee6.jpg

Now look at the others. The calves are highlighted here so this is the SBP_38_Calves partition.

nif005.thumb.jpg.9a37f93cfae3930dd4c2a9ef9fa51da9.jpg

The forearms are highlighted here so this is the SBP_34_Forearms partition.

nif006.thumb.jpg.2b647fe2e2ccd5836d89eadb18cac01b.jpg

 

Another example, the Hide armor, to show the differences in each part of the overall mesh. Not all pieces of one mesh require the same partition, it depends on the mesh itself and what part of the body it covers.

Spoiler

In this case, the "body" of this mesh contains the same partitions as the malebody mesh (and always should).

nif007.thumb.jpg.d49e1854f555481da0c79cbe92983f9d.jpg

The armor itself only contains one partition for the body, because it does not cover forearms or calves.

nif008.thumb.jpg.f314580484f087a98a952593f117b439.jpg

 

General rules to follow regarding BSDismemberSkinPartition - Partitions;

- determines parts where the armor covers - (mainly 32 body, 34 forearms, 38 calves for armor/clothing pieces, 33 hands for gloves, 37 feet for boots)
- can be misc slots that aren't used by others when main slots are expected to be used
- partitions are made in either blender/3dsmax or Outfit Studio
- the partition is mirrored in the armoraddon in the CK

A mesh can also have a NiSkinInstance instead of a BSDismemberSkinPartition. This works in a similar fashion. It is still a partition except it doesn't identify a partition slot in the nif, it is identified in the armoraddon/armor records. In general practice a mesh should not use both of these types, use one or the other.

 

Creation Kit;

There are two types of records in the CK that are important and related to partitions;

ArmorAddon record - identifies parts where the armor covers
Armor record - identifies the slot that will be blocked from anything else trying to use it

 

ArmorAddon record;

In the CK, the partitions (or Body Parts) identified in the nif are called Biped Slots. All the slots used in the nif should also be used when creating the ArmorAddon record or the end result won't turn out like expected (see 2nd post).

Taking the same example as above, looking at the Hide ArmorAddon record shows all 3 biped slots match the skin partitions of the mesh.

Spoiler

ck001.jpg.3aa11597526b7afba2fd7cbd6b8be4ee.jpg

These partition slots are not absolute and multiple pieces of equipment with the same partition slot can override each other. The piece with the higher priority will render the underlying area invisible, to prevent clipping.

For example, armor with 38-calves partition and a pair of boots with 37-feet and 38-calves (because boots cover the calves), the boots will override the armor underneath. If the boots only used 37 feet but still had geometry over the calves, clipping might occur because it is not taking precedence over the calves (and in fact, I've fixed issues like this in USLEEP). See 2nd post for more on this.

Hoods and helmets are a good example of this.

Spoiler

ck004.jpg.0f1c54dbc9773e10e81068c360846433.jpg

Here, when the player equips the hood, it will replace the hair/long hair/ears underneath.

 

Armor record;

All the slots used in the nif do not all have to be used in the Armor record, and shouldn't, because slots identified here are absolute, meaning two pieces with the same Armor slot cannot be used together because the armor slot is blocked. Only the slot that should be blocked should be identified here (body, hands, feet, head). At least one slot is required and it must match a slot used by the armoraddon.

Taking the same example as above, looking at the Hide Armor record shows it is using slot 32-body and equiping any other mesh that also uses this slot will be blocked.

Spoiler

ck002.jpg.4bc1e3d2e9082f3005447b91f8c6a2c1.jpg

However, more than one slot can be used if you want to intentionally block more than one slot (for example, block the ring slot in a gauntlets armor record).

Spoiler

ck003.jpg.a66daec38c9cfaabee03c3662b644e80.jpg

In this example, wearing a mage hood would block the player from wearing any circlets.

 

In Summary;

- The mesh and the ArmorAddon record identify parts that it covers.
- The Armor record identifies slots that will be blocked.
- Every NiTriShape (BSTriShape in SSE) of a skinned mesh requires a BSDismemberSkinInstance and Skin Partitions, or a NiSkinInstance.
- A mesh must have at least 1 Skin Partition.
- Any partition defined in a mesh should be mirrored in the ArmorAddon record.
- At least 1 slot must be identified in the Armor record and that slot will be blocked.

 

Link to comment
Share on other sites

Now, what happens when the nif and the ArmorAddon partitions don't match? There's several ways this can go.

 

Scenario 1:

In this test, my outfit has a calves partition in the nif file, but does not have a calves partition in the ArmorAddon record.

Spoiler

test001.jpg.7f1f034d45b5cdce0638ac2007413b5f.jpg

Oops! The dreaded missing parts! The same would go for any other type of mismatch, ie; a new amulet having an amulet partition in the nif file, but a ring partition in the ArmorAddon record, the entire amulet would be invisible.

 

Scenario 2:

In this test it's the opposite, my nif file does not have a calves partition but there is a calves partition in the ArmorAddon record.

Spoiler

test002.jpg.229c54cfcd4176251925a0dee8177228.jpg

Oh, it works and it looks fine. Great.

Let's test it with another piece of equipment, boots.

Spoiler

test003.jpg.dde0dcd2d4f84beeaf3c9ca0879391ab.jpg

It still looks fine. So, if you don't want to partition your meshes properly that's up to you. It only takes a few minutes.

However! 

Scenario 2 works but only because the mesh of the pants is skin tight and fits inside the boots nice and cozy and snug. Not all meshes are going to fit together this nicely. The following will demonstrate what was said above about partitions fitting over partitions to occlude the geometry underneath.

Taking the same outfit, I increased the volume of the bottom of the pants. They look like this;

Spoiler

test004.jpg.2d30a7a52948e91b601f7e10fb333367.jpg

Now when I equip the boots, the pants clip outside of them because there is no calves partition in my outfit nif.

Spoiler

test005.thumb.jpg.3e2350be108af154202e20a1c8b801fc.jpg

Once I add the calves partition back into my outfit, clipping is gone, because the boots override the outfit.

Spoiler

test006.jpg.cad1821a4f336241eeb1a26ba943aeb7.jpg

 

Hopefully this tutorial has explained skin partitions and their relationships, and given a better understanding of how important they are. Please partition responsibly! :)

 

Link to comment
Share on other sites

  • 2 years later...
  • 9 months later...

This is the best explanation of how armor, addon and biped-slots interact, that I’ve found anywhere. But even this doesn’t quite explain helmets. The head, hair, circlet, ears and longhair slots distort the rules in mysterious ways that go a bit beyond this. 

There is a stage where a head and hair get merged in the CK and saved in the FaceGen mesh, so there are two partitions as a base. Or maybe three, as longhair could be an optional slot. It is not clear if longhair represents a mesh section distinct from hair, or overlapping with it. I suspect Bethesda never quite decided. Hair (the form) also has a regular, and a hairline mesh, which I have always assumed was the “under helmet” version. 

So a helmet would normally have a “hair” partition in its nif and ArmorAddon, and the Armor would specify hair and circlet slots, in order to prevent concurrent wearing of circlets, and to hide the hair. Long hair would get to remain, but the hairline mesh would display? It appears that just about every hair mod uses the same mesh for both, which obscures the original intent, and makes the discussion a bit moot. They all seem to use just the hair slot, not longhair. Full-face helmets would add “head” to the Armor form, as that also gets hidden. Hoods may or may not displace circlets, but do hide hair.

I have never found any use of the ears slot, but it exists. I expected it to get used for large elf ears, so that helmets could hide them when appropriate, but maybe that got dropped before release.

Can anyone clarify?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...