Академический Документы
Профессиональный Документы
Культура Документы
PROJECT ABSTRACT
This project report describes in detail an attempt within a seven month time period to develop a
realistic vehicle simulation application. A project such as this represents a significant learning commitment
as the prerequisites of this project involved a great deal of research into the fields of vehicle dynamics,
computing, mathematics and physics. The project has been name the “Vehicle Dynamics Engine” with the
acronym ‘VDE’ and is executable in real-time on consumer level computer systems. Typical vehicle
simulations of this nature may be found in software and computer entertainment applications. In the latter
case however, the physics models are optimised for enjoyment and playability rather than for realism.
2
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
ACKNOWLEDGEMENTS
Marco Monster for making available an advanced introduction to car physics modelling for games on
which most of the application’s physics is based.
Kenneth J. MacLeod for the inspiration needed to undertake this project.
Discreet for their 3D Studio max 3D modelling package used to create the 3D models.
Adobe for their Photoshop 2D painting package used to create the 2D textures.
Dr. Abhir Bhalerao for his valuable assistance in a supervisory role.
The final acknowledgement I dedicate to family and friends.
3
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
NOMENCLATURE
All important nomenclatures used in the report are listed below in order of appearance:
4
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
L = wheelbase (m)
hp = car horsepower (hp)
rpm = car engine revolutions per minute
Fdrive = car engine drive force (N)
Tengine = car engine torque at a given rpm (N)
Xg = car gear ratio
Xd = car differential ratio
n = transmission efficiency (%)
Rw = car wheel radius (m)
g1 = first gear ratio
g2 = second gear ratio
g3 = third gear ratio
g4 = fourth gear ratio
g5 = fifth gear ratio
g6 = sixth gear ratio
gR = reverse gear ratio
Tdrive = car engine drive torque (N)
Π = ratio of a circle circumference to its diameter, pi
σ = slip ratio
ωw = car wheel angular velocity (rad sֿ¹)
Vlong = longitudinal velocity (m sֿ¹)
Vlat = lateral velocity (m sֿ¹)
Fn, long = normalized longitudinal force for a given slip ratio (N)
Fn, lat = normalized lateral force for a given slip ratio (N)
Fz = load on the tyre (N)
Ct = traction constant
I = total inertia (kg m²)
δ = turning angle made by front and rear wheels, delta (deg)
R = radius of curvature (m)
ω = car angular velocity (rad sֿ¹)
β = angle different between car heading and velocity direction vectors, beta (deg)
Ω = car body heading direction vector, omega
Flateral = car tyre lateral or cornering force (N)
Ca = cornering stiffness
α = slip angle, alpha
5
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
Vx = car front tyre lateral speed (m sֿ¹)
Vy = car front tyre longitudinal speed (m sֿ¹)
αfront = car front wheel slip angle (deg)
αrear = car rear wheel slip angle (deg)
Fcornering = cornering or centripetal force (N)
Flat, rear = car rear lateral force (N)
Flat, front = car front lateral force (N)
ωa = car angular acceleration (rad sֿ²)
Assumptions
The main assumptions made in this project report are that the car physics theory presented only applies for
common modern-day four wheel cars and the rear wheels of these cars provide all the drive for the entire
vehicle. In other words, the theory behind the vehicle dynamics engine is based on common two wheel drive
cars and not four wheel drive cars.
6
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
1 ft (foot) 0.3048 m -
1 in (inch) 0.0254 m 2.54 cm
1 km/h 0.2778 m/s -
1 mph 1.609 km/h 0.447 m/s
1 rpm (revolution per minute) 0.105 rad/s -
1G 9.8 m/s² 32.1 lb/s²
1 lb (pound) 4.45 N -
1 lb (pound) 0.4536 kg 1 lb/1 G
1 lb.ft (foot pounds) 1.356 N.m -
1 lb.ft/s (foot pounds per second) 1.356 W -
1 hp (horsepower) 550 ft.lb/s 745.7 W
1 metric hp 0.986 hp 735.5 kW
7
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
TABLE OF CONTENTS
Abstract ..……………………………………………………………………………………………………. 2
Acknowledgments ………………………………………………………………………………………….. 3
Nomenclature ………………………………………………………………………………………………. 4
Chapter 1 - Introduction ……………………………………………..…………………………………... 11
1.1 The Problem …....………………………………………..…….……………………………….. 11
1.2 Objectives ….…….……………………………………………..………………………...……. 11
1.3 Motivations ………..…………………………………………………………..……………..… 12
1.4 Document Overview ……………………………………………………………………...……. 12
8
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
4.4 Application Framework Design and Architecture ....……...……….......…………….……........ 30
4.5 Application Framework Implementation …………………………………………...………….. 31
4.5.1 Engine Files ……………………………………………………………...…………... 32
4.5.1.1 Level 0: API Library ……...………………………………......……………. 23
4.5.1.2 Level 1: Low Level Functions ..………….……….…………...…………… 23
4.5.1.3 Level 2: High Level Functions …….......…………………...……………… 35
4.5.1.4 Level 3: The Application Core……………………………...……………… 35
4.5.1.5 Resource Manager …..………………………………………...…………… 35
4.5.2 Program Files …………………………………………………………...……………. 35
4.5 Engine Testing and Evaluation ……………………………………………...…………………. 37
9
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
7.2.2 Alternate Input Methods ………………………………………………………...…… 63
7.2.3 Jumping Physics ……………………………………………………………...……… 63
7.2.4 Realistic Suspension System …………………………………………………...…….. 64
7.2.5 Rigid Body Mechanics …………………………………………………...…………... 64
10
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
CHAPTER 1 - INTRODUCTION
1.2 Objectives
The objectives of this project would be to develop a cheap, simple, efficient and modular vehicle
physics engine that can be easily integrated into an existing game or software program providing it with a
fully immersive driving experience using either a keyboard or force feedback driving wheel for navigation.
With the increasing complexity of modern day computer games, the need to modularise code grows more
crucial. Therefore this engine will be made to be standalone in the form of a source file add-on, library or
dynamic link library (DLL).
The vehicle physics engine will be based on rigid body mechanics, dynamics and mathematics and
will be designed to allow various types of vehicle behaviours to be simulated effectively. The engine will
feature:
The vehicle physics engine will be built with a virtual 3D simulation of a landscape to navigate
around and showcase its functionality. The landscape should feature:
1.3 Motivations
Being a hobbyist game developer and an occasional game player I have witnessed the little
development in the games and software industry concerning creating realistic vehicle physics simulators for
budget and hobbyist game developers. Most of the budget level vehicle physics middleware solutions are
either part of a larger more complex physics system or not suitable for serious games and developers. This is
one of my motivations for creating this vehicle dynamics engine so it could help hobbyist developers like
me to easily integrate vehicle physics into their applications. Another motivation of mine is a personal
interest in cars and their representation in computer games with the advent of the modern day desktop
computers.
12
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
Chapter six describes the final integration testing of the vehicle dynamics engine combined with the
simulation engine. This section describes in detail how a simple simulation environment was created and
used to test a vehicle using real-world technical data.
Chapter seven provides a conclusion and evaluation to the finished vehicle dynamics engine. The
specifications of the final simulation are compared to those originally proposed. Moving on from this
evaluation the potential future work and enhancements are discussed.
13
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
15
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
3.1 Introduction
The background research for the vehicle dynamics engine spans several topics in vehicle dynamics,
mathematics, mechanics, physics and computing. With such a broad range of required knowledge much
time was devoted to performing this research. This chapter provides a narrative survey of the background
research for the vehicle dynamics engine. The important research findings are presented here, and their
implications discussed. Background research matter including books, articles, source code, executable
programs, existing games, internet resources, etc to name a few where all used for this project. This portion
of the report will be presented in two main sections. Vehicle dynamics research discusses all the research
carried out concerning cars, their behaviour in real-life and how this can be represented in a computer
simulation. Computer implementation research discusses the research made that focuses on how this
simulation can be implemented in a computer program and how to cater for input, processing and display.
Finally, section 3.4 provides a conclusion on all the research undertaken.
Accounting for such cars would have proved too extensive for the seven month time period available
for designing and developing this project. Research into vehicle dynamics is presented in the four following
16
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
subsections. Section 3.2.1 begins by looking at similar vehicle simulation programs. Section 3.2.2 takes a
look at straight line physics involving drive train simulation, traction, and suspension etc. Section 3.2.3
examines turning physics involving steering. Finally section 3.2.4 focuses on uneven grounds and the
resulting gravitational effects on the vehicle.
17
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
The transmission system also has some problems. When the car is in gear and stationary, the engine
is still running but with zero revolutions per minute (RPM). Obviously an engine cannot be running if it is
not turning. As well as this Racer features only a digital clutch system, the clutch is either engaged or not.
These features are far from realistic.
Racer does feature sound, but although van Gaal claims to have completed the audio system some
bugs are apparent. Audio output can be intermittent and distorted.
Despite these flaws Racer is still very impressive. Features required in the vehicle dynamics engine
are demonstrated such as convincing acceleration and breaking effects.”
The Racer driving simulator provided a useful benchmarking application against which to test
features common with the vehicle dynamics engine. Also, careful study of how Racer has been structured
from a programmer’s point of view also proved useful. Discussions on the program structure of Racer are
presented in chapter 4.
18
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
Another problem is that as in Racer, it is possible to have the engine running at Zero RPM with the
car stationary and in gear.
It has not been possible to evaluate the audio output in TORCS as this has only been implemented
for Linux systems. The system TORCS was reviewed on was running Microsoft Windows. This lack of
sound is not a true flaw, but merely a feature that has not yet been implemented for windows users.”
The TORCS driving simulator also provided a useful benchmarking program against which to test
the common features with the vehicle dynamics engine. A careful study of the structure of TORCS has also
been made and discussions on this structure are presented in later chapters.
19
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
within gear 1 to gear 6 included for an average car). There is a fixed differential gear called the final drive
gear. The differential is the final drive train module that divides output torque force amongst the drive
wheels (rear wheels in this case). Total gearing ratio is the transmission gear multiplied by the final drive
gear [Beckman 1991a].
Gillespie provides a procedure for calculating the inertia of the entire transmission system. This
inertia is the total inertia of all of the main moving parts taking into account the effects of the gear ratios.
Inertia is amplified by gearing in the same way as the torque force.
Marco Monster’s article Car Physics for Games [Monster 2001] features a good discussion on how
drive train output torque force is used to accelerate a vehicle. This article covers key issues but doesn’t go
into complex detailed discussions of vehicle physics. Monster talks about how the acceleration of a car is
due to a traction force from the road. Whenever there is a difference in the linear speeds of the tyre and road
a friction force is generated that opposes the difference. This friction force is known as ‘traction’. The
magnitude of this force depends on the slip ratio between the ground surface and the tyre surfaces, as well as
the characteristics of the two surfaces themselves. For example, a loose gravel surface will always provide
less traction that a tarmac surface.
Ted Zuvich has published a more in depth article on car simulation titled Vehicle Dynamics for
Racing Games [Zuvich 2000]. This covers a wide variety of issues and cites many respected works in
vehicle dynamics including Gillespie’s book [Gillespie 1992]. Zuvich also talks about the environmental
factors acting upon a moving car such as air resistance and rolling resistance from the tyres interacting with
the road surface and within the tyre system. Much of Zuvich’s discussions are regarding environmental
factors cited from Gillespie however, Zuvich’s text is more useful as his discussions are in a more readable
format.
With a typical passenger car, below 60MPH rolling resistance is the main opposing force, at 60MPH
air resistance is approximately equal to rolling resistance and from then on becomes the dominant opposing
force. Rolling resistance and air resistance are the major factors limiting a vehicles acceleration and final top
speed. If the density of the surrounding air is known, the drag or air resistive force acting upon a car can be
calculated from its speed, frontal area and drag coefficient. The coefficient of drag is determined from wind
tunnel tests and is unique to the shape of each individual car. The air resistance force on the car increases
with the square of the car’s velocity. The equation Zuvich provides for air resistance force is cited from
Gillespie’s text and is used in this project.
The rolling resistance increases linearly with car’s velocity. The rate of rolling resistance force gain
is represented by a constant coefficient; this coefficient is determined by the unique combination of the tyre
and road surface. The rolling resistance values are not easily calculated and are normally found through
practical experimentation. The rolling resistance of a vehicle’s tyre also varies depending on the direction in
which the steering wheels (front wheels) are headed. You would expect a greater rolling resistance if a
20
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
vehicle was travelling at high speeds and a quick turn was made on the steering wheel. The equation Zuvich
cites from Gillespie formed the basis of the rolling resistance calculations at the wheels that where used in
this project.
Vehicle Body
Spring Damper
Wheel
Figure 3.2: Simple harmonic oscillator. Figure 3.3: Critically damped harmonic oscillator.
Figure 3.1 shows a simple vehicle suspension system modelled as the vehicle body resting on the
wheels via a spring and damper system. The application of a single spring-damper system and wheel is used
to further simplify the situation rather than four separate spring-damper and wheel systems. Ignoring the
21
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
damper and energy losses from oscillation, if the mass if released from a positive or negative height (as
would be the case when traversing rough terrain), the mass would oscillate indefinitely as show in Figure
3.2. However including the damper into the equation would absorb all the energy from the oscillations and
restore the mass to its original position of rest. The properties of such a damper would determine the time
taken for the mass to return to its original position or in other words, how bumpy the ride will be when
traversing rough terrain.
Traction and steering are of particular importance to one another and hence will be discussed
collectively. A tyre has far from infinite ability to grip the road and there are several variables determining
the tyre’s performance, there are however some methods that can be used to determine a reasonable
approximation of a tyre’s performance. The maximum acceleration (measured in G’s) that a tyre-surface
combination can create is independent of tyre load [Beckman 1991b]. By multiplying the G limit and tyre
load the maximum traction force can be determined. For example, new tyres on a tarmac road will
obviously have greater maximum traction than worn out tyres on a gravel track. So traction therefore
depends upon the adhesion between the tyre surface and the ground surface. The limits of this adhesion give
the maximum vehicle acceleration achievable. Refer to figure 3.4 below.
Figure 3.4: Example tyre traction budget. Image from [Beckman 1991b].
Both longitudinal and lateral accelerations have to be produced within the traction limit of the tyre so
it is possible to reach this limit while accelerating hard and turning rapidly. In this situation, the tyre will
begin sliding rather than rolling in its intended direction. This sliding can cause the car to skid outwards of a
circular turn rather the following the turn around.
As the tyres encounter the rolling and sliding motion, the friction force with the road surface cannot
be represented by a single coefficient because rolling tyres experience what is known as static friction while
sliding tyres experience kinetic friction. Static friction applies only between objects in contact (like the tyre
22
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
and ground surfaces) but not in motion with respect to each another and Kinetic friction applies between
objects in contact and moving with respect to each other. The magnitude of the Kinetic friction is always
less than that of the Static friction so it takes more force to set an object in motion that it does to keep it in
motion. A tyre simply exists in either a rolling or sliding state depending on its motion with respect to the
ground surface and there is a gradual transition between the two states.
Both Zuvich and Monster talk about a good method to calculate the friction coefficient for a given
ratio of slip between the road and tyre surfaces. A 2D curve can be made of how the friction coefficient of a
surface varies with the slip ratio; this is known as a traction curve. The nature of friction force variance is
unique to the tyre/surface combination although trends do apply. With slip ratios below 20% the tyre is
experiencing basically static friction, above this kinetic friction becomes the main force. Traction curves
provide an approximation of tyre performance, Figure 3.5 below provides an example curve for a standard
passenger car tyre on a tarmac surface road.
-N
24
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
surface on the vehicle. On uneven ground the weight force exerted by the vehicle reduces as a component of
the initial weight is now being used to cause motion down the plane. This also affects the suspension system
of the vehicle.
Finally the stability of the vehicle is in question when traversing uneven ground. Picture a rectangle
formed on the surface of the ground with its four points represented by the contact positions between the
vehicles four tyres and the ground surface. Now project the vehicle’s centre of gravity vector position
directly downwards until it intersects the ground surface at a certain point. If this intersection point lies
within the aforementioned rectangle the vehicle is said to be stable. If it lies on the boundaries of the
rectangle then the vehicle is said to be marginally stable or on the brink of capsizing (a small nudge could
topple the vehicle). If it lies outside the boundaries of the rectangle the vehicle is unstable and should
already be toppling if it hasn’t already.
25
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
ODE, faults like random crashing. ODE could therefore not be used as a result of its unreliability and lack
of documentation.
There are several application programming interfaces (API’s) that could be used to handle graphics
processing and display in the vehicle dynamics engine. Two of the well known API’s include Microsoft’s
Direct3D and OpenGL. Direct3D was chosen over OpenGL based on experience with the latter and the
project time window would not permit learning another API from scratch. Direct3D is a well documented
library which masks the compatibility issues and contrasting architectures of the modern day graphics cards
and computer hardware from the software programmer.
For handling program input, DirectInput library from the Microsoft’s DirectX suite seemed a logical
choice. This library is freely available software that allows any compatible input device to be programmed
via a single generic interface. Keyboard, joystick and mouse devices are supported. DirectInput is a part of
the DirectX suite of libraries currently at version 9.0c. The DirectInput library is mature, reliable, easy to
use and well documented.
Audio output is one of the project requirement, to this end research into the use of Microsoft’s
DirectSound library was performed. However unlike DirectInput, DirectSound is less well documented and
would require a lot of work to integrate into the project.
File manipulation techniques and procedures would also be required in this project to retrieve data
such as car specification information from external files and directories. There are functions within
Microsoft’s DirectX API and other standard source files that could help implemented these functions.
26
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
modules are programmed in the form of C++ classes in both cases. Figure 3.7 shows Racer’s car model
structure. Parents in the hierarchy store their children, e.g. in Racer the engine object is stored inside the car
body object and the engine object contains the differential object. The names of certain modules are plural;
this means that there may be more than one instance of that version of the module. For example, the module
“wheels” means that there may be more than one instance of wheel; it does not mean that there is a single
module named wheels.
27
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
prerequisite to understanding much of the background research but it would have been impractical to
present all of this background reading here. As well as providing the required knowledge for building a car
simulation, research also provided a source of encouragement and inspiration. The works of Ruud Van Gaal
was particularly encouraging as he is the sole developer of Racer. This shows even complicated projects do
not always require a large development team.
A brief compilation of key points relating to the final methods that will be used in the design and
development of the vehicle dynamics engine are presented below:
• The entire project will be implemented using the C++ programming language and will be powered by
the Microsoft DirectX API.
• I have chosen the Microsoft’s DirectX API over the OpenGL graphics library because of my familiarity
with the DirectX API in the past. DirectX also provides tools to deal with components such as
multimedia (sound, music, video etc) and input which might be used in this project. Rather than use
OpenGL for the graphics and DirectX for multimedia and input I decided to stick with DirectX.
• I have chosen C++ over Java because C++ is faster than Java and hence better suited for real-time
application development. Such is the case for this project. It is said that learning 100% of one is like
learning 80% of the other so the transition from Java to C++ should be fairly straight forward.
• The vehicle physics will be implemented based on research sources and theories covered previously in
the report.
• Tutorials on how to use 2D painting and 3D modelling programs can be found on the internet or within
the programs them selves. These programs will be used to create the virtual 3D simulated worlds in
which the vehicle physics engine will be showcased.
• Tutorials and sample code regarding using the force feedback Driving Wheel as an alternate input
source can be found on the web and probably within the package.
The engine will be accessed through a function call, this function call will be fed parameters such as car
body object, car wheel objects, input method (keyboard or driving wheel), landscape object, colliding
obstacles, car properties (aerodynamic factors, engine specifications, weight etc). The function might return
information like if collisions occur, what objects collided etc.
28
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
4.1 Introduction
Suitable middleware technologies with which to build the vehicle dynamics engine had to be found
before design of the application officially began. These technologies were briefly introduced in previous
chapters and are discussed further here in more depth; these technologies span from hardware to software.
With the choice of middleware technologies decided, the design of the vehicle dynamics engine
application framework could commence. This framework provides an essential background functionality
foundation upon which to construct the remainder of the simulation. Examples of what this includes are
timing, user input handling and 3D model rendering etc. This chapter provides a discussion of both the
architecture and implementation of this application framework.
29
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
API’s were all selected. These decisions where based upon the author’s previous experience as well as
background research.
The vehicle dynamics engine is written in C++ using Microsoft’s Visual C++ 6.0 Integrated
Development Environment, IDE. For graphics output the Microsoft’s Direct3D API is used. Significant
previous prior experience with both Visual C++ and DirectX was the main factor in these decisions.
However no prior experience was possessed with regards to audio output and user input. C++ was chosen
over alternatives like Java and Basic because of its suitability in handling real-time applications, as is the
nature of the vehicle dynamics engine. On compilation C++ code is converted into machine code which runs
a lot faster than the Java and Basic alternatives. C++ is also an industrial standard for building applications
such as this.
DirectX also comes with a suite of sub libraries such as Direct3D, DirectAudio and DirectInput
which can be used to cater for all programming needs concerning graphics, music, sound and input handling
from various input devices.
Program Engine
Component Component
Level 3: Resource
Core Manager
Level 2:
High Level
Functions
Level 1:
Low Level
Functions
Level 0:
API Library
30
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
The program component will contain all the code that makes use of the simulation engine wrapper
functions for the DirectX application programming interface to create the required simulation environment,
i.e. the code within this component will be responsible for creating the application window, initializing
DirectX, setting up the simulation environment (setup objects, sounds, lights, textures etc) and proceeding
into the application execution loop.
The engine component comprises of several levels of functionality. Level 0 contains all the DirectX
API libraries and files needed to support the application. However, the interface to these functions is bloated
and requires several steps or lines of code to get certain tasks accomplished. Inserting all this code within
the program component would not be advisable and hence a set of wrapper functions had to be created in
order to provide easy access in the form of few lines of code to accomplish these tasks. All these wrapper
functions are embedded in Level 1.
Level 1 of the engine component contains wrapper functions for graphics, audio, input and file
manipulation. They contain simple functions for example to initialize Direct3D, DirectAudio and
DirectInput for keyboard and mouse devices. This layer also contains class definitions for graphic-related
objects such as images, objects, terrain, cameras, lights, sprites and 3D lines, audio-related objects such as
sound and music and input-related objects such as keyboards and mice that can be created and manipulated
by the programmer within the program component.
Level 2 of the engine contains higher level functions that utilises the lower level to perform more
sophisticated processes. Examples of functions that could reside in this layer include collision detection and
response (utilising level 1 objects, terrains etc), Artificial Intelligence routines, etc but in the scope of this
project this is where the vehicle dynamics engine will reside and utilise level 1 objects (vehicle mesh)
terrain (ground surface), sounds (vehicle noises), sprites (heads-up display) and keyboard (user-controlled
input method) etc.
Level 3 of the engine contains the application core, a structure that links all the other levels together.
This structure contains the application entry point as well as miscellaneous functions that handle the engine
window, console, timing, basic maths, etc.
The engine component also contains resources which are basically miscellaneous entities such as
icons and cursors required by the application and a resource manager to handle loading and using these
resources.
31
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
wasn’t sufficient time to learn all the advanced C++ programming techniques initially in the simulation
engine’s development so it had to be learnt during which often involved constantly updating the simulation
engine’s code. However because of the structure initially conceived during the design phase it was a
relatively straight-forward procedure and didn’t require a lot of code re-writing and deleting.
32
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
global would impose problems on the application programmers like keeping to strict function names that
don’t collide with engine functions. Each category has a base file that contains all structures and definitions
required and a class file that contains all the classes for the category.
Graphics
The graphics base file contains constants, functions and structures used by the graphics classes.
Constants in this context refer to text that represents constant numbers to make the application
programmer’s job easier. Functions refer to graphics-related mathematical functions that are constantly used
through-out the application. Structures include vertex structures for meshes for example that contain
position, normal, colour, specular and texture coordinate information.
The graphics class file contains the actual class definitions of several graphics entities including the
following:
• Graphics Class: Manages all other graphics classes, handles printing text to screen and controls the
graphics device responsible for what is visible on screen. Examples of what this device can do include
displaying fog, displaying lights, setting object shade modes and changing the view-port. The graphics
also contains a crucial ‘sync’ function that whenever called updates everything on screen with initial
values.
• Image Class: Responsible for creating, loading and manipulating images. Examples of what this class
can do include blurring images, loading images from file and taking screen shots.
• Objects Class: Responsible for creating, loading and manipulating 3D mesh objects. Examples of what
this class can do include loading objects from file, translating, rotating and scaling the object.
• Eland Class: Responsible for creating, loading and manipulating 3D tile terrain objects. Examples of
what this class can do include creating a terrain from a height map, colouring a terrain and determining
point on the terrain so objects can traverse on its surface.
• Camera Class: Responsible for creating and manipulating the viewing camera in 3D space. Examples
of what this class can do include focussing at a point in 3D space or freely moving about, rotating and
translating.
• Light Class: Responsible for creating and manipulating 3D lights. Examples of what this class can do
include setting light colours, types (spot, directional or point), position in 3D space and range.
• Sprite Class: Responsible for creating and manipulating 2D sprites. Examples of what this class can do
includes assign images to sprites, position sprites and rotate sprites.
• Line Class: Responsible for creating and manipulating 3D line objects. Examples of what this class can
do include colouring lines, positioning lines and rotating lines.
33
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
Audio
This component is responsible for everything heard out of the speakers while the application is
running. The base file contains structures to be used to load sound and music files from external sources and
the class file contains the definitions of the audio class, the sound class and the music class, all described
below:
• Audio Class: Responsible for managing the audio device that makes audio possible, used by both the
sound and music classes. Set’s up application audio.
• Music Class: Responsible for creating, loading and manipulating music. Examples of what this class
can do includes playing music, stopping music, looping music, positioning 3D music and changing the
music tempo.
• Sound Class: Responsible for creating, loading and manipulating sounds. Examples of what this class
can do include playing sounds, stopping sounds, looping sounds, positioning 3D sounds and changing
the sound frequency.
Input
This component is responsible for interaction between the user and the application while the
application is running. The base file contains macro’s to make easier the process of input data collection and
processing. The class file contains the class definitions of the input class, the keyboard class and the mouse
class, all described below:
• Input Class: This manages the input device required to retrieve input from the keyboard and mouse
hardware. It also initializes input detection when the program is run.
• Keyboard Class: Only one instance of this class is required as the user only uses one keyboard.
Examples of what this class can do includes detect keyboard states concerning specific keys and relay
them to the querying function.
• Mouse Class: Only one instance of this class is requires as the user only uses one mouse. Examples of
what this class can do include detect mouse states when mouse buttons are being pressed or the mouse
wheel is being moved.
Files
This component is responsible for file manipulation, i.e. loading, creating and manipulating files.
The base file contains constants used by the class and the class file contains a single file class definition of
which only one instance is made. Examples of what this class can do include opening files, making files,
reading from files, writing to files and opening files to append to.
34
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
hexCore.setupGame(2,1024,768,32)
This line of code will instruct the core to tell the graphics object to setup Direct3D and the graphics
device with a 1024 by 768 resolution, a 32 bit colour depth and in windowed mode signified by a 2.
35
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
light sun;
sun.makeSun();
sun.setAmbient(0.5f,0.5f,0.5f,0.5f);
sun.setPosition(250.0f,100.0f,250.0f);
sun.update();
These five lines of code would create a light object called ‘sun’, set all it’s properties and attributes
(specular, diffusion etc) to values that make the light simulate a sun source and finally update these values
with the graphics object.
image dune("media/2D/Eland/dune.jpg");
image hmap("media/2D/Eland/hmap.jpg");
These two lines of code load two images from the hard disk, ‘dune.jpg’ and ‘hmap.jpg’ respectively
and assign them to image objects of similar names. Figures 4.2 and 4.3 represent the dune and hmap images.
Figure 4.2: The dune.jpg image. Figure 4.3: The hmap.jpg image.
eland land;
land.setTexture(dune);
land.heightMap(hmap,20.0f);
land.colorize(20.0f,2);
land.normalizeEland();
Eland is short for electronic land and basically represents tiled terrains in the simulation engine.
These five lines of code create and eland object called land, textures the land object with the dune image
previously created and finally uses the hmap image to create a terrain height map. This is when an image is
composed of two colour like white and black where for example white represents up and black down, both
by a magnitude of 1 unit and the different shades of grey are all in-between. The extra attribute 20.0 refers
to a multiplication of the magnitude 1 unit by a factor of 20.0. The colorise function basically sets the colour
36
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
of individual vertices based on their height from the 0 unit y axis level and finally the normalize function
recalculates the eland’s vertices normal as they need to be updated since the mesh structure was changed.
cam.setPosition(10.0f,10.0f,10.0f);
cam.setPoint(10.0f,0.0f,50.0f);
The camera object as already been pre-instanced once the application is run and the instance name is
called ‘cam’. These two lines of code sets the position in 3D space and point position in 3D space of the
camera object.
while(1==1)
{
graphicsSystem.sync()
};
This code segment represents the application loop which continually renders the graphic objects to screen
via the sync command.
• Running above code which successfully compiled and the figure 4.4 below shows the error-free result.
• Audio functionality was tested and confirmed by loading and playing sounds and music.
• Graphical functionality was tested and confirmed by loading 3D meshes with and without textures.
• Input functionality was tested and confirmed by creating a program to display mouse and keyboard input
on the screen.
• File functionality was tested and confirmed by manipulating external files (open, close, append, delete).
• Other graphical functions where tested and confirmed such as using 3D lines, changing the graphics
device properties and observing the effects on screen (e.g. fog effects), using lights, sprites and elands
where also confirmed to be working.
37
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
38
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
5.1 Introduction
Every simulated vehicle is contained within a vehicle base class. The vehicle base provides a virtual
chassis in which to mount the drive train, wheel and suspension systems. The vehicle base also aids
interaction between the systems. For example drive train torque accelerates the drive wheels and therefore
the vehicle. Acceleration then causes movement of the suspension. This chapter describes the architecture
and implementation of the vehicle base class.
The vehicle dynamics engine cannot be tested alone, it must be tested with the simulation engine and
hence this chapter contains to testing and evaluation section. However the next chapter provides the testing
and evaluation of the entire simulation engine and vehicle dynamics engine system.
The simulation engine handles rendering so all the vehicle dynamics engine has to do is manipulate
the entities positions, rotations, scales, etc and the simulation engine does the rest. All the vehicle physics
theory will be implemented in functions sub-divided into unique components. These functions when called
will perform the necessary physics calculations based on the vehicle physics theory as well as using the
chosen vehicle properties and store the results in the physics variables. Other functions will control updating
the objects, lines, sounds and sprite instances based on the result of the calculations.
39
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
Ftraction = u * Engineforce
Fdrag = - Cdrag * v * |v|
Frr = - Crr * v
At low speeds the rolling resistance is the main resistance force, at high speeds the aerodynamic drag
force takes over in magnitude. At approximately 100 km/h (60 mph, 30m/s) they are equal according to
[Zuvich]. This means that Crr must be approximately 30 times the value of Cdrag.
40
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
The air resistance coefficient or constant Cdrag is approximated by the following formula from Fluid
Mechanics by Landau and Lifshitz, [Beckham] chapter 6, [Zuvich]:
Using the values of air density as 1.29 kg/m3 and for a Chevrolet Corvette C5 frontal area is
approximately 2.2 m2 and Cd as 0.30 which depends on the car shape determined via wind tunnel tests, the
drag coefficient is about 0.4257.We’ve already found that Crr should be approximately 30 times Cdrag so this
a rolling resistance constant value of 12.8.
The total longitudinal force is therefore the vector sum of these three forces.
Keep in mind that the air resistance force and rolling resistance force are in opposite directions of the
traction force when moving in a straight line. So if the longitudinal force is positive the vehicle is
accelerating, if negative the vehicle is decelerating and if zero then the vehicle is moving at a constant
velocity. The acceleration of the car is determined by the net force of the car and the car’s mass using
Newton’s second law:
a=F/M
The car’s velocity is determined by integrating the acceleration over time using the Euler method for
numerical integration which involves summing the car’s velocity by the multiplication of its acceleration
and a time increment in seconds between subsequent calls of the simulation engine. The same procedure is
done for the car’s position and both processes are represented by the equations below:
v = v + dt * a
p = p + dt * v
With these three forces you can simulate car acceleration fairly accurately. Together they also
determine the top speed of the car for a given engine power.
Braking
When braking, the traction force is replaced by a braking force which is oriented in the opposite
direction. The total longitudinal force is then the vector sum of these three forces.
41
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
Weight Transfer
An important effect when accelerating or breaking is the effect of dynamic weight transfer. When
braking hard the car will nosedive and during accelerating, the car leans back. The effect of this is that the
weight on the rear wheels increases during acceleration and the weight on the front wheels increases during
braking. Weight transfer effects are important in simulations as they add realism as well as dramatically
affect the maximum traction force per wheel. This is because there is a friction limit for a wheel that is
proportional to the load on the wheel.
Fmax = mu * W
For a stationary vehicle the total weight of the car is distributed over the front and rear wheels according to
the distance of the rear and front axle to the centre of mass.
Wf = (c/L)*W
Wr = (b/L)*W
42
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
Wf = (c/L)*W - (h/L)*M*a
Wr = (b/L)*W + (h/L)*M*a
Engine Force
The engine is responsible for delivering a specific amount of torque to the rear wheels. This torque
depends on the speed at which the engine is turning or its revolutions per minute, rpm. The torque vs. rpm
relationship is not linear but is usually provided as a curve known as the torque curve whose exact shape
and height is specific for each engine type and is determined by engine tests on a dynamometer. Figure 5.2
shows an example torque curve of a 5.7 litre V8 engine found in Chevrolet Corvettes from 1997 to 2000.
Fdrive = u * Tengine * xg * xd * n / Rw
43
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
Gear Ratios
As mentioned previously, gear act like torque multipliers on the crankshaft to the torque on the rear
wheels. Most cars have five to six gears, a reverse gear and a differential ratio. Below are typical gear ratios
that apply to a Chevrolet Corvette C5 hardtop [Corvette C5 Specifications].
In low gears the gear ratio is high, so you get lots of torque but not so much speed. In high gears,
you get more speed but less torque. You can put this in a graph as a set of curves, one for each gear as in
Figure 5.3
Figure 5.3: Torque curve per gear for a Chevrolet Corvette C5.
These curves however assume 100% efficient gearing. The engine torque curve is shown as well for
reference. The other curves show the torque on the rear axle for a given rpm of the axle, rather than engine.
The rotation rate of the wheels can be related to the car speed (disregarding wheel slip) if we know the
wheel radius. This means 1000 rpm of the rear axle is 36 m/s or 128 km/h car speed (80 mph).
44
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
The torque from the torque curves for a given rpm is the maximum torque at that rpm. How much
torque is actually applied to the drive wheels depends on the throttle position. This position determined by
user input (the accelerator pedal) and varies from 0 to 100% of this maximum torque. To implement this, a
function is created to retrieve the maximum torque and this value is multiplied by the throttle position to get
the engine torque. The function will comprise of six torque/rpm value pairs and linear interpolation will be
used to get results in-between. This torque is delivered to the drive wheels via the gearbox and results in a
drive torque:
Tdrive = Tengine * xg * xd * n
where Fdrive = Tdrive / Rw
The gearbox increases the torque, but reduces the rate of rotation, especially in low gears.
Engine RPM
The engine rpm is required to calculate the engine’s max torque and from there the engine’s actual
applied torque. This can be done by calculating back from the drive wheel rotation speed. If the engine is
not declutched, the crankshaft and the drive wheels are physically connected through a set of gears. If you
know the rpm, you can calculate the rotation speed of the drive wheels and vice versa.
The 60 / 2 pi is a conversion factor to get from rad/s to revolutions per minute. Because the torque
curve isn’t defined below a certain rpm, a limit will have to be imposed on the result. This is needed to get
the car in motion from a standstill. The wheels aren’t turning so the rpm calculation would return a zero. A
zero rpm, the engine torque is either undefined or zero. That would mean you’d never be able to get the car
moving. In real life, you’d be using the clutch in this case, gently declutching while the car starts moving.
So the wheel rotation and engine rpm are more or less decoupled in this situation. The wheel rotation rate
can be calculated from the car speed and the wheel radius.
45
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
traction depends on the amount of slip. The standardised way of expressing the amount of slips is called the
slip ratio which is expressed by the equation:
The slip ratio is zero for a free rolling wheel. For a car braking with locked wheels the slip ratio is -
1, and a car accelerating forward has a positive slip ratio. It can even be larger than 1 if there’s a lot of slip.
The relationship between longitudinal (forward) force and slip ratio can be described by a curve shown in
Figure 5.4.
46
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
case the net torque is still positive and will result in an acceleration of the rear wheel rotation rate. This will
increase the rpm and increase the slip ratio.
total torque = drive torque + traction torques from both wheels + brake torque
This torque will cause an angular acceleration of the drive wheels, just like a force applied on a mass
will cause it to accelerate:
The inertia of a solid cylinder around its axis can be calculated using the equation above. A positive
angular acceleration will increase the angular velocity of the rear wheels over time. As for the car velocity
which depends on the linear acceleration, you can simulate this by doing one step numerical integration
each time you go through the physics calculations:
rear wheel angular velocity += rear wheel angular acceleration * time step
Where the time step is the amount of simulated time between two call’s of this functions. This way you can
determine how fast the drive wheels are turning and therefore the engine’s rpm.
47
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
At higher speeds, it becomes noticeable that the wheels can be heading in one direction while their
movement is still in another direction. In other words, the wheels can sometimes have a velocity that is not
aligned with the wheel orientation. This means there is a velocity component that is at right angle to the
wheel. This of course causes a lot of friction. In high speed turns, wheels are being pushed sideways and all
these forces need to be taken into account.
In the situation of low speed turning you can assume that the wheels are moving in the direction
they’re pointing. The wheels are rolling, but not slipping sideways. If the front wheels are turned at an angle
delta and the car is moving at a constant speed, then the car will describe a circular path. If lines are
projected from the centre of the hubcaps of the front and rear wheel at the inside of the curves, where these
two lines cross would be the centre of the circle.
Refer to figure 5.6 the radius of the circle can be determined via geometry. The distance between the
front and rear axle is known as the wheel base and denoted as L. The radius of the circle that the car
describes is called R. The figure shows a triangle with one vertex in the circle centre and one at the centre of
each wheel.
If the steering angle is zero, then the circle radius is infinite, i.e. we’re driving in a straight line. The
next step would be to calculate the angular velocity or the rate at which the car turns. Angular velocity is
usually represented by the Greek letter omega, and is expressed in radians per second. It is fairly simple to
determine:
48
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
By using these last two equations, you can determine how fast the car must turn for a given steering
angle at a specific speed. For low speed cornering, that’s all the information that is needed. The steering
angle is determined via user input. The car speed is determined as for the straight line cases. From this you
can calculate the circle radius and the angular velocity. The angular velocity is used to change the car
orientation at a specific rate. The car’s speed is unaffected by the turn, the velocity vector just rotates to
match the car’s orientation.
As stated previously, there wasn’t sufficient time to update the vehicle dynamics engine further and
one of the physics features that couldn’t be implemented was high speed turning.
This weight force affects the total longitudinal force of the vehicle regardless of if the vehicle is in motion
or stationary. It does not affect the lateral force of the vehicle because the vehicles wheels don’t move or roll
in this direction and hence the weight force would have to be of a considerable magnitude or the vehicle
tyres would have to be worn out for the weight force to have an effect.
F = -kx
Where F is the weight force applied to the spring, x is the extension made and k is the spring constant
[Pearson]. The minus sign shows that the force acts in the opposite direction to the extension. The spring
continuously oscillates every time the net force displaces it and is brought to rest by means of the energy
consuming damper using a linear damping mechanism. Assuming the spring is only functional within its
elastic limits, the spring has maximum and minimum extension amplitude as extreme stretching or
compression would change its elastic properties. The equations below are used to calculate the
displacement, velocity and acceleration respectively of the oscillation process against time.
x = Asin(ωt)
v = Aωcos(ωt)
a = -Aω²sin(ωt)
Where A is the oscillation amplitude, ω is the angular velocity and t is the time. Damping complicates
matters by effectively reducing the amplitude A over time. The spring extension is calculated by dividing
the vehicle weight by the spring constant. The oscillation original amplitude is a factor of the difference
between the spring’s previous length and its new length. A sine function is used to simulate the simple
harmonic oscillation of the spring and a variable is used to monitor the increasing effect of the damper on
the spring’s oscillation via the amplitude.
50
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
The same emulation is done for the break key ‘S’ and the steering keys ‘A’ and ‘D’. The up and
down keys are used to change the gears from gear 1 to the maximum gear the vehicle has. Gear 0 is reserved
for the revered gear. The input component and all the variables they directly affect are all encapsulated
within a input control function within the vehicle dynamics engine.
51
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
• Vehicle name
• Brake torque
• Vehicle body mass
• Vehicle wheel mass
• Drag coefficient
• Frontal area
• Vehicle body length
• Vehicle body width
• Vehicle body height
• Centre of gravity position vector
• Vehicle wheel radius
• Suspension spring original length
• Suspension spring constant
• Gear information
• Wheel position information
• Engine torque/rpm curve values
• Vehicle mesh, images and sound file names and paths
This data is retrieved from the file once the vehicle instance object is created. The path of the .vdp file is
actually an attribute of the vehicle class constructor and has to be specified for a vehicle object to be created.
The vehicle dynamics engine currently has .vdp files on the Chevrolet Corvette C5, the Audi TT and the
Mini Cooper.
52
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
53
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
The specifications for these vehicles can be found on websites referenced in the later sections of the
report. Below is the exact program file code used to setup and run the simulation environment, the program
code uses the simulation engine to perform all the necessary tasks.
// create light
light sun;
sun.makeSun();
sun.setAmbient(0.5f,0.5f,0.5f,0.5f);
sun.setPosition(250.0f,100.0f,250.0f);
sun.update();
// create terrain
image dune("media/2D/Eland/dune.jpg"); // dune texture
image hmap("media/2D/Eland/hmap.jpg"); // hmap texture
eland land;
land.setFillType(1);
land.setTexture(dune);
land.heightMap(hmap,20.0f);
land.colorize(20.0f,2);
54
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
land.normalizeEland();
return S_OK;
}
As you can see, the program code required to make the entire simulation engine is very small, about
20 lines of code. However, behind each class and function are several lines of code all wrapped up and
placed within the main simulation engine. The interface to the vehicle dynamics engine is also made very
easy, the programmer only has to create a vehicle instance, in this case called ‘car’ and provide the directory
of the car’s technical information as well as the terrain on which it traverses, in this case the eland instance
‘land’. Once this is done another simple function call is made by the vehicle instance to its own vehicle
control method within the main program loop. Within the function call, everything from the physics
calculations, vehicle mesh position and orientation updates, user input logging and processing, heads-up
display control, sound control etc are all controlled.
Desktop Specifications
Make: Custom.
Operating System: Microsoft Windows XP Professional Edition.
Processor: Intel Pentium 4 CPU 3.00GHz.
Memory: 512MB RAM.
55
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
DirectX Version: 9.0c.
Graphics Card: RADEON X300 series, ATI Technologies Inc.
Graphics Card Memory: 256MB.
Laptop Specifications
Make: Dell Computer Corporation.
Operating System: Microsoft Windows XP Home Edition.
Processor: Intel Pentium 4 Mobile CPU 1.70GHz.
Memory: 254MB RAM.
DirectX Version: 9.0c.
Graphics Card: GeForce2 Go, NVIDIA.
Graphics Card Memory: 16.0MB.
The procedure for testing the vehicle dynamics engine was simply selecting each car in turn and
driving around the simulation environment over even and uneven terrain while performing turns, brakes,
accelerations, free rolls etc. While driving around the environment, at the same time the vehicle behaviour
was being monitored and reactions of the vehicle like weight transfer, performance, and speed of the vehicle
where closely watched. The procedure was repeated on both the high specification Desktop computer and
the low specification Laptop computer.
56
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
57
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
58
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
59
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
60
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
61
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
62
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
63
Vehicle Dynamics Engine (VDE) – Vehicle Physics Simulation Dienye S. Boham
_______________________________________________________________________________________
The current vehicle physics is under the assumption that the vehicle stays firmly on the ground at all
times but this is not the case in real life. Jumping physics is an essential part of all vehicle physics engines
and allow the vehicle to actually leave the ground when going over a curve or speeding off a cliff, the
vehicle dynamics engine currently doesn’t support this so it could be implemented in the future.
64