Re: point_spotlight discussion
Posted by RadiKal on
Fri Jan 7th 2005 at 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
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
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
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
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
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
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
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
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 RadiKal on
Sun Jan 9th 2005 at 11:46am
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 Leperous on
Sun Jan 9th 2005 at 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!