[Gtkradiant] HDR light

Forest Hale lordhavoc at ghdigital.com
Thu Sep 4 15:01:42 CDT 2008


Yes, some lightmap formats of interest:
fp16 ("half" float) - doubles the memory usage but relatively easy to process (can be converted to LDR with a little masking and bit shifting, and a min/max check).
RGBE8 (RGB8 plus exponent) - fairly easy to decode on shader hardware, simply multiply the RGB value by a power of 2.
RGB8 with per-surface range (conventional RGB8 format) - easy on any hardware, even possible on fixed function (to a point), store conventional 24bit color lightmap and a multiplier, which you can 
feed in as a texcoord component.

Jay Mattis wrote:
> Well, you could implement the high range. The dynamic part would 
> obviously have to be implemented in-engine. The key idea is rendering to 
> a floating point texture so you're no longer limited to the 0 to 255 
> range for your RGB channels. So this just means that the lightmap stage 
> should have an option that keeps it from clamping color values above 255 
> and writes each channel as a float instead of a byte. It might also be a 
> good idea to do some sort of normalizing for better precision, so that 
> you save the mean for each channel up front and then only save the 
> deviation from the mean in each channel as you write the lightmap.
> 
> On Thu, Sep 4, 2008 at 8:47 AM, LinuxManMikeC <linuxmanmikec at gmail.com 
> <mailto:linuxmanmikec at gmail.com>> wrote:
> 
>     On Thu, Sep 4, 2008 at 7:19 AM, Adam Sibson <adamsibson at hotmail.com
>     <mailto:adamsibson at hotmail.com>> wrote:
>      >
>      > Hi,
>      > Would it be possible to add an HDR-like light option into the
>     light map compile? Would this interest anyone sufficiently to have a
>     go at adding it? I think it'd be very popular with mappers.
>      > Cheers,
>      > ix
>      >
>      >
> 
>     The "D" in HDR stands for "Dynamic".  High Dynamic Range rendering is
>     a game engine feature.  The lightmap compilation in q3map2 is a static
>     process.  The results of HDR calculations are dependant on the
>     location of the viewpoint, which in a game is always changing.  I
>     think it might be possible to implement some aspects of HDR into the
>     lightmap compilation (is it already there?), but anything done in the
>     lightmap stage couldn't compare to true HDR rendering.  I really don't
>     know enough on the subject to comment further, so there's my 2 cents.
> 
>     _______________________________________________
>     Gtkradiant mailing list
>     Gtkradiant at zerowing.idsoftware.com
>     <mailto:Gtkradiant at zerowing.idsoftware.com>
>     http://zerowing.idsoftware.com/cgi-bin/mailman/listinfo/gtkradiant
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Gtkradiant mailing list
> Gtkradiant at zerowing.idsoftware.com
> http://zerowing.idsoftware.com/cgi-bin/mailman/listinfo/gtkradiant


-- 
LordHavoc
Author of DarkPlaces Quake1 engine and mod
http://icculus.org/twilight/darkplaces/
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass




More information about the Gtkradiant mailing list