A Quick Video:
In this tutorial we are going to rig this bike to go along a road as it should, here we see the bike taking a left-hand corner:
Did you notice the motion blur on the wheels – 0.2 shutter setting.This tutorial explains how it is done, including how to steer the front wheel and lean the bike. It is, of course, based upon the same principles as the Car and Truck.
Here is the starting position, we have the two planes as before, see this page, they have been setup the same, using keyframes for the fix plane and a driver for the target plane.
We still have the root bone, steer-track and steer-control bones, but you should notice that the steer-control has been tilted up 20 degrees, this is the rake angle of the forks. You can read this for an insight into bike mechanics and geometry. There are plenty more examples on the ‘net, I found this one easily and it has a nice picture.
The steer-control bone is parented to the bike bone. You will also notice a new bone, the bike bone, this is positioned very near to the road, at the pivot point for the tyres. this is where the bike will pivot for its lean function, this bone is parented to the root bone. We have also lost all the wheel bones, there is no need for them as the rear wheel is parented to the bike bone and the front wheel is parented to the steer-control bone. Both the bike and steer-control bones rotate about their X axes. Here are the two driver, steer-control first:
var * 1.5 – var is X rotation of steer-track as in the car & truck rigs.
var * 3.8 – var is X rotation of steer-track as in the car & truck rigs.
Note the steer angle is less than for cars and trucks, I used 2 for the car and truck, this is because the bike leans to get more turn from the same amount of wheel steer. The lean angle of the bike is considerably more to get the bike right over on tight turns, just check it doesn’t ground the bike anywhere on the tightest corner you will put the bike on.
The wheel rotation are dealt with by Animation Nodes in this setup, just to ring the changes and give you a different method of doing things, here is the node tree:
You can see that the fix object drives the rotations – the Object Transforms Input node, I get the X value form the location vector and divide this by 0.8 for the front wheel and 0.9 for the rear wheel, these being the respective radii of the two wheels. These values are fed though Combine Euler nodes to the Object Transforms Output nodes for the two wheels. As I said before the wheels are parented to the steer-control bone and bike bone respectively.
A brief resumé; The two planes, fix & target, control the attitude of the bike on the straight and in corners, the steer-track bone has a Damped Track constraint, so it points around the corners, its rotation controls both the steering angle and the lean angle of the bike. The wheels are controlled by the movement of the fix plane and use their radii to determine their angular rotation.
Here is the bike taking a right-hand corner:
This isn’t about the modelling by the way, this is just a quickly-thrown-together model for the tutorial, hence no rider, or only a ghost rider perhaps! Maybe I will put Honey (see other pages for who Honey is) on it wearing her short skirt 😛
You may have noticed that none of the rigs for Car Truck & Bike have any suspension, excuse me! you didn’t notice that, shame on you! May the fruits of your loins be a constant drain on your finances – like all children are these days… So the principle is this; the wheels stay in contact with the road, so these rigs control where the wheels should be, the body moves on top of this through suspension systems in its basic form.
Advanced stuff like having a rough road surface so the wheels move all over the place can easily be done, then all you need to do is control where the vehicle is in space and the suspension systems will take care of themselves, particularly if you use IK chains for the springs/dampers, etc. The basic principle however, is to have a separate curve to control where the body is in space, this allows you to move body and wheels independently. I have used this basic system for an aeroplane in the past, the flight path is a curve and the plane automatically rolls in the turns. This may be the subject of a new tutorial, but it is not top of my ToDo list just now, or maybe it is…
Here is a very early video, when I was really bad at Blender, but it showed the principle of the system, it works very similar to the Bike rig, except there are no wheels to steer, or rotate, except during take-off. I have refined my techniques considerably since I made that video, in Jan 2015, there are a few glitches and jerky movements in it – everybody has to start somewhere!
This page definitely isn’t finished 😛