MonsterMod69 Posted April 1 Share Posted April 1 I am working on my first HDT project, adding cloth physics to a loin cloth. The outfit I am using is a 3BA outfit. While I can find a generic guide on writing the XML I cannot find any guide for when it is also a 3ba body. Any help would be appreciated. Link to comment Share on other sites More sharing options...
scorrp10 Posted April 1 Share Posted April 1 It being a '3BA body' is of little relevance. The 3BA physics will take care of anything weighted to various extra bones on the XP32 skeleton, no need to worry about it. So you first create the non-SMP version, weighing the mesh to the body and conforming to sliders. For the loincloth, I would use 'Sliders: CBBE 3BA UniLowerCurtain' reference. Once that is done, you build out the bone structure - for the loincloth it will typically stem from the Pelvis bone. You remove the weightings of usual skeleton bones from the 'hanging parts' of loincloth. Then you paint weights for the SMP bones you created. Now, the various body collision shapes - you need those weighted and slider-conformed to a 3BA reference body. As to writing the XML: A lot of good information here: And look at other mods that add SMP cloth physics. I.e. R18pn Lingerie mod - B and D outfits have SMP elements. Link to comment Share on other sites More sharing options...
MonsterMod69 Posted April 1 Author Share Posted April 1 I now have a poorly configured XML or a poorly weighted mesh. I have working SMP on other outfits but on my project outfit it sinks into the floor. If I unequip and reequip I can watch the loincloth sink into the floor. Not finding any info on this issue since it is a common symptom of hdt not being installed correctly. I have also noticed that outfit studio changed the weights I painted, I clearly remember different weights being there. Should I try repainting? Or is this an issue with the XML? Link to comment Share on other sites More sharing options...
scorrp10 Posted April 1 Share Posted April 1 When you save the project in Outfit Studio, vertex weights are normalized so that total sum of weights across all bones is 1. Which means if you paint the same vertex 'red' (1) for two bones, upon saving it will normalize the weight for each bone to 0.5, and when you open it next time, they will show as green. Here is a mesh I recently worked on. FPanelL01 and FPanel_R01 attach to 'NPC Pelvis'. I have attached the xml I wrote for this one. To quickly go over the sections: 1. body bones - this must list all skeleton bones present here. 2. anchor bones: L01 and R01 are rigidly connected to Pelvis bone, and there are no vertices weighted to them. No 'bone_defaut' block preceding those. 3. Dynamic bones definitions - I put in a bone_default block, and it will apply to the listed L02 and R02 bones, next block (same mass, slightly more inertia), is used for L03, L04 and R03, R04. and finally next block (more mass/inertia) is used for L05 and R05 end bones. 4. Next go the vertical constraints. If your mesh "falls into floor" this is the area where you most likely messed up. Here, I am constraining L02 to L01, L03 to L02, etc. You can also see that 02-01 and 03-02 constraints allow less angular motion than 04-03 and 05-04 constraints. 5. Next are the lateral constraints. L01 and R01 are static, so no need to constrain them to each other. But I do constrain L02 to R02, L03 to R03, etc. 6. Finally, are collision bodies definitions. You can see that I am defining ground, legs and skirt bodies, and skirt can collide with ground and legs. If you have two monitor setup, or run Skyrim in a window, you can examine how your xml is working by checking Documents\My Games\Skyrim Special Edition\SKSE\hdtSMP64.log file. It WILL tell you if you got errors in your xml. Here is what I get in the log when equipping the above item: Spoiler meshes\armor\DSR\D\FrontSkirt.xml(5,2):Found node named NPC Belly, creating bone meshes\armor\DSR\D\FrontSkirt.xml(6,2):Found node named NPC L Butt, creating bone meshes\armor\DSR\D\FrontSkirt.xml(7,2):Found node named NPC L Calf [LClf], creating bone meshes\armor\DSR\D\FrontSkirt.xml(8,2):Found node named NPC L Foot [Lft ], creating bone meshes\armor\DSR\D\FrontSkirt.xml(9,2):Found node named NPC L FrontThigh, creating bone meshes\armor\DSR\D\FrontSkirt.xml(10,2):Found node named NPC L RearCalf [LrClf], creating bone meshes\armor\DSR\D\FrontSkirt.xml(11,2):Found node named NPC L RearThigh, creating bone meshes\armor\DSR\D\FrontSkirt.xml(12,2):Found node named NPC L Thigh [LThg], creating bone meshes\armor\DSR\D\FrontSkirt.xml(13,2):Found node named NPC Pelvis [Pelv], creating bone meshes\armor\DSR\D\FrontSkirt.xml(14,2):Found node named NPC R Butt, creating bone meshes\armor\DSR\D\FrontSkirt.xml(15,2):Found node named NPC R Calf [RClf], creating bone meshes\armor\DSR\D\FrontSkirt.xml(16,2):Found node named NPC R Foot [Rft ], creating bone meshes\armor\DSR\D\FrontSkirt.xml(17,2):Found node named NPC R FrontThigh, creating bone meshes\armor\DSR\D\FrontSkirt.xml(18,2):Found node named NPC R RearCalf [RrClf], creating bone meshes\armor\DSR\D\FrontSkirt.xml(19,2):Found node named NPC R RearThigh, creating bone meshes\armor\DSR\D\FrontSkirt.xml(20,2):Found node named NPC R Thigh [RThg], creating bone meshes\armor\DSR\D\FrontSkirt.xml(21,2):Found node named NPC Root [Root], creating bone meshes\armor\DSR\D\FrontSkirt.xml(22,2):Found node named NPC Spine [Spn0], creating bone meshes\armor\DSR\D\FrontSkirt.xml(23,2):Found node named NPC Spine1 [Spn1], creating bone meshes\armor\DSR\D\FrontSkirt.xml(26,2):Found node named hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L01, creating bone meshes\armor\DSR\D\FrontSkirt.xml(27,2):Found node named hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R01, creating bone meshes\armor\DSR\D\FrontSkirt.xml(44,2):Found node named hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L02, creating bone meshes\armor\DSR\D\FrontSkirt.xml(45,2):Found node named hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R02, creating bone meshes\armor\DSR\D\FrontSkirt.xml(61,2):Found node named hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L03, creating bone meshes\armor\DSR\D\FrontSkirt.xml(62,2):Found node named hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R03, creating bone meshes\armor\DSR\D\FrontSkirt.xml(64,2):Found node named hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L04, creating bone meshes\armor\DSR\D\FrontSkirt.xml(65,2):Found node named hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R04, creating bone meshes\armor\DSR\D\FrontSkirt.xml(82,2):Found node named hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L05, creating bone meshes\armor\DSR\D\FrontSkirt.xml(83,2):Found node named hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R05, creating bone meshes\armor\DSR\D\FrontSkirt.xml(104,2):OK: constraint between object hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L02 <-> hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L01 meshes\armor\DSR\D\FrontSkirt.xml(105,2):OK: constraint between object hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R02 <-> hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R01 meshes\armor\DSR\D\FrontSkirt.xml(107,2):OK: constraint between object hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L03 <-> hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L02 meshes\armor\DSR\D\FrontSkirt.xml(108,2):OK: constraint between object hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R03 <-> hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R02 meshes\armor\DSR\D\FrontSkirt.xml(129,2):OK: constraint between object hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L04 <-> hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L03 meshes\armor\DSR\D\FrontSkirt.xml(130,2):OK: constraint between object hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R04 <-> hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R03 meshes\armor\DSR\D\FrontSkirt.xml(132,2):OK: constraint between object hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L05 <-> hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L04 meshes\armor\DSR\D\FrontSkirt.xml(133,2):OK: constraint between object hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R05 <-> hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R04 meshes\armor\DSR\D\FrontSkirt.xml(148,2):OK: constraint between object hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L02 <-> hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R02 meshes\armor\DSR\D\FrontSkirt.xml(149,2):OK: constraint between object hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L03 <-> hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R03 meshes\armor\DSR\D\FrontSkirt.xml(150,2):OK: constraint between object hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L04 <-> hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R04 meshes\armor\DSR\D\FrontSkirt.xml(151,2):OK: constraint between object hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_L05 <-> hdtSSEPhysics_AutoRename_Armor_00000008 FPanel_R05 No errors. Remember, you can edit your xml while you are in game. If you unequip and reequip the item, the xml will be re-read. FrontSkirt.xml Link to comment Share on other sites More sharing options...
MonsterMod69 Posted April 1 Author Share Posted April 1 Thank you for the help. Looking at your xml I can see just how much I screwed mine up. I will work on rewriting it tonight. Edit: removed some questions. Found answers in the main HDT guide on the nexus Link to comment Share on other sites More sharing options...
MonsterMod69 Posted April 2 Author Share Posted April 2 With your help I have successfully added physics to the loincloth. Now all I need to solve is thye skirt quivering or maybe wibbling when the follower stands still. Thank you for your time and the XML was just what I needed to help understand what I was seeing on the main HDT tutorial. I hope you do not mind, but I used your physics vales in your XML as a starting place to get mine working. For collision I removed the virtual ground and changed the virtual leg to reference the 3BA body. Given how the loincloth mesh drapes over and rests on the body at several points I decided it would be the best course of action for me to use the 3BA body for collision instead of a virtual mesh that would need to be in the same shape as the body. I included a copy of the XML I made so others can see how I adapted your XML hermaskinnynew.xml Link to comment Share on other sites More sharing options...
Recommended Posts