Xonotic Forums

Full Version: SRGB lightmaps - how to use them
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a question about SRGB lightmaps, are they just more hi res lightmaps, that are added to BSP and can be used in any game (Warsow/Urban Terror/etc) or is it Xonotic specific feature?
sRGB lightmaps is not abt higher resolution at all, its how they are 'encoded' / rendered. In short, it looks more natural but the engine needs to support it.

http://www.xonotic.org/2011/11/wox-blox-...oper-news/ Wrote:sRGB lightmaps
There’s a major fixing of the rendering of map lighting that divVerent is working on: sRGB lightmap encoding. Oh, come on, don’t give me that face, I’ll explain it right away what it does! In real life, lights have 1/r^2 falloff (and q3map2 emulates that too). This means, if you move away from the light source, the intensity of the light decreases linearly in an exponential way: the double the distance, the quarter the light intensity.

Ok, are you still with me? Good. But, here comes the problem: light values on your screen are not linear. In fact, the quarter the light value is actually 21th (!) the light intensity. This produces overshadowed, and unrealistically sharp lighting in maps. sRGB lighmap encoding fixes this issue, so we’ll have more natural, more realistic lights, that modern engines like CryEngine render. Here are some screenshots to demonstrate the effect (before and after).

Note: The greyish tint is actually due to a bug where the lights don’t use the proper color tinting values, this bug was fixed by the time of this post, so pay no attention to it for now and simply look at the lighting/shadowing.
Thanks for explanation Smile