Hey guys..
I've been trying to add jigglebones to my models in the past, but it never worked. Now I'm trying to add jigglebones to a new model, and it still won't work. My problem is that when I'm assigning the vertices to the bones, the whole model changes it's postition in-game. Does anyone know what I'm doing wrong? (I want the hook to jiggle)
Replies
I've found lately that I get best results to just5 export the entire skeleton, then the bip_head keeps relative position to all the bones that link back to bip_pelvis (or at least include all bones from bip_pelvis straight up to bip_head.
For things like feet have each foot a seperate mesh so it's a clean link from bip_pelvis down to the foot (instead of one models split down the fork, etc..)
I did not scale the bone
Will Valve accept such an item? (with the entire skeleton)
But you really only need bip_pelvis (center) to end of chain ) bip_head/jiggles) in this case.
If you are using the entire skeleton for hat placement but only exporting bip_head then it will get moved to 0,0,0 in game (which is pelvis location) and rotations will change too. If you include the chain of bones it will be relative to them, so it will stay in correct spot.
Not a 100% that's your issue with this model or not. But you have the full sniper body there so I assume full skeleton too.
Otherwise you can just use the head placement models Valve has up on the import page. Those are just head and bip_head (maybe bip_hat for soly, bip_cig for spy, etc..) centered at 0,0,0 so the bip_head's placement in game is zero'ed out.
I don't like them because I have been making all sorts of items, so I have a base file that is ready to go everytime I start a new one. Saves me model import/material import time.
See this is my sniper's nest model. http://steamcommunity.com/sharedfiles/filedetails/?id=171257150
The bottom bone is the bip_head. bip_hat is a child of bip_head and is sitting somewhere in the nest. (This is because the sniper can take off his hat in a taunt so there is a hat bone too).
Then you have 5 jiggle bones which is the max. Root, jiggle_1, 2, 3 and 4. Root is also a jiggle bone. Jiggle 1 and 3 are on the left, 2 and 4 on the right. 3 is on the far left and is linked to 1, which is linked to root. 4 to 2 to root. This is so the whole thing wobbles around like a twig.
For your hat you want probably 2 bones. A root jiggle which will be attached to the hat bone, and a hook jiggle which will be attached to the root.
You could try something like this:
$jigglebone "root" {
is_flexible {
yaw_stiffness 700
yaw_damping 6
pitch_stiffness 700
pitch_damping 8
tip_mass 5
length 30
angle_constraint 37
}
}
Also yes do export every bone, the whole sniper rig. The exporter will remove any that are duplicates.
However, you should only add up to 5 extra custom bones. These are usually always jiggle bones. I'm not aware of any that aren't that have been accepted.
But you're right, there is a sniper hat bone so his jiggles should be attached to that, not the head bone.
(soly also has hat bone (makes helmet wobble), doesn't need to be used though because he doesn't have a remove animation.
Edit: I'm trying to think if I had the whole body moving bug and I think I did. You should definitely make sure all the bones are in the skin and that all the jiggle bones are named correctly in the QC file. Check their hierarchy and what they are attached to and in what order.
So that doesn't mean his pivot for the bone is at the head bone. It's at the actual dot showing the location of the bone.
Also, the whole skeleton doesn't need to be added to the skin.
He only needs to include (bip_pelvis, bip_spine (all 4 of them), bip_neck and bip_head (in this case also bip_hat) and the jiggles. Hide everything else, attach these and export.
TF2 doesn't need feet and arm locations. Only the root location (bip_pelvis) and all bones leading to the mesh/jiggles)
QC file (only jiggle related):
$jigglebone "jiggle_base" {
is_flexible {
yaw_stiffness 700
yaw_damping 6
pitch_stiffness 700
pitch_damping 8
tip_mass 5
length 30
angle_constraint 37
}
}
$jigglebone "jiggle_1" {
is_flexible {
yaw_stiffness 100
yaw_damping 5
pitch_stiffness 100
pitch_damping 5
tip_mass 20
length 20
angle_constraint 90
}
}
Import tool doesn't show jiggles. Model viewer and SFM do.
Game does BUT...
You probably have to set a qvar:
jiggle_bone_cutoff (I think) to less than 10 to see the wiggles in game. For some reason no matter my settings the jiggles never show in the test map (even on highest settings).
just pull up console and type jig... and you'll see the cutoff cvar.
I take it that it is positioned correctly now though?
leave jiggle_1 where it is, and use it.
go look up how to disconnect and separate parental bones in blender. i'm still looking it up whenever i need to use it.
when you're done, there should be a dotted line connecting the tail of bip_head to jiggle_1
this has been working for me, try: cl_jiggle_bone_framerate_cutoff 1
as far as that hat goes, the hook parts could afford to be thicker. it's tf2. it might fit the art more if it looked more comical.
Finally! My jigglebones work
Thanks for the help, I deleted the jiggle_base and attached jiggle area to jiggle_1 and the rest to bip_head, and it works.. I used the test map to check it because my model viewer won't work.
Thanks Baddcog, circle, and heinous
*btw it's a new hat, I'll post a link to it as soon as I finish making the promos
I'd also maybe put an AO bake multiplied on top of your diffuse to give it a bit more shape. It's looking a tiny bit flat at the moment. Maybe subtly make the band a slightly different hue or texture.
Actually the corners are square and a bit chunky, it just looks like they're points.
I know about the AO.. I really did put a flat texture with no baking, I'll see what I can do about it. Perhaps a V2