Bus Door Rig Assistance?

hi all;

I was wondering if someone could help me with this particular problem. I’ve modelled a bus and I’m trying to rig the front doors so that they open via use of a lever (to be animated at a later date). Initially, I rigged both doors the exact same way, and both have an individual lever to open them up and did work as intended. There was an issue with the ‘clamp’ piece however, it moved outside of the recess on the ‘overhead’ object which doesn’t look right. The idea is the clamp stays within the recess and slides along as the door opens and shut. If you move the ‘door 2’ lever and go into top-view, you should see what I mean.

Leaving door 2’s rig alone for comparison reasons, I’ve had a go at rerigging the ‘door 1.’ I’ve added a ‘clamp’ bone and tracked the pivot to the clamp as opposed to the transformation constraint I used originally. This works to a certain degree, but I’ve gotten stuck at how to glide the clamp bone along without shifting the piece on the door because it’s supposed to be bolted on. How would I go about moving this clamp bone/piece without compromising its position on the door?

I’ve attached two screenshots which may make what I’m trying to say clearer as well:


Bus_Rigged_v2.blend (2.58 MB)

Attachments


I have not taken a look at your file, but will give some advice anyways.

For this type of mechanical rigging, I find that Action Constraints are the way to go. I find that creating and keyframing an action that does exactly what I want, is far easier then “tracking this” and “constraining to that” , etc, etc. There really are no limits to what you can do with an action constraint vs. other types of constraints where you may need to do a lot of parenting and other trickery to get the results you want.

Good luck!

Thank you DanPro for your response!

I have taken what you have said onboard and have done a bit of further research regarding the Action constraint and it seems perfect for what I’m intending to do and I’ve successfully rigged it to my satisfaction. I should be able to use this constraint with many other things I want to rig on the bus as a whole as well so it should prove extremely useful.

I would do it like this:

Bus_Rigged_v2.blend (2.52 MB)

Just press Play or rotate the “operator” bone about its Y axis (key R YY) or about the Global Z axis (Key R Z).

Cheers, Clock. :smiley:

Thanks Clock!

I’ve had a look at your rig and I’m surprised at how simple it is! I’ll be sure to study it and see if I can implement it a bit more practically in my own model. Thank you!

Here is my version with action constraints: http://www.pasteall.org/blend/36284

I have some bones hidden on skeleton layer two. Enable that layer to see the action constraint/bone set up. Push play to see the animation, or r,z (global)/ r,yy (local) to rotate the control bone for the door. (Big blue box.)

My rig has a huge, crappy custom bone, so it’s obviously better then Clockmenders. :wink:

(Just kidding Clock!)

Good Luck!

LMAO ! :D:p

OK, so the bar is raised - I must now add a “huge crappy custom” bone to my rig. :eyebrowlift:

Cheers, Clock.

:stuck_out_tongue: I’ve used loads in mine! I just turned them off in this case cos it was easier to see what I was doing. Not sure adding custom-shapes is a bar-raiser though! I mean a bone’s a bone! :smiley:

I have another question (not sure whether to ask here or create a new thread); I have created a driver in Blender to line up with a bone which acts as a lever in a control panel, and that bone is constrained to go from ‘0.000 to 0.300’. I set up a driver to this bone and the ‘var’ value reaches 0.3 but I need it to go to ‘1.000’. Do you know what expression I need to put in the driver to tell it to max-out at 1.000 as opposed to 0.300? I just need to basically mathematically tell it that 1=0.3

I’ve recreated a simple rig here to show what I mean. There’s the ‘bone’ piece which acts as a lever, and the plane. I want the lever to basically say ‘I want this plane to size up from 0 to 1 on the Z axis.’ Right now, it gets stuck at 0.3 (like my real rig).

lever_blend.blend (489 KB)

I have sussed it out! I’ll recreate the instructions here incase anyone stumbles on this thread in future. Quite simple:

  • Click on the PLANE object where the driver is situated.
  • (Right) click on the second ‘handle’ in the ‘drivers’ section in the graph editor.
  • Set the ‘Frame’ value to the number required (0.3 in this case).
  • Adjust the ‘bone’ lever in the 3D viewport and the plane should scale on Z correctly.


OK I see what you are dong, however, there is another way:

But first, just a small point, you should check the “For Transform” checkbox on your Limit Location constraint on the bone. This ensures that the bone cannot go beyond the limits set and cannot accept a greater value when you slide it with your mouse. By this I mean that if you continue to slide the bone, its X value will increase although it does not move - this can mess up movements of a specified value, like G X -0.3 after you have slid it using the LMB as its X value could be 1.2 so it will appear not to move. It’s just a small point but worth noting.

On your driver, your scripted expression would be var * 3.3333 (you can add an infinite number of 3’s and still not be truly accurate since 1 divided by 3 is 3.3 recurring!) However, this is still not the best method for you operation IMHO.

What I would do is add a Transformation Constraint to the plane and set it to scale the plane from 0 - 1 in the Z axis, then set the Target as your controlling bone, and set the values and axis mapping as the picture below:


Here’s you modified blend file:

lever_blend.blend (506 KB)

You should note that I did not check the “Extrapolation” Checkbox - this is important.

Transformation Constraints are very useful in setting up control systems - If you read the Airplane Rigging tutorial on my website you will see how I have used the movement of one empty to open u/c doors, stow the u/c legs, then close the doors again. This is quite a complex series of movements on a number of objects and bones, and its a lot easier than trying to remember all those angles and movements every time I want to retract or deploy the u/c. :smiley:

The tutorial is here: http://www.lafavinie.f2s.com/blender/actut2.html just find the bit headed The Sequencer"

Cheers, Clock.

PS. Remember that ALL rotations in Drivers, if you ever do any, are in Radians not Degrees and there are 2 * pi radians in a full circle, so 90 degrees would be pi / 2 for example. You can use pi in a Driver by the way and Blender kindly remembers that the actually value of pi is approximately 3.1418.

Transformation Constraints are very useful in setting up control systems - If you read the Airplane Rigging tutorial on my website you will see how I have used the movement of one empty to open u/c doors, stow the u/c legs, then close the doors again. This is quite a complex series of movements on a number of objects and bones, and its a lot easier than trying to remember all those angles and movements every time I want to retract or deploy the u/c. :smiley:

I’ve actually used a lot of transform constraints on my bus buddy! I’ll have to show you when I’ve completed it. Transform constraints are probably one of the most versatile constraints in Blender’s arsenal cos it has tons of uses. I am aware I could’ve used a transform in this particular case as it was just scaling the plane up and down and it would indeed be a better solution, but on my real rig I wanted to change a value that the transform constraint doesn’t cover, notably a material setting so I figured I would create a simplified rig first and then try again on this material one.

But first, just a small point, you should check the “For Transform” checkbox on your Limit Location constraint on the bone. This ensures that the bone cannot go beyond the limits set and cannot accept a greater value when you slide it with your mouse. By this I mean that if you continue to slide the bone, its X value will increase although it does not move - this can mess up movements of a specified value, like G X -0.3 after you have slid it using the LMB as its X value could be 1.2 so it will appear not to move. It’s just a small point but worth noting.

So that’s what the transform box does! I couldn’t figure out a difference between the checkbox on and off so I just left it off cos my rig worked but I’ll go through them all and turn them on with this in mind.

PS. Remember that ALL rotations in Drivers, if you ever do any, are in Radians not Degrees and there are 2 * pi radians in a full circle, so 90 degrees would be pi / 2 for example. You can use pi in a Driver by the way and Blender kindly remembers that the actually value of pi is approximately 3.1418.

I see! I reckon there’ll be one last part of the rig which this might come in handy for. So 1 radian is effectively 180° in a circle? That would make sense because Blender seems to like working in 180° blocks. I have one part of the rig that I need to do which might need this information. It’s good to know!

Thanks clock, you’ve been a tremendous help!

I see! I reckon there’ll be one last part of the rig which this might come in handy for. So 1 radian is effectively 180° in a circle

No! 180 degrees is pi radians so 1 radian is 180 / pi or 180 / 3.1418 or approximately 57.291998217528228 degrees!

Cheers, Clock.!

I think I understand.

So 1 radian = 57.3°? [ 180/pi = 1 radian ]
2 radians = 114.6° [ (180/pi)*2 = 2 radians ]
6 radians = 360° [ (180/pi)=360/57.3 ??

I’ll have to do a bit of research into this because I’m still a little confused.

I have one final question with regards to the rig. I’m trying to create an indicator light that flashes on and off when a control bone is rotated. I’ve managed to set it up so that it turns on when rotated, but it won’t turn off again. I’m trying to set it up so that it’s on for 50% of the control rotation, and off for 50% of the rotation, and then it repeats ad infinitum. What would be the easiest way of accomplishing this?

The setup I currently have in this Blend starts with the light on and turns off over the course of (what seems to be) 1 radian.

indicator_light_test.blend (536 KB)

Looking at it, it seems the only thing I need to do is turn the curve in the driver into a ‘square wave’ curve (ideally with a little rounding off at the corner).

I have progressed with the indicator light and I’m pretty happy with the result! I’ve found a way to carry on the animation by use of modifiers within the driver pane; I’ve set the curve to ‘Quintic Ease In & Out’ on both points and then set a ‘cycles’ modifier and increased the ‘Frame’ value to slow it down a little bit. I’m quite happy with this result! I was hoping to have a little more control with the easing in and out but for what it’s worth, it does the job I wanted it to do.


indicator_light_test1.blend (519 KB)