Vehicle Simulation Readme
Gregor Veble, March 22nd 2001
gregor.veble@uni-mb.si
Thank you for your interest in my vehicle simulation project. While this is very much a work in progress, or even a work in the beginning, I think enough features are already present that the potential will be obvious at this stage.
Disclaimer
The author cannot be held responsible for any damage that the program or its parts may inflict to the system it runs on. Installing and running it is done at the sole responsibility of the user.
It's obvious nothing like this should ever happen during normal usage, but it's better to cover one's back, isn't it?
Requirements
Unknown at this point, but it runs on my 450 MHz processor and a GeForce 2 MX card nicely. The complexity of the scenery and the car parameters may change the requirements drastically, though. DirectX 8.0 or higher is needed for the sound and inputs, while an OpenGL 3D accelerator card is required for the graphics.
Features
This is the good stuff!
- Part based physics model: Each part of the vehicle is a separate object in a tree like structure that, according to its type, interacts with the parent and other objects. Upon initialization, the object properties are read from simple text files that define the object hierarchy and their properties;
- Open architecture: All the files that are read are either text files or the usual bitmap files (currently only BMP type is supported), allowing anyone to edit them or create new vehicles and worlds from scratch;
- Support for proper multi link suspensions: The suspension movement is not done via a prescribed path, but is calculated on the spot. All the forces on each of the five links and the spring/damper link are calculated, and the movement of the wheel assembly is calculated with respect to them, taking the constraints of constant link lengths into account. This means that instant centers, scrub radius, kingpin, caster etc. are not given as parameters, but are automatically taken care of by the suspension physics. Steering is not done by simply rotating the wheel; instead, it is the movement of the tie rod as demanded by the steering input that in turn produces the change in orientation of the wheel.
- Force Feedback: The force feedback is obtained from the multilink suspension by actually reading the force on the tie rod and taking its component along the movement of the steering rack.
- Open and viscous differentials are supported
- OpenGL is used for the 3D engine, DirectX 8 is used for input and sound
I'm sure I've forgotten some features, I'll add more when I think of them!
Setup
Currently, the program is provided as a zipped file that can be decompressed into a directory of choice. No real installation is necessary.
The program is run by starting the SimEngine.exe executable file in the main directory.
Unless you are using a simple joystick, you will probably want to change the axis assignements. These settings are found in the Input.ini file in the main directory. Different controls (prefix CTR_ ) can be assigned to different axes or buttons of your joystick. Settings for my Logitech Formula Force GP wheel in split axis mode are provided as the Input.iniff file, and this file needs to be renamed to Input.ini to work. Current controls are
- CTR_STEERING
- CTR_ACCELERATOR
- CTR_BRAKE
- CTR_CLUTCH
- CTR_SHIFTUP
- CTR_SHIFTDOWN
and these can be assigned to the following
- X_AXIS
- Y_AXIS
- Z_AXIS
- RX_AXIS
- RY_AXIS
- RZ_AXIS
- BUTTON_0
- BUTTON_1
- BUTTON_2
- BUTTON_3
- BUTTON_4
- BUTTON_5
For example,
CTR_STEERING X_AXIS;
Additionally, each axis can be given an _UP or _DOWN suffix (e.g. Y_AXIS_UP ) in order to, for example, support inputs with combined axes (e.g. accelerator and brake on the same axis). To help you with axis assignements, run the Joystick.exe file that is in the main directory.
Additional commands are the following:
- FLIP [command]; (e.g. FLIP Z_AXIS; ) - this reverses the action of the input
- FF ENABLE - enables Force Feedback for the devices that support it; do not use if your device doesn't support it.
- MAX_FORCE [number]; (e.g. MAX_FORCE 500; ) - tells the program what force on the actual steering assembly corresponds to the maximum output of the force feedback device. The lower the value, the stronger the feedback.
- FF_DAMPING [number]; (e.g. FF_DAMPING 10; ) - the damping of the forces as transmitted to the force feedback device. The number gives the inverse of the relaxation time in seconds (10 represents 1/10s as te typical time for the forces to settle).
Credits
- NeHe's Tutorials; no better place to start if you want to learn OpenGL programming. A large part of the Windows initialization code is from there.
- Mauritz Lindqvist, whose Realistic environment sounds for GPL the tire skid sound is taken from.
- Stevie "Fingers" Marshall, whose Ferrari V10 sounds for GP3 are used for the engine sound.
- and last but not least, Ruud van Gaal, whose Racer was a source of inspiration and gave many a nice discussion at the rec.autos.simulators group, and also for providing idea to include the DirectX Joystick program to help with axis assignment.