DigitalEro Offline

Problem with jigglebones for hair

Mon, 22 Apr 2013 08:32:38

Selph80

I've run into a weird problem concerning jigglebones. the model on the right is just the upright model, gravity seems to affect her ponytail as you'd expect. When she hunches over a little bit (as seen with the model on the left), gravity seems to change polarity and her her stands upright. The settings I used are:
$jigglebone "hair_ponytail_1" {
	is_flexible {
		yaw_stiffness 40
		yaw_damping 3
		pitch_stiffness 40
		pitch_damping 3
		along_stiffness 40
		along_damping 3
		tip_mass 500
		length 15
		angle_constraint 90
	}
}
These setting are sort of copied from this tutorial http://www.youtube.com/watch?v=tmfK-xlNn88 with some custom values. Anyone with any experience with jigglebones knows what I'm doing wrong?
Mon, 22 Apr 2013 09:55:26

Ganonmaster

You can get a more accurate idea of how the bone moves by opening your model in the model viewer. Highlight the bone and see how it rotates as you move your model around. Opening it up in SFM or Gmod doesn't tell you much about the actual behaviour of the bone. I'm guessing it has something to do with the orientation, the length and the mass you assign. The Z axis is oriented in such a way that it points in the direction of her face. The image below illustrates the direction of axes in source. (x = left, y = up, z = forward) The length of the bone as you defined in the QC file, is 15, meaning that the end point is around 15 units in front of her. At the outer end or tip of the bone (15 units in front of her) is the simulated mass of the bone. The mass moves down, rotating along the coordinates of the bone. The result: her ponytail moves up. I'd start by changing the rotation of the bone and decreasing the length and mass. In depth details about jigglebones can ofcourse be found here.
Mon, 22 Apr 2013 10:23:36

Selph80

"Ganonmaster" said ...
You can get a more accurate idea of how the bone moves by opening your model in the model viewer. Highlight the bone and see how it rotates as you move your model around. Opening it up in SFM or Gmod doesn't tell you much about the actual behaviour of the bone. I'm guessing it has something to do with the orientation, the length and the mass you assign. The Z axis is oriented in such a way that it points in the direction of her face. The image below illustrates the direction of axes in source. (x = left, y = up, z = forward) The length of the bone as you defined in the QC file, is 15, meaning that the end point is around 15 units in front of her. At the outer end or tip of the bone (15 units in front of her) is the simulated mass of the bone. The mass moves down, rotating along the coordinates of the bone. The result: her ponytail moves up. I'd start by changing the rotation of the bone and decreasing the length and mass. In depth details about jigglebones can ofcourse be found here.
I thought the positive z axis is along the length of the bone (so towards the pointy part of the bone is 3dsmax) and I think I'm correct in that assumption, because when decided to change it to -15, the pony tail went straight through her face. Also for changing the orientation you mean in 3dsmax then? Because I don't really see a way to do it with the parameters I can use for the jigglebone.
Mon, 22 Apr 2013 11:15:22

Ganonmaster

"Selph80" said ...
I thought the positive z axis is along the length of the bone (so towards the pointy part of the bone is 3dsmax) and I think I'm correct in that assumption, because when decided to change it to -15, the pony tail went straight through her face.
I think that's what I meant. The positive Z axis points towards her face, that's why the ponytail rotates away from from her neck when the length is positive, and towards it when the length is negative. Keep in mind that the Source engine sticks to Maya/XSI style axes, which are different from 3ds Max. Below is a screenshot from QC_eyes, Valve's tool for eye position setup. The default is Y axis up:
"Selph80" said ...
Also for changing the orientation you mean in 3dsmax then? Because I don't really see a way to do it with the parameters I can use for the jigglebone.
That's your best bet.
Mon, 22 Apr 2013 12:24:30

Selph80

"Ganonmaster" said ...
"Selph80" said ...
I thought the positive z axis is along the length of the bone (so towards the pointy part of the bone is 3dsmax) and I think I'm correct in that assumption, because when decided to change it to -15, the pony tail went straight through her face.
I think that's what I meant. The positive Z axis points towards her face, that's why the ponytail rotates away from from her neck when the length is positive, and towards it when the length is negative. Keep in mind that the Source engine sticks to Maya/XSI style axes, which are different from 3ds Max. Below is a screenshot from QC_eyes, Valve's tool for eye position setup. The default is Y axis up:
"Selph80" said ...
Also for changing the orientation you mean in 3dsmax then? Because I don't really see a way to do it with the parameters I can use for the jigglebone.
That's your best bet.
That could very well be the problem, source not getting the correct axis for the downward direction. I guess that's what I need to fix... somehow :P