Racer v0.8.29 released!

Ruud

RACER Developer
For a happy New Year, v0.8.29 ;)

Get it at http://www.racer.nl/download/racer0.8.29.zip (75Mb)
** BEFORE using, set racer.ini's mastervolume to 255 to get a bit of sound

Changelist:
- Added surface 'forbidden' field (in special.ini); if set to 1 (default=0) it will reset your
car to the road if you set racer.ini's assist.time_allowed_offroad. See http://www.racer.nl/reference/tracks_surfaces.htm
- Car and track version checking is now updated to '090'. If your track/car doesn't match this
compatibility info, you'll get a warning in QLOG. All content must be updated!
- Autoclutch RPM now only really hunts for max torque in 1st gear. Other gears are the old way (more subtle).
- 'Ini' tool can now modify references ('ini wheel0.pacejka pacejka_front' for example).
- Clutch mechanism revised since some clutch-controlling subsystems (gearbox/anti-stall/controls)
would not mix correctly, giving hard jerks when shifting up/down.
- Added dbg_car.max_brake_reduction (=0.2) which determines the minimum brake torque reduction when wheels stop spinning.
- Added car.ini engine.launch_control to specify autoclutch_rpm=0 behavior in 1st gear.
- Added X-tree shaders for nicer X-tree shading, see http://www.racer.nl/tutorial/xtrees.htm
- Cg parameters Kd, Ka, Ke and Ks (diffuse/ambient/emission/specular) expanded to pass RGBA instead of just RGB.
Not used in the Cg shaders yet though; the use is a bit unclear still.
- Minimap painting was bad when car select screen was called first. Same for mirrors.
- Minimap paint could cause statistics paint to become transparent
- Added 'graph step 0 1 clutch' option to visualize clutch behavior.
- Wheel heat shader gives more light
- View elements get lit at night.
- panorama_f.cg had a syntax error.
- Just loading a controller profile would save it if controllers were missing.
- Newton.dll is back, since that got rid of NaN errors when colliding cars with the track. It's also Newton 2.29 now.
- Added 'timing.pause_every_step' to optionally step through each iteration
- Fixed a bunch of replay sound issues (engine/horn/indicatorLeft/indiRight/hazard). Replays are now definitely
incompatible with older replays; also may change before v0.9 comes out to fix further things (gearwhine?).
- The NoCG version was giving a lot of QLOG warnings.
 
Nice to see 0.9 getting closer. I'm not really up to date anymore, but I have one question: Are the diff's working now? The fact that we haven't been able to do donuts since 0.5.x is kind of bugging me, as it tells me that the diffs are not working properly. It's not important for driving, but it just looks so stupid compared to other sims. And as Racer is great for free roaming and assing around in cars, I would really like for my RS500 and the likes to be able to burn some rubber without looking like they have an open diff...

It used to work great, so I'm just wondering what happened. If nothing else, could we have a completely locked diff that doesn't open after half a donut? :)

That's my first wish for 2011. Happy new year!
 
Are the diff's working now?

It used to work great, so I'm just wondering what happened. If nothing else, could we have a completely locked diff that doesn't open after half a donut? :)

LSD diffs recently got a fix for braking behavior. Most tire models will struggle with donuts since Pajecka, for example, is really only targeted at low angles. An extract from a real .tir file:

Code:
[LONG_SLIP_RANGE]
KPUMIN                   =  -0.414743        $typarr(  23)       $Minimum valid wheel slip
KPUMAX                   =  0.40448          $typarr(  24)       $Maximum valid wheel slip
$---------------------------------------------------------------slip_angle_range
[SLIP_ANGLE_RANGE]
ALPMIN                   =  -0.31            $typarr(  25)       $Minimum valid slip angle
ALPMAX                   =  0.31             $typarr(  26)       $Maximum valid slip angle
$---------------------------------------------------------inclination_slip_range
[INCLINATION_ANGLE_RANGE]
CAMMIN                   =  -0.05            $typarr(  27)       $Minimum valid camber angle
CAMMAX                   =  0.05             $typarr(  28)       $Maximum valid camber angle
$-----------------------------------------------------------vertical_force_range
[VERTICAL_FORCE_RANGE]
FZMIN                    =  929.58           $typarr(  21)       $Minimum allowed wheel load
FZMAX                    =  7931.86          $typarr(  22)       $Maximum allowed wheel load

Slipangle is in radians, so you can see that it only really defines -17..+17 degrees of slipangle. That's where trouble and creativity come in. I'll be looking into other tire models next year to see if we could make a bit more sense at extreme situations. The main things to tweak (globally for now) are these in racer.ini:

; Maximum slip length for combined slip calculations (5=understeery, 15=snap oversteers)
max_slip_len=6.0
; Maximum tan(slipAngle); default is 0.75 (+/- 36 degrees), 20.0 (87 degrees) seems to work better
max_tan_sa=20.0

The max_slip_len affects combined slip (except when using MF5.2 tires); the max_tan_sa is quite high now. 'max_tan_sa' being high might mean that the Pacejka forces get unrealistically low at extreme slip angles, thus giving a very skiddy feeling. Try setting it to 0.36 for example (tan(20 deg)=0.36). Should keep tires from entering a really skiddy territory.
Tires are a complex area though, and difficult.
 
Hi Ruud,
THX nice release!
Only one thing makes me thinking....Tire smoke...

screenshot006.jpgscreenshot007.jpgscreenshot003.jpg

he moves to a unlogick direktion......
 
Happy New Year :)

Error

Fri Dec 31 17:34:57 (FATAL): [racer/2996] DGPUShaderManager:MakeObject(standard_xtree_f.cg): can't create CG fragment shader program
The compile returned an error.
data/renderer/shaders/standard_xtree_f.cg(111) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/standard_xtree_f.cg(112) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/standard_xtree_f.cg(85) : error C3004: function "float ddx(float);" not supported in this profile
Fri Dec 31 17:34:58 (FATAL): [racer/2996] Exception 0xC0000005, flags 0, Address 0x004FA062
(this dialog text is stored in QLOG.txt)

Windows 7 x86, ATI Radeon HD 5670 (10.11 drivers)
 
hmm...after race, i want to select a different car....then i got this:

ri Dec 31 15:54:25 (FATAL): [racer/7268] Exception 0xC0000005, flags 0, Address 0x0044B28A
(this dialog text is stored in QLOG.txt)

OS-Version: 6.1.7600 () 0x100-0x1

0x0044B28A d:\source\trunk\dev_racer\src\lib\rcar.cpp (line 2016): RCar::SetOutcarView()
0x004E1E91 d:\source\trunk\dev_racer\src\ui_public\selcar.cpp (line 346): CarPaint()
0x004E22CF d:\source\trunk\dev_racer\src\ui_public\selcar.cpp (line 612): idlefunc()
0x004E22F9 d:\source\trunk\dev_racer\src\ui_public\selcar.cpp (line 626): Do()
0x004E2783 d:\source\trunk\dev_racer\src\ui_public\selcar.cpp (line 767): rrSelectCar()
0x004D990E d:\source\trunk\dev_racer\src\ui_public\menu.cpp (line 1741): Do()
0x004D9ACB d:\source\trunk\dev_racer\src\ui_public\menu.cpp (line 1864): RMenuRun()
0x004035EA d:\source\trunk\dev_racer\src\mrun.cpp (line 1668): Setup()
0x00403A64 d:\source\trunk\dev_racer\src\mrun.cpp (line 1970): Run()
0x00401504 d:\source\trunk\dev_racer\src\main.cpp (line 222): main()
0x00401573 d:\source\trunk\dev_racer\src\main.cpp (line 229): WinMain()
0x0055385B f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (line 263): __tmainCRTStartup()
0x75C73677 [kernel32]: (filename not available): BaseThreadInitThunk
0x77BB9D42 [ntdll]: (filename not available): RtlInitializeExceptionChain
0x77BB9D15 [ntdll]: (filename not available): RtlInitializeExceptionChain
 
Some comments about the flares.
(changed outColor.a=1.0 in flare_f.cg for debugging reasons)


As you can see, the flare quad is still not perfectly aligned wrt the camera - it should appear as a perfect square, but isn't.
Also, I'd prefer, that if the alpha of the flare texture is all white, then the flare doesn't appear transparent, as it does on the screen.

Other than that, very nice release!
 
Some comments about the flares.
(changed outColor.a=1.0 in flare_f.cg for debugging reasons)


As you can see, the flare quad is still not perfectly aligned wrt the camera - it should appear as a perfect square, but isn't.
Also, I'd prefer, that if the alpha of the flare texture is all white, then the flare doesn't appear transparent, as it does on the screen.

Other than that, very nice release!

I tried that before (align it with the camera), but it didn't get any better. Not sure exactly how it looked, but I rejected it...
On the blend, I might try that again; it is now set to:
pipe->BlendFunc(GL_SRC_ALPHA,GL_ONE);

I think with the standard a,1-a it was a bit bleak, hm.
 
Thanks, but I think I am gonna sit this one out and wait for 090. I finally managed to get a descent 0829a version running, and I am reluctant to do it all over again. But hey, all improvements are cool, and I am really looking forward to a stable, non-changing release so I can finish my old stuff and get on with the new. That being said, time to finish other old things, like 2010.. so, since I will be occupied with making dinner, taking care of my daughter and other real-life stuff, I say, for a last time this year, HAPPY NEW YEAR, see you in the new one! :)
 
cant get cars and tracks (polish roads, early fall, etc.) to work, says there have to be up too version 090... ??
cars dont look right and tracks cant be loaded or the textures are wrong (purple and blue etc.)

vista x32
4 gb ram
Nvidia GTX 460 hawk 1gb
nothing else what can be bad..
 
I tried that before (align it with the camera), but it didn't get any better. Not sure exactly how it looked, but I rejected it...

Interesting. I managed to create a billboard shader for rFactor, that worked perfectly in the end (although, I had to make a lot of assumptions in the shader). My Supra and some newer mods feature this shader.
http://www.rfactorcentral.com/detail.cfm?ID=Light Flare Tutorial

The vertex shader (rFactor uses DirectX's HLSL) for that is this:
Code:
// Vertex shader for light flares 
// ------------------------------
// This shader makes the quad face the camera and change its size according to the camera vs quad normal.
// This shader should only be applied to quads (square consisting of 2 triangles) that face forward. 
//
// Created by Siim Annuk
// Date: June 28, 2009

#define USEFOG

float4x4 viewProjMatrix : register (c0);
float4x4 worldMatrix : register (c4);
float4x4 viewMatrix : register (c16);
float4 worldEye: register (c8);
float4 fogData : register (c9);
float4 texMod : register (c11); // tex0.u=x, tex0.v=y, tex1.u=z, tex1.v=w
float4 specularColor : register (c15); // power in c15.a

struct VS_OUTPUT
{
   float4 Pos  : POSITION;
   float4 Diff : COLOR0;
#ifdef USEFOG
   float  Fog  : FOG;
#endif   
   float2 Tex  : TEXCOORD0;
   float  Depth: TEXCOORD1;
};

#if HIGHFLASH == 1
VS_OUTPUT vs20_blinnLightFlareHeadlights (float4 inPos : POSITION, float4 inNorm : NORMAL, float4 inColor : COLOR0, float2 inTex : TEXCOORD0)  
#else
VS_OUTPUT vs20_blinnLightFlare (float4 inPos : POSITION, float4 inNorm : NORMAL, float4 inColor : COLOR0, float2 inTex : TEXCOORD0)  
#endif
{
  VS_OUTPUT Out;

  // Assume the quad is a square, side length is 0.5 units
  float quadSize = 0.5f;

  // Build the world view matrix
  float4x4 worldViewMatrix = mul(viewMatrix, worldMatrix);

  // normalize inNorm
  float3 unitInNorm = normalize(inNorm.xyz);

  // Construct a forward vector
  float3 forwardVec = float3(0.0f, 0.0f, 1.0f);

  // Calculate angles between the in normal and up, right and forward vectors
  float dotFwNorm = dot(forwardVec, unitInNorm);

  // Corner identificators of the vertex
  float tx = inTex.x - 0.5f;
  float ty = inTex.y + 0.5f;

  // Calculate the particle position (center of quad)
  float halfQuad = quadSize / 2.0f;
  float3 n1 = normalize(float3(inNorm.z, 0, -inNorm.x));
  float3 n2 = cross(-unitInNorm, n1);
  float3 particlePosition = inPos.xyz + (sign(tx) * n1 * halfQuad) + (-sign(ty) * n2 * halfQuad);

  // Normal of the vertex
  float3 worldNormal = normalize(mul(worldMatrix, inNorm.xyz));

  // Eve vector
  float3 eyeVector = normalize(mul(worldMatrix, float4(particlePosition, 1.0f)) + worldEye);
  float dotProduct = max(0, -(dot(eyeVector, worldNormal) / (length(eyeVector) * length(worldNormal))));
  
  // The size of the particle
#if HIGHFLASH == 1
  float particleSize = max(pow(dotProduct * FLASHSIZE, FLASHMULTIPLIER), pow(dotProduct * GLOWSIZE, GLOWMULTIPLIER));
#else
  float particleSize = pow(dotProduct * GLOWSIZE, GLOWMULTIPLIER);
#endif

  // Use specular power to set the size of the particle
  particleSize *= specularColor.a;

  // Billboard the quad
  float3 pos = float3(0.0, 0.0, 0.0);
  pos += (particleSize * tx) * worldViewMatrix[0] + (particleSize * -ty) * worldViewMatrix[1];
  pos += particlePosition;

  // The absolute position of the vertex
  Out.Pos = mul(viewProjMatrix, float4(pos, 1.0f));

  // Fix the depth
  pos.z += sign(dotFwNorm) * pow(abs(dotProduct), 3);
  float4 depthPos = mul(viewProjMatrix, float4(pos, 1.0f));
  Out.Depth = depthPos.z / depthPos.w;

#ifdef USEFOG
  Out.Fog.x = 100000; // hacky fix 
#endif
  
  // Propagate color and texture coordinates
  Out.Diff = inColor;
  Out.Tex.xy = inTex;

  return (Out);
}
 
cant get cars and tracks (polish roads, early fall, etc.) to work, says there have to be up too version 090... ??
cars dont look right and tracks cant be loaded or the textures are wrong (purple and blue etc.)

vista x32
4 gb ram
Nvidia GTX 460 hawk 1gb
nothing else what can be bad..

Yes, welcome to the new stable version since 2003 (v0.5.0). ;-) Since soooo much has changed, really all content out there is outdated. Normally I'd try to get compatibility but the 2003 version is just not up to par and impossible to try to get compatible. So indeed, all content needs upgrading. v0.9 is hopefully out within a month so that things can begin to be updated (the problems are getting smaller).
I'll need to update racerdownloads.com for example to specify compatibility with v0.9.

Note also that I'm using SVN to branch v0.9. I'm using this with other versions that we use commercially; this means I can continue to work on another branch, but still do minor changes/fixes to the v0.9 branch. So small things can always be patched later. My v0.9 wishes left are these:

# Bug: Tire smoke flies off
# Controls with 2 controllers - 2nd isn't detected
# Finish throttle_on/throttle_off.
# Flare rotation not used. Check alpha=1 to really fill in.
# MP Shift-F (autoreset) keeps car from driving off, if quickstart=1 it should be able to drive
# Replays a bit better (particles?)
 
# Bug: Tire smoke flies off

My impression with this is that it's using 'sim time' to initialize the wind's effect on particle speed (v_init = wind*sim_time*smoke.wind). Dropping particles.ini smoke.wind=0.8 down to 0.2 (match with gravel/grass smoke) makes it not fly off at the same rate. Can't check the wind speed in-game though so I'm not certain.

screenshot009no.jpg

This is with grass_smoke.airfriction=0, grass_smoke.wind=1 at 4 minutes in - it flies off fairly fast. Nearer the start of the race it hardly moves at all. So either the wind's accelerating or its effect on the smoke is growing over time.

I am slightly curious why this needs two parameters - 'air friction' seems like it should be based on the difference in current wind speed from particle speed, and thus implicitly include the wind in the calculation. Though then that gets into a question of what's worth simulating in atmosphere - for example, near the ground wind speed is lower than at 10m up. But a car also carries a pocket of trapped air behind it, which could pull smoke along with it.

Also another bug - the grass particles are spawning even on wheels not touching the ground.
 

Latest News

How long have you been simracing

  • < 1 year

    Votes: 311 15.5%
  • < 2 years

    Votes: 213 10.6%
  • < 3 years

    Votes: 207 10.3%
  • < 4 years

    Votes: 157 7.8%
  • < 5 years

    Votes: 271 13.5%
  • < 10 years

    Votes: 232 11.5%
  • < 15 years

    Votes: 150 7.5%
  • < 20 years

    Votes: 118 5.9%
  • < 25 years

    Votes: 89 4.4%
  • Ok, I am a dinosaur

    Votes: 261 13.0%
Back
Top