1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice
MINI Challenge - Round 1 - Oulton Park (LIVE)

Racer v0.8.11 is out

Discussion in 'Racer' started by Ruud, Jul 2, 2010.

  1. Ruud

    Ruud
    RACER Developer

    Yep, another version. Get it at http://www.racer.nl/download/racer0.8.11.zip (60Mb)

    To testdrive, also check out Swiss Stroll Cg at http://www.racerdownloads.com/uploads_view.php?type=T&cmd=latest

    Enjoy!
    Ruud

    The changes:

    - Added standard_wave_banner_v.g for waving banners, see http://www.racer.nl/tutorial/waving_flag.html#banners
    - Skidmark painting more robust (texture usage and render state could cause transparent or black renders)
    - Non-Cg version still tried to load shadowmapping Cg shaders when renderer.shadowmapping.enable was 1
    - Projected lights intensity back from 1.1 to 0.6( data/renderer/shaders_*/projected_texture_f.cg)
    - Default shader_<x>.reflect value is now 1.0 (was 0)
    - Modified per shader layer reading of .ambient a little; otherwise the global shader_<x>.ambient
    did not default to the global shader_<x>.diffuse. This only really influences non-Cg .shd files.
    - dyn_standard_reflect_window_v/f.cg improved to do per-pixel fresnel.
    - Reflection shaders fixed to respond to ambient/diffuse more accurately ('diffuse=0 0 0' still gave a shadow).
    - The Lambo brakediscs now heat up through an alpha layer, looks better
    - shadowmapping.shadowintensity removed - shadows are ambient and need not be softened (would only include false diffuse lighting)
    - Shader directories combined into data/renderer/shaders/*. Compilation uses -DCSM for shadowmapped variety.
    - Shadowmapping optimized a little bit in the .cg shaders.
     
  2. Tried it, the cg version, i have lots lots of lag while playing and everytime I press esc to return to the menu I get a crash....
    And I can only start it with CSM turned off...
     
  3. Tried and everything seems to be working out-of-the-box.

    As for the shadows, I really don't like the way you're blurring them in screen-space (with fullscreen shader). The shadow blurring looks very different under different camera angles and somehow I get this feeling that the shadows are "3D" or something.

    I'd rather prefer the non-smoothed look:
    http://img189.imageshack.us/i/screenshot002bv.jpg/
    http://img80.imageshack.us/i/screenshot001cq.jpg/

    Are you doing the shadow blurring in 2 passes (1st pass - horizontal, 2nd pass - vertical)?

    Bugs? I think the live env map lacks smoothing (looks very pixelated close up).
     
  4. Agree with you!
    The 2nd screen is a lot better!
    How did you do? ( wich setting to edit?)
     
  5. For me, bloor(bloom) is annoying. Cant play nfs or another game with this thing turned on. So unreal, except if you are very drunk and driving at high speed
     
  6. Use the modified version of "bloom_shadows_f.cg". Basically, I just used the "BlurTexture0" function from "csm_f.cg" to do the shadowmapping blur (no blur).

    bloom_shadows_f.cg:
    Code:
    // CSM Shadowmapping + Bloom
    // HDR version
    
    #include "../common/constants.cg"
    #include "../common/hdr.cg"
    #include "bloom.cg"
    
    
    struct VertOut
    {
      float4 pos : POSITION;
      float4 col : COLOR0;
      float2 tc0 : TEXCOORD0;
    };
    
    struct FragOut
    {
      float4 col : COLOR;
    };
    
    /*
    float4 BlurTexture0(sampler2D tex, float2 vin, float blur)
    // float4 version, but only .a is used
    {
       float4 sum = vec4(0.0);
     
      // blur in y (vertical)
      // take nine samples, with the distance blur between them
      sum += tex2D(tex, float2(vin.x - 4.0*blur, vin.y)) * 0.05;
      sum += tex2D(tex, float2(vin.x - 3.0*blur, vin.y)) * 0.09;
      sum += tex2D(tex, float2(vin.x - 2.0*blur, vin.y)) * 0.12;
      sum += tex2D(tex, float2(vin.x - blur, vin.y)) * 0.15;
      sum += tex2D(tex, float2(vin.x, vin.y)) * 0.16 * 2.0f;
      sum += tex2D(tex, float2(vin.x + blur, vin.y)) * 0.15;
      sum += tex2D(tex, float2(vin.x + 2.0*blur, vin.y)) * 0.12;
      sum += tex2D(tex, float2(vin.x + 3.0*blur, vin.y)) * 0.09;
      sum += tex2D(tex, float2(vin.x + 4.0*blur, vin.y)) * 0.05;
      
      sum += tex2D(tex, float2(vin.x, vin.y - 4.0*blur)) * 0.05;
      sum += tex2D(tex, float2(vin.x, vin.y - 3.0*blur)) * 0.09;
      sum += tex2D(tex, float2(vin.x, vin.y - 2.0*blur)) * 0.12;
      sum += tex2D(tex, float2(vin.x, vin.y - blur)) * 0.15;
      //sum += tex2D(tex, float2(vin.x, vin.y)) * 0.16;
      sum += tex2D(tex, float2(vin.x, vin.y + blur)) * 0.15;
      sum += tex2D(tex, float2(vin.x, vin.y + 2.0*blur)) * 0.12;
      sum += tex2D(tex, float2(vin.x, vin.y + 3.0*blur)) * 0.09;
      sum += tex2D(tex, float2(vin.x, vin.y + 4.0*blur)) * 0.05;
      
      return sum*0.5f;
    }
    */
    
    float BlurTexture0(sampler2D tex, float2 vin, float blur)
    {
      float sum=0;
     
      // blur in y (vertical)
      // take nine samples, with the distance blur between them
      sum += tex2D(tex, float2(vin.x - 4.0*blur, vin.y)).a * 0.05;
      sum += tex2D(tex, float2(vin.x - 3.0*blur, vin.y)).a * 0.09;
      sum += tex2D(tex, float2(vin.x - 2.0*blur, vin.y)).a * 0.12;
      sum += tex2D(tex, float2(vin.x - blur, vin.y)).a * 0.15;
      sum += tex2D(tex, float2(vin.x, vin.y)).a * 0.16 * 2.0f;
      sum += tex2D(tex, float2(vin.x + blur, vin.y)).a * 0.15;
      sum += tex2D(tex, float2(vin.x + 2.0*blur, vin.y)).a * 0.12;
      sum += tex2D(tex, float2(vin.x + 3.0*blur, vin.y)).a * 0.09;
      sum += tex2D(tex, float2(vin.x + 4.0*blur, vin.y)).a * 0.05;
      
      sum += tex2D(tex, float2(vin.x, vin.y - 4.0*blur)).a * 0.05;
      sum += tex2D(tex, float2(vin.x, vin.y - 3.0*blur)).a * 0.09;
      sum += tex2D(tex, float2(vin.x, vin.y - 2.0*blur)).a * 0.12;
      sum += tex2D(tex, float2(vin.x, vin.y - blur)).a * 0.15;
      //sum += tex2D(tex, float2(vin.x, vin.y)).a * 0.16;
      sum += tex2D(tex, float2(vin.x, vin.y + blur)).a * 0.15;
      sum += tex2D(tex, float2(vin.x, vin.y + 2.0*blur)).a * 0.12;
      sum += tex2D(tex, float2(vin.x, vin.y + 3.0*blur)).a * 0.09;
      sum += tex2D(tex, float2(vin.x, vin.y + 4.0*blur)).a * 0.05;
      
      return sum*0.5f;
    }
    
    float BlurTexture(sampler2D tex, float2 vin, float blur)
    {
      float sum=0;
      const float blurT2=2.0*blur;
     
      // blur in y (vertical)
      // take nine samples, with the distance blur between them
      sum += tex2D(tex, float2(vin.x - 4.0*blur, vin.y)).a * 0.05;
      sum += tex2D(tex, float2(vin.x - 3.0*blur, vin.y)).a * 0.09;
      sum += tex2D(tex, float2(vin.x - blurT2, vin.y)).a * 0.12;
      sum += tex2D(tex, float2(vin.x - blur, vin.y)).a * 0.15;
      sum += tex2D(tex, float2(vin.x, vin.y)).a * 0.16 * 2.0f;
      sum += tex2D(tex, float2(vin.x + blur, vin.y)).a * 0.15;
      sum += tex2D(tex, float2(vin.x + blurT2, vin.y)).a * 0.12;
      sum += tex2D(tex, float2(vin.x + 3.0*blur, vin.y)).a * 0.09;
      sum += tex2D(tex, float2(vin.x + 4.0*blur, vin.y)).a * 0.05;
      
      sum += tex2D(tex, float2(vin.x, vin.y - 4.0*blur)).a * 0.05;
      sum += tex2D(tex, float2(vin.x, vin.y - 3.0*blur)).a * 0.09;
      sum += tex2D(tex, float2(vin.x, vin.y - blurT2)).a * 0.12;
      sum += tex2D(tex, float2(vin.x, vin.y - blur)).a * 0.15;
      //sum += tex2D(tex, float2(vin.x, vin.y)).a * 0.16;
      sum += tex2D(tex, float2(vin.x, vin.y + blur)).a * 0.15;
      sum += tex2D(tex, float2(vin.x, vin.y + blurT2)).a * 0.12;
      sum += tex2D(tex, float2(vin.x, vin.y + 3.0*blur)).a * 0.09;
      sum += tex2D(tex, float2(vin.x, vin.y + 4.0*blur)).a * 0.05;
      
      return sum*0.5f;
    }
    
    float BlurTexture1(sampler2D tex, float2 vin, float blur)
    // Does not smooth
    {
      // blur in y (vertical)
      // take nine samples, with the distance blur between them
      return tex2D(tex, float2(vin.x, vin.y)).a;
    }
    
    FragOut main(
      VertOut vin,
      uniform sampler2D tex0 : TEXUNIT0,
      /// Z in TEXUNIT5
      uniform sampler2D bloomMap1   : TEXUNIT2,
      uniform sampler2D bloomMap2   : TEXUNIT3,
      uniform sampler2D bloomMap3   : TEXUNIT4,
      uniform sampler2D shadowMap   : TEXUNIT6,
      //uniform float smblurAmount,
      uniform float exposure
    )
    {
      FragOut fout;
    
      float4 ambientColor,
             sdColor,                 // Specular+diffuse
             color;
    
      // Original color
      ambientColor=tex2D(tex0,vin.tc0);
      sdColor=tex2D(shadowMap,vin.tc0);
      //sceneColor=tex2D(shadowMap,vin.tc0);
      
      float shadowAmount=BlurTexture1(shadowMap, vin.tc0, smBlurAmount);
    //shadowAmount=0.0f;
      color=ambientColor+shadowAmount*sdColor;
    //color=ambientColor;
    //color=sdColor;
    //color=shadowAmount;
      
      float4 bloomColor=BloomCombineMaps3(bloomMap1,bloomMap2,bloomMap3,vin.tc0);
    //color=bloomColor;
      color=BloomMix(color,bloomColor*0.5);
    //color=tex2D(bloomMap1,vin.tc0);
    //sceneColor=tex2D(shadowMap,vin.tc0).a;
    
      // HDR -> LDR tonemap
      fout.col=ToneMapHDR(color,exposure);
    //fout.col=tex2D(bloomMap3,vin.tc0);
    //fout.col=shadow;
    //fout.col=sceneColor;
    
      return fout;
    } 
    
    
     
  7. Damn, never had any problem, and now:

    [​IMG]

    What's that?
     
  8. Thanks for the quick revisions Ruud. :good:
    Please! disable the autoswitch to the discocam, it's hard to see what the car is doing from the trackcams when it constantly switches back to the
    discocam. I really don't see much use for discocam other than in replay mode.

    It looks like you have changed the tire smoke some. It doesn't just pop in like cotton balls, but rather fades in smoothly. Much nicer. :)

    As far as the shadows go, I prefer the smooth shadows to the hard edge but it's nice to have both options available.

    The dynamic shaders seem to have problems in that they don't appear to be translating the light source, or it could be the CSM that makes it appear that way.

    Alex Forbin
     
  9. Thanks for another great release Ruud. It works rather well, only when quiting races does it get hung like 089 did. But apart from that, it seems fine.
    I triedout how sparks work and added in the car.shd material=metal and got this:

    [​IMG]

    Not bad, but it could be improved :).

    One more thing, when are we going to get a tutorial how to animate hands and add exhaust smoke and backfire? Would be really nice:cool:.
     
  10. KS95

    KS95
    RACER Moderator

    Wow, that looks awesome xD
     
  11. Btw ruud, i've an annoying bug
    everytime when i try to modify graphic options, Racer crashes... sometimes sames when exiting the game
    have you an idea?
     
  12. KS95

    KS95
    RACER Moderator

    Yeah, I get that too Skybh. It saves what you modify though :S
     
  13. Ruud, while I'm trying to export my new car I'm getting lots of QLOG errors from modeler. :(

    Sat Jul 03 11:08:42 (ERR ): [modeler/5276] PaintAll: OpenGL error (1280): invalid enumerant

    Sat Jul 03 11:14:43 (ERR ): [modeler/3224] DGeodeASEImport: indices overflow (n=26801 giving index 80405; limit is 65536)
    ^^ This one's a bugger - it repeats and repeats in QLOG and end up making two 9mb files. Any chance you can ammend the error output to just say how many times it's repeated instead of actually repeating it 10000 times?!

    This brings me to my next problem.
    I can't get this bloody car out of max. I've tried every permutation of ase export that I can and still no luck. The car only has 30000 polies but it's not exporting. Is this a bug with modeler's ASE import?
    I really need this export process to be better and Some1's export tool isn't an option since I'm using max 2010.

    ###EDIT###
    On closer look, I'm 99% certain there's a bug with the ASE import but I have no idea how to describe it haha
     
  14. Actually, I prefer smooth shadows too, but the way they are currently smoothed is not very good.
     
  15. I think you could use the constants.cg in the common folder and adjust smBlurAmount variable (set relative to the resolution of the screen too!)


    In theory this would be good to tie to mie via a factor in the track settings, so you could have softer shadows the more diffuse the sun. Ie, a foggy sky has softer shadows, a really sharp sunny day harder ones.

    Hmmm

    Dave
     
  16. My current fave tweaks to make things look nicer (out of the box) (for CSM/HDR version)

    constants.cg
    const float smBlurAmount=2.0f/1024.0f;
    (halved the factor from 4.0f to 2.0f)

    lighting.cg
    normalInfluence=(N.y+4)*0.2;
    (reduced the normal influence on ambient significantly, so peak reduction is to 60% on downward pointing verts... feels much more natural, probably room for improvement on the function to get it strong around the top-dome area, and then fall off more steeply as the vert Y inverts to negative numbers)



    These two tweaks make things a bit nicer imo.

    Dave
     
  17. Also, I'm not sure how/why but the reflections in the envmap are still far too 'bluey' compared to what we are seeing in the actual sky itself.

    When I chrome the material it looks natural and reflects the sky nicely, but when using the default fresnel settings the reflections away from the full glancing angle, appear to blue up quite a lot... I'm just wondering if the ordering or the blend are correct here... it feels about twice as 'saturated' with colour as it needs to be with the fresnel in action.
    As pure chrome it works correctly and feels natural, at 50% reflection chrome it does the same as above, gets very deep blue...


    Just feeling a bit wrong, not sure if others feel the same or can sense check the process to check these things are working correctly (I already spotted double reflection strength on lit side with some basic experiments because things just looked a bit wrong...)


    Hmmm

    Dave
     
  18. thanks Ruud nice version runs straight out of the box on Windows vista 64 bit. will add some more comment tomorrow
     
  19. Never had so much trouble with any version of racer than this one! :( Lot´s of crashes when quiting game, replay, changing graphic settings etc. Also the lowest framerate I´ve ever had. Maybe I need to tweak a bit.. ?
     
  20. Waited a couple days before saying anything, but i have to admit, for no-cg this
    is the most complete version ever. It beats anything before it hands down. What
    Ruud has done, I do not know, but I can not find a single thing to criticize...

    @GizmoPower: yeah, I think the success of getting Racer optimized is tweaking.