The addon is available on GitHub
If you want to animate cars but you don't want to spend too much time for rigging, Rigacar could be helpful. It is a free addon for Blender I developed during the preproduction phase of one of my projects. Rigacar was designed to fulfill the following goals:
- generate a complete rig as quickly as possible for standard car models
- provide tools to automate wheels animation
- allow efficient animation baking to be able to export animated models into real time renderers
Add the deformation rig
Once you have installed and enabled the addon, you can add to your scene a new kind of armature: a deformation rig for a car.
It is called a deformation rig because it adds an armature with only five bones used to animate directly your model: the four wheels and the body. Rigacar expects your model is oriented along the Y axis. This way the front of your model matches the front view in Blender. If it is not the case, you should rotate your model to match this orientation. Of course, don't forget to apply rotation and scale on your model.
If you look at the rig, you will notice that each bone is oriented in the same direction as the car. Please don't change the orientation of the bones or the final rig will not work properly.
You should place the bones for the wheels first to fit your model according to their names:
|Bone name||Associated wheel object|
|DEF-Wheel.Ft.L||Front left wheel|
|DEF-Wheel.Ft.R||Front right wheel|
|DEF-Wheel.Bk.L||Rear left wheel|
|DEF-Wheel.Bk.R||Rear right wheel|
For each wheel, the bone's head must be placed at the center of the wheel but, on the X axis, the bone should be placed at the inner edge of the wheel (especially for front wheels to match the pivot point of the steering axis). The length of the bone must match the radius of the wheel.
DEF-Body is the name of the deformation bone for the car body. Its head should be placed at the center of the car chassis and the tail should be at the back of the model to give an hint of its length.
Parent your model
Then you have to parent each part of your model to the corresponding bone. If you have more than 5 objects for your model (for instance if you have objects for the rims and others for the tires), you can either parent them to the corresponding bone or create a hierarchy (i.e. parenting the tire to the rim and the rim to the bone).
You can now generate the complete rig... but wait! This is really a cumbersome workflow. Actually, you can achieve the previous steps in a much faster way. You just have to follow the naming convention!
Use naming convention
If you name your objects as mentioned below, the addon can do almost all the job for you. Your wheels names should end respectively with Wheel.Ft.L, Wheel.Ft.R, Wheel.Bk.L and Wheel.Bk.R and the body name should end with Body. Then, make sure the center point of each object is correctly placed.
Select all four wheels and the body (you can even select more than the expected objects because the additional ones will simply be ignored) and add the deformation rig. Rigacar will automatically create each bone to match the center point of the corresponding object. You can use the operator parameters to quickly adjust the rig. For instance you can easily push wheel bones inward on the X axis.
Rigacar will also automatically parent your objects with the correct bone. This way, you can generate a rig for your model in only few seconds.
Generate the complete rig
Whatever the method you have chosen, once the deformation rig is in place and your model is parented to the bones, you can now generate the complete rig.
Use the button Generate available in the properties panel in the 3D View. You can also find the same button in the properties of the armature.
The complete rig is generated and dispatched over several armature's layers:
- Layer 1 (blue widgets) contains the root bone for the overall model and the drift bone to control location and orientation of the car
- Layer 2 (yellow widgets) contains the suspension bone and one damper bone per wheel
- Layer 3 (green widgets) contains front wheels, back wheels bones and the steering bone to control rotation of the wheels
- Layer 4 (red widgets) contains the ground sensors (one per wheel)
- Layer 31 contains the deformation bones (from the deformation rig)
- Layer 32 contains mechanical bones if you want to tweak or improve the rig.
Ground sensors (layer 4) are generated with a shrinkwrap constraint named Ground projection. By default, this constraint is not activated. Just target the object used as the ground in your scene to stick each wheel to the ground. Ground sensors are designed to fake roadholding, not to control the location of the car. Use the root bone to move your model accross the scene.
Rigacar will try to position widgets to match your model. But you can adjust the widgets position and scale. To adjust the position, select the widget, go to edit mode and change the position of the bone. To adjust the scale, go to pose mode and change the scale of the custom widget into the bone properties panel.
Wheels rotation on the Y axis
The animation rig can rotate wheels as you move your model along the Y axis.
Be aware the rotation is only correct for translation on this axis. So, this feature is not the proper way to animate wheels with Rigacar (see section below). But it is useful to quickly check the generated rig. In Car Rig panel, put the property 'Wheels on Y axis' to 1 to activate this feature.
Generate wheels animation
Most of the time, you don't really need to animate wheels. Rigacar can bake the animation for you based on the motion of your model. So you should not animate the steering bone nor the front wheels bone and the back wheels bone.
Whenever you need, click on Bake wheels rotation and on Bake steering buttons: Rigacar will create the animation. In the popup dialog, you can specify the following parameters:
- Start frame and end frame
- The range for the animation. By default it matches the range of the current animation. You can adjust it if you like.
- Visual keying
- By default, the animation is based on the real position of your model. Unless you have a good reason to uncheck this option, leave it on.
- Keyframe tolerance
- Rigacar tries not to add keyframe if it is not necessary. If you want to remove some noise in the animation, you can crank up this value: Rigacar will become more and more tolerant and will ignore significant variations, adding less keyframes. On the contrary, if you set this value to zero, Rigacar will add keyframes for each frame.
Moving ground sensor and damper nodes has an effect on the body of your model. Animation of these bones is supposed to be subtle. Otherwise, your model will be stripped away. If you want, you can adjust this suspension effect in Car Rig panel.
- Suspension factor
- This factor adjusts the variation on the local Z axis of the body when ground sensors and/or damper nodes are moving.
- Suspension rolling factor
- This factor adjusts rolling of the body when ground sensors and/or damper nodes are moving.
If you want to keep full control on your animation, you can turn these factors to 0 to deactivate any effect from the suspension.
To infinity and beyond
I would be glad if this addon could be useful to some of you. I am no professional rigger nor animator. So I am pretty sure this addon and the generated rig can be dramatically improved. Use them in a way I have not imagined and give me feedbacks. You can use the comments below, you can create an issue on GitHub and, of course, you can fork my code.
Originally, I was inspired by Ondrej Raha's addon. I eventually realized it would not provide the features I was looking for. So I decided to write my own addon and finally to share it with the community. Thanks to him for giving me inspiration.
Drive safely :)
Nice BMW27 model used in this article comes from the Blender demo files. Thanks to Mike Pan for creating and sharing it.