On this page
How to Build a Car Rig in 3ds Max
Reactor Physics
Unreal Tournament 3 - UT3 - City Project
Car Rig Project - 3ds max - Updated
Reactor Physics
Unreal Tournament 3 - UT3 - City Project
Car Rig Project - 3ds max - Updated
Tag cloud
wrc rigging css price test f1 ford unwrap progress crash character animation modelling ball after effects vehicle red bull work in progress highlights match animation online game cars demo php city eurofighter rally multiplayer reactor mod freelance environment bbc car rig earth web update 2009 bullet time camera crysis montage anticipation blackjack rss robot themes monkey texturing car kitchen
Categories
Featured work
Finished animations
Interactive features
Maps and mods
Work In progress
Character animation and loops
Images
Site news and updates
Tutorials
Random blog posts
Uncategorised
Finished animations
Interactive features
Maps and mods
Work In progress
Character animation and loops
Images
Site news and updates
Tutorials
Random blog posts
Uncategorised
Most popular
How to Build a Car Rig in 3ds Max
Car Rig Project - 3ds max - Updated
Unreal Tournament 3 - UT3 - City Project
Car Rig Tutorial - 3ds Max and Reactor
Motorway and Foliage - Grass
Car Rig Project - 3ds max - Updated
Unreal Tournament 3 - UT3 - City Project
Car Rig Tutorial - 3ds Max and Reactor
Motorway and Foliage - Grass
Archive
August 2010 [1]
July 2010 [3]
June 2010 [4]
May 2010 [3]
April 2010 [3]
March 2010 [3]
February 2010 [6]
January 2010 [1]
October 2009 [2]
September 2009 [3]
August 2009 [4]
July 2009 [2]
June 2009 [3]
May 2009 [1]
April 2009 [7]
March 2009 [2]
February 2009 [3]
January 2009 [3]
December 2008 [4]
November 2008 [1]
October 2008 [7]
September 2008 [3]
July 2008 [1]
July 2010 [3]
June 2010 [4]
May 2010 [3]
April 2010 [3]
March 2010 [3]
February 2010 [6]
January 2010 [1]
October 2009 [2]
September 2009 [3]
August 2009 [4]
July 2009 [2]
June 2009 [3]
May 2009 [1]
April 2009 [7]
March 2009 [2]
February 2009 [3]
January 2009 [3]
December 2008 [4]
November 2008 [1]
October 2008 [7]
September 2008 [3]
July 2008 [1]
Blog
"scripting"
Items tagged with scripting:
How to Build a Car Rig in 3ds Max
FEB
06
2010
You need to download the latest version of Flash to play and/or enable JavaScript.
This is a project that formed part of my postgraduate degree which I have continued to improve afterwards, and the videos in this post should demonstrate some of its functions. I'll also explain the methods used, although I won't go into too much detail, but feel free to ask me about any specifics in the comment section after the post.The intention of the rig is so that you can quickly and easily animate a vehicle that has been modelled without having to worry about the physics, as the rig will handle that with scripts.

The project started off life as a reactor-based rig, which was fairly easy to set up, and can be seen in a tutorial I wrote on building it. This method works well for simple animations, particularly over bumps, but I found to be quite limiting for manipulating the steering or for swapping the vehicle for another one without having to change all the settings.
I soon decided that scripting was the way to go. I followed techniques similar to this tutorial. I didn't actually follow this tutorial, but it does contain many of the techniques I did learn how to do, and I wish I'd have found this while constructing my rig. The main difference is that that is designed for a tank with tracks, while mine needed to be to suit any four wheeled vehicle, which I later expanded to allow any (even) amount of wheels, but not tracks.
The first thing I needed to do was to allow the wheels to determine where the ground was, so they could travel up and down terrain. This allowed the vehicles to not be stuck in flat, boring car parks. To do this, as in the tutorial mentioned above, I used the Conform tool on a plane and attached the wheels to it. I then used a spline curve as the path and made the conformed plane controller move along the path.
I now had a path and height sorted, the next thing was for the wheel rotation. A scripted expression was needed for this and required knowing the radius of the wheels, the length of the path, and the percentage of the path that the vehicle is situated at any given moment on the timeline. After adding these as variables in an expression for the z-axis rotation of one of the rig's wheels, the following expression should then calculate the correct rotation at each frame:
((pathpercent*(distance*100)*pi)/(pi*rad))/100
where pathpercent is the current percentage along the path that the vehicle has travelled, distance is the total length, and rad is the radius of the wheel.

The rig was now at a point comparable to reactor, minus the bump physics, but allowing the vehicle to have direction without having to pause the simulation and create new settings. The problem with the direction change is that the wheels remained pointing forwards, rather than in the direction the car intends to travel - it needed steering. This was done in a similar way to the wheel rotation, in that it was done with expressions, although it required further objects to be placed in the scene. One such object was for a marker to follow along the spline curve path slightly ahead of the path that the main rig is about to travel. This meant there was a way of knowing which direction is coming up, and so the wheels could face this direction, taking care to ignore the axis controlling the wheel rotation.
The final major obstacle was getting the vehicle to bank realistically on corners or when traversing bumps. In the following image, you can see a couple of controller points to act as the main chassis, and these were used by adding position and orientation constraints in the motion wheel tab, then making the geometry that is following the spline curve bank on corners and using appropriate settings, and making one of the two objects in the rig mirror this position. The other object remains static. A third object is then placed and takes the average orientation of these two objects, and it is this that the main body of the model will be attached.

For acceleration and braking banking, the current speed was calculated using an expression, and set to a slider manipulator in the interface, and this speed controls two objects in the world space, one of which moves in the vertical axis depending on the speed. The difference between the two objects (one of which remains static) is then used to determine how much the car should rock forwards or backwards - ie, it calculates how much the speed has changed from one frame to the next. This is then multiplied by a multiplier variable set by the user using a slider manipulator to control how much the car should move - so how stiff the suspension should be. An F1 car for example would have stiffer suspension than a road car and thus be less visually active on weight shift.
The rig is controlled by the user using sliders (create > helpers > manipulators > sliders), which are tied to various elements of the rig. Things like the wheel size and heights of the front vs the rear wheels, ride heights and wheel base and widths can all be controlled, allowing easy addition of any wheel-based vehicle. Other elements such as the steering look-ahead, steering override (to allow for oversteer - see below), speed and weight shifts are also controlled in this section to cater for different vehicles - a truck will clearly behave differently to a Mini Cooper, but they can both be used on the same rig without needing to change any of the scripts.

The sequence below will demonstrate how to add a custom model to the rig, and give a further insight into how the rig is put together.

And that's the basic story of the rig. I went on to add further controls such as oversteer and the ability to add a driver, and these can be seen in the Motorway F1 video. The oversteer, which is a slider attached to the y-rotation of the main rig, ties in with the steering override, and is to be done manually, as it is difficult to predict how much oversteer is required. Wheelspin is a further addition and behaves in a similar way, allowing the front and rear wheels to rotate independently and at varying speeds, or to behave normally - this is a choice left to the animator.
I hope this helps someone, and that I have the balance between detail and being boring right.
Links to other videos containing the car rig on my site:
Motorway F1
Bugatti Veyron vs Eurofighter Typhoon
Reactor Physics
Car Rig Tutorial - 3dsmax
Car Rig - WRC
Car Rig - F1
Reactor Physics
MAY
19
2009
Unreal Tournament 3 - UT3 - City Project
DEC
18
2008
The environment and effects themselves were created in 3D Studio Max and imported into the Unreal...
Car Rig Project - 3ds max - Updated
DEC
10
2008
A scripted rig is set up to allow for any four wheeled vehicle to be applied to it, which is manipulated using the sliders as you can see in the image...