Inverse Square Falloff

So it is apparently worth it to invest hours upon hours into lighting your map. I finally found out what made my lighting so flat looking. Those of you who use Jardrup’s compilers, beware of “delay 5”. It does *something* fishy and somehow limits the headroom of the lights in your map.

I came to this conclusion by making an actual testmap for lights, because I wanted to see what the different falloff formulas did, mostly. It turns out light in real life follows what is known as the inverse square rule – put into maths it looks like 1/x². Look it up if it interests you. The light tool actually does have a setting that does this – “delay 2”.

Experimentation led me to combine torches (coloured light) with white point lights, as I had been doing, but to change the white light from “wait 0.5” to “delay 2” – the inverse square formula – and remove “delay 5” (the kinky one) from the torch. Instead I increased the torch’s light range (“wait 0.35”). I also removed delay 5 from all my candles which made them appear brighter, but have a shorter range.

It seems using delay 1 or 2 on a coloured light produces colour problems – looks like lit files still get the evil clamping. Hooray for green walls. But the combination method works well and creates the same overall impression of brightness due to the white component using inverse square (the orange torches use Quake’s default, which is *linear* falloff – quite unnatural).

For some reason all of this gave me super-vibrant light. I don’t know if delay 5 was interfering with MH’s HDR lightmaps or something. Anyway the contrast is now pretty good, the dynamic lights (shambler lightning!) are almost blindingly bright now, and the game seems to finally come around to do something *remotely* like I want it to.

Hmm. Looks almost Doom 3-ish in places despite the lack of normal mapping etc.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: