Jump to content

A Guide to HDT-SMP Users/Modders


treota

Recommended Posts

There is almost certainly going to need to be weight mapping involved in any proxy object creation, though I suppose you could potentially duplicate the current tails and just scale them.

 

If I recall angular values are in radians, so 180deg would be PI or ~3.14, you most likely want to be working with values more like 5-25deg of movement so somewhere between 0-0.5. Using constraints would depend on the type of movement you are going for, my thought was to have quite small limits so that you get some sway but the tail remains mostly within a few degrees +/- of its original position.

 

Jittering sounds like constraints fighting with something else, do you have an example of your settings for your constraints & bones?

Link to comment
Share on other sites

  • Replies 234
  • Created
  • Last Reply

Top Posters In This Topic

These are the defaults I have set right now.

</bone-default>
        <mass>3</mass>
	<inertia x="1" y="1" z="1"/>
	<centerOfMassTransform>
		<basis x="0" y="0" z="0" w="1"/>
		<origin x="0" y="0" z="0"/>
	</centerOfMassTransform>
	<linearDamping>0.5</linearDamping>
	<angularDamping>0.5</angularDamping>
	<friction>0.1</friction>
	<rollingFriction>0.5</rollingFriction>
	<restitution>0</restitution>
	<gravity-factor>0.4</gravity-factor>
</bone-default>
<generic-constraint-default>
    <frameInB>
	<basis x="0" y="0" z="0" w="1"/>
	<origin x="0" y="0" z="0"/>
    </frameInB>
    <frameInLerp>
	<translationLerp>0</translationLerp>
	<rotationLerp>0</rotationLerp>
    </frameInLerp>
	<useLinearReferenceFrameA>false</useLinearReferenceFrameA>
	<angularLowerLimit x="-2" y="-1.2" z="-0.5"/>
	<angularUpperLimit x="2" y="1.2" z="0.5"/>
	<linearLowerLimit x="0" y="0" z="0"/>
	<linearUpperLimit x="0" y="0" z="0"/>
	<linearStiffness x="800" y="800" z="800"/>
	<angularStiffness x="500" y="500" z="500"/>
	<linearDamping x="10" y="10" z="10"/>
	<angularDamping x="10" y="10" z="10"/>
	<linearEquilibrium x="0" y="0" z="0"/>
	<angularEquilibrium x="0" y="0" z="0"/>
</generic-constraint-default>
Edited by BentSpoon01
Link to comment
Share on other sites

Can 2 HDT-PE XMLs be merged into one? they belong to the same nif.

 

From what I know, I'd say it probably depends. Most likely though, it uses different xmls for a good reason. For example, Multiple nifs might use the same floor.xml but use different "main" xmls.

 

unknown.png

(Example Image)

If I were to put the code from "Floor.xml" into "Matera.xml" and then delete the Floor.xml file, then the nif on the right would no longer have a Floor.xml to refer to.

Edit: Also I'm not so sure that merging .xmls for HDT-PE would be as simple as copy-pasting it. There's possibly some ordering that needs to be done, as with HDT-SMP.

 

So I guess it comes down to exactly what you're trying to modify and why. Personally I don't see any practical reason to merge .xmls, but if I wanted to merge them I would make sure to avoid inadvertently messing up another .nif's physics.

Edited by BentSpoon01
Link to comment
Share on other sites

  • 2 weeks later...

On the subject of the tail(s) jittering:

I looked back earlier in the forum a few days ago and found this post by DarkFireTim:
unknown.png
(on page 5 of forum, "the second problem" refers to his succubus tail jittering)

I've tried increasing/decreasing the simulation accuracy, limiting/unlimiting constraints, lowering/increasing its inertia, Disabling collisions, lowering/increasing gravity, lowering/increasing its mass, and I believe I also fumbled around with the stiffness settings. At this point I think some of the tails are just going to have to jitter. luckily though, the jitter does not affect the tails that I plan to use. When/if I ever upload my SE conversion of HDT Tails Wearable, I plan to include a note specifying which tails jitter and why.

 

As for the Fox5Tail, I think anything with 3D software would be too much for me right now. I plan to try and learn how to make my own Skyrim mesh at some point, but that is many many months from now. Unless I can get a crash course on how to "fake" the collision with constraints (I think the original HDT-PE mod does this), then I think I'm going to include it as an optional file, with a note about what's wrong with them. Luckily I also don't plan on using the Fox5Tail, so I shouldn't let it bother me if I can't get it working.

Link to comment
Share on other sites

 

Can 2 HDT-PE XMLs be merged into one? they belong to the same nif.

 

From what I know, I'd say it probably depends. Most likely though, it uses different xmls for a good reason. For example, Multiple nifs might use the same floor.xml but use different "main" xmls.

 

unknown.png

(Example Image)

If I were to put the code from "Floor.xml" into "Matera.xml" and then delete the Floor.xml file, then the nif on the right would no longer have a Floor.xml to refer to.

Edit: Also I'm not so sure that merging .xmls for HDT-PE would be as simple as copy-pasting it. There's possibly some ordering that needs to be done, as with HDT-SMP.

 

So I guess it comes down to exactly what you're trying to modify and why. Personally I don't see any practical reason to merge .xmls, but if I wanted to merge them I would make sure to avoid inadvertently messing up another .nif's physics.

 

The problem is SMP will not work with more than one XML...so I have no idea what to do. I know nothing about physics, so i wouldnt even know where to start, and why this armor has a piece of XML outside of the regular XML.

 

I took a few pictures of the armor i'm trying to adapt:

it's not like i have any other choice but merge, since i'm definitely not going to re-weightpaint it all just for an SE conversion.

Don't really care if it won't be perfect, just trying to understand whatthis Pelvis.XML is for...

 

 

 

 

ARMOR:

Oe3OfA6.jpg

 

SMP Setup is usually like this:

ImAkjWe.jpg

 

I opened the XMLs in JFF, and the PELVIS.XML is just this:

 

uSaBIbL.jpg

 

While the armor XML, has all the other bits of DATA:

 

oQPD9dx.jpg

 

I4cPbNc.jpg

 

Constraint (not present inthe other XML):

 

rH5vTYF.jpg

 

 

 

 

My question is what exactly shouuld i do? try to merge them into one? just copy the info of the pelvs XML before i write my SMP xml?After?? ignore the Pevlis XML?

What is this pelvis XML doing ingame to the armor?

Link to comment
Share on other sites

@BentSpoon01

 

Apologies for not getting back to you, I was intending to play around a bit in a test environment to see if I could prove my 'fake constraint collision' theory but did not get the time to do so, funnily enough the idea for using constraints came from playing around with that very succubus tail.

 

Sounds like you have already covered what I was going to try though, the balance of inertia vs mass vs damping is rather fiddly. I'll try to get some time to look at the problem tails when/if you release them and see if I can magic out some settings that look alright.

Link to comment
Share on other sites

  • 1 month later...

 

 

 

  • <mass>: (float, reasonable starting value 1) This tells SMP how "heavy" the bone is, mostly used as a multiplier in other calculations, 0 is a special property though as a mass of 0 will change your bone to Kinematic/Static (will only be affected by animations targeting it, no physics). Use a mass of 0 for your anchor/root bone so that your bones don't "fall off your character"
  • <inertia>: (float, reasonable starting value 100 * mass) How much energy is applied to your bone, if your bone is Dynamic (affected by physics) then none of these values can be 0, setting one or more of these to 0 will give you undesired results. This also affects how much energy your constraints have, low energy will make your constraints basically worthless.
  • <linearDamping>: (float, valid range any) This will remove a percentage of your translational (X, Y, Z) energy per calculated second, a value of 1 will remove 100% of your energy, 0.3 will remove 30% etc
  • <angularDamping>: (float, valid range any) This will remove a percentage of your rotational (Y, P, R) energy per calculated second.
  • <friction/rollingFriction>: (float, valid range unknown) These are not terribly well explained, needs more investigation.
  • <restitution>: (float, valid range any]) Restitution is how bouncy your object is, higher values being more bouncy
  • <margin-multiplier>: (float, valid range any/standard float range) Has something to do with skeletal related collisions, higher values will increase impact of collisions on the bone.
  • <gravity-factor>: (float, valid range [0-1]) Add gravity as a force that affects this bone.

 

 

 

As a user of Acro's 3BA I've tinkered a bit with all these settings an see some measure of success an plenty of failures before resetting an reworking. I do have some questions regarding the float, valid ranges and standard float range.

As some categories are not simply 0 to 1 ratios (0.00 to 1.00), which act more like a percentage. While others appear to work, with ranges beyond 0 to 1. Is there an absolute range limit like you would find in the generic constraints for xyz?

For example, Restitution.

I've seen postings regarding the valid range being limited as a 0 to 1 range, yet this document (which often is cited as the page to work from) shows that range can be any? Is there a agreed range of what seems to have the best application of results, without going to far off the curve. Such as 0-100, or ?

An as far as the example goes.. any of the categories that suggest any float valid range. Would they also adhere to these constraints, an if so when would a valid range become extreme, or simply no longer register?

Here's an example of one of the bones I've tinkered with. Trying to get a semi-realistic leg that reacts with a proper impact effect from movement or collision. I've marked the locations in the bone listing with ? for uncertain ranges. When first applied In game they appeared to improve, but lowering them now seems to have minimal effect or change.


<bone name="NPC R FrontThigh">
<mass>20</mass>
<inertia x="40" y="15" z="0.15"/>
<centerOfMassTransform>
<basis x="2" y="0" z="0" w="1"/>
<origin x="0" y="0" z="0"/>
</centerOfMassTransform>
<linearDamping>0.65</linearDamping>
<angularDamping>0.65</angularDamping>
<gravity-factor>0.1</gravity-factor>
<friction>0.5</friction> Percentage range or float range?? Affect linear constraints?
<rollingFriction>0.25</rollingFriction> As for rolling I'm making an assumption it affects the angular constraints?
<restitution>300</restitution> ??
<margin-multiplier>250</margin-multiplier> ??
</bone>

<generic-constraint bodyA="NPC L FrontThigh" bodyB="NPC L Thigh [LThg]">
<frameInB>
<basis x="0" y="0" z="0" w="1"/>
<origin x="0" y="0" z="0"/>
</frameInB>
<useLinearReferenceFrameA>false</useLinearReferenceFrameA>
<linearLowerLimit x="-10" y="0" z="-2"/>
<linearUpperLimit x="10" y="0" z="2"/>
<angularLowerLimit x="-2" y="-0" z="-0.5"/>
<angularUpperLimit x="2" y="0" z="0.5"/>
<linearStiffness x="800" y="800" z="800"/>
<angularStiffness x="1000" y="100" z="1000"/>
<linearDamping x="10" y="10" z="10"/>
<angularDamping x="0" y="0" z="0"/>
<linearEquilibrium x="0" y="0" z="0"/>
<angularEquilibrium x="0" y="0" z="0"/>
<linearBounce x="1.2" y="1.2" z="1.2"/>
<angularBounce x="0.2" y="0.2" z="0.2"/>
</generic-constraint>

 

Link to comment
Share on other sites

@SpartanXZero Great questions, also the guide appears to be contradicting itself there about the damping values being 0-1 or anything, I'll have to open up the various dusty tomes and look into those again.

 

From what I recall several of these values are parts of equations, so they are relative to other defined values like mass & intertia.

 

Most of the 'valid' values I have listed were lifted from either the bullet documentation or from reading through the SMP source code, this is somewhat flawed as the code might accept any value but in reality not any value makes sense as you have no doubt discovered. That being said I would recommend browsing the bullet documentation as it can have some helpful insights even if you have to mind map them from bullet to SMP concepts.

 

I would be super keen to be proven wrong about any of these values, I'll try to find some time to investigate what some of the formulas behind these values are so that I can suggest some values to use.

Link to comment
Share on other sites

  • 1 month later...

So, I've been trying to find more "easier to understand" info on how to install HDT-SMP for LE, but couldn't find much on it. I've tried installing it on my own several times, and even tried installing all in one versions of the mod, but still can't seem to get it to work. I've been stuck on this for almost two years, and still cannot figure it out. I am not tech savvy, I don't use MO, for again, I am not adept at using it, and I am vary slow to adept. I am usually reluctant on coming out to ask for help, but my obsessing over this is really getting on my last nerve. Can someone please help me with this, so I can finally stop obsessing on making this work...

Edited by MovingShadow13
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...