• Home of the RD Le Mans Series by Vesaro
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Racer v0.8.29 released!

Discussion in 'Racer' started by Ruud, Dec 31, 2010.

  1. 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

    - 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.
  2. Thank you, Sir. I guess we are close to final version.
  3. Hi Ruud! New version looks nice. I know messengers who brought bad messages were often used as a dinner for lions, but:
    Master volume is set to 2 instead of 255!
  4. Ruud

    RACER Developer

    Argh, that's what you get when you try not to disturb other people while testing. :)
  5. fsr


    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!
  6. Ruud

    RACER Developer

    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:

    KPUMIN                   =  -0.414743        $typarr(  23)       $Minimum valid wheel slip
    KPUMAX                   =  0.40448          $typarr(  24)       $Maximum valid wheel slip
    ALPMIN                   =  -0.31            $typarr(  25)       $Minimum valid slip angle
    ALPMAX                   =  0.31             $typarr(  26)       $Maximum valid slip angle
    CAMMIN                   =  -0.05            $typarr(  27)       $Minimum valid camber angle
    CAMMAX                   =  0.05             $typarr(  28)       $Maximum valid camber angle
    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)
    ; Maximum tan(slipAngle); default is 0.75 (+/- 36 degrees), 20.0 (87 degrees) seems to work better

    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.
  7. Alexander Knoll

    Alexander Knoll

    Hi Ruud,
    THX nice release!
    Only one thing makes me thinking....Tire smoke...

    screenshot006.jpg screenshot007.jpg screenshot003.jpg

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


    Windows 7 x86, ATI Radeon HD 5670 (10.11 drivers)
  9. Alexander Knoll

    Alexander Knoll

    hmm...after race, i want to select a different car....then i got this:

  10. Ruud

    RACER Developer

    In data/renderer/shaders/standard_xtree_f.cg, change the 'uDirection' line into this:

    #ifdef ATI
      float uDirection=0;
      float uDirection=ddx(IN.tc0.x);
    ATI, pff.
  11. KS95

    RACER Moderator

    Hehe.. :tongue:
  12. 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!
  13. Ruud

    RACER Developer

    Fixed in v0.8.30.
  14. Ruud

    RACER Developer

    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:

    I think with the standard a,1-a it was a bit bleak, hm.
  15. 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! :)
  16. 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..
  17. 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:
    // 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;
       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)  
    VS_OUTPUT vs20_blinnLightFlare (float4 inPos : POSITION, float4 inNorm : NORMAL, float4 inColor : COLOR0, float2 inTex : TEXCOORD0)  
      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));
      float particleSize = pow(dotProduct * GLOWSIZE, GLOWMULTIPLIER);
      // 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 
      // Propagate color and texture coordinates
      Out.Diff = inColor;
      Out.Tex.xy = inTex;
      return (Out);
  18. Ruud

    RACER Developer

    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?)
  19. Thnx, working perfectly )
  20. 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.

    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.