Home » Featured, JScript, XSI

Building A Car Rig

5 January 2012 29,404 views 2 Comments

Contents




Notes About This Tutorial

 
CarRig_MagazinePageThis tutorial was written for the November 2008 of 3D World magazine (issue 109). It shows how to create a rig for a 4 wheeled vehicle that uses spring dynamics to simulate suspension movement.

Originally companion scene files were supplied for XSI version 6.5, along with a high resolution model for the vehicle. Since I don’t have the rights to distribute the model, I’ve replaced it with a (very ugly!) low resolution proxy. As a result, two of the scene files have been modified using XSI version 9.5. The original start scene is still in XSI 6 format, so you’ll be able to follow the tutorial if you have an old version of XSI.

Below is a video of what you can expect to create:


For clarity I’ve also uploaded a step-by-step video that shows the process. To make it easy to follow the article and watch the video at the same time, you can click the following image to open it in Vimeo in a new window:

CarRig_VideoLink


One other side effect of recreating the tutorial for XSI 9.5 is that some of the simulation settings have changed. The tutorial text below has been updated to reflect the changes, but the step-by-step video has not. As a result, the old settings for the spring constant (14.0) and spring damping (1.0) will be seen in the video instead of the new settings (80 and 6 respectively).

A few other minor changes have been made to the text, but otherwise, it is exactly as printed in the original magazine. As such, the explanations are quite brief as there were constraints on the number of words. If you feel you need better a explanation of any of the steps, please leave a comment.

If you have any problems viewing the screenshot images at high enough resolution, either go full screen with your browser, or right click and select “Open Link In New Window”.

I’ve provided the following companion files as a single downloadable Zip file:

  • Hummer.emdl
  • WheelTurnOp.js
  • vehiclerig_start.scn
  • vehiclerig_step16_XSI95.scn
  • vehiclerig_final_XSI95.scn

If you want to follow along, then at the very least, you need to start with the “vehiclerig_start.scn” scene file.

Download... XSI Tutorial Files V1.0 (881 Kb)


Introduction

Designing a vehicle rig to accommodate every possible situation is a complex task, if not impossible. In most cases, you would have a specific rig for a specific set of circumstances. This has parallels with how cars are used in the movie industry where they might have several different versions for specific stunts, as well as a “hero” car for close up work.

The job of the rigger is to put together a system that will allow the animator to concentrate on creating a performance. The animator should never have to worry about the technical aspects of a damped spring system. If a rig is constructed properly, it will automatically respond and recreate the suspension’s subtle dynamics.

The rig that you’re about to make is designed to work for fairly flat surfaces. It has suspension based on a physics simulation which allows it to react to the underlying surface in a realistic way. There is a system to roll the car from front to back as it accelerates, and the vehicle will even steer automatically.

This tutorial is about the assembly of the physics simulation and constraints that make up the suspension, but it’s important to realise that there still leaves a lot to be desired from an animator’s point of view. For example, a rigger would typically provide a synoptic view (a special HTML driven toolbar) or a custom parameter page for the animator to easily access key controls in the rig. An animator may have to spend a huge amount of time with the rig, so it’s the rigger’s duty to make sure that it is as friendly to use as possible.

Also included is a free plug-in that I wrote specifically for this tutorial to rotate the wheels correctly. It’s a very simple script and I would encourage anyone thinking of becoming a TD or rigger to take a look and attempt to understand how it works. The script is fully commented to assist you as much as possible. Step two of the tutorial will take you through the installation process of this plug-in.

Stage One: Applying the wheel turn plugin

  1. Start XSI and load the vehiclerig_start scene file. The scene already contains a basic hierarchy of the vehicle and wheel rig, as well as a simple terrain for testing the suspension later. Press [9] to open the schematic to see the rig structure. At the moment, we only have a rig for one wheel. We will duplicate this later for the other wheels after we have rigged it.

    CarRig_Step01
  2. First we need to install a plugin for making the wheels turn correctly. Go to File > Plugin Manager and expand the User Root folder. Right click on the Plug-ins folder and select Explore from the menu. Copy the WheelTurnOp.js file from the downloaded files (see above) to this location. Click the Update All button in Plugin Manager and close its window. You now have a new menu called CarRigging.

    CarRig_Step02
  3. The plugin keeps track of where the wheel has moved from previous frames and applies the correct rotation to the Wheel_Rot object. In the schematic view, first select the orange Wheel_Rot object and go to the new CarRigging menu at the top of the screen. Select the Apply WheelTurn Op option from the menu and then, in the interactive picking session that starts, pick the green Wheel_Steer object. Set the Radius parameter for the operator to 3.75.

    CarRig_Step03

Move on to the next page to continue.

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading ... Loading ...

2 Comments »

  • Bubba said:

    Thanks

  • Francesco said:

    XSI 9.5?

    Thanks for this tutorial

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

Security Code: