Quake II Evolved Per Pixel Lighting Tutorial

Basics Of Lighting The Game World (Things To Remember)

For this tutorial you will need the following:

>> A full copy of Quake 2, complete with the latest official patch

>> Quake II Evolved version 0.65 Beta

>> A popular level editor compatible with Quake 2 (GTK Radiant 1.3 etc)

Ok then, lets begin with a little information shall we?

Lets Go Back To Basics!

Remeber that when you are using a realistic lighting engine, you want your world to look, well, realistic. Here are a few pointers to help you go about lighting your world:

 

Invisible Light?!

A major problem with most (all) lightmapped engines is that light comes from nowhere most of the time. You will be running along this amazingly well done textured hallway, shooting alien scumbags with your high poly assault rifle, blood spurting over the walls, laughing as you go, but... Stop. Just for a second. Take a look at that hallway. Where exactly is the light coming from? The answer is usually "Everywhere". The whole hallway will be lit up, every area will be bright and vivid, and the only light source in the room is a small light on the ceiling. Not good.

Try to remember when your adding lights to your level that lights dont just appear out of thin air. A basic rule of thumb is to place a point light next to every single visible light source in your level, be in the glow from a computer panel, the sky, or the light on the ceiling. Anything that lights up, slap a light source next to it. Give it a custom shader if its blinking on the wall (amazing stuff, you can make the light blink EXACTLY the same as the texture does, woo!). Once you have done this, you should have a nice basic lighting theme, however you may find that it can still be quite dark. This is a problem with Quake 2, as the levels are in most cases huge, with hardly any visible light sources. Its not that a little clever use of ambient lighting should come into play. Ambient lighting doesn't change shadows or normals, but it does light up the world still with little to no performance hit. So, use it in combination with your pointlights for some nice lighting with hardly any performance hit.

 

And Then There Was... Light?

So your lighting your level perfectly, all is going great, but then... You get to an area that has NO visible light source... Inside, too... What the hell are you going to do now? Simple. Create a visible light source :D

Sounds daft, I know, but think about this. You have map models that can be added to Quake 2's stock maps easily. All you need to do is add a small rectangle light here and there in the style of Quake 2, and your done, you have a new visible light source to play with, that you can place anywhere. Woo! Now usually clipping would be an issue but these lights are so small they don't really need any clipping.

So remember, just because Quake 2's stock maps don't have visible light sources everywhere, it doesn't mean that they CANT have visible light sources everywhere ;)

 

Performance An Issue? Grab A Tissue

Your level running a bit sluggish? Optimize! You want your maps looking bright but still running fast, I know. Here is a simple yet effective tip. Think of your light radius as a "square". Now, everything inside that square will be lit up to some degree, depending on the proximity to the origin of the light. What you should do, is slightly cross one lights radius into another. This reduces the visible black line between the two lights and keeps the area bright. Why dont you go more than just a tad, I hear you ask? Well, simple really, When two lights cross paths, it really impacts performance. The more volume intersecting, the more performance bound that light becomes and your FPS will lower. So, only use a little bit, and you can still get a nice effect, but with less FPS loss.

 

Boring Dull Level? Change it!

Most of the time you will find that although you have nice shadows, you will get some pretty boring looking areas. So, change them. Remember you have full control over the lights appearances, so change the colour, or change the effect, anything. Shaders are there for a reason, use them!

 

That about wraps up the basics. If you have any questions please post them in our forums.

 

 

The Blur Logo and website ©2002-2004 Team Blur - All rights reserved. Reproduction of any material on this site without a working link to its original location is prohibited.