Does spotlight distance have an effect on performance?

BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
I have a room in my map with a very large window in it. I'm trying to make it look like sunlight is coming in from the outside, and matching it up with the sun from the skybox (I'm using the summit skybox). Luckily, it's a pretty big, bright spot, so I get a little bit of leeway in terms of positioning the spotlight so it looks like it's really far away. Of course, having the spot light far enough away so that it looks like a parallel light source means I need to have a tiny cone for the spotlight (10 degrees) and a very large max distance (in this case, 7800). My question is: does having a max distance this large cause a very noticeable performance impact? I have a pretty powerful system, so I'm not worried about MY performance, but am more concerned about every one else who might try to play this map.

Normally what I'd do is just have a bunch of smaller spotlights at each window, but here, I have one big, long, un-broken window looking outside, so if I have a bunch of separate spotlights, you'll see the shadows crossing over each other.

Comments

  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    edited October 2013
    As long as shadows are not on and it's not shining on a lot of stuff on the top of the map and atmospherics are not too high it should not be too bad.
  • JoseppeJoseppe Join Date: 2012-01-21 Member: 141497Members
    edited October 2013
    1. just check summit, atrium techpoint (same situation: 1 big lightsource, far away)
    2. open the map ingame and check the performance with console (^) and type: r_stats
  • McGlaspieMcGlaspie www.team156.com Join Date: 2010-07-26 Member: 73044Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester
    With lights, it typically comes down to how many are on processed / drawn. Sadly, the r_lights console command appears to have been removed at some point. You used to be able to see all the light volumes that were currently visible.
    With lights, casting shadows will have a big impact on their effect on FPS. It's also important to note that lights visibility is controlled through your occlusion mesh. So, checking with r_wireframe 1 is always a good idea. The less that gets drawn (not necessarily visible) the better.
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    Thanks for the replies guys.

    I looked at Summit and it's given me some idea with how to better light it. I'm thinking I'll just have multiple spotlights casting shadows at the proper angle in the obvious spots, rather than having one giant spotlight casting all the shadows. (they get all pixelated looking too when you do that!)
Sign In or Register to comment.