Sun Light
slayer20
Killed a man once. Join Date: 2007-12-13 Member: 63157Members, Reinforced - Shadow
<div class="IPBDescription">light_enviroment</div>Something I'd like to see in the next update is the ability to make Sun Light (A single light entity like the light_enviroment for Half-Life).
I can't get the lighting I want with spot lights or a normal light entity. So yeah, simple suggestion. Could be really useful.
I can't get the lighting I want with spot lights or a normal light entity. So yeah, simple suggestion. Could be really useful.
Comments
You can do the same with a normal light entity but it messes with the shadows big time.
EDIT: Glare would be cool too. Like, 2 or 3 properties for intensity, color, etc when you look directly at a light.
If it casts shadows you'll probably be wasting a lof of performance and a lot of props don't have backsides, which probably causes a lot of weird lighting.
You have to use a couple of lights and light_spots to fake the different parts of the sunlight.
I've made some pics, maybe this helps anyone:
I'm using only one shadow casting light_spot in that area, which you can see in the first picture:
<a href="http://img43.imageshack.us/img43/572/sunlight01.jpg" target="_blank">http://img43.imageshack.us/img43/572/sunlight01.jpg</a>
"Only" a range of 2000, but you can see it working from everywhere and still it doesn't hit adjacent corridors, areas or the dark bottom area.
The small, higher light adds the highlight on the top to the left, the bigger light adds ambient light around the effect of the spot_light.
This spot_light to the upper left doesn't cast shadows and as you can see it is almost behind the rocks and has more of an effect on the normal map of those:
<a href="http://img21.imageshack.us/img21/7627/sunlight02.jpg" target="_blank">http://img21.imageshack.us/img21/7627/sunlight02.jpg</a>
The small light again highlights the top of the rocks, which you can barely see and the bigger light gives ambient lighting.
Behind that to the left is another light_spot (no shadow) faking the light that comes from below that hanging rock into the crevice. The unselected light, you can see below the big light, just lights all the rocks far away that you can barely see and which get more sun light.
If it casts shadows you'll probably be wasting a lof of performance and a lot of props don't have backsides, which probably causes a lot of weird lighting.
You have to use a couple of lights and light_spots to fake the different parts of the sunlight.
I've made some pics, maybe this helps anyone:
I'm using only one shadow casting light_spot in that area, which you can see in the first picture:
<a href="http://img43.imageshack.us/img43/572/sunlight01.jpg" target="_blank">http://img43.imageshack.us/img43/572/sunlight01.jpg</a>
"Only" a range of 2000, but you can see it working from everywhere and still it doesn't hit adjacent corridors, areas or the dark bottom area.
The small, higher light adds the highlight on the top to the left, the bigger light adds ambient light around the effect of the spot_light.
This spot_light to the upper left doesn't cast shadows and as you can see it is almost behind the rocks and has more of an effect on the normal map of those:
<a href="http://img21.imageshack.us/img21/7627/sunlight02.jpg" target="_blank">http://img21.imageshack.us/img21/7627/sunlight02.jpg</a>
The small light again highlights the top of the rocks, which you can barely see and the bigger light gives ambient lighting.
Behind that to the left is another light_spot (no shadow) faking the light that comes from below that hanging rock into the crevice. The unselected light, you can see below the big light, just lights all the rocks far away that you can barely see and which get more sun light.<!--QuoteEnd--></div><!--QuoteEEnd-->
You can make directional lights with probably similar performance to point lights, instead of shooting lots of rays out in all directions from a single point, you shoot one ray out in one direction from many points over an area.
A sensible implementation would be to allow people to define skylight planes where the light will come from and then just put them so they cover wherever you have an outdoor area.
Also means you can have multiple sun angles if you need to, as there isn't a universal environment light, there's just a light that seems to be infinitely distant in each area.