From old content to new content
|Keeping it running on ancient hardware.
Racer v0.5.0 was really the last 'stable' version before v0.9. New versions often gave little problems when trying to keep up the content. v0.9 of Racer will be a version that will be available for quite some time, to provide a non-moving target for content developers.
A lot has changed since v0.5, and an attempt here is made to list all the things that you need to watch out for when trying to use older content. Old content will normally NOT work with v0.9 right out of the box. This is due to required graphics shading mostly, to make shadowmapping and such to work.
First, make yourself familiar with the development page to help you combat any problems while developing. A main thing before distributing your content is make sure QLOG.txt is empty of warnings or errors.
The following things have changed for cars:
- You need 'version=090' in car.ini for it to load. Yes, no old content will even load just like that in v0.9; they need patching.
- Moving the CG (center of gravity) has been fixed to work in v0.9. You may experience weight shifting problems due to that. There is a racer.ini setting (dbg_car.move_cg) that deals with this; setting it to 0 will bring back the old, but buggy behavior. You should keep it at 1.
- All points are defined with respect to a nullpoint. One of the latest things that was changed to use the nullpoint as a basis were the wings. It used to be defined relatively to the CG, so now you have to move the wings with the inverse (negative) of the CG location. Use the console command 'show carpoints' to see where your wings currently are, to make sure they're placed ok.
- You need to add GPU/Cg shaders to all materials (in car.shd) for things to work
- A subtle thing changed in the .ini reader code. The next thing didn't work before v0.8.6:
In v0.9, it now reads sectionname.x correctly, whereas before it would miss it (the 'x' being a child parameter of the comment line!). This might crop up in some badly defined car.ini files.
- Try LSD differentials (type=3) instead of viscous diffs (type=1). They should be more flexible.
- MF5.2 (Pacejka's Magic Formula) support is in. If you have the numbers, they are better at combined slip than Pacejka 96 (or was it '89). TIR files (standard file format used in multiple professional packages) are also supported for MF5.2 tires only.
- Non-linear dampers using .crv files. Much better than the algorithmic ones. Real shocks are quite non-linear but now supported.
- idle_method=1; this new idling method will allow the throttle pedal to be fully released until you get near idle rpm. More realistic, but for some cars this means an increased braking torque when letting go off the throttle, which would need tuning (probably engine_braking).
- Suspension bumpstops/reboundstops. Suspension now supports reboundstops next to bumpstops. Bumpstops are useful, but reboundstops are needed to prevent the wheel from falling too far. There was a hardcoded limit before (maxlen) but that gave physical simulation problems (unstable forces). Reboundstops have a quadratic spring force and damping.
- tire_damping (in car.ini, wheel<n>.tire_damping). This is used to stabilize tire forces. A good start is 1% of your tire_rate. That is a bit much for just the rubber, but it implicitly also dampens the surface interactions, so perhaps it's not that unrealistic.
Optional things that are new and would be good to try for cars:
- Add a 3D driver model and separate helmet (the helmet responds to accelerations by moving)
- Add fully animated steering (to be documented)
- Add flares
- Add reverse lights
- Add brake discs
- Add exhaust fire (particles)
- Add 'no Cg' support by supplying a car_nocg.shd file which works with racer_nocg.exe. See the NoCG page.
A quick guideline to convert older cars to use the new (and mostly simpler) Cg system is described here. These days .shd files are often split into vf_* entries, describing actual Cg shaders, and the materials (shader_*) describing the textures and using one of the 'vf_*' references for the basic type of material. A good start point is just the standard shaders:
Note that the fragment shader uses 'dyn' (dynamic) to make sure that vertices get transformed with the model's rotation matrix (car 3D models move around, whereas most track objects always stay at a fixed placed and thus need to transformation).
An example conversion is Stecki's Mercedes-Benz CLK DTM, which was from 2003 something, now for Racer v0.9 at RacerDownloads. It does lack finishing touches like projected headlights, flares, bumpmaps etc.
Tracks also require work.
- In track.ini, you need 'version=090' for the track to even load.
- In special.ini, the sun.intensity has been normalized. A normal value for v0.9 is now 1.0 (this is already the case since v0.8.10). Old values were around 2500.
- For the non-Cg version, it's probably needed to copy track.shd to track_nocg.shd. If the track was already Cg-shaded, you need to create a (simpler) track_nocg.shd file so that textures will be loaded correctly. A simplest version would just give the right textures for the material names. The non-Cg version is there more to have people get a taste of Racer, but not as a path to follow for the future. More info on the non-Cg version here.
- Add Cg shaders.
November 13, 2012