Jump to content

Recommended Posts

I am making a XML for some earrings, trying to make sense of the only guide i could find (https://forums.nexusmods.com/index.php?/topic/3800385-a-guide-to-hdt-smp-usersmodders/).
The guide isn't exactly clear about some things, so i hope some of you may clarify..

I am working on earrings, and i want it to keep simple, so i want it to have collision only with the head (MAYBE also the ground in case the char falls/lies down, but that is really all that makes sense for earrings, right?).
Do i need to have the "ground" shape in the XML? is it mandatory?
What about other collision shapes - i looked at several earrings mods, and their XMLs are full of things - not just the head and ground, but hands, breasts collision, and a whole body.
Is any of that mandatory? i mean it must be, right? why would it otherwise be included in every XML i saw so far?
Of course i tried my XML without these things, and it worked, but maybe i just dont see the problem i introduced by not adding those things?

One other thing - at some point the guide says the following:

<bone-default>
    <mass>0</mass>
</bone-default>
<!-- Set default back to kinematic just in case, leave undeclared bones as non physics bones -->

I dont understand the meaning - does this mean that if i do not add those three lines after my last declared bone, the system would consider ALL other bones i didn't declared as physics bones and tried using them for something? that sounds liek nonsense, why would it do anything like that? but if its not the case then what is this about?

Link to comment
12 hours ago, lynak said:

Speaking of which: I'm normally a CBPC-only user, but have HDT as a disabled modman package - just in case i ever want to fiddle with this.

 

Well, i just accidentally enabled it and wondered why my framerate went from 60 to 40. Took me a while to figure out (the weirdly hanging bellies might've been a giveaway).

 

Oh well: Now at least i know what all the physics-performance talk is all about. You guys keep fiddling with those fancy physics - i'll keep flying at sixty.

sour grapes ... just flew by

Link to comment
3 hours ago, Roggvir said:

I am making a XML for some earrings, trying to make sense of the only guide i could find (https://forums.nexusmods.com/index.php?/topic/3800385-a-guide-to-hdt-smp-usersmodders/).
The guide isn't exactly clear about some things, so i hope some of you may clarify..

I am working on earrings, and i want it to keep simple, so i want it to have collision only with the head (MAYBE also the ground in case the char falls/lies down, but that is really all that makes sense for earrings, right?).
Do i need to have the "ground" shape in the XML? is it mandatory?
What about other collision shapes - i looked at several earrings mods, and their XMLs are full of things - not just the head and ground, but hands, breasts collision, and a whole body.
Is any of that mandatory? i mean it must be, right? why would it otherwise be included in every XML i saw so far?
Of course i tried my XML without these things, and it worked, but maybe i just dont see the problem i introduced by not adding those things?

One other thing - at some point the guide says the following:


<bone-default>
    <mass>0</mass>
</bone-default>
<!-- Set default back to kinematic just in case, leave undeclared bones as non physics bones -->

I dont understand the meaning - does this mean that if i do not add those three lines after my last declared bone, the system would consider ALL other bones i didn't declared as physics bones and tried using them for something? that sounds liek nonsense, why would it do anything like that? but if its not the case then what is this about?

Hey.
1. In the case of earrings, adding meshes of virtual ground or not depends more on their length, if they can touch the ground it is better to add.
To ensure collisions, you need to add a head proxy mesh (you can take it from any correct smp wig) and add collisions to the xml file (again, the same as in wigs).
2. Adding these lines is optional if all the required bones are declared.

As for the tutorials, I like Senpo lessons, it’s a pity that they are not finished.

Link to comment
6 hours ago, Gromilla said:

2. Adding these lines is optional if all the required bones are declared.

I am sorry, maybe its because my english sucks, but i still do not understand.

If i use <bone-default>...</bone-default> and do not declare any bones after that, the system will apply those settings to ALL bones that exist in the NIF?
And if i wanted to prevent that, i need to add <bone-default><mass>0</mass></bone-default> at the end of the XML?
But why do anything like that at all? i dont see the purpose those bone-default settings would serve if doing this.
Or, is the point of adding <bone-default><mass>0</mass></bone-default> to use it in combination with previously declared bones to ensure that ANY OTHER bones will not be physics enabled? ...in other words, to "switch off" the physics on any other bones that would normally have it for some reason?

If i use <bone-default>...</bone-default> followed by <bone name="MyBone"/> then those defaults will be applied only to MyBone, but also any other undeclared bones (therefore ALL bones existing in the NIF), unless i end the XML with <bone-default><mass>0</mass></bone-default> ?r is it that declaring ANY bone at any point after that bone-default block, will make the system apply the last bone-default settings only to the bones declared anywhere after it, and ALL the other bones that exists in the NIF will be left alone - so if i declare any bone after a bone-default block, i won't have to use the <bone-default><mass>0</mass></bone-default> ?

 

6 hours ago, Gromilla said:

I like Senpo lessons

I found this: https://www.loverslab.com/topic/97031-senpo-hdt-smp-xml-writing-tutorial/ is that what you mean?

 

Link to comment

but I’m interested in anyone other than @Kokan can show anything from physics? or come here just to ask about the same thing hundreds of times? Thank God that someone is doing something new, but everything stopped a year ago. "Tits tremble? - Yes! Good! Vagina collides? Yes! - Good ..." And is that all you need? "Oh FPS dipped by 5, not by 10!, It's a failure! It's impossible !!" And nobody looks at the physics logs, but the fact that 90% of all things for physics are done hastily, and you need to clean everything. But we don’t care. We want everything out of the box at once and beautifully.

Forget it.

 

Sooooory for my google language .. 

Link to comment
1 hour ago, Roggvir said:

I am sorry, maybe its because my english sucks, but i still do not understand.

If i use <bone-default>...</bone-default> and do not declare any bones after that, the system will apply those settings to ALL bones that exist in the NIF?
And if i wanted to prevent that, i need to add <bone-default><mass>0</mass></bone-default> at the end of the XML?
But why do anything like that at all? i dont see the purpose those bone-default settings would serve if doing this.
Or, is the point of adding <bone-default><mass>0</mass></bone-default> to use it in combination with previously declared bones to ensure that ANY OTHER bones will not be physics enabled? ...in other words, to "switch off" the physics on any other bones that would normally have it for some reason?

If i use <bone-default>...</bone-default> followed by <bone name="MyBone"/> then those defaults will be applied only to MyBone, but also any other undeclared bones (therefore ALL bones existing in the NIF), unless i end the XML with <bone-default><mass>0</mass></bone-default> ?r is it that declaring ANY bone at any point after that bone-default block, will make the system apply the last bone-default settings only to the bones declared anywhere after it, and ALL the other bones that exists in the NIF will be left alone - so if i declare any bone after a bone-default block, i won't have to use the <bone-default><mass>0</mass></bone-default> ?

 

I found this: https://www.loverslab.com/topic/97031-senpo-hdt-smp-xml-writing-tutorial/ is that what you mean?

 

Oh, don’t tell me about English :) I already write through Google.

<bone name="MyBone"/> primary and does not change further unless specifically asked.

<bone-default>...</bone-default> parameters per group of bones 

<bone-default>
    <mass>0.1</mass>
    <inertia x="30" y="30" z="30"/>
    <centerOfMassTransform>
      <basis x="0" y="0" z="0" w="1"/>
      <origin x="0" y="0" z="0"/>
    </centerOfMassTransform>
    <linearDamping>0.9</linearDamping>
    <angularDamping>0.9</angularDamping>
		<friction>0</friction>
    <restitution>0</restitution>
  </bone-default>

	<bone name="HDT TailBone001"/>
	<bone name="HDT TailBone002"/>
	<bone name="HDT TailBone003"/>
	<bone name="HDT TailBone004"/>
	<bone name="HDT TailBone005"/>

and this group has the same parameters of weight and inertia.

 

<bone-default><mass>0</mass></bone-default>  do not mind it

 

 

Link to comment
13 hours ago, Roggvir said:

I am making a XML for some earrings, trying to make sense of the only guide i could find (https://forums.nexusmods.com/index.php?/topic/3800385-a-guide-to-hdt-smp-usersmodders/).
The guide isn't exactly clear about some things, so i hope some of you may clarify..

I am working on earrings, and i want it to keep simple, so i want it to have collision only with the head (MAYBE also the ground in case the char falls/lies down, but that is really all that makes sense for earrings, right?).
Do i need to have the "ground" shape in the XML? is it mandatory?
What about other collision shapes - i looked at several earrings mods, and their XMLs are full of things - not just the head and ground, but hands, breasts collision, and a whole body.
Is any of that mandatory? i mean it must be, right? why would it otherwise be included in every XML i saw so far?
Of course i tried my XML without these things, and it worked, but maybe i just dont see the problem i introduced by not adding those things?

One other thing - at some point the guide says the following:


<bone-default>
    <mass>0</mass>
</bone-default>
<!-- Set default back to kinematic just in case, leave undeclared bones as non physics bones -->

I dont understand the meaning - does this mean that if i do not add those three lines after my last declared bone, the system would consider ALL other bones i didn't declared as physics bones and tried using them for something? that sounds liek nonsense, why would it do anything like that? but if its not the case then what is this about?

Hi!

 

Why do you need to add collision to earrings? It's much easier to just limit their movement using the angular upper and lower limits, like the example below.

If you set a bone to have a mass of 0, it means the bone is kinematic (no movement)

 

<bone name="NPC Spine [Spn0]"/>
    <bone name="NPC Spine1 [Spn1]"/>
    <bone name="NPC Spine2 [Spn2]"/>
    <bone name="NPC Neck [Neck]"/>
    <bone name="NPC Head [Head]"/>
    <bone name="NPC R Clavicle [RClv]"/>
    <bone name="NPC L Clavicle [LClv]"/>
    <bone name="NPC L UpperArm [LUar]"/>
    <bone name="NPC L Forearm [LLar]"/>
    <bone name="NPC L Hand [LHnd]"/>
    <bone name="NPC L ForearmTwist1 [LLt1]"/>
    <bone name="NPC L ForearmTwist2 [LLt2]"/>
    <bone name="NPC L UpperarmTwist1 [LUt1]"/>
    <bone name="NPC L UpperarmTwist2 [LUt2]"/>
    <bone name="Earring Right 1"/>
    <bone name="Earring Left 1"/>
    
    <bone-default>
    <mass>3</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.8</linearDamping>
    <angularDamping>0.8</angularDamping>
    <friction>0</friction>
    <rollingFriction>0</rollingFriction>
    <restitution>0</restitution>
  </bone-default>
  
    <bone name="Earring Right 2"/>
    <bone name="Earring Right 3"/>
    <bone name="Earring Left 2"/>
    <bone name="Earring Left 3"/>
    
    <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="Earring Right 2" bodyB="Earring Right 1"/>
  <generic-constraint bodyA="Earring Right 3" bodyB="Earring Right 2"/>
  <generic-constraint bodyA="Earring Left 2" bodyB="Earring Left 1"/>  
  <generic-constraint bodyA="Earring Left 3" bodyB="Earring Left 2"/>  
</system>

 

Link to comment
45 minutes ago, Farass said:

If you set a bone to have a mass of 0, it means the bone is kinematic (no movement)

That i know. What i dont know, is why do they put it at the very end of the XML in that tutorial?
They make it look almost as if it is something one should always do, but i dont see it being done in any of the XMLs i got my hands on, and regardless of anything it makes no sense to me, so i am confused - what do they mean? why did they put it at the end of the XML in that tutorial example?

Link to comment

I am stuck on a weird issue caused by something i did, but i can't find what it was...

Its the earrings, and the problem is the bones they are weighted on do not stick to the head - as if they would be hanging on a spring which is connected to the head.

Can somebody have a look at the XML and tell me what is the problem?
 

Spoiler

<?xml version="1.0" encoding="UTF-8"?>
<system xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="description.xsd">

	<bone name="NPC Head [Head]"/>

	<bone name="oo1 1"/>
	<bone name="oo2 1"/>

	<bone-default>
		<mass>3</mass>
		<inertia x="20" y="9" z="9" />
		<centerOfMassTransform>
			<basis x="0" y="0" z="0" w="1" />
			<origin x="0" y="0" z="0" />
		</centerOfMassTransform>
		<linearDamping>0.7</linearDamping>
		<angularDamping>0.6</angularDamping>
		<friction>0.2</friction>
		<gravity-factor>1</gravity-factor>
		<restitution>0.1</restitution>
		<margin-multiplier>0.05</margin-multiplier>
	</bone-default>

	<bone name="oo1 2"/>
	<bone name="oo2 2"/>

	<constraint-group>
		<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.6" />
			<angularUpperLimit x="0" y="0.6" z="0.6" />
			<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="oo1 2" bodyB="oo1 1"/>
		<generic-constraint bodyA="oo2 2" bodyB="oo2 1"/>
	</constraint-group>

</system>

 

 

EDIT: maybe i should also describe the bone hierarchy:
NPC Head [Head] ----> oo1 1 ----> oo1 2

NPC Head [Head] ----> oo2 1 ----> oo2 2
(earings are weighted on "oo1 2" and "oo2 2")

 

EDIT 2: NEVERMIND! :)

It wasn't the XML, it was the NIF file - i am bulding the NIF from BodySlide, and i forgot a hidden slider set to 100 by default, which was horizontally rotating the mesh 180 degrees.
So, the left earing mesh ended up on the right side while already skinned to the left bone, and same with the right earing mesh except that ended on left side.

As a result, the HDT movement and rotation was completely wrong (or maybe i should say "unexpectedly different").

Link to comment

Is it normal for SMP cloth physics to get weird after some time in game?

 

For example, the spartan bard smp outfit works just fine for some minutes, then the smp skirt tangles itself up or it clips through my body or other parts of the outfit, starts getting all jittery and never returns to normal until i restart the game. In LE one could open the console to reset smp, but in SE opening the console only resets the outfit while inside console and it returns to bugged out state after console is closed.

 

It is no global SMP problem, because i can use yundao hair, DINT smp hairs and Ousnius SMP body without glitches. The weirdness is only in SMP dresses with cloth physics.

 

Some help would be much appreciated.

Link to comment
8 hours ago, Farass said:

If you set a bone to have a mass of 0, it means the bone is kinematic (no movement)

This right here is one reason I have such huge problems trying to figure out how to write SMP xmls- the actual meaning of the word "kinematic" is "the branch of mechanics that deals with pure motion." So a bone without motion should be called "static," and a bone that moves should be called "kinetic" or "kinematic." Yet in xmls it apparently means the exact opposite of what it really means? This is a huge source of cognitive dissonance for me and I have a really hard time getting past it.

Link to comment
1 hour ago, Texmarker said:

Is it normal for SMP cloth physics to get weird after some time in game?

 

For example, the spartan bard smp outfit works just fine for some minutes, then the smp skirt tangles itself up or it clips through my body or other parts of the outfit, starts getting all jittery and never returns to normal until i restart the game. [...] The weirdness is only in SMP dresses with cloth physics.

I'm using the Afternoon Dress as well as the Remake SMP skirts ("Simple Skirts") and both seem fine to me- none of the skirts gets tangled up and fights itself until it swamps the cpu trying to get out of the impossible situation. I have done entire dungeons wearing them, several hours in-game, with no issues. I have used Spartan Bard but not for hours at a time, so I haven't worn it long enough, or done enough gymnastics & gyrations in it, to put it into a bind if it's inclined to go there. I'll make it a point to test it later and let you know.

 

Also, for those times when something using SMP does get itself into a bind, I have found that Quicksave >> Quickload OR just load your last Autosave works almost every time- no need to quit to desktop and then relaunch the game.

Link to comment
16 minutes ago, Vyxenne said:

I'm using the Afternoon Dress as well as the Remake SMP skirts ("Simple Skirts") and both seem fine to me- none of the skirts gets tangled up and fights itself until it swamps the cpu trying to get out of the impossible situation. I have done entire dungeons wearing them, several hours in-game, with no issues. I have used Spartan Bard but not for hours at a time, so I haven't worn it long enough, or done enough gymnastics & gyrations in it, to put it into a bind if it's inclined to go there. I'll make it a point to test it later and let you know.

Thanks for helping, ill try out the outfits you mentioned as well.

Link to comment
On 9/24/2019 at 8:33 AM, Roggvir said:

I am making a XML for some earrings, trying to make sense of the only guide i could find (https://forums.nexusmods.com/index.php?/topic/3800385-a-guide-to-hdt-smp-usersmodders/).
The guide isn't exactly clear about some things, so i hope some of you may clarify..

I am working on earrings, and i want it to keep simple, so i want it to have collision only with the head (MAYBE also the ground in case the char falls/lies down, but that is really all that makes sense for earrings, right?).
Do i need to have the "ground" shape in the XML? is it mandatory?
What about other collision shapes - i looked at several earrings mods, and their XMLs are full of things - not just the head and ground, but hands, breasts collision, and a whole body.
Is any of that mandatory? i mean it must be, right? why would it otherwise be included in every XML i saw so far?
Of course i tried my XML without these things, and it worked, but maybe i just dont see the problem i introduced by not adding those things?

One other thing - at some point the guide says the following:


<bone-default>
    <mass>0</mass>
</bone-default>
<!-- Set default back to kinematic just in case, leave undeclared bones as non physics bones -->

I dont understand the meaning - does this mean that if i do not add those three lines after my last declared bone, the system would consider ALL other bones i didn't declared as physics bones and tried using them for something? that sounds liek nonsense, why would it do anything like that? but if its not the case then what is this about?

As kinematic bone we understand a bone that's movement is driven by animations.

hdt smp needs a mass for a bone to calculate it's movement, therefore apply a mass of 0 turns it kinematic since no movement can be calculated.

 

You have troubles setting up multiple bones with the same parameters? If you declare parameters all bones you list after that will have them applied until you set another declaration.

Link to comment
2 hours ago, Vyxenne said:

This right here is one reason I have such huge problems trying to figure out how to write SMP xmls- the actual meaning of the word "kinematic" is "the branch of mechanics that deals with pure motion." So a bone without motion should be called "static," and a bone that moves should be called "kinetic" or "kinematic." Yet in xmls it apparently means the exact opposite of what it really means? This is a huge source of cognitive dissonance for me and I have a really hard time getting past it.

That's not correct. Motion can be applied in multiple ways. The way smp works is it needs a kinematic node (driven by an animation) to apply an impulse to constrained nodes that have their movement calculated by the terms of bullet physics library. The only thing applying such impulses are node movements in 3d space. That's because of the way it's implemented.

Link to comment
4 hours ago, Vyxenne said:

I'm using the Afternoon Dress as well as the Remake SMP skirts ("Simple Skirts") and both seem fine to me- none of the skirts gets tangled up and fights itself until it swamps the cpu trying to get out of the impossible situation. I have done entire dungeons wearing them, several hours in-game, with no issues. I have used Spartan Bard but not for hours at a time, so I haven't worn it long enough, or done enough gymnastics & gyrations in it, to put it into a bind if it's inclined to go there. I'll make it a point to test it later and let you know.

 

Also, for those times when something using SMP does get itself into a bind, I have found that Quicksave >> Quickload OR just load your last Autosave works almost every time- no need to quit to desktop and then relaunch the game.

Ok i did some more investigation: The same happens with both outfits you mentioned. But i found out what triggers the problem: Going through a loading screen between an exterior and an interior cell. For example entering or exiting bleakfallsbarrow or embershardmines. When you do that, the skirt physics get all weird jittery, like a strong wind is blowing though it from below, or it is charged with static electricity. To fix it, you have to save and reload the game like you said. And it seems even just saving or quicksaving the game is sometimes enough to fix it.

 

EDIT: I had autosave on travel disabled. Enabling it, so a quicksave is made on interior/exterior travel does fix the problem for me.

EDIT2: Sometimes saving and reloading does not fix the problem. Neither does re-equipping. In those cases, i have to restart Skyrim to fix it temporarily.

Link to comment
38 minutes ago, Texmarker said:

Ok i did some more investigation: The same happens with both outfits you mentioned. But i found out what triggers the problem: Going through a loading screen between an exterior and an interior cell. For example entering or exiting bleakfallsbarrow or embershardmines. When you do that, the skirt physics get all weird jittery, like a strong wind is blowing though it from below, or it is charged with static electricity. To fix it, you have to save and reload the game like you said. And it seems even just saving or quicksaving the game is sometimes enough to fix it.

 

EDIT: I had autosave on travel disabled. Enabling it, so a quicksave is made on interior/exterior travel does fix the problem for me.

Force is applied on cell change and also on camera transition. Reequipping should be enough to fix it.

Link to comment
1 hour ago, eru. said:

Force is applied on cell change and also on camera transition. Reequipping should be enough to fix it.

Thanks for answering. You are right insofar that it does help with minor glitches. But sometimes saving and reloading does not fix the problem. Neither does re-equipping. In those cases, i have to restart Skyrim to fix it temporarily. In those cases, the skirts appear to be floating upwards like a wind is blowing them up from below.

Link to comment
1 hour ago, Texmarker said:

Thanks for answering. You are right insofar that it does help with minor glitches. But sometimes saving and reloading does not fix the problem. Neither does re-equipping. In those cases, i have to restart Skyrim to fix it temporarily. In those cases, the skirts appear to be floating upwards like a wind is blowing them up from below.

May be you accidentally enabled the Marylin Monroe mode. Just kidding. Can you paste the XML here?

Link to comment
8 hours ago, eru. said:

That's not correct. Motion can be applied in multiple ways. The way smp works is it needs a kinematic node (driven by an animation) to apply an impulse to constrained nodes that have their movement calculated by the terms of bullet physics library. The only thing applying such impulses are node movements in 3d space. That's because of the way it's implemented.

Well, thanks for the explanation, the first I've ever seen to justify naming a static bone "kinematic." I think what you're saying is that a "kinematic" bone is the "root" bone, attached to a skeleton node, to which the first physics bone is attached?

Link to comment
5 hours ago, Vyxenne said:

Well, thanks for the explanation, the first I've ever seen to justify naming a static bone "kinematic." I think what you're saying is that a "kinematic" bone is the "root" bone, attached to a skeleton node, to which the first physics bone is attached?

It's indeed true that most of the time the keyframe node is a kinematic node. But it don't have to be.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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