Jump to content

A Guide to HDT-SMP Users/Modders


treota

Recommended Posts

Solution:

After 5 days and probably 40+ hours or trial and error and literally trying to attempt every single thing I could think of I finally found the answer for Skyrim Special Edition HDT-SMP when it comes to custom meshes not colliding properly with virtual collisions such as legs.

 

It turns out it was a combination of my custom HDT bones setup and some extra XML tweaking to finally get it all working. To start becasue my dress goes 180 degrees around the waist and all the way to the bottom of the floor the issue was the first bone length to the second one was too long. The first bone in each HDT chain is kinematic meaning it doesn't follow the HDT physics but will follow the animation of whatever bone its parented to (in this case parented to the pelvis). As a result becasue bone #2 in my chains were so far away when I would do any extreme action like walk or crouch the top kinematic bone was forcing the rest to ignore the collision becasue it would just animate though and follow the pelvis rotation. So as the picture below shows the fix is the 2nd bone in each chain should be close to or almost right after the first one so it can immediately start having physics right at the waist point. I never ran into this issue with my other custom HDT meshes I think becasue they were smaller pieces of skirts or capes and as a result the bone lengths were way shorter so I never would see the bad kinematic animation clipping occurring. (The the bones in the image below is the correct way to do it, before they were way to spread apart from bones 1 to 2 in the chain)

 

LxycBmG.jpg

 

The bottom right picture shows even in extreme sprinting mode the dress will fully collide with the legs. Of course, there will still be micro-second instances the legs/thigh will appear to pop out in front of the dress but after observing many other HDT armors made by other modders this is to be expected (skyrim is an old game and amazing we can get HDT working in it at all to this degree). I think it can be mitigated even more by increasing the iterations of HDT SMP in the config file (not tried it yet) but another way if you want more extreme animation poses that look nice in HDT for screenshot purposes is to just slow time down in the console command 'sgtm 0.3' or even slower 'sgtm 0.1'. With slowed down time the HDT physics can calculate way more accurate per frame and the clipping really never happens no mater the animation I do.

 

The last piece of the puzzle is I had to tweak the XML weight threshold settings and margin multipliers a bit more with the bone relations. Its also recommended to set your meshes in the XML with the tag <shared>private</shared> this will prevent any outside meshes not part of your HDT mesh to collide with the dress. I found when I didn't have it private the arms on my character would hit the dress bones on the side for example and push them in odd directions causing annoying clipping so that tag is one thing you can keep in consideration as well. With all that combined I finally have a decent looking HDT dress that I feel is now comparable to many of the other good HDT armors other modders make. Hopefully this post helps anyone else trying to find an answer. I literally think I scoured the entire web for a specific answer to this and even a 100+ page HDT thread over at lover labs and couldn't find definitive answers. It all came down to observing a few other HDT armors that dealt with long dresses and seeing how their bone setup was placed. Maybe there is another way I could have fixed this problem I had but it worked for me and until an HDT expert comes along and can post a better answer this will hopefully work for anyone else that runs into similar issue with their custom HDT's.

 

 

Just posting some keywords so this post can show up in search queries for anyone looking for an answer if they run into the same issue:

Skyrim Special Edition HDT leg clipping

Custom HDT meshes clipping in legs

virtual leg collision - virtual proxy leg collision

Link to comment
Share on other sites

  • Replies 234
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...
  • 3 months later...

Interesting, I have not personally tried to get character hair working so I can not be of much use there sorry.

 

I would have thought SMP would be applicable to anything as long as the mesh is actually present in the game, though it is possible that some kind of merging or renaming goes on behind the scenes with character mesh/hair. Someone with more experience in body mods / hair mods would be good to reach out to for some insight there, I would certainly be interested in learning more about how that works behind the scenes.

I've ran into the same thing. I'm not sure how any of this works, I'm a total noob with HDT, wanted to convert a wig to actual hair. I solved it though. I made sure the xml's name field matches up with the EDID of the proxy headpart. As in, I gave my proxy headpart the EDID ShanaVirtualBody, and in the xml had <per-triangle-shape name="ShanaVirtualBody">. What I name the nif file or the BSTriShape inside the NIF file has no effect. My uneducated guess is that if a shape of the specified name is not found in the nif file the xml is called from, then it looks for an EDID of that name instead. I have no clue, I'm just glad I figured this out somehow, and thought I might as well share.

I noticed the log had some SkinSingleGeometry thing listing all my current headparts by their EDID, that's what got me thinking about the EDID.

Edit: looks like the proxy and hair nif both have to be in the same folder too. I tried using the collision proxies used by KSHair and that didn't work.

Edited by Benna96
Link to comment
Share on other sites

  • 2 months later...

I'm Having a problem where the virtual physics body is visible in game once i enable SMP while not having any armor equipped

 

what am i doing wrong ?

Sounds like you have the virtual body assigned to partition 32, maybe?

Link to comment
Share on other sites

I'm adding a chain to a belt (partition 52 MOD_PELVIS_SECONDARY). It's a separate mesh in the NIF.

 

I've added a custom bone to the pelvis node in nifSkope, so I now have 2 extra bones.

1. NPC Pelvis [Pelv]

2. bone_anchor

3. bone_chain

 

 

I've made an XML based on a working earring that I had, and changed the bone names accordingly.

<system xmlns:xsi="ht...blah">

<bone name="NPC Pelvis [Pelv]"/>
<bone name="bone_anchor"/>
	
<bone-default>
    <mass>5</mass>
    <inertia x="20" y="20" z="20"/>
    <centerOfMassTransform>
      <basis x="0" y="0" z="0" w="1"/>
      <origin x="0" y="0" z="0"/>
    </centerOfMassTransform>
    <linearDamping>0.99</linearDamping>
    <angularDamping>0.99</angularDamping>
    <friction>0</friction>
    <rollingFriction>0</rollingFriction>
    <restitution>0</restitution>
  </bone-default>
  
<bone name="bone_chain"/>
	
<generic-constraint-default>
    <frameInB>
      <basis x="0" y="0" z="0" w="1"/>
      <origin x="0" y="0" z="0"/>
    </frameInB>
    <useLinearReferenceFrameA>false</useLinearReferenceFrameA>
    <linearLowerLimit x="0" y="0" z="0"/>
    <linearUpperLimit x="0" y="0" z="0"/>
    <angularLowerLimit x="0" y="-0.2" z="-0.5"/>
    <angularUpperLimit x="0" y="0.5" z="0.5"/>
    <linearStiffness x="0" y="0" z="0"/>
    <angularStiffness x="0" y="0" z="0"/>
    <linearDamping x="0" y="0" z="0"/>
    <angularDamping x="0" y="0" z="0"/>
    <linearEquilibrium x="0" y="0" z="0"/>
    <angularEquilibrium x="0" y="0" z="0"/>
  </generic-constraint-default>
  
  <generic-constraint bodyA="bone_chain" bodyB="bone_anchor"/>

Hoping someone knows what I'm doing wrong, because the chain is static. I checked my weight paint, it definitely looks fine. I also have the NiStringExtraData pointing to the XML file.

Edited by timsterse
Link to comment
Share on other sites

  • 4 weeks later...

So uh, I am back with another issue. Daymarr recently released the [COCO] body mod for his armor sets. I downloaded the 3bbb smp LE file and built the body and all that jazz but in game, the boobas of my character are stuck in space and time, unmoved by my character,
I will first provide the error log:

hello world
hdtSkinnedMeshPhysics
[Thu Jun 3 20:44:16 2021]INFO: Queue OK
[Thu Jun 3 20:44:16 2021]INFO: SKSEPlugin_Load
[06/03/2021 08:45:30 PM]WARNING: SKSE\Plugins\hdtSkinnedMeshConfigs\COCO\BaseShapeA.xml(4,0):
VirtualGround is not a NiGeomery or doesn't exist, skipped
[06/03/2021 08:45:30 PM]WARNING: SKSE\Plugins\hdtSkinnedMeshConfigs\COCO\BaseShapeA.xml(377,0):
Bone L Breast00 is not exist, skipped
[06/03/2021 08:45:30 PM]WARNING: SKSE\Plugins\hdtSkinnedMeshConfigs\COCO\BaseShapeA.xml(391,0):
Bone R Breast00 is not exist, skipped
[06/03/2021 08:45:30 PM]ERROR: SKSE\Plugins\hdtSkinnedMeshConfigs\COCO\BaseShapeA.xml(406,0):
xml parse error - not a float value



I will also attach some screenshots:
20210603205434_1.jpg
20210603205439_1.jpg
20210603205444_1.jpg
20210603205446_1.jpg
Link to comment
Share on other sites

 

xml parse error - not a float value

 

This was fixed in the open source version of SMP for special edition, unfortunately for LE you will either need to change your OS language or open the physics XML files from the mod and convert all of the decimal notation to the appropriate version for your locale.

 

e.g. decimal notation in my locale is . (dot) while in others it is , (comma)

 

This should be relatively easy to achieve in any kind of text editing program via search & replace (notepad++, VSCode, Atom etc)

 

 

 

VirtualGround is not a NiGeomery or doesn't exist, skipped

 

This usually means that one of the hulls/meshes is not in the expected format (LE vs SE), though being virtual ground you can probably just ignore it in this case.

 

 

[06/03/2021 08:45:30 PM]WARNING: SKSE\Plugins\hdtSkinnedMeshConfigs\COCO\BaseShapeA.xml(377,0):

Bone L Breast00 is not exist, skipped
[06/03/2021 08:45:30 PM]WARNING: SKSE\Plugins\hdtSkinnedMeshConfigs\COCO\BaseShapeA.xml(391,0):
Bone R Breast00 is not exist, skipped

 

These could indicate a problem with the physics XML file, it might be caused by the decimal notation issue though. Either way the numbers in brackets are line numbers, so you could try inspecting BaseShapeA.xml at lines 377 & 391 to see if anything obvious is wrong. (use an editor with line numbers functionality to save yourself a headache)

 

It might also indicate an issue with the skeleton in use, are you using XPMSE ?

Edited by treota
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...