Does spotlight distance have an effect on performance?
BeigeAlert
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
in Mapping
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.
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
2. open the map ingame and check the performance with console (^) and type: r_stats
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.
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!)