General Optimization Question

  • Thread starter Thread starter elroy
  • Start date Start date
E

elroy

Guest
I've almost finished the level I've been building for a month or so now and I'm starting to look at further methods of optimization to improve the frame rates that I'm getting.

I've read up on leafs and such but, never having done this before for HL2 I'm wondering what the best way to tackle the problem that I'm having is:

PROBLEM: I've noticed what, when I'm running the level, if I walk up to a wall that is on the outer edge of the map (eg, nothing (much) is behind it) and look at it my frame rates will sit up around 200 fps.

However if I repeat the same process, but look at a wall that has most of the level behind it, my fps can drop to below 30-40 fps.

As I said, I've done little in the way of optimization to this point (plenty of nodraw textures on unseen faces, but that's it). So I'm wondering what people with a bit of real world experience think is the best way to address this issue? (some kind of blocking volume perhaps - yeah, I'm from the UnrealEd world originally).

Input and advice is appreciated.

~ elroy
 
Turn your complex architecture (curves and stuff) into func_detail. (Press "toEntity" in the upper right when you have all the different brushes selected).

Test your map, go to your console, type "sv_cheats 1" and then "mat_wireframe 1" (I think that's right anyway). Then you can see how it's splitting faces - the "func_details" should prevent it from creating additional edges on the brusehs that touch it. Also, you can see whether it's rendering things that should be occluded - it makes optimizing geometry a lot easier.
 
Thanks guys,

I've already done the func_detail thing (I should have mentioned it before).

One thing I'm scratching my head about here is that I'm getting leak errors in a build of my map where I've been messing about with hits/leafs.
The leak is apparently being caused by a rope entity (power lines). However the leak doesn't happen when the hit volumes/brushes/whatever you want to call them, aren't there?

I'm assuming that the hits are causing the problem, is there some specific method that should be used to avoid this sort of thing?

Thanks again,

~ elroy
 
ONe thing I ntoticed is that entities sitting inside a func_detail will register as a leak with lots of errors. I turned a set of columns into one func_detail. A env_glow was positioned in between the columns. since bounding rectangles define object, the bounding rectangle of the whole func_detail now included another entity and this would crap out the compile. SOmething to consider.
 
RoyalEF said:
ONe thing I ntoticed is that entities sitting inside a func_detail will register as a leak with lots of errors. I turned a set of columns into one func_detail. A env_glow was positioned in between the columns. since bounding rectangles define object, the bounding rectangle of the whole func_detail now included another entity and this would crap out the compile. SOmething to consider.

That's not true, I've got some pretty large func_detail groups, and plenty of entities within the bounding box, and it doesn't give any leaks.
 
Thanks for the comments guys - however I've managed to chase down the source of the leak.. it was a: Func_n_idiot causing the problem.. ie: ME!

I'd evidently nudged one of the 'walls' of my sealed box a point or two (I must have been aligning something and accidentally selected that face as well.

Let that be a lesson to you!

~ elroy
 
PvtRyan said:
That's not true, I've got some pretty large func_detail groups, and plenty of entities within the bounding box, and it doesn't give any leaks.
You're right I just did a simple test and the error didn't occur. I have a series of arched windows (32 in a row) each window had a env_glow or spot light in it. WHen I converted them to func_detail I had the entities hidden. I immediately got leaked and a series of couldn't fidn portal, brush with CONTENTS SOLID. I redid the func's so the didn't include the entities and it went away. It happened three times which is why I was pretty sure that was the case. Now I have no idea why I got those swarms of errors.
 
Back
Top