• This Website Is Not For Sale
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

GFX feature request

Discussion in 'Racer' started by Mr Whippy, Apr 18, 2011.

  1. Please Ruud, or Mitch...

    Just reading the Crytek 3 engine specs, and they apply specular reflection maps to all scene objects (so envmapping on everything)

    Obviously we can do this in Racer right now. The issue is flexibility of what we can do with the env cubemap.

    Is there any way to enable the mipmap bias on the envmap, so we can force a more blurry version? That way road surfaces can use the envmap blurred up a load, so when driving into a dark bluey sky, the road surface picks up a bluey specular, and when into a big soft orange sunset, the road picks up an orange specular.

    Right now Racer looks fairly limited because specular is driven by only the sun light, while real specular is more a function of light in the scene reflecting diffusely or sharply, which we can get really nicely from our HDR envmap!

    So, to sum up. Can we mipmap bias the envmap per shader as we can for any given texture map we reference?
    Can we also then maybe have a tweak on the map so we can colourise it, and adjust contrast perhaps? Ie, define rgb values to pass from 0...1, so we can just take the red info for example... 1 0 0... not sure how you would do contrast... perhaps an exposure adjustment (not sure if that is needed really, hmmm)

    Just feels like we are missing a HUGE trick here with regards to realistic looking material response. Currently all track materials are just flat and respond only to sun specular, and only look nice on a sunny day... or we can only reflect sharply if we do use the envmap.

    However, with a softer envmap response, we can do cool things like have soft wet-road reflections of street lights on a night for amazing looking city tracks etc...

    The sooner we abandon the old specular, mainly for the primary 'reflection' on track items especially, the sooner Racer will look a whole lot more realistic again :D


  2. Well, as long as there's still only a single specular response, you can easily tweak colour by by specular=r g b. I'm not entirely sure what you mean by adjusting the contrast, is there some reason to cut back on very bright specular spots?
  3. I think he means the contrast from white/grey/black specular maps almost all recent games have & that's what must change. We need another spec sampler2D in our Cg shaders to get a better control.
  4. I'm not sure if we need contrast or not. I guess fresnel, envmap blur (mipmap bias), should cover most material responses. Hmmmm... not sure.

    Either way, we need to be able to mipmap bias the envmap per shader. I feel it'll open up much nicer 'diffuse' material emulation (or closer to simulation) for track objects!

    In most cases they will be so blurred, that the fact it's car relative will be irrelevant I think.

  5. Also, the envmapping needs blurring/blending between the sides, otherwise we will get some bad color matching problems.
  6. Yeah, the cube sampler isn't really good enough for this purpose.


    Temporarily set envmap.size=8 in Racer.ini... the effect looks pretty nice on the chrome (much softer, rather than the excessive shininess) but unfortunately every edge of the cube is quite visible, especially if there's a light near it. (in this the top right edge of the sunspot is at the edge of a side, so it cuts off sharply)

    envmap.size=16 is more the satin finish,
    larger view

    Last note: tex2Dbias works - presumably texCUBEbias works too. On my 460GTX anyway. But there are no mipmaps generated on the envmap right now. So that's what needs to be enabled.
  7. What do tex2Dbias and texCUBEbias do?

    I thought the mipmap of the envmap was generated... but perhaps I am wrong... I thought Ruud mipped it down to get scene intensity for exposure control!?


  8. No, I think it was the frame buffer that was downscaled to 1x1 to get the intensity.
  9. Indeed, it's the framebuffer that's scaled down.

    For whatever reason the texCUBEbias doesn't work...