Xonotic Forums
SRGB lightmaps - how to use them - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10)
+--- Forum: Xonotic - Editing and Concept Art (https://forums.xonotic.org/forumdisplay.php?fid=11)
+--- Thread: SRGB lightmaps - how to use them (/showthread.php?tid=4673)



SRGB lightmaps - how to use them - Majki - 12-24-2013

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?


RE: SRGB lightmaps - how to use them - tZork - 12-26-2013

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



RE: SRGB lightmaps - how to use them - Majki - 12-26-2013

Thanks for explanation Smile