PPL lighting tuts and tips?

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
o'dium
Posts: 11712
Joined: Sun Mar 25, 2001 8:00 am

PPL lighting tuts and tips?

Post by o'dium »

I'm trying to gather some info on the best way to light a map... Sometimes I have to light an area with a single light source, and in Doom 3 it looks fine and bright, yet everything I try just looks either dark, or runs slow...
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

With Doom3, you can create a box and then convert it into a light entity. The size of the box dictates how great of an area that light will affect. So if you have a hallway 128x256x128 units large, you can create a box to fill that area and then convert it into a light entity. That one light should be able to illuminate the entire hallway.

On performance, the largest problem with PPL is overlapping light volumes. Try to reduce areas where you have 3 or more light volumes overlapping.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
urgrund777
Posts: 153
Joined: Tue Mar 08, 2005 4:29 am

Post by urgrund777 »

do your Q2E lights allow different attenuation falloffs? (assuming this is for youre Q3E stuff?) Linear falloff often means you need to crank the light radious to fill in darker reaches of a room (which is bad becuase then the radious goes off touching stuff you don't want). See if you can get exponential falloff - should be a simple shader modification. Also, if you add a 'no specualr, no normalmap' technique to your shaders you'll be able to easily add ambient lights that could essentially just be handled in the vertex shader to help fill in large rooms with ambience at minimal cost (I think D3 has something like this when you uncheck 'Specular' and 'Bump' on the light). Also, you wouldn't want your big ambeint lights casting stencil volumes which are huge fillrate hogs.

With PPL, overlapping lights cause the touching polys to be rendered again (unless you accumulate multi-pass lighting into a single pass via PS3.0). Not too much of an issue unless you have heavy pixel shaders (like a 10 step perpspective correct parallax shader :S )... if all you're using is standard normalmaps then 4 overlapping radious' should be fine (of course... how much of the screen these overlapping polys fill is an issue as well).

it gets tricky when you start adding PRT lighting (extra pass) and self shadowing parallax into the bill! Have to start squeezing all you can out of a single point lihgt by using fancy looking light masks or omni projections to fake half of the shadows
Lukin
Posts: 349
Joined: Sat Jan 29, 2000 8:00 am

Post by Lukin »

urgrund777, I've just lookt at your site. Amazing stuff you've got there.
I'm curious about Reality Engine. It looks wonderful (especially in this game called Metronome and on your level design page), but one thing amazes me more than its' features: this engine is property of Epic Games (according to this site) :icon27: WTF? ;)
[size=75][url=http://www.lukinonline.com]lukinonline.com[/url][/size]
urgrund777
Posts: 153
Joined: Tue Mar 08, 2005 4:29 am

Post by urgrund777 »

it is now... it got bought out a few months back, it hasn't effected current licensees but no one can license it anymore, Epic have just shelved it. My reasoning behind it is that it was in direct competition with UE3 (as far as features, capabilities go) but for a fraction of the price... so you know, "if you can't beat 'em, buy 'em" :P
Lukin
Posts: 349
Joined: Sat Jan 29, 2000 8:00 am

Post by Lukin »

Bastards :icon33: It looks like they're going for the monopoly (xbox360, ps3). I wonder if they'll buy out this engine.

Hopefully JC will show them where their place is ;)
[size=75][url=http://www.lukinonline.com]lukinonline.com[/url][/size]
Post Reply