Optimization

I’ve been working on a map for multiplayer over the past couple of days. Its pretty small, but it starts to lag a lot when standing in one corner of the map to the other (even though you can’t see across the entire map). I turned on wireframe mode, and it turns out, my entire map is being rendered most of the time, which, as you could understand, reduces the framerate from 200 to 30 (way too low).

Here’s a mark up of my map if it was working properly (purple = hints, black = walls, white = skybox, green = areas being rendered, red = areas not being rendered, black dot = player):

[Ideal]
http://img46.imageshack.us/img46/4826/optim10004.th.png
http://img706.imageshack.us/img706/9694/optim10005.th.png
http://img19.imageshack.us/img19/6116/optim10006.th.png

Here’s what its actually doing, which causes lag:

[What it’s doing]
http://img697.imageshack.us/img697/1504/optim10001.th.png
http://img684.imageshack.us/img684/6581/optim10002.th.png
http://img132.imageshack.us/img132/5636/optim10003.th.png

Now, the only thing I’ve added are those few hints, and I can’t use area portals because the entire map will be in play at a single time. Are there any more hints I can add? How about other ways of getting the “ideal situation”?

Thanks.
-Ven

Is your skybox a big hollow box around the map?

I don’t understand. Why does this lag so much?

How big is this map?

The map is 6192*6192. And, no, my sky box is all the white space in the picture. I wrapped it around carefully.

The map is pretty heavy in props and architecture though. Which would explain why, if the entire map is being rendered, it would lag so much. My goal is to NOT have the entire map rendered. Any thoughts?

Add func_areaportals maybe?

Run VIS on full and use horizontal hints?

The problem with that is that its a multiplayer map :confused:

[editline]02:44PM[/editline]

Horizontal hints would be a good idea actually. VVIS is on fast, but I’m hoping to get the framerate up even before the final compile. I’ll add some horizontal hints and see how it works out.

Except: when I run mat_leafvis all the leafs seem to be in the right position. Hmm…

It will still work. Even if there open they act like a Vis leaf.
Try it.
Just dont use any I/O and keep the state “Open”.

What would be the difference between an open visleaf and the hints I placed then? (refer to the diagrams; those purple lines) Or is there a difference?

An areaportal is like a “Realtime” Leaf.

I know it a bad example but its the only one i can find of what an area portal atually does (Of corse this is the best case for an areaportal)

Skip to 5:11

Very useful. I didn’t realize areaportals were good for anything but cutting out complete vision. That’s a really useful video. I’m going to try areaportaling the doorways and I’ll also add a diagonal hint while I’m at it. I’ll let you know how it goes after.

Glad I can be of help.
PS. They guy who made that video is not a good person to learn off.

Stupid stupid stupid. The reason it’s rendering the entire map at once is because you ran VVIS on fast. It didn’t bother doing calculation to see which portal can see which, so it renders the entire map at once. Your not going to see any improvement via placing hints when you just run VIS on fast.

Please, learn the compile tools and options before you start something next time.

www.optimization.interlopers.net

I realize that it ended up making a load of difference… but I didn’t start mapping yesterday. I’ve been doing mapping for Valve games for at least a year… although do to my short intention span never really ended up finishing anything, so there was never any need for optimization. I’m sorry if I stole a moment of your time by asking a dumb question… either way, the feedback was really helpful in getting my map to a good optimized state even after vvis ran on high.

Besides, all the optimization tuts I’ve looked at don’t even touch on the fact that vvis running on fast will not do the full calculations of portals, it just says it will make everything run slower and look worse, which I assumed already. Even the source sdk developer wiki doesn’t give full info on the vvis system in the optimization section.

Acknowledged, edited the Wiki to be more descriptive as to what -fast mode does.