Home Contests & Challenges Archives Team Fortress 2

Jigglebones

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)

52c5acd61f99c.png

Replies

  • Baddcog
    Options
    Offline / Send Message
    Baddcog polycounter lvl 9
    most likely you scaled the jiggle bone?

    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..)
  • perrryz
    Options
    Offline / Send Message
    Baddcog wrote: »
    most likely you scaled the jiggle bone?

    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)
  • Baddcog
    Options
    Offline / Send Message
    Baddcog polycounter lvl 9
    Yeah the skeleton really is only a few coordinates. The bones aren't meshes in the export. They don't count towards tri count.

    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.
  • circle of friends
    Options
    Offline / Send Message
    circle of friends polycounter lvl 10
    You don't need to attach the jiggle bone to the bip bone like you have done there physically. All it needs to do is be parented to it. What 3d modelling program are you using?

    qs0Tjgg.png

    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.
  • Baddcog
    Options
    Offline / Send Message
    Baddcog polycounter lvl 9
    He's using Blender (I believe), it just shows the links. You're using Max, it doesn't show the links.

    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.
  • circle of friends
    Options
    Offline / Send Message
    circle of friends polycounter lvl 10
    Yep exactly. Also because his first jiggle bone stretches from the head bone to the 2nd jiggle bone, it's pivot will be by the head bone which is obviously miles from where he wants it. Parenting doesn't mean physically attaching, so you can have the bone way up by the hook but attaching it to its parent head bone through the magical ether.

    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.
  • Baddcog
    Options
    Offline / Send Message
    Baddcog polycounter lvl 9
    Again, I'm pretty sure Blender just SHOWS the links of the bones. Max doesn't.

    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)
  • perrryz
    Options
    Offline / Send Message
    Guys, I tried doing what you suggested and I extruded the bone from the bip_hat, and now it just wont jiggle. I assigned the hook to jiggle_1 and the rest of the hat to bip_head.
    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
    }
    }
  • Baddcog
    Options
    Offline / Send Message
    Baddcog polycounter lvl 9
    First: It won't jiggle where?
    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?
  • heinous
    Options
    Offline / Send Message
    you don't need jiggle_base.

    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
    Baddcog wrote: »
    First: It won't jiggle where?
    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?
    this has been working for me, try: cl_jiggle_bone_framerate_cutoff 1
  • Baddcog
    Options
    Offline / Send Message
    Baddcog polycounter lvl 9
    whoops, cl_... I knew there was something I was forgetting
  • heinous
    Options
    Offline / Send Message
    don't worry, mine's probably wrong too anyway. i just type halfway and the console will activate its auto-fill to insert the rest of the codes, so i never had it memorized.

    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.
  • perrryz
    Options
    Offline / Send Message
    Guys, it works!
    Finally! My jigglebones work :D

    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
  • perrryz
    Options
    Offline / Send Message
  • circle of friends
    Options
    Offline / Send Message
    circle of friends polycounter lvl 10
    Nice hat. I think you should make the peak a bit more chunky though. You've welded the corners in to points, where as for TF2 I'd keep that square and chunky it all up a bit more.

    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.
  • perrryz
    Options
    Offline / Send Message
    Nice hat. I think you should make the peak a bit more chunky though. You've welded the corners in to points, where as for TF2 I'd keep that square and chunky it all up a bit more.

    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 :)
Sign In or Register to comment.