point_spotlight discussion

point_spotlight discussion

Re: point_spotlight discussion Posted by RadiKal on Fri Jan 7th 2005 at 8:50am
RadiKal
55 posts
Posted 2005-01-07 8:50am
RadiKal
member
55 posts 265 snarkmarks Registered: Dec 24th 2004 Occupation: student Location: USA
Ok I posted about 2 weeks ago complaining that my frame rate was suffering. I thought that the problem was that I had a large pile of func_physboxes and that all my brushes collided, causing the compiler to need to chop up all the brushes. This, I thought, was my problem and I tried using areaportals and such to fix the lag. Well, none of it worked, but at least I cleaned up my map a bit by making sure the brushes don't intersect any more :smile: After more investigation I found that the major culprits are my point_spotlights. Originally I had about 10 point_spotlight entities in my map, and my fps was about 10 (keeping in mind I have a 1.67 Ghz, 512 mb ram, geforce 5700) when I was looking at the area with the highest concentration of the lights. This includes being on a completely other side of the map with two huge canyon walls in between the point_spotlights and I. Shortening the lights didnt' do any good, and neither did removing half the lights. Normally (without the spotlights) I managed 30 to 50 fps. Upon more experimentation I found that with only 1 point_spotlight in the map, I got 20 fps when in or looking at the light and 30 to 40 when not looking at it. Thus, I figured the point_spotlights are my problem and came here to see if anyone knew what I could do that would allow me to use the spotlights without having a huge hit for fps. They are rather essential to the map (since the map is based at night). The spotlights are not all in the same room, so if there was some way to "contain" their effect on fps so that the frame rate would only take a hit when you were inthat room, it would be acceptable... I'm thinking there must be a way to do it because in de_prodigy there are the hanging lights in ct spawn, but I dont' suffer any real fps drop there. thanks!
Re: point_spotlight discussion Posted by Yak_Fighter on Fri Jan 7th 2005 at 9:14am
Yak_Fighter
1832 posts
Posted 2005-01-07 9:14am
1832 posts 742 snarkmarks Registered: Dec 30th 2001 Occupation: College Student/Slacker Location: Indianapolis, IN
I highly doubt the point_spotlights are causing you framerate drops. I've got a ton of them in my map and they create like a 1-2 fps hit at max. You can test this by going into your map and entering into the console sv_cheats 1 and r_drawbeams 0. You've just turned off all the point_spotlights in your map. Now by turning them off and on you can see how large a dent they make in your framerates.

If they really are the culprit, then I guess you'll have to just use regular glow sprites and increase the intensity of those lights.
Re: point_spotlight discussion Posted by Paladin on Fri Jan 7th 2005 at 1:50pm
Paladin
16 posts
Posted 2005-01-07 1:50pm
Paladin
member
16 posts 42 snarkmarks Registered: Nov 30th 2004 Occupation: Student Location: Germany
Point_spotlights can be real resource hoggers. Remember to switch of
dynamic lightning in the flags section of the entity. Dynamic lightning
is not very well implemented in source and thus can result in a huge
framerate drop. Try to use at maximum one dynamic light per screen and
never use more.

With dynamic lightning switched off you can use a lot more point_spotlights.
Re: point_spotlight discussion Posted by Leperous on Fri Jan 7th 2005 at 3:31pm
Leperous
3382 posts
Posted 2005-01-07 3:31pm
Leperous
Creator of SnarkPit!
member
3382 posts 1635 snarkmarks Registered: Aug 21st 2001 Occupation: Lazy student Location: UK
Type +showbudget into the console, and it'll probably tell you what's going wrong.

I had a similar problem with my map- the FPS would drop really low in quite a simple area, and the only thing around were displacement surfaces, spotlights and a couple of models. My advice would be to remove different things and recompile to see what's going on; if your "two huge canyon walls" are built with displacement surfaces I would try removing them first as this is what was causing problem in one of my rooms (lowering the power of it seemed to help).
Re: point_spotlight discussion Posted by RadiKal on Sat Jan 8th 2005 at 10:48pm
RadiKal
55 posts
Posted 2005-01-08 10:48pm
RadiKal
member
55 posts 265 snarkmarks Registered: Dec 24th 2004 Occupation: student Location: USA
Wow, huge performance difference :smile: Thanks to all three of you! I never expected that the showbudget command would be so helpful. First thing I saw when i popped it up was that my dynamic lighting was all the way to the right and never even dropped. I switched that flag for no dynamic lighting on for all the point_spotlights and now the dynamic lighting is way down and my fps never go below 30. Thanks everyone!
Re: point_spotlight discussion Posted by Leperous on Sat Jan 8th 2005 at 10:58pm
Leperous
3382 posts
Posted 2005-01-08 10:58pm
Leperous
Creator of SnarkPit!
member
3382 posts 1635 snarkmarks Registered: Aug 21st 2001 Occupation: Lazy student Location: UK
The 'no dynamic light' flag on point_spotlights saved my life too! :biggrin:
Re: point_spotlight discussion Posted by satchmo on Sun Jan 9th 2005 at 6:01am
satchmo
2077 posts
Posted 2005-01-09 6:01am
satchmo
member
2077 posts 1809 snarkmarks Registered: Nov 24th 2004 Occupation: pediatrician Location: Los Angeles, U.S.
Same here. The frame rates increased by 10 to 20 in most places. :smile:

Even after I turned dynamic light off on point_spotlights entities, I did not notice
anything differently about the appearance of my light beams. So
the question is, when is it necessary to leave dynamic lighting on for
these entities? It seems like that there's no real reason to
leave it on, in any situation.
Re: point_spotlight discussion Posted by Joe-Bob on Sun Jan 9th 2005 at 6:16am
Joe-Bob
180 posts
Posted 2005-01-09 6:16am
Joe-Bob
member
180 posts 77 snarkmarks Registered: Dec 3rd 2004
Well, would it light up a player or prop that got in its path? It might look kinda strange if they didn't get lit at all.
Re: point_spotlight discussion Posted by mazemaster on Sun Jan 9th 2005 at 8:35am
mazemaster
890 posts
Posted 2005-01-09 8:35am
890 posts 438 snarkmarks Registered: Feb 12th 2002
Just wanted to pipe in agreement that +showbudget is a godsend.
Re: point_spotlight discussion Posted by RealEschaton on Sun Jan 9th 2005 at 9:21am
RealEschaton
19 posts
Posted 2005-01-09 9:21am
19 posts 12 snarkmarks Registered: Dec 30th 2004 Occupation: Student (College) Location: USA
<DIV class=quote>
<DIV class=quotetitle>? quoting satchmo</DIV>
<DIV class=quotetext>Same here. The frame rates increased by 10 to 20 in most places. :smile:

Even after I turned dynamic light off on point_spotlights entities, I did not notice anything differently about the appearance of my light beams. So the question is, when is it necessary to leave dynamic lighting on for these entities? It seems like that there's no real reason to leave it on, in any situation.
</DIV></DIV>
I think it only matters if you want the point_spotlight to be able to move around, sort of like the hanging lights at CT spawn in the Source de_prodigy. Turing dynamic lighting off means the light is treated as a normal spotlight, with its data used by vrad to determine the overall lighting scheme. Leaving it on means that the lighting must be recalculated at every frame (or close to it... in maps that I had dynamic lights in the amount of time spent on lighting seemed to vary wildly).
Re: point_spotlight discussion Posted by RadiKal on Sun Jan 9th 2005 at 11:46am
RadiKal
55 posts
Posted 2005-01-09 11:46am
RadiKal
member
55 posts 265 snarkmarks Registered: Dec 24th 2004 Occupation: student Location: USA
Actually, I did notice one thing when I switched the dynamic lighting flag. My spotlights are pretty long, and before, the ground spotlighted would be much lighter than the area around (much moreso than just the light_spotlight behind it) When I turned off the dynamic lighting, the ground wasn't illuminated any more (or any models or anything). The beam and glare effect are still there though, which is what I really wanted in the first place. I just upped the brightness of the light_spotlights to compensate for the loss of the extra illumination. Also, I'm looking into just placing some sort of decal on the ground to make it lighter (can this work?)
Re: point_spotlight discussion Posted by Orpheus on Sun Jan 9th 2005 at 12:28pm
Orpheus
13860 posts
Posted 2005-01-09 12:28pm
Orpheus
member
13860 posts 2024 snarkmarks Registered: Aug 26th 2001 Occupation: Long Haul Trucking Location: Long Oklahoma - USA
<DIV class=quote>
<DIV class=quotetitle>? quoting Leperous</DIV>
<DIV class=quotetext>The 'no dynamic light' flag on point_spotlights saved my life too! :biggrin: </DIV></DIV>

1)if its such a killer, what is its intended purpose used for?

2)what exactly (other than frame drops) does one do and the other do when you alter that specific setting?
3)how does it look ingame for each?

[edit] before some gripes, the case is closed, and its 3 inquiries about 1 question.
Re: point_spotlight discussion Posted by Leperous on Sun Jan 9th 2005 at 5:55pm
Leperous
3382 posts
Posted 2005-01-09 5:55pm
Leperous
Creator of SnarkPit!
member
3382 posts 1635 snarkmarks Registered: Aug 21st 2001 Occupation: Lazy student Location: UK
Without that flag ticked I think it actually lights things up; presumably as it has a 'parent' field it's categorised under dynamic lighting. It's there because I can imagine you'd want these in low-poly areas, though unticking this flag doesn't change appearance if you have a light_spot in the smae place anyway!