1 point light = ? spot lights

yimmasabiyimmasabi Join Date: 2006-11-03 Member: 58318Members
edited December 2009 in NS2 General Discussion
Ok here is an equation for the use of better cpu/gpu load.

1 point light = N x spot light ; N = ?

If we consider point light is a sphere and spot light is 90 deg

N may be 8 but i m not sure. It should be somehow tested.

I need this answer cuz corridors need much more lights.

e.g. should have to use 3 spotlight for one point light in a corridor ?

Comments

  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    The performance in the editor right now doesn't reflect the performance in the game or what it will be like in the final version of editor, so I wouldn't try to extrapolate too much from it.
  • WatchMakerWatchMaker Join Date: 2003-09-26 Member: 21233Members, Constellation
  • Chris0132Chris0132 Join Date: 2009-07-25 Member: 68262Members
    It depends on the casting distance, whether you use projection maps, what it's casting on, whether shadows are enabled, how wide the spotlight is etc.

    Just don't put lights in so that it lags a lot, if it lags take some out.
  • Draco_2kDraco_2k Evil Genius Join Date: 2009-12-09 Member: 69546Members
    edited December 2009
    I think this will actually result in a performance decrease if anything: what you'll be doing is placing six (?) independent lights where there could be one.

    <!--quoteo(post=1743028:date=Dec 8 2009, 08:21 PM:name=Max)--><div class='quotetop'>QUOTE (Max @ Dec 8 2009, 08:21 PM) <a href="index.php?act=findpost&pid=1743028"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The performance in the editor right now doesn't reflect the performance in the game or what it will be like in the final version of editor, so I wouldn't try to extrapolate too much from it.<!--QuoteEnd--></div><!--QuoteEEnd-->
    That is... For better or worse? Surely you guys on certain number of lights/shadows per scene, right?

    If we can use more than two shadow-casting lights in the editor without too much lag, that's already great news because those are looking great.
  • PsympleJesterPsympleJester Join Date: 2008-04-06 Member: 64024Members
    Yeah but something 2 spot lights firing at 90 degrees end to end do a LOT better than 1 norm light.
    God knows why but in some situations the norm lights seem to try screw me over so I tend to use spotlights.
  • yimmasabiyimmasabi Join Date: 2006-11-03 Member: 58318Members
    <!--quoteo(post=1743294:date=Dec 10 2009, 03:12 PM:name=PsympleJester)--><div class='quotetop'>QUOTE (PsympleJester @ Dec 10 2009, 03:12 PM) <a href="index.php?act=findpost&pid=1743294"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Yeah but something 2 spot lights firing at 90 degrees end to end do a LOT better than 1 norm light.
    God knows why but in some situations the norm lights seem to try screw me over so I tend to use spotlights.<!--QuoteEnd--></div><!--QuoteEEnd-->

    +1 I agree.
  • Draco_2kDraco_2k Evil Genius Join Date: 2009-12-09 Member: 69546Members
    <!--quoteo(post=1743294:date=Dec 10 2009, 06:12 PM:name=PsympleJester)--><div class='quotetop'>QUOTE (PsympleJester @ Dec 10 2009, 06:12 PM) <a href="index.php?act=findpost&pid=1743294"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Yeah but something 2 spot lights firing at 90 degrees end to end do a LOT better than 1 norm light.
    God knows why but in some situations the norm lights seem to try screw me over so I tend to use spotlights.<!--QuoteEnd--></div><!--QuoteEEnd-->
    What exactly do you mean by "better" or "worse"?
  • yimmasabiyimmasabi Join Date: 2006-11-03 Member: 58318Members
    better=less cpu/gpu load which makes maps playable including low or mid range gfx cards / cpus etc.
  • PsympleJesterPsympleJester Join Date: 2008-04-06 Member: 64024Members
    <!--quoteo(post=1743317:date=Dec 10 2009, 05:11 PM:name=Draco_2k)--><div class='quotetop'>QUOTE (Draco_2k @ Dec 10 2009, 05:11 PM) <a href="index.php?act=findpost&pid=1743317"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->What exactly do you mean by "better" or "worse"?<!--QuoteEnd--></div><!--QuoteEEnd-->

    Better in everyway.
    You can move them independantly so you dont have to abide by true physics.
    You can have them 2 different colours, 2 different intensitys and 2 different ranges.
    You can have one that needs to be shadow causing to have shadows whilst the other doesnt, same with atmostspheriic.
    Basically it is just better in all ways.
  • Draco_2kDraco_2k Evil Genius Join Date: 2009-12-09 Member: 69546Members
    edited December 2009
    <!--quoteo(post=1743329:date=Dec 10 2009, 10:37 PM:name=yimmasabi)--><div class='quotetop'>QUOTE (yimmasabi @ Dec 10 2009, 10:37 PM) <a href="index.php?act=findpost&pid=1743329"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->better=less cpu/gpu load which makes maps playable including low or mid range gfx cards / cpus etc.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Tested it, it's an exact opposite for me. I'm quite sure there are geometry/shadows/distance properties we aren't taking into account here.

    Also, like Max said, this may just be a quirk with the Alpha.

    <!--quoteo(post=1743330:date=Dec 10 2009, 11:34 PM:name=PsympleJester)--><div class='quotetop'>QUOTE (PsympleJester @ Dec 10 2009, 11:34 PM) <a href="index.php?act=findpost&pid=1743330"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Better in everyway.
    You can move them independantly so you dont have to abide by true physics.
    You can have them 2 different colours, 2 different intensitys and 2 different ranges.
    You can have one that needs to be shadow causing to have shadows whilst the other doesnt, same with atmostspheriic.
    Basically it is just better in all ways.<!--QuoteEnd--></div><!--QuoteEEnd-->
    That's actually a pretty neat trick if you need to do things that way. Of course you'll never get actual even spherical light distribution.
  • PsympleJesterPsympleJester Join Date: 2008-04-06 Member: 64024Members
    <!--quoteo(post=1743352:date=Dec 10 2009, 11:30 PM:name=Draco_2k)--><div class='quotetop'>QUOTE (Draco_2k @ Dec 10 2009, 11:30 PM) <a href="index.php?act=findpost&pid=1743352"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Tested it, it's an exact opposite for me. I'm quite sure there are geometry/shadows/distance properties we aren't taking into account here.

    Also, like Max said, this may just be a quirk with the Alpha.


    That's actually a pretty neat trick if you need to do things that way. Of course you'll never get actual even spherical light distribution.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Why would you EVER want that?
  • Draco_2kDraco_2k Evil Genius Join Date: 2009-12-09 Member: 69546Members
    <!--quoteo(post=1743358:date=Dec 11 2009, 03:59 AM:name=PsympleJester)--><div class='quotetop'>QUOTE (PsympleJester @ Dec 11 2009, 03:59 AM) <a href="index.php?act=findpost&pid=1743358"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Why would you EVER want that?<!--QuoteEnd--></div><!--QuoteEEnd-->
    Why would you ever not want to is a better question. Spotlights are more of special-case tools for highly directional lighting, which rarely occurs when using actual light sources, lightbulbs, ambient and outdoors alike (although it may occur a lot more in NS2).
  • Chris0132Chris0132 Join Date: 2009-07-25 Member: 68262Members
    edited December 2009
    Actually spotlights are more like the difference between painting with a sponge and painting with a brush.

    There are situations where you would use points, but a lot of the time you can get a better result by including a spotlight with a point light, you would rarely want the two to be visibly distinct, but often you will want to send light in one general direction for your primary light in any given area, because that creates good shadows and allows you to illuminate a room evenly using a light source that does not originate in the centre of the room.

    For example: <img src="http://ns2.squarespace.com/storage/concept_railcar_room.jpg" border="0" class="linked-image" />

    I think that light is supposed to be in the corner of the room judging from the shadows, now in order to make that look good I'd probably use a spot.

    I'd put an omni in to give the basic glow around the light source, but for the actual casting into the room, I'd probably use a wide spot with a very blurry edge because if I used an omni it would overbrighten around the light itsefl, whereas using a spot I can create a bright area in the middle of the room without overpowering anywhere.

    Of course if I was using pre-baked lighting I would probably place a lot of low power ambient omni lights around the place as well just to scatter it around a bit, but with dynamic lighting I would have to use as few lights as possible, which means the omni/spot pair you need to make most lights look good, and then one or two kickers to soften the shadows and set the general mood of the room.

    Generally you want two primary lights from two different directions and a kicker (low, ambient light) lighting any object in order to make it look best, so that means six lights at most, two of which should be casting shadows and possibly one with the light beams enabled, or both if the engine blends it nicely and it doesn't lag.

    Even in the image you can see a difference, the ceiling is quite a bit darker than the floor, so you'd at the very least put a spotlight pointing downward to create that effect, and that is true of any light really, regardless of where it's located in the scene. Ceilings should be dark because the horizontal space is where the level is located, and also it gives clever aliens a bit of an advantage because dark ceilings mean people don't look up.
  • Draco_2kDraco_2k Evil Genius Join Date: 2009-12-09 Member: 69546Members
    Listen to the man, that is indeed how you do it.

    Granted performance is no object in the situation, of course: say, Alpha right now can't handle more than three dynamic lights without lagging out on my machine, but that'll certainly change.
Sign In or Register to comment.