Optimizing Help? Seem to be stuck...

Discussion in 'Mapping Questions & Discussion' started by (s2a) yahodahan, Jul 16, 2009.

  1. (s2a) yahodahan

    (s2a) yahodahan L3: Member

    Messages:
    144
    Positive Ratings:
    18
    Lots of comments on the "s2a_compound" map being uber-laggy, so I'm doing my best to fix it!

    Problem is, I seem to have hit a plateau on just how good I can get it, and am not having luck with most tutorials, etc- I believe because this map is very much open, and not so twisty/turny that Vis can do a good job.

    I know this is a long shot, and a lot to ask, but if ANYONE would kind enough to take a gander at the VMF you can find here, and toss me some advice/ideas/suggestions, that would be amazingly helpful.

    I have read up on area portals and occluders mostly, and am doing all I can with those. Actually, I have found that occluders, despite being rarely (if ever) used by most, have been doing me much better than vis and area portals, in some places.

    I have the feeling, however, I'm not using these all to the best advantage...or even correctly, necessarily :p

    Even a quick glance and and then screenshot with "this is WRONG!, this is on the right track!" would be great- thanks all!
     
  2. Geit

    aa Geit 💜 I probably broke it 💜

    Messages:
    597
    Positive Ratings:
    1,114
    I'll take a look, give me a few hours.

    Also, i notice that it has custom models, it'd be easier to edit the map if I/We had them.
     
    • Thanks Thanks x 1
    Last edited: Jul 17, 2009
  3. Open Blade

    Open Blade L7: Fancy Member

    Messages:
    439
    Positive Ratings:
    34
    You gotta a ton of major problems on that map that are keeping your frames high. Here's a few things I noticed after viewing it for 5 minutes and some others that really don't have anything to do with frame rates, just odd things.


    These are the frame savers

    1) I didn't see one Hint/Skip brush on the entire map. In a large open map with hardly any building, you will need those.

    2) You have your floor set to func_detail and just underneath the floor is a MASSIVE body of water. That much water will usually be hard on the frames but with your upper floor being set to func_detail, you are now removing the leaf between the 2 areas and now the water is in the same leaf as most of the entire map. Do not make your floor func_detail. Keep the water below the main play area and seal that entire lower level with areaportals.

    3) You have a few areaportals on the 2 middle buildings but 90% of your map is one large open area, which just happens to contain most of the models on your map. I would say Hints will help but a map like this needs better structure work.

    I would say doing those 3 things will greatly help your frames.

    Just a quick note, why do you have occluders around your walls when you have your walls set to func_detail? You don't need an occluder on func_details.


    Honestly, my best advice, besides the things listed above would be to try and section off your map a little better. And you don't really need your skybox that tall. I don't think a demo man could even sticky jump half that height. Lower that thing down about a 3rd.
     
    • Thanks Thanks x 1
  4. (s2a) yahodahan

    (s2a) yahodahan L3: Member

    Messages:
    144
    Positive Ratings:
    18
    A ton eh? no prob, now I'll know better what they are :)


    I may have made a premature decision on this- I read in the forums, a letter from valve, actually, that hints could actually just slow things down in more open maps. Not that I ruled them out entirely, but I figured I should mess with them later, as it also seemed they were more for helping VVis go faster? I'll make this my next mission to implement. Also, skip I simply havn't yet looked into at all, will do.

    Got it. Not sure why I had that floor set to function detail...I think I (too the opposite of most, it seems) started off in Hammer being very "func_detail" happy, not leaving really anything at all for VVis to work with. If you saw my map from just 3 days ago, there were perhaps 10 world brushes total...haha. :blush:

    Is it alright to make the water separate pieces of brushwork? Then I could fit it properly into the tunnel, but I was worried this might be a no-no.

    Yep, I just started messing with those area portals, and am really trying to implement them as best as possible. My big problem is, most of the buildings have slanting roofs- how can I make sure the world brushes hit each other exactly on the verts, and thereby contain the area/vis leaf, for portals to work correctly? That's why I only have them on the garage so far...

    Much appreciated- I'll hit those up right away! :D

    Ahh...I knew someone would point/taunt/laugh/get very confused on that...haha :p

    The reason was, the occluders seemed to be doing a MUCH better job at hiding props than the vis and area portals. When in the garage, I could see tons and tons of models through walls (via wireframe mode), even though there was no reason for it! With the occluders placed in, 80% of those models were properly hidden...so I went crazy with 'em...maybe a bit too much, though it did seem to help alot.

    Sectioning it off, indeed. It's tough though, since I don't really want to add in more buildings/etc, but it may just have to be done. Do you think I should make the walls world brushes, and maybe raise them up a bit, to make good vis leafs for players on the ground?

    About the skybox- it's only that high due to the huge factory chimeny-thing. Not sure how to get around that, without stumping the chimeny. Is this hurting frame rate badly?

    Oh, and I actually had to put a clip around the chimeny top- otherwise (just barely!) a demo man could double-sticky jump right up on top! :p

    Thanks a ton OpenBlade, really appreciate it, I'll get right to work on all those :):thumbup:
     
  5. Open Blade

    Open Blade L7: Fancy Member

    Messages:
    439
    Positive Ratings:
    34

    It is one big open map, which hammer really doesn't like but it's not nearly as big as some I've seen. I think one thing that will really help alot is to get that huge amount of water sealed into it's own leaf down below. I mean, that thing was as large as a football field if not bigger. That's a ton of water. You should also make sure you are using "cheap" water rather then "expensive" water since you have so much of it. That will help alot.

    You can have slanted roofs and still keep your room sealed so you can use area portals. Lot's of mappers do this. Just make a separate roof inside that fits snug to the walls and keep the roof separate (as a func_detail). Just make sure there are no leaks in the room, or your areaportals will leak. Every opening will need an areaportal (doors, windows, etc...). You can't have one areaportal in one door and not the other if both doors are open to the same space.

    Also, did not mention this before but you also should be using NODRAW texture on all brush surfaces except for those that show to the player.

    I would worry about your hint/skips last. Those usually help frames but unless the other stuff is fixed, they won't help much at all.

    One last thing, since you have so many props on the top level and they are all out in the open, you can set the fade distance higher so they fade out faster. Oh yeah, and the fog controller can help with that same thing also. Fog can cut down visibility on stuff far away and it won't get rendered.

    Goodluck.
     
  6. Sgt Frag

    Sgt Frag L14: Epic Member

    Messages:
    1,443
    Positive Ratings:
    294
    I haven't looked at the map, just read the comments.

    1: it's true that water will cause lag, better to use a few small brushes in the tunnel than one huge brush. Water surface reflections is what causes lag. Only use water where it can be seen, everything else is wasted. (Of course with displacements in something like a twisty stream there will be some unseen water.)

    2:If it is one large area hints (skip is just used on the remaining faces of that brush) won't help. They might limit sight lines out of a door or something but they will add visleafs to an area that might have too many to begin with.

    3:all your walls/floors/ceilings should be world spawn, thus blocking views and objects. area portals inside windows and doors won't limit views of terrain but will limit object rendering which is good.

    4: on angled roofs just cut all the brushes flat across the top of the room. Everything above that straight cut can be func_details, everything below will be squared up world spawn. You can put an 'area_portal roof' across the top of the room like a door, that'll limit views of objects and seal the room.

    5: You should use a skybox smokestack probably, or build a tight little skybox to go up around the smokestack, but don't make the entire map tall enough for it.
     
    • Thanks Thanks x 1
  7. (s2a) yahodahan

    (s2a) yahodahan L3: Member

    Messages:
    144
    Positive Ratings:
    18
    Just got back from The Land Where There Is No Internet Or Even Cell Phone Coverage (gasp!), thanks for the ideas Sgt Frag- the "area portal roof" is great! I'll implement that right away.

    Thanks!
     
  8. Shmitz

    aa Shmitz Old Hat

    Messages:
    1,129
    Positive Ratings:
    740
    If you have made custom props for the map, do they have lod models? Those can help with performance, as they reduce the number of polies being drawn as you get farther away. On a similar note, have you played around with the fade distance on your props? If you have a prop, and you know players will never see it unless they're within X distance, you can set the fade distances such that they quickly pop into existance only right before a player would come around that corner and see them. This is generally useful if they're only ever being hidden behind func_details or other props.

    Lastly, occluders should only be used if they're hiding a ton of props. They have a pretty high performance overhead themselves, and can end up hurting more than they help if overused.
     
  9. (s2a) yahodahan

    (s2a) yahodahan L3: Member

    Messages:
    144
    Positive Ratings:
    18
    hi shmitz- I did indeed go through and set custom fade out distances for just about every single prop in the level. May have actually been a bit to aggressive with the fades...we'll see.

    The occluders do hide quite a few props, so I think they are making a positive contribution. Most, anyway...

    I could work on LOD models, too, if I get time, and these other methods don't work...

    thanks!