Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/archive/global.php(40) : eval()'d code on line 2
A question on ambient light [Archive] - TF2Maps.net Forums

PDA

View Full Version : A question on ambient light


MoonUnit
08-31-2008, 02:12 AM
This is kind of a newbie question so apologies, but I had a search through and couldn't find the answer anywhere.

Essentially what I'm trying to understand is how bounce light works in indoor environments. I understand that outdoors when you have an light_env any face that can see the skybox but is not lit directly by the sunlight angle is lit by the ambient light, thus creating light in shadows so they aren't completely black.

So what's the indoor equivalent?

I.e. looking at a decompiled lumberyard map, the spawn room (that's completely encased when the doors are closed to begin with) is lit only with two downward facing spots and yet the roof area above the spots is not completely black. Why? What's lighting that?

Again I'm a newbie to all this but thank in advance for any help.

TheBladeRoden
08-31-2008, 04:19 AM
Radiosity makes the light hitting the floor bounce back up onto the ceiling.

Oh, and welcome to our club, join the chat.

FaTony
08-31-2008, 04:42 AM
Yes, light from entities can bounce many times, lighting a big area. 4 example if u make a light 1 constant 0 linear 0 quadratic, it will theoretically never fade.

http://developer.valvesoftware.com/wiki/Constant-Linear-Quadratic_Falloff

MoonUnit
08-31-2008, 08:53 AM
Thanks for the welcome and the advice so far.

Ok so that wiki page was useful and I sort of understand the different falloff systems but I'm still not really understanding what causes the bounce. I mean as you say a constant light would theoretically never fade but for a spotlight it would never fade only in the direction to which it is being aimed.

In a practical in hammer sense, could someone demonstrate how using a downward facing spot they could light a room including the roof above the spotlight. I.e. bounce the light off of the floor and onto the ceiling. Or am I just not turning on some property or compile option?

VelvetFistIronGlove
08-31-2008, 10:09 AM
The light bounces are calculated when you run Vrad as part of a compile. They might be skipped a bit when using the "Fast" option, I'm not sure.

If you're seeing a mostly black ceiling, it might well be that you've got a light prop that's casting shadows, so you should turn shadows off for it.

MoonUnit
08-31-2008, 11:07 PM
Ok I've attached to this post some screencaps of my problem. There's the light_spot entity in a small room. Its downward facing and has an intensity of 2000 (sorta extreme to illustrate the point, looking at decompiled valve maps they're often 200). There's a prop above it with shadows disabled. After compile (with normal RAD settings) you get the other two pictures showing how the floor where the light directly hits is light but there's zero bounce light.

TheDarkerSideofYourShadow
08-31-2008, 11:21 PM
With a light_spot, you'll want to toy with the angles. There is both the inner and the outer. Make sure you have the helpers button on (upper right of hammer, I believe it is the wireframe sphere) to see what they look like in the map.

FaTony
09-01-2008, 04:06 AM
Guys, stop giving him unhelpful advices. I see obvious leak, that prevent VIS and, because of that, RAD light bounces.

http://developer.valvesoftware.com/wiki/Leak

Moon, if it is difficult, to find a leak at 1st time, try using cordon tool.

http://developer.valvesoftware.com/wiki/Cordon

Just make a cordon around the room u trying to light. And check compile log. U should see "bounce added" in the RAD part.

samn
09-01-2008, 10:55 AM
Can you post your compile log?

If it is a leak then you can go to Map -> Load Pointfile, it should show a red arrow that gives you an idea of where the leak is.

efciem
09-02-2008, 10:22 PM
wouldnt a leak just make the map fullbright?
thus , blackness would be impossible?

Altaco
09-02-2008, 10:28 PM
No, the map is still lit if there's a leak I believe, but there are no bounces. Not sure though.

efciem
09-02-2008, 10:30 PM
Radiosity is a global illumination algorithm, Basicly what it means is
Light pointing in a certain direction, will hit any object in its path, light is then absorbed by the object and reflected back outwards at a similar but opposing angle of that of the light hitting it, this can be 100% of the light bouncing off, to only a small percentage, this would depend on the surface the light is hitting.

In Hammer, rad process in compile handles this,.

You can set your light up , to have limits to the distance the light will travel before it fades out / falls off.

Increase these options in the spot light properties and you will see the difference. The question remains, if the model above your light is blocking the light.. if you attempt lowering the light entity down slightly fromunder the light model, you may also notice this changes things.

here is an example of what radiosity does:

http://en.wikipedia.org/wiki/Image:Radiosity_Comparison.jpg

bob+M|M+
09-02-2008, 10:46 PM
Definitely a leak

newton21989
09-02-2008, 11:15 PM
Why not combine your light_spot with a light to achieve the effect you want?

MoonUnit
09-03-2008, 06:01 AM
So it was a leak, thanks for a all the help guys :)

(if your curious there was some trouble with displacements and a mesh that protruded out into the void seemed to cause a bit of trouble too).