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.
 
cil-2.jpg
cil2-1.jpg

cil3.jpg

cil1.jpg
 
A couple of interesting websites!
http://projects.ict.usc.edu/graphics/HDRShop/
v1 for non comercial work is free and can be used to make a new environment cube from a sperical sky image.

http://www.bencloward.com/
3ds Max shaders. carpaint shader, allows setting several attributes in 3ds Max.

Bruce, I have considered upgrading but not for awhile. That dome sky was due to the flags=0 in the geometry.ini file. Flags=73 makes the dome work properly and stay far, far away.

I made the sky.tga image all black and there was no difference in the sky on carlswood, so I guess we don't need good sky images any more! We can use the non-cg shader if we want a good sky background and then if we want a night view settings in special.ini need setting for that. I do like the way Ruud made the time settings work but don't like his sky cg's!
 
Interesting link, these 3DsMax shaders. But even if it seems that the provided codes are similar to Racer cg shaders, I don't know how we could "translate" it to make it work. :) If anyone have the clue for the carpaint, could be a great effect!
 
Aha! We look but we don't see! Try the following racer.ini settings hdr off, bloom off, and autoexposure off. Copy the sky.tga file and set darken it a whole lot then save it as sky_night.
Add to track shader, just before the line ; Shaders:
vf_sky_night
{
vertex_shader
{
file=sky_daynight_v.cg
}
fragment_shader
{
file=sky_daynight_f.cg
}
}
Add just after the line ; Shaders
shader_sky~vf_sky_night
{
sky=1
; fog=0
cull=none
layer0
{
map=sky.tga
depthwrite=0
}
layer1
{
map=sky_night.tga
depthwrite=0
}
}
Comment out the shader_sky~vf_sky secton and set intensity=10 in special.ini file

Viola! Ruud, after all the complaining I did you could have told me that you made sky_daynight cg's and hid them in the renderer folder! I played hide and seek when I was a young lad but wasn't very good at it! The carlswood skybox isn't very good and the sun rising/setting doesn't match the sky day/night transition, needs a little tweaking! Thanks Ruud!!!!!

Citronized, I think there are instructions some where on the link pages.
 

Bruce, I have considered upgrading but not for awhile. That dome sky was due to the flags=0 in the geometry.ini file. Flags=73 makes the dome work properly and stay far, far away.

I made the sky.tga image all black and there was no difference in the sky on carlswood, so I guess we don't need good sky images any more! We can use the non-cg shader if we want a good sky background and then if we want a night view settings in special.ini need setting for that. I do like the way Ruud made the time settings work but don't like his sky cg's!

Actually, for motion blur, we here now give every 'horizon'-type model flags=0. The movement of the sky object gave very problematic motion blur with earlier Cg shaders (since it's moving relative to the car). It might be better now that the motion blur shaders were enhanced to counter the 'echoing' effect near wheels, but still.
For example, if you make a mountain, relatively far away, we now model it as around 5000m away (where it actually is), so the Cg sky shader fog fading works ok. The mountain texture then is as it would be from close up: unfogged. You then use any Cg shader, which applies the fog to account for its distance. The track.shd shader must have sky=1 applied though, otherwise the object will clip at the far plane, which is often not more than 1000m.

The sky then also gets to be a dome of around 10km radius (as long as it fits all the horizon objects, it's ok).

The sky.tga should do something, at least; I'm using clouds as an overlay to the sky/fog colors calculations. The alpha channel is used to do the overlay, in conjunction with the 'clouds' amount (try 'clouds 1' in Racer, or clouds 0.5, try that in Carlswood).

So (see sky_f.cg):
- Cg shader gets a 3D vertex
- it traces a ray from viewer to vertex onto the end of the atmosphere; this calculates a sky color based on zenith color and angle towards the sun etc.
- it takes a texture sample of the applied texture (sky.tga) and modifies the transparency using the 'clouds' setting of the track.
- it mixes both colors to get the end result.

Note that sky_daynight_f.cg uses 2 textures; one for day & one for night. The night 'amount' is calculated in Racer and this will mix the day & night textures automatically so that at night, only the night texture is used. That way you can do clouds during the day and stars at night.

What the other shaders do with the calculated sky color is mix them with the texture, based on distance. So the more distance, the more the 'sky' color will be present, and the less the original texture. Try 'fog mie 0.1' for example and you'll see everything swamped in a mist. In that case, the original colors can hardly be seen.


Hope that clears things up a bit.
 
  • Vitaliy

Hello can anyone give me a link or mirror to a BMW M3? I seen them on some websites but when i go to download it, the link is dead....... Can anyone help? Thanks in advance.:wink2:
 
Hello can anyone give me a link or mirror to a BMW M3?
PM me with your e-mail addy and I'll send you the one by Mr Whippy.


Ruud,
I set the following in racer.ini, renderer section and used the code in post #121. motion blur disabled. My nVidia 7300 LE graphics card will do hdr but no bloom:
hdr off, bloom off, and autoexposure off or on, all other renderer section settings original values.
Set the clouds=0.5 in special.ini file, all it did was darken the day sky. Clouds=0.0 makes day sky black!

The sky.tga that came with carlswood doesn't have an alpha channel!

Track makers use a rectangular box or hemisphere for the skybox, depending on the texture image being rextangular or spherical and thier expertise. The sky texture is sometimes an actual photo of the track background. Some tracks are long and narrow which makes using flags=73 the ideal way to do the job!

Stars and clouds can be part of the two sky images and a moon could be created that rotates 180 deg. from the sun.

With the sky cg's the sky.tga texture doesn't do anything on carlswood, try making it all black!

Finding the sky_daynight cg's allowed the two textures to work fairly well on my surfaces and sounds track as well as the very large track I'm making. The problems are the fact that the transition from day/night, night/day don't match the sun crossing the horizon which it should. There is also an objectionable sun refelction that occurs, looks like a UFO. The sun also bleeds through the ground object! I would prefer the sun rising/setting directly from the east/west not at the angle it now takes, which would look a little more realistic!

I don't know how to write a cg and believe the problems above are in the sky_daynight cg's. Several days were spent working on this sky problem and it needs more work, IMHO! Thanks for your help, Ruud!
 
  • davidiau

I concur with Boomer, I tried to get the day/night working on Mugello, which in general I'm getting reasonable fps on even with a decent amount of bumpmapping happening. What I did was use the night sky texture from Mugello night mod as the second tex, and Mugello's original sky tex as the first, and set the sky_daynight shaders. During day time it looks fine, but it doesn't ever seem to get dark, if i set TOD in Raven to 2300 i get a VERY nice looking sunset type effect, when I'd more expect to see only stars. I AM from the sth hemisphere, and not used to twilight etc but...
Anyways, Racer's looking good, as always the potential for greatness is bigger and better than ever, limited only by us (and our wimpy systems LOL).

PS Boomer, Not only UFO's, if u look hard enough on Carlswood theres also a cloud that looks like Jesus ;)
 
The new betas work pretty nicely for me, so thanks for the updates, Ruud!

There are a few things that I'm confused about though:

1. I have a GeForce 7600GT. Which GFX functions should and which should not be working? I don't seem to be getting any of the bloom stuff so I guess my card doesn't support those then? The motion blur I had to disable because it was making things extremely slow. Here's a picture of how my Carlswood looks now.. The car is.. Well, okay but the track seems unnaturally bright and bluish?

Might be that the reason for this was already explained somewhere in the topic but somehow I must've missed it then.

2. For some reason Curved hasn't been willing to work for a while now... It gives an error box in Finnish. I've had to copy the curved.exe from some older beta for a while now, seems to do the job.

edit: LOL posted in the wrong topic... Thanks for the comment citronized!
 
So, this is a post copied from the 3ds Max topic.. Should've posted it here in the first place.. Don't really know what I was thinking. :D

The new betas work pretty nicely for me, so thanks for the updates, Ruud!

There are a few things that I'm confused about though:

1. I have a GeForce 7600GT. Which GFX functions should and which should not be working? I don't seem to be getting any of the bloom stuff so I guess my card doesn't support those then? The motion blur I had to disable because it was making things extremely slow. Here's a picture of how my Carlswood looks now.. The car is.. Well, okay but the track seems unnaturally bright and bluish?

Might be that the reason for this was already explained somewhere in the topic but somehow I must've missed it then.

2. For some reason Curved hasn't been willing to work for a while now... It gives an error box in Finnish. I've had to copy the curved.exe from some older beta for a while now, seems to do the job.
 
  • Tiberius

@ Bumper:

Looks like the FBO stuff isn't working...I was getting the same look on my GF 7800:



I get the same effect if I disable the motion blur but leave the HDR/bloom on my 9800...I don't think we can have HDR without the blur/multisampling at the moment. AFAIK you need a 7950 or above to manage the HDR, for now just turn off everything (motion blur, HDR, bloom, auto exposure) and you should be alright. Or you can try cutting the motion blur samples from 16 to 4 or below and see how it looks then...it should make things run a lot faster, I'm not sure if it'll render correctly then but worth trying.

Try running the VCredist exe on the downloads page on racer.nl, might get curved working again :)
 
Maybe some pointers for you:

[ame]http://www.youtube.com/watch?v=hOdjofFrkkU&fmt=18[/ame]

[ame]http://www.youtube.com/watch?v=4sihpaEHMgY&fmt=18[/ame]

Thought you would need to ask for permission, I think this dude is creating some awesome sounds (I use some sounds from TDU in some cars, it sounds breathtaking)

Hope that helps somewhat.
 

Latest News

What would be the ideal raceday for you to join our Club Races?

  • Monday

    Votes: 34 15.5%
  • Tuesday

    Votes: 27 12.3%
  • Wednesday

    Votes: 30 13.7%
  • Thursday

    Votes: 28 12.8%
  • Friday

    Votes: 77 35.2%
  • Saturday

    Votes: 124 56.6%
  • Sunday

    Votes: 87 39.7%
Back
Top