GoldenEye: Source Forums

Debriefing => Questions, Help, & How To's => Topic started by: Boris_Crack on December 15, 2012, 05:16:01 pm

Title: Very soft lights and ambient lightning.
Post by: Boris_Crack on December 15, 2012, 05:16:01 pm
I suck at lightning, probably because I haven't watched a proper tutorial about it but anyway. Whenever I place a light in my map, it's super bright. And wathever I do I can't soften it enough. There's always a big bright spot. I tried everything in the settings. I don't know if I'm making myself clear but any kind of tip would help.
Title: Re: Very soft lights and ambient lightning.
Post by: Mangley on December 15, 2012, 06:54:34 pm
There are 4 different values in a light's properties you want to pay attention to.

They are: Color, Quadratic, Linear, Constant.

Color is simple, it's a 4 number value that determines the colour and brightness of a light. I believe the default value is: 255 255 255 200 which is Red, Green, Blue, Brightness.

The main thing you want to learn, however, is Quadratic, Linear and Constant values.

These are properties of each light entity, and they can be treated like parts of a 'mixture'. If you're familiar to the concept of mixing one part water to two parts cement.

By default they are Quadratic 1, Linear 0, Constant 0.

What do they do? Simple. Quadratic light is very intense close to the light source but has a short falloff. Constant is not intense near the light source, in fact it's 'constant' and will travel infinitely far without fading. Linear light is pretty much the middle ground between those two types.

For ambient light in a map I recommend using the omnidirectional light entity, selecting a dim colour like grey or brown, and then setting the QLC values to Quadratic 0, Linear 1, Constant 8.

This means 8 parts constant light to 1 part linear light. The result will be a pretty realistic ambient light. It won't have infinite falloff, but it won't be intense either. Depending on how bright it is you can also cast sharp shadows, if the light grazes geometry between a lit area and a non-lit area.

From this point you can tweak the Brightness value of the light colour until you get your desired level and hue of ambient light.

More detailed info here: https://developer.valvesoftware.com/wiki/Constant-Linear-Quadratic_Falloff

As ever, Boris, I recommend thoroughly that you pour over the documentation on the Valve Developer Wiki, look for tutorials (there is loads out there) and most importantly experiment with the properties of entities to give yourself a better understanding of their functions.