Rigacar

a Blender add-on to rig... a car

Rigacar thumbnail

Downloadable file

rigacar.zip

The add-on 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 add-on for Blender I developed for one of my projects. Rigacar was designed to fulfill the following goals:

Before reading the official documentation, you can watch my series of videotutorials:

Add the deformation rig

Downloadable file

bmw27_with_rig.blend

You can download the blend file with the model and the complete rig. Don't forget to download and install Rigacar. Nice BMW27 model used in this article comes from the Blender demo files. Thanks to Mike Pan for creating and sharing it.

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.

Once you have installed and enabled the add-on, 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 bones used to animate directly your model: the wheels, the body (and optionally the brakes). You can use the operator panel (or press F6 in the viewport) to tweak the deformation rig:

  • add front/back wheel pairs. You can even remove front wheels or back wheels (very convenient if you want to rig a trailer for instance)
  • add bones for brakes. These bones are useful if you need to control mesh elements in wheels which do not spin (most probably wheel brakes).
  • adjust bones position
  • adjust length of body bone

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

If you create a rig with more than one front or back wheel pairs, additional bones are suffixed by a number: DEF-Wheel.Ft.L.001 and DEF-Wheel.Ft.R.001 for instance.

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 does not have to match the radius of the wheel. Rigacar derives the radius of a wheel from the position on the z axis of the corresponding wheel bone.

If you have bones for brakes, their head should also be placed at the center 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 your model has many distinct objects (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 add-on 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. If your model has more than one front or back wheel pairs, additional wheels must be prefixed by number (for instance Wheel.Ft.L.001, Wheel.FT.R.001). If your model has brakes, their name should follow the same convention with WheelBrake.Ft.L, WheelBrake.Ft.R, WheelBrake.Bk.L, WheelBrake.Bk.R...

Select all objects from your model (you can 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 (press F6) 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 14 contains bones necessary to tweak the position of the widgets
  • layer 15 contains main mechanical bones
  • Layer 16 contains deformation bones (those originally added)
  • Layer 32 contains all mechanical bones.

Layers 1, 2, 3 and 4 are useful for animators. Layer 14 is useful for riggers to tweak the generated rig (see below). Layer 15 is useful for riggers who want to create a more complex rig. For instance, if you want to add bones to control side doors, you should parent these new bones to MCH-Body from this layer.

Tweak the generated rig

Ground sensors (layer 4) are generated with a shrinkwrap constraint named Ground projection. By default, this constraint is not activated. When you select these bones, additional properties are added in the properties panel to easily customized this constraint. You can pick the object for the ground and adjust min/max values to limit wheels vertical position.

Rigacar will try to position widgets to match your model. But you can adjust position of widgets and scale them at your ease.

To adjust position of widgets, go the layer 14 of the armature. This layer displays bones useful to tweak position of the widgets. Even if the rig seems to be displayed as usual, the bones are not quite the same. For instance, if you select the widget for the root bone, you will in fact select a bone named "SHP-Root". If you are not familiar with creating custom shapes for bones in Blender, the good news is you don't need to fully understand the technical stuff. Just go to layer 14, select the widget you want to move, go to edit mode and change the position of the selected bone and it will update the position of the widget.

To scale up/down a widget, you have to go back to layers 1 to 4, go to pose mode and change the scale of the custom widget from 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.

Bake 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 but use buttons to bake their animation.

Bake steering

Bake steering button will compute animation of the steering. When you click on it, a popup dialog is displayed to adjust baking 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.
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.
Rotation factor
The value is used as a factor to adjust strength of the steering. If you want to create animation with a more noticeable animation of the steering rotation, you can put a value higher than 1.

Note

The algorithm for baking the steering animation may produce jagged animation curves. I highly encourage you to check the animation and tweak generated curves if necessary. For instance, you can use Simplify curves, another add-on to reshape animation curves.

Bake wheels rotation

Bake wheels rotation button will compute rotation of the wheels. When you click on it, a popup dialog is displayed to adjust baking 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.
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.

If you want to animate skidding during braking, you can activate brakes on wheels. Scale down front wheels and/or back wheels widgets, add keyframes then hit Bake wheels rotation button.

Adjust suspension

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 add-on could be useful to some of you. I am no professional rigger nor animator. So I am pretty sure this add-on 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 add-on. I eventually realized it would not provide the features I was looking for. So I decided to write my own add-on and finally to share it with the community. Thanks to him for giving me inspiration.

Drive safely :)