Home Technical Talk

Mechanical Rigs - Catapult

polycounter lvl 11
Offline / Send Message
riuthamus polycounter lvl 11
So i am trying to rig this thing for use in a video game.... problem is we are using a custom engine and I have never done this before in any game so the idea on how to do it escapes me

catapult2.jpg

Is the object, and the rig looks like this:

gallery_1_371_207815.jpg

This rig just animates the objects, the issue is our engine requires a bone set. If i add a bone set... i dont even know where to begin to get this thing to work the way I want. Any ideas would be GREAT!

Replies

  • electricsauce
    Offline / Send Message
    electricsauce polycounter lvl 11
    When I rigged mine, I used a root bone for the framework, a bone each for the front and rear axles, a bone for the winding arm and a bone chain for the arm.
  • riuthamus
    Offline / Send Message
    riuthamus polycounter lvl 11
    Do you mind showing me what you mean. Not sure I can figure out... what you mean exactly. Thanks for any and all help
  • electricsauce
  • riuthamus
    Offline / Send Message
    riuthamus polycounter lvl 11
    Interesting, how did you weight it? and those look like all different bone sets. Did you bind the mesh to the bones?
  • BARDLER
    Offline / Send Message
    BARDLER polycounter lvl 12
    If you need to use joints, all you have to do is place joints where the pivots are. The controls you set up will work fine, but instead of constraining them to the mesh you constrain them to the joints. Then all you do is flood the weights of each mesh to the corresponding joint.

    If you are having trouble understanding what I am talking about, then look up some basic rigging tutorials in Maya.
  • electricsauce
    Offline / Send Message
    electricsauce polycounter lvl 11
    Since the main arm consists of a chain of bones, Blenders auto weighting worked fine. The other sets (front axle, rear axle, and winding arm) all have 100% weight for their corresponding parts. I can't remember why the winding arm has extra bones. I made this almost a year ago.
  • Vii
    Offline / Send Message
    Vii polycounter lvl 6
    BARDLER wrote: »
    If you need to use joints, all you have to do is place joints where the pivots are. The controls you set up will work fine, but instead of constraining them to the mesh you constrain them to the joints. Then all you do is flood the weights of each mesh to the corresponding joint.

    If you are having trouble understanding what I am talking about, then look up some basic rigging tutorials in Maya.

    You don't even need to flood the weighting. You'd have a root bone which would contain everything that doesn't move individually and nothing else, they'd have 1 influence maximum, then for each other bone the corresponding object would be bound in the same fashion to it. No weighting necessary.
  • riuthamus
    Offline / Send Message
    riuthamus polycounter lvl 11
    I might need to make a video or something and have you guys critique it... I dont understand it all :P
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Root bone, weight everything that doesn't move to it.
    Then make extra bones which do move, and rig the respective parts.

    Like a character...but without all the fancy framwork.
  • riuthamus
    Offline / Send Message
    riuthamus polycounter lvl 11
    Here is a video, more accurately explaining what I am talking about.

    http://www.youtube.com/watch?v=ckcACebCUlg&feature=youtu.be
  • electricsauce
    Offline / Send Message
    electricsauce polycounter lvl 11
    I can't really help you with the maya aspects of this, but the workflow should be similar. The extra bones that you make would be children of the root bone. Even though the root has no influence on say the front axle, the front axle bone would follow the root transformations.

    Looking at your model, you should only need 5 bones - Root, Front Axle, Rear Axle, Winding Arm, Launcher Arm. Weight the appropriate vertices to each bone and make each bone a child of the root.

    To make your model look convincing, you'll have to add a rope between the winding arm and the launcher arm. Also, in my experience it's easier to rotate the wheels and winding arm in the game engine.
  • riuthamus
    Offline / Send Message
    riuthamus polycounter lvl 11
    I have all of those bones, the question ( which is probably related to my lack of knowledge on bones ) is how to get them to be combined. Do i just group them? Cause if i parent them than rotating one part fucks with the other parts.
  • riuthamus
    Offline / Send Message
    riuthamus polycounter lvl 11
    gallery_1_371_63059.jpg

    So the first image ( left ) is the 4 bottom bones ( none of them are connected or parented as I have no clue how to parented them when they are not connected. ) I did add the chassis to the rootbone via skin > bind smooth. My question is... i could bind the other parts to the other bones... but how do i get all the bones to be one set?
  • electricsauce
    Offline / Send Message
    electricsauce polycounter lvl 11
    Each bone should only have the root as a direct parent, this way they only influence the verts that they have been 100% weighted to. Moving any bone (except the root) shouldn't affect any of the others.
  • riuthamus
    Offline / Send Message
    riuthamus polycounter lvl 11
    gallery_1_371_196822.jpg

    So something like this?
  • electricsauce
    Offline / Send Message
    electricsauce polycounter lvl 11
    The bones marked x should be removed and replaced with the blue bones.

    gallery_1_371_196822.jpg
  • riuthamus
    Offline / Send Message
    riuthamus polycounter lvl 11
    The issue with that is, exporting that and getting it to work. It might work in our engine... but support for multiple bone sets is not there ( that i know of )
  • riuthamus
    Offline / Send Message
    riuthamus polycounter lvl 11
    I think i got it, thanks guys for all the help!
  • 54Strat
    Offline / Send Message
    54Strat polycounter lvl 5
    In house engines do all sorts of unconventional things. I've seen something like this before, in my case joints were used to communicate to the engine that anything under it, or anything skinned to it (with a vert influence of 1 bone and 100% weighting) is identified as a movable object, using the joint as a pivot for this. Joints were used purely as a tag with a pivot, and completely data driven. In this case, every animated object was considered 'skinned' and optimized by the code as such.

    Maybe talk with your code team to see how joints are used? Will they need animation on it or will their code animate it? You may need to provide limits of movement.

    As far as the bones arrangement, I think your post #16 pretty much nailed it. The root provides a point on the origin that identifies the ground plane and the wheel offsets are good. The Arm is correct too, though if the handle needs to wind you might want to add an additional bone off the root for this. I'd keep each axis consistent througout, so the primary axis of rotation would be ,say, Z throughout.
  • Valandar
    Offline / Send Message
    Valandar polycounter lvl 18
    Should note this is not a catapult, which would use the springiness of either the arm or ropes around the axle as the propulsive force, but a trebuchet, which uses the weight of the mass at the arm opposite the cup, and thus everything would simply be 100% assigned to a bone mechanically speaking.
  • JKMakowka
    Offline / Send Message
    JKMakowka polycounter lvl 18
    Maybe this helps:
    http://www.blendswap.com/blends/view/17016
    License: Creative Commons Attribution 3.0
Sign In or Register to comment.