Sun Light

slayer20slayer20 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.

Comments

  • GISPGISP Battle Gorge Denmark Join Date: 2004-03-20 Member: 27460Members, Playtest Lead, Forum Moderators, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, NS2 Map Tester, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester, Forum staff
    Cant you just make a long reach spotlight to cover your entire map from a distance?
  • slayer20slayer20 Killed a man once. Join Date: 2007-12-13 Member: 63157Members, Reinforced - Shadow
    <!--quoteo(post=1775121:date=Jun 16 2010, 07:52 PM:name=GISP)--><div class='quotetop'>QUOTE (GISP @ Jun 16 2010, 07:52 PM) <a href="index.php?act=findpost&pid=1775121"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Cant you just make a long reach spotlight to cover your entire map from a distance?<!--QuoteEnd--></div><!--QuoteEEnd-->

    You can do the same with a normal light entity but it messes with the shadows big time.
  • PipiPipi Join Date: 2009-12-09 Member: 69550Members
    edited June 2010
    Well it just doesn't cast shadows at extreme ranges.. (yet?)


    EDIT: Glare would be cool too. Like, 2 or 3 properties for intensity, color, etc when you look directly at a light.
  • pSyk0mAnpSyk0mAn Nerdish by Nature Germany Join Date: 2003-08-07 Member: 19166Members, NS2 Playtester, Squad Five Silver, NS2 Community Developer
    edited June 2010
    I'm not sure how easy a light_env would be with this engine and how you could stop it from casting on adjacent, closed corridors and areas.
    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.
  • Chris0132Chris0132 Join Date: 2009-07-25 Member: 68262Members
    <!--quoteo(post=1775135:date=Jun 17 2010, 05:24 AM:name=pSyk0mAn)--><div class='quotetop'>QUOTE (pSyk0mAn @ Jun 17 2010, 05:24 AM) <a href="index.php?act=findpost&pid=1775135"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I'm not sure how easy a light_env would be with this engine and how you could stop it from casting on adjacent, closed corridors and areas.
    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.
Sign In or Register to comment.