Home Technical Talk

Rigging Tubes

I got this character I have been working on for a while that I plan to rig and put in some game engine. Probably UDK. He has these tube things that run from his backpack thing to his gloves and boots. Right now they are just cylinders that are path constrained to a line. I'm not quite sure what the best way to make these would be and how to rig them. Would dynamics work, or would turning it into an editable poly then adding bones work. What about leaving it on the path constraint and animating the line its constrained to?
Tubes.jpgI have a bit more modeled on this guy at the moment, but I'm still stuck with the tubes.


  • MikeF
    Offline / Send Message
    MikeF polycounter lvl 17
    i'd say run a length of bones down the tube, and just have a simple IK handle running from the wrist to the chest plate
  • Alidium
    That's actually the back, but sounds good.
  • Mark Dygert
    That really depends on what the range of motion is that you'll need. Typically designers and character artists try to work around things like tubes from the torso to the arms or legs because the range of motion is so high and its so hard to get them to behave like tubes and not blow your entire rigging budget on the tubes. It's a balance that often leads to the tubes being cut out of the design or the animations being limited.

    If this is just for animation fun and the sky is the limit for the number of bones, you might want to set up stretchy bones, where there is a helper at each bone pivot that you can move around and the bones stretch and scale as needed. Depending on what software you're using there are probably scripts to assist in setting up a stretchy bone chain. I know there are a few for max Jason Labbe has a pretty decent stretchy bone script.

    Personally I would do the wires with simulations and if needed assign helpers to the surface of the simulated wires and create a simple blending system similar to an IK/FK switch for arms, so you could blend between the two systems. Using the simulation when it works and animating the helpers when you need something different, like returning to a root pose or the simulation just fubars on a very difficult motion, and its faster to animate around it rather than fix the sim.

    You can do this for games also but it depends heavily on the engine and what the priorities of the game are, if you can use floating bones, scale on bones, how many bones do you have to make it work? Do you have to sacrifice finger bones to make tube bones bla bla bla...

    It's a similar method to "capturing a cloth simulation" which I outlined here:

    But honestly most of the time tubes crossing highly active joints like that get nipped at the design stage because of the complexity of the solutions you need to pull them off, especially for games.
  • MagnificentMicrowave
    How about setting it up as soft body when you throw it into UDK?
  • Alidium
    Is a high number of bones normally a bad thing? If having the tubes hang off the back dose not work, bringing them to run along the surface of the arms and just adding them to those bones should work then.
    Thanks for the help.
  • JamesWild
    Offline / Send Message
    JamesWild polycounter lvl 8
    Just a curiosity here, never rigged something like this, but if you had a single bone sticking out of the elbow here with a softish blend on the tube between the forearm bone, then our elbow bone, then the shoulder, would that give you enough control over the middle part of the tube to make it look reasonably realistic (and able to animate it flopping/drooping/etc) without running bones all the way along?
    Many bones ARE a bad thing yes as it's more bones to store/blend animations for and AFAIK they're all kept memory resident on-GPU as an array.
  • Mark Dygert
    That could work for some rigs and animations if they are pretty limited. It would help if you could scale that bone, but most games don't allow squash and stretch only rotation (due to memory constraints again).

    The problem is that the shoulder is a ball joint and rotates almost 360 degrees, then the elbow bends on one axis and the wrist and forearm twist. It's really easy to get a combination of rotations down the arm that make the tube look like crap, especially if the tube is connected to the hand like in the OP.

    If the design was changed a bit to connect it to the forearm it might work better but then you still have to contend with the wrist twist being spread down the forearm. So you probably want the connection point to be close to the elbow where the twist is pretty minimal.

    But it really depends on the range of motion that is required. If the person is holding a gun in one potion and the arm isn't really animating then great its pretty easy to rig. If the arm is doing all kinds of motions then its a nightmare. You really need to work closely with the engine and probably a programer, to make it look good and stay on the tech budget.

    And yes more bones is bad, there is often a limit to how many bones a single mesh can be bound to, so more than likely you would have to break the tubes off as a separate object that gets skinned apart from the main mesh, a bit like a gun is separate from a player model, sort of... This happens quite often with customizable heads and gear, typically a little programing trickery is required to get it all working right.

    Not only do you need to worry about how many bones you have in your rig but you need to worry about how many bones are influencing each vertex. Typically games max out at 3-4 bone weights per vertex. In max and Maya there are controls to cap the number of bones per vert but in max the default is 20 so make sure you set that pretty early to 3 or 4 or it causes all kinds of headaches later.
  • cptSwing
    Offline / Send Message
    cptSwing polycounter lvl 10
    sure is!

    ..kudos to the bot programmer. had me going in one of the other threads.. what exactly is it they want?
Sign In or Register to comment.