Racer

Ruud

RACER Developer
Welcome to RaceDepartment. :)
As RSC has been offline for quite a while, RaceDepartment has been gracious enough to host a temporary Racer forum.

To kick it off, here is Racer v0.8.0. Warning: all things are set to target relatively high-end graphics card. nVidia 7950+ somewhat. Onboard cards will not do.

The download is at http://www.racer.nl/download/racer080.zip (42Mb).
If you have an ATI card, Cg shaders may not work due to a bug in Cg 2.1. Try the patched racer.exe from http://www.racer.nl/download/racer081a_patch.zip (1Mb).

Hope you can enjoy it!
Ruud

The patch (really a preview of v0.8.1, so interesting for nVidia users as well) changes these, although no data files are included you can check out some things already:
- Added envmap.live_track.sides_per_frame to set update count of live envmap
- Car.ini camera<n>.view variables were read, but never used. Removed loading them, they are (and were) obsolete.
- LOD (level of detail) for objects is now adjusted to take into account the camera FOV (normal FOV=50).
- Split fullscreen_shaders directory into LDR and HDR variants (data/renderer/fullscreen_shaders_hdr and _ldr).
- Added car.ini engine.idle_method to avoid throttle being slightly open all the time. See http://www.racer.nl/tutorial/engine.htm
- Now enforcing engine.stall_rpm to be at least 100 rpm less than idle_rpm to enable the new idle_method 1.
- Added engine.braking_torque_curve to specify a curve for the engine braking instead of the linear parameters.
(the Lambo now uses such a curve for demonstration)
- Modified smoke particles to have no velocity. Also increased the brightness somewhat.
- Bloom map was 16-bit, now 8-bit.
- Added car.ini audio.skid audioset based on skid amount (around 0..2). This allows subtle scrub sounds before
going to screeching & screaming.
- Added 'gearwhine_off' audioset for gearwhine under deceleration circumstances.
- Fuel consumption was based on engine output torque, added internal friction (engine braking torque) in fuel use calculations.
- Renamed racer.ini variable 'collision.report_car_trk' to 'collision.report_car_track_collision'
- Added car.ini's reboundstop_len and reboundstop_k for much the same as a bumpstop, only to prevent wheels falling through susp<n>.maxlen
see http://www.racer.nl/tutorial/suspensions.htm#reboundstops
- susp<n>.restlen no longer needs to be smaller than maxlen. It ignored precompression that way.
- Added fuel.rof to overrule the fuel grams/liter parameter. Normally it's around 700 for regular petrol.
- Added views.ini 'invert' field (0/1) which inverts the variable (like 'factor' which multiplies it)

The list of changes since v0.7.3:

- Bugfix: OpenGL3.0 drivers would crash Racer due to a mistake in getting some extension function pointers.
- Bugfix: track's with special.ini gfx.time below 1000 (10am) were not interpreted correctly.
- Bugfix: turning on projected lights no longer kills some 3D dials
- Heavily modified Cg shaders. Also added a lot more. See http://racer.nl/tutorial/gpushader.htm
- Projected lights used alphafunc, which made lights on semi-transparent object pixely.
- Added car.ini's model_reverse_l/r models for true rear lights. This should do away with the views.ini hack to add reverse lights.
- Modified live track envmapping to not do all sides every frame. Lots faster.
- Removed dbg_stats tree in racer.ini (it was obsolete).
- Added 'clouds' script command for Cg-shaded skies, added 'clouds' uniform float parameter for Cg shaders (0..1).
- Also added 'clouds' in a track's special.ini (env.clouds)
- Added resolution.vsync to sync to display frequency or not (0=max fps, 1=sync, >1=set interval)
- Added moving helmet (+pilot body) model option in car.ini. See http://www.racer.nl/tutorial/helmet.htm
- Raised the number of possible flares for each car to 20 (was 10)
- Simple (single-polygon) shadows for car views without a body model are now turned off.
- Removed 'fx.sky_enable' option. The sky is always on.
- Removed 'gfx.reflections' option. Was/is obsolete.
- Added graphics.show_names to be able to indicate driver names floating above cars.
- Added mirrors.texture.fbo setting to render into an offscreen framebuffer object (faster)
- Added mirrors.texture.fbo_samples setting to enable anti-aliasing of the mirror.
- Added HDR rendering basics (renderer.hdr.enable=1). Uses data/renderer/shaders_hdr directory if enabled, shaders_ldr otherwise.
- Added Bloom rendering for HDR mode (renderer.bloom.enable=1).
- Split data/renderer/shaders directory in two: shaders_ldr and shaders_hdr. HDR is the way to go. LDR will be deprecated.
- Added ini.auto_lights setting (0/1) to determine with time-of-day controls a car's light automatically
- Added shader 'reflect' material property for reflective Cg shaders (in the same line as diffuse, ambient, specular etc).
Use this in conjunction with [dyn_]shader_reflective_v/f.cg for example.
- Added car.shd/track.shd 'motion_blur' variable to turn off motion blur velocity map generation for certain shaders (wheels mostly).
- Added auto-exposure settings for HDR rendering (racer.ini:renderer.auto_exposure.*)
- Added fx.sun.auto_time_of_day to track real current (PC) time for the time of day in Racer
- Added fx.sun.fast_time_factor to set time speed. Normally 0 for no time change, 1 for realtime, >1=faster than realtime
- Added fueltank in cars. See data/cars/default/car.ini (fuel.* settings). Currently in alpha. No fuel means no throttle.
- Added fuel view variables for views.ini files (for cars). See http://www.racer.nl/tutorial/fuel.htm for details.
- Added formatting option for views.ini; 'float_1' displays a value with 1 decimal (for example: 123.4).
- Added 'sample_hold' option for view elements to get slow-updating dials (mostly useful for digital dashboards)
- Added fx.sun.flare option to remove sun flare. It doesn't match with the Cg sun position.
 
Indeed, the HDR and LDR paths now take different directories, and I've stripped some of the 'hdr_' prefixes. Get a more thorough download at http://www.racer.nl/download/racer081a.zip (13Mb) which contains all shaders. It has all except:
- data/audio
- data/cars/lambomurcielago
- data/tracks/carlswood_nt

So you'll need to copy those 3 from the v0.8.0 download.
Let me know if that works. I should really post a full v0.8.1 I guess. :)

Ruud, have you ever thought about making an update manager or something? So we wouldn't have to download a full package each time a new beta's out?

As for the new versions, my GF7800 (AGP, 256MB, SM2.0) probably doesn't support some features you implemented in the latest betas... for example, I get a black square on the lower left corner of the screen, instead of HDR, I believe.

Have you ever tried Half Life 2 Lost Coast? It has a very nice commentary mode where the developers explain, how they did some of the effects and features. It also explains pretty well, how they did HDR... and the latest HL2 Episode 2 runs fine with all the gfx options enabled + HDR and AA.
 
  • Tiberius

Bendy said:
I can't help but feel the motion blur has been a bit over done, makes it look almost cartoonish in my opinion (is it something to do with if it happens in 1 view it happens in all views type-of-thing that results in motion blur on the car when the camera is static in relation to the car(if that makes sense)?)

Could be that your card isn't rendering it correctly, my 7800 had some weird bugs with the rear of the car being blurred and textures popping through...it looks a lot better on my new one though. To be honest I'm not in love with the blur, liked the old motion blur better...although it looks better from bonnet view, the blur on the road texture and track objects looks pretty good.

As for the new versions, my GF7800 (AGP, 256MB, SM2.0) probably doesn't support some features you implemented in the latest betas... for example, I get a black square on the lower left corner of the screen, instead of HDR, I believe.

Lose the multisampling for the motion blur, will take the black box away...you'll still get a Qlog error but it should work...had the same on my 7800 :)
 
  • Tiberius

Hmm. I like the HDR but it needs some tweaking - looks a bit flat ATM compared to how it did, like everything's being nudged towards the midtones.

What I was getting in 0.74:



And now:





Don't get me wrong, I like the direction it's going in and the exposure changing when you look torwards the sun is ace...it just lacks the contrast that it did and like there's a haze over it (the bloom?), like a dusty camera lens or something.

Also, if I lose the motion blur but keep HDR and bloom on, I'm getting the shot below, looks like what I was getting on my 7800 which couldn't do the HDR at all...I'm guessing turning the blur off is killing the HDR too?



Cheers, Bruce.
 
Indeed, the HDR and LDR paths now take different directories, and I've stripped some of the 'hdr_' prefixes. Get a more thorough download at http://www.racer.nl/download/racer081a.zip (13Mb) which contains all shaders. It has all except:
- data/audio
- data/cars/lambomurcielago
- data/tracks/carlswood_nt

So you'll need to copy those 3 from the v0.8.0 download.
Let me know if that works. I should really post a full v0.8.1 I guess. :)
LOL,
THX, i know i renamed the folder and files...so i got 0.8.0a working...
A other thing....i changed this
Code:
'virtualShutterFrequency'. That is currently set to 24, film speed. If you up that to, say, 60
from 24.0 to 60.0....is it right that my fps is now 50! instead of 25....?!
with the same grafics settings...

LG Alex
 
Hi Ruud,
....you have one forgotten....

Code:
Thu Apr 09 22:11:49 (WARN): [racer/2080] WorldMotionBlur: requested full-screen dev filter (data/renderer/fullscreen_shaders_hdr/hdr_bloom_motionblur_vign2_f.cg) but not found

but it's not a big deal...copy file and rename....works!
Oh...my fps is hitting the sky....~80fps atm...at fullscreen 1024x768 @ full grafics power!

THX Alex
 
Excellent idea on the first one; I've added an 'invert' option (set it to 1 in your case) to use 1/value. See http://www.racer.nl/tutorial/newcar.htm#views for the exact explanation (ordering of operations!). Actually, it's in the v0.8.0 patch already (see the first post).

The 2nd odometer idea is not high on my list, sorry.


Ruud, i still can't set my fuel consumption in km/l.

L/100 gives a factor x. to convert this value to km/l, i need do 1/x, after multiply x100, correct?

Example. 20l/100. 1/20 = 0,05 x 100 = 5km/l

I'm using this code:

var=fuel_inst_consumption
invert=1
factor=100

Don't work! :dont-know:

The value seems to be "digital"... is showing 0 in idle up to 100% GAS, but show 9999 (the number i've setted to digits) in desacc. Like a cutoff meter.

If i use WITHOUT inverse/factor_inv, works correctly (in l/100)

Is this correct and i'm doing wrong or need to be adjusted ?



two more ideas (just my opinion):

- auto-saving fuel. In fuel code in ini, we could work with "tank capacity" and "actual fuel" variables. The way you burns the fuel, the number gets down and save the data always you exit from a race. The car could be refueled when you write a command in console, like "refuel x" (x = liters). BUT.. i don't know if this "everytime saving" could let the game slower.

- average fuel x whole trip km... so we could get a more realistic data.


thx, i'm lovin this updates :fingers-crossed:
 
Ruud,
The smoke looks SO much better! :)
Could we get a code sample of the new tire sounds?
Engine braking curve works very nicely.
Also appreciate the new suspension allowance for pre-compression
and rebound limits.
Collision sounds? Are they active? I tried a sample but got no results.

Thanks,
Alex Forbin
 
  • bendy

Played round with the different motion blur options in racer.ini, I think I might just leave it at method 2 and maybe method 1 with 3 passes if I'm bored. I get my good old high frame rates on method 2 (150+ mostly) and method 1 with 3 passes I can get some pretty motion blur and ~60fps (unless some smoke appears lol). Also 0.8.1 seems to have resolved the wheel issue as well!

PS: Tiberius, I've got an MSI factory OC'ed 9800gt with the latest drivers on Vista 32bit, but the problem is fixed now so it doesn't matter any more :)
PPS: I really do like the swaying trees in 0.8 :D
 
Ruud, i still can't set my fuel consumption in km/l. L/100 gives a factor x. to convert this value to km/l, i need do 1/x, after multiply x100, correct?

Not entirely; from racer.nl/newcar.htm where it explains 'invert':

value=rawInputValue
clamp(value,min_value,max_value)
value=value*factor
if(invert)value=1/value

The factor comes in BEFORE the invert. So you'd need factor=0.01, not factor=100. I've tried that and it seems ok, although I haven't checked the numbers exactly.
 
Dream Factory,
Where are you getting the documentation on the new sounds? All I can
find is a reference to new skid sounds under sounds, but no examples.

Hm, that's not really complete indeed; I have to make it compatible with the older lat+lon samples if the new method isn't defined. But the new one is much better, since it allows a gradual change from scrub to screech and scream. In principle the docs are at:
http://www.racer.nl/reference/carphys.htm#miscsound

Here's an example which I am using:

skid
{
; Old style
;sample=skid.wav
;sample2=skid_road.wav
; New style (multiple samples mixed)
; Master volume for this set
volume=1
; Acceleration; outside of the car
smp0
{
volume=1.0
; All engine samples depend on engine RPM
sample=tarmac_scrub.wav
min=0.1
max=0.6
attack=0.09
decay=1.0
}
smp1
{
volume=1.0
; All engine samples depend on engine RPM
sample=tarmac_screech.wav
min=0.3
max=20
attack=0.2
decay=0
}
}

The min/max is a bit car-dependent, since it depends on the skid amount (which seems to vary a bit per car) and skid sound (the more 'scream' in the samples, the higher min/max you'd want to avoid screaming sounds kicking in too soon).
 
Ruud,
The smoke looks SO much better! :)
Could we get a code sample of the new tire sounds?
Engine braking curve works very nicely.
Also appreciate the new suspension allowance for pre-compression
and rebound limits.
Collision sounds? Are they active? I tried a sample but got no results.

Finally, that smoke! ;)
The suspension thing may be quite important, esp. for softer cars. Not sure of the full impact yet, but for the soft cars here it seems like it works a treat.
Collision sounds; only heavy_imp*.wav are active. 4 samples, randomly played when a car-track collision takes place. There will be multiple sets for velocity-dependent impacts, plus separate sets for car-car and car-track collisions. (some code is in there for car-movables but that's a whole different ballgame)
 
Played round with the different motion blur options in racer.ini, I think I might just leave it at method 2 and maybe method 1 with 3 passes if I'm bored. I get my good old high frame rates on method 2 (150+ mostly) and method 1 with 3 passes I can get some pretty motion blur and ~60fps (unless some smoke appears lol). Also 0.8.1 seems to have resolved the wheel issue as well!

I like the blur in method 4 better; you'll need that method anyway to get all the postprocess Cg shaders (HDR/bloom etc).

The HDR does tonemapping, and since most stuff is still living in 0..1 LDR space, things get less contrasty. What the HDR shaders do is push a wider range of luminance into the smaller LDR range (tonemapping). Currently I use:

ldrColor=1.0-exp(-exposure*hdrColor); (see data/renderer/common/hdr.cg)

This pushes white to gray. Perhaps things need to be more contrasty, but perhaps when live envmaps get 16-bit with light sun reflections, the tonemapping may be imporant.

If you want to test the 1:1 mapping, in hdr.cg just uncomment the 'return color;' line and comment the '1-exp' one.
 
  • Tiberius

- LOD (level of detail) for objects is now adjusted to take into account the camera FOV (normal FOV=50).
Great :)

Now the LOD models switch in and out so smoothly that you can't even notice them, was painful watching the Capri on track cams before.

Sounds like some interesting stuff in 0.81, will try a few things over the weekend :)

Ruud, about the HDR, it does nudge things torwards grey a bit, it's just taking a bit of getting used to after the contrast the cg shaders had before. I like the extra detail in the lighting, it's just making really dark details (like tyre walls/treads) look a bit greyed out at the moment, same with bright highlights on the body shaders etc...maybe I should start tweaking textures. Looks like if you press the preview button on an old SLR, I guess that's the effect you're going for, that part looks ace :)

Also, about the motion blur, would there be any way of putting a limit on the velocity per frame (not possible I guess?) - maybe that would help solve the wheel bug? The blur on the wheels looks pretty good while they're moving slow, it's when they start spinning faster and the blur gets thrown outwards, if they could work with the blur it'd be great, would look far better than just the blur models we have now.
 
Ruud, about the HDR, it does nudge things torwards grey a bit, it's just taking a bit of getting used to after the contrast the cg shaders had before.

Also, about the motion blur, would there be any way of putting a limit on the velocity per frame (not possible I guess?) - maybe that would help solve the wheel bug? The blur on the wheels looks pretty good while they're moving slow, it's when they start spinning faster and the blur gets thrown outwards, if they could work with the blur it'd be great, would look far better than just the blur models we have now.

For the HDR greyish look, try playing with renderer.auto_exposure.offset and gradient (possible min/max as well). More exposure (offset higher or gradient higher) might give more contrast back. Don't start modifying textures just yet, normally you should not have to tweak those. Perhaps increase specular color in shaders to >1 (like specular=1 1 1).
For some things, I like the less contrasty look; it takes getting used to but is perhaps a bit more realistic, not as cartoony.

For motion blur, a max cap is certainly possible; you may want to put a max in one of the motion blur Cg shaders, like in motion_blur.cg: modify 'return vel;' into 'return max(vel,2.0f);' for example.
 
Hm, that's not really complete indeed; I have to make it compatible with the older lat+lon samples if the new method isn't defined. But the new one is much better, since it allows a gradual change from scrub to screech and scream. In principle the docs are at:
http://www.racer.nl/reference/carphys.htm#miscsound

Here's an example which I am using:

skid
{
; Old style
;sample=skid.wav
;sample2=skid_road.wav
; New style (multiple samples mixed)
; Master volume for this set
volume=1
; Acceleration; outside of the car
smp0
{
volume=1.0
; All engine samples depend on engine RPM
sample=tarmac_scrub.wav
min=0.1
max=0.6
attack=0.09
decay=1.0
}
smp1
{
volume=1.0
; All engine samples depend on engine RPM
sample=tarmac_screech.wav
min=0.3
max=20
attack=0.2
decay=0
}
}

The min/max is a bit car-dependent, since it depends on the skid amount (which seems to vary a bit per car) and skid sound (the more 'scream' in the samples, the higher min/max you'd want to avoid screaming sounds kicking in too soon).


Got it. It really adds to the perceived feel of the car too. I'm working on a
set of sounds and setting that someone can just drop in to a current car
and have good sound.

Thanks
Alex Forbin
 
Finally, that smoke! ;)
The suspension thing may be quite important, esp. for softer cars. Not sure of the full impact yet, but for the soft cars here it seems like it works a treat.
Collision sounds; only heavy_imp*.wav are active. 4 samples, randomly played when a car-track collision takes place. There will be multiple sets for velocity-dependent impacts, plus separate sets for car-car and car-track collisions. (some code is in there for car-movables but that's a whole different ballgame)

Softer suspensions have always been a problem for me since they would
"droop" so far down when not under a load, it really made a difference.

Thanks
Alex Forbin
 
I like the blur in method 4 better; you'll need that method anyway to get all the postprocess Cg shaders (HDR/bloom etc).

The HDR does tonemapping, and since most stuff is still living in 0..1 LDR space, things get less contrasty. What the HDR shaders do is push a wider range of luminance into the smaller LDR range (tonemapping). Currently I use:

ldrColor=1.0-exp(-exposure*hdrColor); (see data/renderer/common/hdr.cg)

This pushes white to gray. Perhaps things need to be more contrasty, but perhaps when live envmaps get 16-bit with light sun reflections, the tonemapping may be imporant.

If you want to test the 1:1 mapping, in hdr.cg just uncomment the 'return color;' line and comment the '1-exp' one.

I too seem to have better luck with method 2.

FBOs seem to work differently on my 9600GTKO than they do on your
system. I take a major framerate hit (from 350-400 to 45-55) with a lot
of tearing and since the old shaders don't pick up the MIE scattering
they look odd (high contrast compared to everthing else). I'm also not
able to get the motion blur to work in the latest version. (tried updating
the drivers already.)
I assume it is my card since there have not been a lot of similar comments
and I ordered the card within hours of its release (9800GTS weren't out).
My biggest concern is development, how will my cars look on other machines now?

Thanks
Alex Forbin
 

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top