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.
 
Tormento, I think that's a shader problem rather than a bug. Ambient and diffuse light are read now and weren't before (Ruud fixed it a few version back AFAIK), light calculation has changed anyway so you might need to change the ambient and diffuse in the car shader, especially for non-cg shaders :).

Hmmm, any idea how to do it? i did that ford, and the full dash is only with gray scale, not mapped. How can i fix the shader without any bright aspect; like opaque materials shader (no bright)? (for non-cg user, but looking for cg users fit good too.)


thanks in advance.
 
  • Tiberius

Hmmm, any idea how to do it? i did that ford, and the full dash is only with gray scale, not mapped. How can i fix the shader without any bright aspect; like opaque materials shader (no bright)? (for non-cg user, but looking for cg users fit good too.)


thanks in advance.

Hi. Yep, it's probably the ambient light in the shader, lighting in Racer seems to have changed again (it's all over the place at the moment :(). The only non-cg car I have at the moment is the X-type I just downloaded again, I can't get the same problem to appear on that one.

Try commenting out any ambient, diffuse or emission on that shader, if that doesn't work it might be the shader? Basic interior shader is simple, you really don't need more than 1 layer unless you want to do special effects like reflection. So for all the basic stuff, try a shader like this:

Code:
shader_xxx
{
layer0
{
map=texture.tga
specular=0.1 0.1 0.1
shininess=12
}
}
That's all you should need, I add a bit of specular and shininess to give the material some shine when the sun hits it but you can leave those two lines out. The ambient and diffuse light lines (ambient=1.0 1.0 1.0 and diffuse=1.0 1.0 1.0) could be added but on the X-Type it seems fine in Racer 088 with them left out, so I'd leave them out for now (the lighting is probably going to change again anyway).

If you can't get it to work, if it's the same version of the car as on Traccion Trasera, I'll download it again and see if I can sort it for you.
 
Yeah, Ruud set the ambient equal to diffuse if there is no ambient defined in the material. Ambient is supposed to represent the effect light from the light source after it is bounced around by the atmosphere and other objects. It is always less than diffuse since diffuse represents the light directly from the light source.
Light sources can vary in ambient and diffuse levels due to time of day and the environment, a material on the other hand doesn't.
A photo of a white car on a clear sunny day has a lot of contrast since there is a lot of light coming directly from the source and being reflected back by the surfaces facing it (high diffuse) while only a little of the sources light is bounced around by the atmosphere and lighting up the dark side of the object.
This same car on a foggy day would have a lesser amount of direct light on the light side due to the fog absorbing it (or less diffuse), but would have a much higher than normal ambient level for the same reason.
The only instance I can think of when diffuse and ambient light are close to equal would be on a very foggy day with no overcast, a charcoal ball however would STILL have a lower ambient level since it can only reflect minimal amounts of light from the scattering effect of atmosphere/objects and the diffuse would be less as well. A white chalk ball would show this better, the ambient goes up and the diffuse goes down. The result is a fairly washed out object.

The result of this setting makes undefined objects glow due to not having an ambient level set on the material. Set it around 0.3-0.5 for most glossy materials and 0.1-0.3 for materials such as tires and dashes.

Alex Forbin
 
Hi. Yep, it's probably the ambient light in the shader, lighting in Racer seems to have changed again (it's all over the place at the moment :(). The only non-cg car I have at the moment is the X-type I just downloaded again, I can't get the same problem to appear on that one.

Try commenting out any ambient, diffuse or emission on that shader, if that doesn't work it might be the shader? Basic interior shader is simple, you really don't need more than 1 layer unless you want to do special effects like reflection. So for all the basic stuff, try a shader like this:

Code:
shader_xxx
{
layer0
{
map=texture.tga
specular=0.1 0.1 0.1
shininess=12
}
}
That's all you should need, I add a bit of specular and shininess to give the material some shine when the sun hits it but you can leave those two lines out. The ambient and diffuse light lines (ambient=1.0 1.0 1.0 and diffuse=1.0 1.0 1.0) could be added but on the X-Type it seems fine in Racer 088 with them left out, so I'd leave them out for now (the lighting is probably going to change again anyway).

If you can't get it to work, if it's the same version of the car as on Traccion Trasera, I'll download it again and see if I can sort it for you.


Thanks Bruce!! i will try your mod and leave here some feedback. Tormento will release in his site and you will can try it soon. :p:p
 
Hmmm, ok, so I wasn't sure where to put this so I apologise for digging up an old thread but this seems to be the most logical place to put this.
I noticed Ruud is lurking on here and I know Mitch is around a bit so thought I'd post an idea I had.

I remember someone (Davidiau?) mentioning/suggesting an alteration to the air density code/calculation method.
He said that we should be able to set the air density per-track, and I agree with this, but it raises another question in my mind.
Does altitude affect air density?
Would it be possible to have air density set at y=whatever in the special.ini and then a simple function (whether in the racer code or a polynomial in the special.ini) to modify the air density the higher you go?
I plan to do a nice alpine/hillclimb track in the near future with nice scenery and it would be ace to have the cars behave the way they should at higher altitude.

For example, the track I'm currently working on is using actual altitudes for the road ~60m above sea level. It would be nice to have a simple calculation within racer that adjusts air density depending on the y=XXX car position.

Just a thought.
Racer looks great and all...but IMHO it's time to tune up some of the physics.
 
  • davidiau

I remember someone (Davidiau?) mentioning/suggesting an alteration to the air density code/calculation method.
He said that we should be able to set the air density per-track, and I agree with this, but it raises another question in my mind.
Guilty as charged.

Does altitude affect air density?
Yes it does, well altitude is one of the main factors, ambient temp being the other.

Would it be possible to have air density set at y=whatever in the special.ini and then a simple function (whether in the racer code or a polynomial in the special.ini) to modify the air density the higher you go?
This is what I was suggesting originally, that a car's current air density should be affected by its altitude, ambient temp and also time of day, which affects ambient temp.
 
  • davidiau

Sorry, should have clarified...I meant in racer.
In Racer, no, air density is a constant set in racer.ini. Hence me suggesting it (& gravity) be moved to per track (special.ini or other). Per track Gravity and air pressure opens up a range of options, I was interested to change both for Carnage, alien planet & all it needs something a little less earth-like.
 
Remembers me of Shift (I know, this kind of camerasystem might be used in several other games) instantly: http://racer.nl/blog.htm

But dear god, err I mean Ruud, please make the Screen Shaking dynamically based on the cars speed or something like that. It just looks horrible in Shift when the car comes crawling at 20 km/h and the screen shakes like theres an earthquake.

Also did you get my E-Mail where I asked about the possibility of a good limiter audio implementation? (Maybe you can ask him Mitch? You seem to be in contact with Ruud a little bit more than the rest of us - or maybe I am only speaking of me ;) ).
 

Latest News

Online or Offline racing?

  • 100% online racing

    Votes: 103 7.8%
  • 75% online 25% offline

    Votes: 134 10.2%
  • 50% online 50% offline

    Votes: 189 14.4%
  • 25% online 75% offline

    Votes: 369 28.1%
  • 100% offline racing

    Votes: 513 39.1%
  • Something else, explain in comment

    Votes: 5 0.4%
Back
Top