Jump to content

[LE] How to remove HDT PE dependency?


Recommended Posts

Hellow there fellow modders,

 

First of all, this is my very first topic on the forums so please be gentle >.< I apologize if the question I'm about to ask (which is already stated in the title, I guess) is a stupid one. I'm fairly new to modding Skyrim in general and am not very familiar with some stuff, especially when it comes to meshes. So let me just hop right into it and explain what I'm trying to achieve:

 

I have an armor mod that I'd like to include within a separate mod (a standalone follower). Unfortunately, that armor mod requires the HDT physics extension as a hard dependency; if you don't have HDT PE installed, the game will CTD whenever you equip the armor or enter a cell with an NPC wearing it.

 

While I, personally, am using HDT PE by myself, I would be pretty fine with that - no problem. But since my ultimate goal is to create a standalone follower mod with that armor, it wouldn't be really "standalone" if it had such a requirement. Other people might not necessarily be interested in things like "jiggly body parts" or stuff like that.

 

So my question is: how - if it's even possible, I don't know - would I remove the HDT component from the armor mod? I assume it's somewhere in the mesh, but I'm really not sure. I googled for quite a while now to find a solution, and have found some posts about it (even here on the Nexus forums iirc) but they all explained it differently (none of the things I've read worked so far), or they didn't even describe my situation at all. I've tried to figure it out by myself afterwards, but to no avail.

 

Some people said, to add HDT support to a mesh, you would open it up in NifSkope and add a "NiStringExtraData" with the HDT Havok Path pointing to the extension's .xml file (where I assumed, to reverse that process, you would simply remove that data). When I opened up the armor mesh in NifSkope, there wasn't any kind of such extra string data to begin with.

 

Some people said it would be declared somewhere in the mod's ESP - then again, that doesn't make much sense to me, since I'm not using the original mod's ESP but created my own (for the follower) and just made a new outfit / armor addon using the meshes and textures. So I have no clue on where to look now.

 

If anyone could be so nice and point me into the right direction, I'd be super glad and thankful.

Or, if it would be too complicated to explain, and you wouldn't mind doing me the favor and do it by yourself, then I could as well just send you any file required for it.

 

Anyway, thanks for your time! :smile:

Edited by ThraxxMedia
Link to comment
Share on other sites

You have to replace the rigging of the mesh so that it does not have any HDT bones/nodes associated with it. This is easier said than done. If the armor is CBBE or UUNP based you could use BodySlide to change the rigging. If it is not, you *might* be able to use a tool called Mesh Rigger. But Mesh Rigger is not easy to learn or I should say "get right the first time".

Link to comment
Share on other sites

Hmm... I'm sorry to dig this up again, but I made some progress on the topic - yet stumbled into another problem right afterwards.

 

I successfully removed the HDT bones/nodes via Bodyslide's Outfit Studio. It was as simple as going to the "bones" tab, then selecting and deleting them. It works fine, the mesh will load ingame without crashing and the physics are gone.

 

The problem I'm facing now is a weird offset I seemingly can't do anything about. The character's head is "floating" above the armor mesh when ingame. When in Outfit Studio, and adding a reference body, I can see this offset, too. At first I thought the armor would've somehow been placed too low (maybe during the steps I did before, to remove the bones), so I went ahead and tried loading the original, unedited mesh at first, to see if the offset came along with my edits. Nope, it didn't. Offset is there, even with the unedited backup file.

 

Then I thought, "oh well, no worries, I'm gonna adjust the height of the armor then"... went to "Shape" -> "Move..." and dragged the Z axis slider until it looked kind of fine and was aligning to the reference properly. Back in the game, the head was no longer floating - although, now the whole character was floating above its feet / boots. Since I did not edit the boots at all (there was no need to, they don't have physics), their alignment, scale and size was absolutely fine. And because the armor itself was aligned to the feet properly before, too, I came to the conclusion that it's NOT the armor that's off, but apparently the position of the body inside of it.

 

I tried to "semi-fix" this (e.g. getting rid of all gaps, at the head AND feet) by increasing the overall scale of the armor (not just the height), but obviously, that totally blows everything out of proportion. I don't want to have a MASSIVE body with a tiny head in comparison. That would just look ridiculously silly.

 

Would there be any proper way to fix this? Or am I out of luck, because maybe Bodyslide / Outfit Studio just can't import some meshes correctly?

Edited by ThraxxMedia
Link to comment
Share on other sites

 

 

Would there be any proper way to fix this? Or am I out of luck, because maybe Bodyslide / Outfit Studio just can't import some meshes correctly?

Don't know. And probably.

 

I got pretty much the same thing (a body out of position from head/hands/feet) before which is why I ended up trying to learn Mesh Rigger. But I was adding HDT rather than trying to get rid of it.

Link to comment
Share on other sites

Oh, I know :laugh: I actually found your old post while searching for solutions. I tried Mesh Rigger then, but it couldn't even process the .nif file properly. There was a whole bunch of the same error line over and over during processing (something about "improper rotation matrix") and after it was seemingly finished, the window closed without any further notice, but the output folder was still empty. Tried this several times with different settings but to no avail.

 

/edit

 

HAH! After a long night of trial and error (mostly error though) I finally achieved what I wanted.
For everyone who might be interested in doing the same - removing HDT bones from a mesh, that is - here's what I did:

 

1. Load up the mesh in NifSkope. Do not even remotely think about going into Outfit Studio!
I know, it's quicker and somewhat more user-friendly, but this is exactly what introduces the head / hands / feet offsets.

 

2. Expand the "Scene Root" (or whatever the root node is) so that you see all NiTriShapes and NiNodes listed.

 

3. Delete all HDT related NiNodes by right-clicking on them and selecting "Block" -> "Remove" or "Remove Branch" (doesn't matter).
Usually, these are called something like "NPC L Butt" / "NPC R Butt", "NPC L Breast" / "NPC R Breast" and so on.

 

If you would save the mesh now and load it up in game (what probably most people try, me included), you'd always CTD so don't do that.

You wouldn't even be able to open it in Outfit Studio (it would give you a critical error and shut down) so right now the mesh is "broken".

But don't worry, we're going to fix that.

 

4. Expand every NiTriShape, navigate to its BSDismemberSkinInstance and make sure there are no "empty" bones.
Most NiTriShapes will be just fine and don't need any further editing. Those which had an HDT bone attached to them require some cleanup though.

 

If the bone list looks something like this, it's pretty easy:

Num Bones 5
Bones
316 (NPC Spine2 [spn2])
322 (NPC R UpperarmTwist1 [RUt1])
328 (NPC L ForearmTwist2 [LLt2])
none
none

 

Just change the "Num Bones" value to the correct number (3 in this example), refresh it, and the list will automatically collapse and remove the trailing null entries.

 

If it looks like this though, you'll have to sort them manually:

Num Bones 5
Bones
316 (NPC Spine2 [spn2])

322 (NPC R UpperarmTwist1 [RUt1])

none

328 (NPC L ForearmTwist2 [LLt2])
none

 

Don't just change the number of bones and refresh in that case, or you will actually lose the "328 (NPC L ForearmTwist2 [LLt2])" entry!

Instead, click into the topmost field that reads "none" so you can edit it, and type in the number of the bone below (328).

Now you have two identical fields, but of course you don't want that, so click into the bottom one and just delete the number in there.

Continue sorting the list like that until every "none" is at the very bottom. Then update the "Num Bones" count as previously described.

 

If you're done with cleaning up every NiTriShape that way, save the mesh and close NifSkope.

The tool you're going to need next is called "Clean Nif" (this is part of the "Mesh Rigger" package)

 

This one is fairly easy, because it doesn't have many options. Select your mesh as both "Skeleton" and "Target" via the "File" menu.

Select a destination folder for output, check the buttons "Replace Skeleton" and "Re-skin Nif" and hit OK. After that, you're finally done.

 

On a side note: you can't just run the "Clean Nif" tool without the previous cleanup steps, because it would close without any output.
Apparently it's unable to process the mesh in its broken state, so while the NifSkope stuff is awfully tedious, I'm afraid it's necessary.

Also, you can't skip the "Clean Nif" part because your mesh is not yet totally clean at that point and will still cause your game to CTD.

 

Anyway... congratulations! You now have a clean, functional mesh without HDT physics.

:smile:

Edited by ThraxxMedia
Link to comment
Share on other sites

  • 6 months later...

Hey your guide up there is awesome but I've run into a problem. Ive done everything you said but the part of the armor that had the HDT doesnt appear in game. and when i open it in nifskope it looks totally wonky, like stretched out and vertical and just wrong. im pretty sure i did everything you said correctly and i dont know what went wrong

Edited by jzenterous26
Link to comment
Share on other sites

  • 5 months later...
  • 2 months later...

FYI, I've never seen a mesh that actually requires HDT physics. What they require is a skeleton that contains those bones, like XPMS or XPMSE. A lot of those meshes predate HDT and were actually built for TBBP animations. Again, they did not require the animations. All that's required is that the mesh isn't rigged to a bone that isn't there. You can use the same meshes and have zero jiggling in your game just by installing a compatible skeleton without installing HDT or TBBP.

 

There's really no downside at all to installing a custom skeleton, either. If you install XPMSE you never have to worry about any of this. If I have a mod that's rigged for HDT, I usually just list XPMSE as a requirement and let it go at that. People can add jiggling or not, as they see fit, but just use the damn skeleton and you won't get crashes.

 

 

It's also possible to just include XPMSE skeletons in your mod archive; they're free to share. Then the user doesn't have to do anything and your mod is still stand-alone. Somebody would have to have deliberately installed an incompatible skeleton to run into any problems.

Link to comment
Share on other sites

  • 2 years later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...