Jump to content

Guide to Installing and Understanding HDT/SMP Body Physics


Myst42

7,752 views

I must say before everything that this guide is made from a BHUNP-Legendary-Edition perspective. There are some variations on SE, given the different body mods, especially if you're using CBBE-3BA type bodies instead of the UUNP-BHUNP lineage. But a lot of the concepts are somewhat general to all systems, considering that in the end, it all comes down to nif files, and the mechanics that make them have physics.

 

With the arrival of SMP, the entire world of modding was revolutionized again, offering incredible looks for body physics, but the problem is these mods are some whimsical, and  most people just see a gif of bouncing tits, and they immediately want to get the new mod, without really understanding what it is, how to set it up right, and how to even make it work in the first place.

 

Even more, something that I dont think many people notice, is that following the install documentation on BHUNP doesnt actually guarantee that SMP is going to work. It's more likely that it doesnt, because in order to truly install SMP propely, one needs extra steps that are hardly described anywhere.

My experience might perhaps be limited due to the fact I figured out all of this by just deconstructing some of the basic mods. Perhaps more people out there get different results using stuff like COCO Body or some other addon, physics repack or custom setting lying around. Maybe that's why I see so many SMP enthusiasts on the modding community and I cant for the life of me understand how is it that people actually manages to get SMP working since there's literally no documentation on the base files that helps users get a actually functional install.

But what I found here, is less about what mods you install and more about why some things work the way they do while some others just dont.

 

It has taken me several months of research and the creation of my own body mod, to understand how these things work. So in hopes of helping someone else, and also as a way to put my findings in written, I decided to make this guide which will attempt to be addessed to modders and users alike.

 

So let's get on with it.

 

Part 1 - What is HDT/SMP

 

HDT, is actually the name of the modder who created physics for Skyrim, which is also the same person behind SMP. But both are different versions of a physics engine, the original HDT has the long name of HDT-PE (For "Physics Extensions"), but I will refer to it on this guide as simply HDT.

SMP stands for "Skinned Mesh Physics" and they have a couple of fundamental differences:

  • HDT is a system based on collision objects. A body or clothing item has certain "bones" that animations can move, and when the animation moves a bone, the model moves. In the case of physics bones, they arent controlled by game animations but by the physics system instead. HDT assigns physics bones values such as acceleration, movement limitations and inertia. It also assigns collision objects to these bones, which are simple invisible meshes such as cubes, boxes, cones, cyllinders and spheres. When those invisible objects colide, you get in-game model collisions.

01.jpg

  • SMP instead, relies less on the collision objects and more on an actual model. The bone assignment mechanic is the same, there are physics bones on a model, and the system will assign motion values and move them, but the collisions can be asigned to an entire actual mesh instead of needing collision objects. This provides for the smoother and more realistic looks you see on the bouncing titty gifs people posts. SMP however is much more CPU-Demanding than HDT, which is why when in game you can just "install it" right off the box. To activate body SMP collisions in game, it is needed that you use the mod, and activate "SMP Mode" from inside the game, which equips invisible collision structures that enable true SMP physics.

 

Part 2A - Installing HDT

 

HDT is the simplest physics system to install. In fact, you only need 3 mods to get it working. XMPSE Skeleton, Bodyslide and HDT-PE, which is the system itself and consists of 2 files, which are hdtPhysicsExtensions.dll and hdtPhysicsExtensions.ini

The skeleton just goes in the game directory as ordered by the installer, Bodyslide requires the use of the software inside to generate meshes.

In order to generate physics-enabled meshes, users should choose the options labeled as "Special" or "HDT".

As for HDT itself, it needs to be added or else, you still wont have jiggle physics. Bodyslide provides the prepared meshes, HDT makes sure they have physics.

 

Part 2B - Installing SMP

 

For now, I have only ever used BHUNP, but it's my understanding that 3BA works more or less the same. This is when things get tricky because SMP will not work right off the box.

The BHUNP installer comes with a lot of options most of it are kind of hard to understand, especially for new users, and you may think you're setting up an SMP setting, but you will not succeed unless you take extra steps.

 

The basic process is about running the installer and generating the collision meshes with Bodyslide.

When running the installer, you should mind 2 things:

  • First, the size of your collision mesh (referred to as cup size), this is important because it refers to the Players, breast cup size. If you play a small chested character, and choose D Cup IE, your breast jiggle will probably look ridiculous. This is not an issue for NPCs since the mod inside the game allows you to choose a specific physics collision setting for NPCs when you add SMP mode to them.

03.jpg

  • Second, the "Head for NPCs" option. This installs a head mesh that has embedded physics, "for NPCs" this might seem like a good idea at first, but in my experience its a terrible one. For starters, it doesnt really work on NPCs. It only works on the Player. which is why some of my testings with this file active, resulted in different behavior between Player and NPCs. More specifically, stuff like generating the "Advanced V2" model in Bodyslide (which is meant to be the one you use for SMP) can result in the player having automatic breast jiggle (With no SMP collision mode active) while NPCs do not. The reason for that is described on the next part. But basically, when the installer prompts you to install the head, I recommend you don't click that.

04.jpg

 

Finally, after the installer is done, you should generate meshes with Bodyslide, and you have 2 sets of things to generate:

 

  • The Body Mesh: 3BBB comes with several body options, but the "Advanced V2" should be the one used for SMP, while the "Havok Path" one is meant to be a bit different than normal HDT models BUT IT STILL USES HDT PHYSICS. The rest of the options labeled BBP and TBBP are also set to behave on HDT physics.
  • Collision Meshes: Very important. These models are invisible in game, and can only be equipped from inside the game by activating "SMP Mode" on the player and a target NPC. These must be generated or else true SMP will not work. There are about 5 models to generate, 1 for player, and the other ones are for NPCs.
  • VERY IMPORTANT AGAIN: Remember that at least the basic nude body settings for SMP, work like this, for what I've seen, in both games. SMP mode is triggered from inside the game by an MCM-configurable hotkey. If something jiggles and collides without you activating the key, then it's either not really using SMP physics, or it's an outfit that has internal SMP setting (which will probably conflict with normal SMP if you try to use the hotkey).

05.jpg

 

 

Part 2B.1 - Why SMP doesnt "just work" and how to fix it.

 

SMP actually has 3 problems:

 

  • First, the dlls are all wrong. For SMP to work, one needs to have a couple of functional files which are called hdtSkyrimMempatch.dll and .ini. The ones that BHUNP has, do not work, at least on version 2.31. Some other mods come with working copies of these files, including my own body mod, and other mods such as Naturalistic Jiggle.
  • Once you get those files, the SMP collision meshes, when called upon in game, should actually work.

06.jpg

  • Which brings us to the second problem which is physics overlap.
  • I mentioned the head option on the installer before, because if you did install the head, you may notice that generating the Advanced V2 model, already uses physics without the need of SMP mode in game, at least for the player. This is because the head was adding physics to the actor, but the issue here is that SMP requires the actor to have no preexisting physics instead. If you try to add SMP mode to an actor (in this case the Player) in game, when physics are already active, you will get pysics overlap, which in simple terms, means HDT and SMP are competing for control of the physics bones. This will look in game as trembling breasts and buttocks.
  • On top of that, the head also has body, fingers and vagina physics settings, which will mean if you use SMP, you may also get trembling on those areas. The solution to this, is simply minding the previous part and not installing the head. Alternativelty, I was able to solve this by editing hdt3BBB.xml and removing all bone values from it by using JFF to edit the xml. This last option however, will also make 3BBB-PE stop working.
  • Adding one more point, in my case it was the head, but the head is not the only place where physics paths might exist. Sometimes hands and feet can also have them and though Hands didn't seem to add physics for me, maybe they do in other cases. Rememer: Proper SMP requires that HDT is completely shut down, so you can't have other models adding HDT controllers to your actors.

07.jpg
Physics Overlap in all their glory

  • The third problem, is that even if you did everything right, have the collision meshes, generated an SMP-Prepared body, and didn't install the head, so that your character's body is ready, you will still have physics overlap in the buttocks. Now the reason for this, is actually HDT.
  • Coded internally, within HDT, is the fact that physics get added to every single model in the game. No exceptions. This means if a model has the "rigging" AKA bones to jiggle, it WILL jiggle. No need to have an xml path embedded inside the nif file for it to jiggle, it will just jiggle no matter what you do.
  • But Myst, what the fuck even are these "embedded" things? I hear you say. Well, embedded xmls or "havok paths" are properties that are contained inside a nif file. They tell the game that this particular nif, should have physics, as they point to controller files that move bones within the nif's "skeleton".

09.jpg

  • Now, some files may have embedded havok path, but some of them have nothing. Having nothing embedded, however, doesnt mean the model wont have physics, because, every model already has an implicit physics file attached to it, even if the nif file itself does not. The controller file for the implicit physics, is the default physics file, called hdtPhysicsExtensionsDefaultBBP.xml.
  • The problem is that SMP requires a model that's clean of preexisting physics, which means HDT should be turned off if we are to use SMP. But this is impossible because HDT is hardcoded to be present in all things, and there is no real way of completely shutting HDT physics down from the nif file. The only solution I could find to this issue, was editing the xml manually. Which means using JFF, locating the DefaultBBP xml you are using, and remove the 4 Butt bones from it. Once that's done, SMP should finally be able to use a mesh that's clean of physics so it can use its own gimmick to generate proper jiggles and collisions.

08.jpg

The downside of this procedure is that automatic butt jiggle that models used to have without embedded havok, will in fact, stop working for every model unless the nif file specifically contains xml paths pointing to a file that does use those bones. The good news is such alternate file that can provide full physics without being the default xml, exists.

It's called HDT.xml, and it's present on Bodyslide and BHUNP.

In other words, a nif with no havok path embeds, will not have butt jiggle. Technically, it's still using defaultBBP xml but that file no longer controls buttocks. The way to give a mesh HDT butt jiggle, is simply a matter of embedding an xml file that does have the bones, such as "HDT.xml" (At least the versions that come in Bodyslide and BHUNP do have the bones)

 

Part 3 - On making properly set collision mods.

 

This part is meant for modders since I feel like I need to say somewhere, that making correctly prepared models is important. For this, any modder should have a few things in consideration.

 

  • HDT ALWAYS has embedded physics to all the models. So if you simply rig a model to have HDT-Controlled bones, they will jiggle even if you make nifs without embedded xml havok paths inside. The default file is always hdtPhysicsExtensionsDefaultBBP.xml
  • Adding alternate xml havok paths, pointing to the same bones hdtPhysicsExtensionsDefaultBBP.xml controls, results in an overriding (not overlapping) physics controller for a file. Which is probably why many models use HDT.xml instead of DefaultBBP.xml. Those control the exact same bones, but the HDT file has the capacity to override the default one, resulting in different looks for the physics. It is relatively simple; if a model has butt bones, and no embedded xml, Default will move them. If a model has butt bones and embedded hdt.xml, hdt xml file will move butt bones instead
  • In my game, I have removed the butt bones from DefaultBBP and left them on a separate file, which means if a model has butt bones, the default xml has no data about them, so they wont move, unless another xml includes them, which is how I'll be setting my models my models on BHUNP-Lite and every further mod I make from now on. I would like this to become a common practice but unfortunately I'm just a random modder in a sea of other people doing their own thing. I hope this can be a somewhat easy method to fix models anyway.
  • Finally, some mods might add parts that have their own xml paths on some parts other than the body, like IE hands and Feet. This is also a thing since Bodyslide (If you look at Hands-Special and Feet Special, you'll notice the difference is they have embedded xmls) As mentioned before, it used to be a good idea to have extra models containing physics paths, but that was before SMP became a thing. Now with SMP, the priority is to get rid of HDT physics in SMP models which can prove really hard if you have anything else that's adding them. Hands, Heads and Feet seem to be the most common alternate places where people puts physics paths, and they can be somewhat tricky since they dont always work the same for Player and NPCs. IE on my tests I found that an embedded Head gives physics to the player, but not to NPCs, while Hands give physics to an NPC but not the Player.

 

Part 4 . Recommended Install:

 

Depending on what setting you want, the process varies, but what I did is this:

Quote

 

  1. Installing XMPSE. Choose "physics" options since they include the proper bones.
  2. Installing Bodyslide. Options at one's discretion, I use UUNP.
  3. Installing BHUNP, make sure you DONT click the head for NPCs option, everything else is yes. If you have another head nif in your mod list you should also be careful about what it contains. The one that comes with Bodyslide is harmless, but the one in BHUNP can cause issues.
  4. Generate BHUNP collision models with Bodyslide
  5. Installing my own mod BHUNP-Lite, My Smol Tiddy xmls are optional as prompted by the installer. The hdtSkyrimMemPatch files are also optional but highly recommended and a necessary step for proper SMP to work. *Note: my mod is optional and you dont even need to generate its meshes, but at least the way I got it to work, it is necessary just for the physics files fixes.
  6. Using JFF to edit hdtPhysicsExtensionsDefaultBBP.xml is also optional, and the final step to preparing a setting that's ready for SMP. I will be including my edited xml for that as well in future versions of my body mod, but for now (v1.11) it's still not included, so JFF is the best alternative.
  7. Now all models whould work properly. Generate HDT models for either BBP, TBBP or 3BBB, or a functional SMP one

 

 

I hope you fid this guide useful, It may or may not be subject to further changes as I'm still figuring this all out. If you have any comments feel free to leave them and I'll be sure to check them. Thanks for reading and have a nice day.

Edited by Myst42

5 Comments


Recommended Comments

Many thanks for this guide. I'm struggling myself through this now. I wasn't aware that I had to choose the "Advanced V2" so many thanks for this guide. Also that the hdtSkyrimMemPatch files didn't work was totally new for me.

 

One question I have. The femalehead.

 

It's not something you build through the bodyslide is it? At least BHUNP don't have such an slider option?

I have three HDT paths located in my femalehead.nif. So basically I should just get rid of those manually? I use the mod "everybodie's different" made by mungomonk. So every other female in Skyrim is using a femalehead from the uunp special body. Only my character (and a few follower mods) actually uses the default femalehead.nif (or the other body files for that matter). removed the hdt paths in the femalehead.nif.

 

EDIT:

 

First I got fooled by HDT still hanging around.

Then there was no action at all after equipping the collision meshes. HDT is at least gone. Hooray...

 

What seemed to be the issue for why it wasn't working was the "non European" choices. I'm european and consider my country part of Europe. So I choosed "European" all the way.

But my country is not part of the European Union. That's a different thing. The BHUNP fomod The fomod from Factoryclose didn't spell that out so I could understand that.

So I choosed the non European options all the way. Why does it even matter I wonder ?... The content of the xmls seems to be the same (?).

 

But it seems to be working as it should now. I realize now how much I miss the Belly physics collision. Cause that is gone. As foretold of course. And I probably must do that butt bone removal you told about too.

 

Again, many thanks for this guide, Myst42.

Edited by Thor2000
Link to comment

I know this is a really delayed response. Thought I would add this just in case it will help someone. I believe the only difference between the EU vs. Non-EU options is the way the decimal point is represented in the XML files. The EU option uses a comma to separate the whole number part from the fractional part; otherwise, a period is used. For example, if you are running Skyrim on a Windows operating system in Germany, the entire OS will be configured to convert numeric strings having a comma into a decimal number. If you're in the United States the entire OS will be configured to convert numeric strings containing periods into a decimal number. To make things more complicated, commas in the US are often used to separate significant digits (e.g. 1,000,000.00 represents one-million and it contains 2 commas and 1 period). The XML files controlling the physics of XMPSE bones are used to configure the natural motion of the bones and how they interact with nearby objects. Many of these settings are controlled by minute changes in decimal values. When the physics extension reads those values from an XML file into memory, the string of characters has to be converted into a number before it can be used in a mathematical operation. If the wrong character appears in the XML file to represent the decimal point, the whole thing just breaks. So, I'm pretty sure that's why the option is there.

 

By the way, thank you Myst for documenting your travels with SMP. I use the Wonderland mod and the BHUNP-Lite mod in my game and love them both. This was very helpful.

Edited by el670005
Link to comment
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use