FPS issue on large outdoor map


(Krischan) #1

Hi,

I am really stuck and need some help for my current map. I hope that the work of the last three months wasn’t in vain. After finishing the terrain and the streets, I started the buildings some weeks ago. Normally I am getting around 70-80 FPS on my map (Mobile 1.7GHz Pentium M with Ati X600, 128MB) which is not optimum but workable without any optimizations. Now I noticed in some parts of the Map immediate drops to 40-50 FPS at approximate 40.000 rspeeds. I guess the Q3 engine calcs all visible Vertexes even I can’t see them from there (but the engine calcs them) and the showtris 2 result confirmed this.

To give you a short overview about it take a look over the command map:

At this time, there are not many buildings there, only the townhall at the left hand and two churches. But in the upper part of the map there will be many ruins and rubble, thus exploding the number of brushes there. I am feared that the FPS will drop there to unplayable performance, and finally bury this map. The map is 12288x12288 units with a fogclip at 4096 which greatly helps improving the performance, together with a one-layer sky.

Here some screenshots showing the “red spot” of my map, the townhall yard:


view towards the right side of the command map


same position with showtris 2


top view of this area


same position with showtris 2

I tried some optimizations but none worked well, some even dropped the FPS even more. First I converted ALL map brushes to detail and converted the main walls of the buildings to become structural. This lead to a very long vis time and it wasn’t really simple as it should be. Then I experimented with areaportals and hint brushes but many tutorials describe optimizations inside non-leaked buildings. Here we have ruins with windows and open roofs (after a bombing raid It would be unrealistic to have roofs everywhere :wink: ). Then I found a tutorial by Detoeni (radskybox) which describes the caulked hull technique, I tried but even this didnt work well.

This tutorial / thread:
http://www.wolfensteinx.com/surface/forums/showthread.php?s=9cd4d47166cb88fe4fab064fe8b4fc7c&threadid=598&perpage=8&highlight=radskybox&pagenumber=4

He wrote there:

By having windows you can see from the leaf in side the room into the leafs outside the room. Unless the room is total sealed and unseen from the rest of the map the portals wont work. Hinting wont work for the same reasion. Both of thess tools need to be used with a solid visual blocking structures. By having the windows most of your leafs can see into each other, so the whole map will be drawn.

I don’t get it how to tell the Q3 Engine only to calc what I can see like in screenshot #1 or how to seal the rooms in an outdoor map. I know that improvement could be possible when I saw the transmitter final map with over 160 FPS constantly on the same machine here, a big outdoor map like mine. But how? How did they?

If anybody wants to take a look over the map (PK3ed, about 10MB now, including everything) please send me a PM and you’ll get the Link for download. It is a pain in the ass, even the scripting of the objectives was simpler than this and I thought scripting is hard :frowning:


(Shaderman) #2

Better vis blocking is needed :slight_smile: Looking at those showtris 2 screenshots, there’s not much blocked IMO. I could have a look at your map tomorrow if you send me the link.


(DAbell) #3

Krischan

FPS is always going to be a problem on map that has expansive outside areas, is there some way you could try and split the map up into sections like in fuel dump where each area is in its own (ie the start with bridge and all those bits in, and the fuel dump area in the other), the tunnel keeps them completely seperate so nothing from one area is drawn in the other. I have been thinking about a similar set up for a map i’ve been planning for a while (but can’t even start) I know from the look of your map that tall hills will not fit in with the style of your map but maybe you could use tall buildings to the same effect.

You could have like a town square arrangement that is only accessed via long arcades that if they had a change in direction could block visibility and cut off an area, if you make this in its own skybox then the viz blocking would be far more efficient.

In my own mind this makes perfect sense but i’m not sure if it would really work in your situation, if you would like me to elaborate more then just say and i will try and provide some sort of pictures to back up my suggestions.

Good Luck

<DJ>


(Lanz) #4

You only have two options with a map like that, either make it into zones where you can apply proper vis blocking or adding heavy fogging with farplane dist and changed blocksize.


(Shaderman) #5

This thread might be useful: http://splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=6025


(Ifurita) #6

you could try structural sky brushes. Here’s how I did that with Byzantine

http://www.planetwolfenstein.com/4newbies/source/byzantine_final2_source.zip


(S14Y3R) #7

Can you give us a shot from Radiant of the affected area with your map.prt loaded? [gtk1.4 It’s in the toolbar under plugins\prt viewer]. _After a basic -meta. You might be able to get away with using subtlehint in the windows(or better yet-translucent glass shaders). Subtlehint acts more like a transparant structural brush(in dealing with portals) than a hint_cut.

Another useful config setting is

bind x  r_lockpvs "1" to lock what player-is-actually-drawing and another key to set 0, to unlock again.

With this you can lock PVS(potential visible set) in a hallway/ante_room and see what is actually being drawn around the corner. Helpful for figuring out where you need portals, if objects/surfaces are being drawn when they don’t need to be. .prt viewer helps with figuring too.

Also, in the newer q3map2 compiler settings, you can have the portals viewable in_Game, for severe disection!! [Thankyou Ydnar] – Except I can’t find the compiler key to activate it…anyone?

you are using _farplanedist with _foghull, right?


(Krischan) #8

First - thanks for the replies.

@Shaderman:
well I think there is nothing blocked at this time :frowning: Except the fog which clips correctly and my vis blocksize, which is currently 1024.

@DAbell:
I thought about splitting but I can forget it b/c this is a real map of the old Frankfurt am Main city, and it is in fact a large outdoor area without any tall buildings. It looks like they saved much FPS in transmitter separating the areas. I don’t think we can go this way here, unfortunately.

@Lanz:
Well heavy fogclip, hmm not the best solution but I tried it and the FPS raised at this position to ~ 80. Still looks nice, even more spooky out there :wink: The r_speeds dropped to 25000. I think I’ll keep the fog at 2048. But I still need more VIS optimize at the townhall building, there are many tris there, I have gothic arcs and many facade details I won’t cut out. I think I could do the trick by proper use of structural brushes and hints but I don’t know how.

@Ifurita:
Well done! I am getting at least 100-130 FPS there, and this without fog! I will have to think about it, still not sure how to do it without a rearrangement of the whole map. Can you explain a little bit more how you did it?

@S14Y3R:
Sure, here are the shots (first without prt, second with):

I think my structural/detail arrangement is crap at this time. It is a from my first vis tests. For the fog I only use this shader which seem to work:

textures/ffm/fog
{
	qer_editorimage textures/skies_sd/wurzburg_env/sky_bk.tga
	
	surfaceparm fog
	surfaceparm nonsolid
	surfaceparm trans
	surfaceparm nolightmap
	
	fogparms ( 0.062745098039216 0.062745098039216 0.090196078431373 ) 2048
	
}

The _farplanedist with _foghull is cutting the buildings unrealisitic, in my opinion. I just have a _fog at worldspawn and it clips correctly at 2048.


(FireFly) #9

In my map Tramfight I also used the caulkhull technique to keep fps as low as possible:

First picture shows a part of the village (the orange stuff is my own caulk-texture)

Second image only shows structural brushes (and patches). As you can see all buildings, terrain etc are made from detail-brushes to a) reduce compile time and b) to keep the amount of portals to a minimum…

Last pic shows the hint brushes I added to reduce vis.

The downside of this technique is that players will not be able to get onto all the roofs in the map.


(Krischan) #10

Mmmh I understand… so I could draw the sky around the buildings? and it will show up correctly ingame? Huh never heard of it. I must give it a try…


(FireFly) #11

yep, all will show up correctly ingame.
Goldrush used this same technique, so you might want to have a look at that map.
Also check out the link Ifurita provided and have a look at his Byzantine_final2.map file.

In my experience:It’s also best to first build your “big Blocks” of structural brushes
and then build your buildings/houses (detail brushes) around them,
and not the other way around.


(S14Y3R) #12

The _farplanedist with _foghull is cutting the buildings unrealisitic

set up your farplanedist to cull beyond the fog, so buildings don’t pop in and out.
with your fog at 2048 try farplane at 2560, just beyond the fog.

eep, yeah, make as many brushes as possible Detail. Structural brushes make portal cuts, and too many small portals in an area is causing your fps drop.
Don’t think of a detail brush like a bench, or fence, you can have entire buildings made out of detail brushes. It’s the sctrutural(foundation) behind everything you want to tweak. and hint to.


(aburn) #13

whoa… this is awsome… firefly…
Actually it would mean rebuilding my whole map… but it would be better cause if I use caulking like that makeing everything but caulk detailed…


(allanon) #14

Ah Firefly…off topic but you did Tramfight? I loved your map and had it running for about 3 months or so. I Was waiting for a final with fixed spawns :slight_smile:

aburn, that’s a pretty cool looking map.


(carnage) #15

i dont think farplane is the way to go about vising this map

if you do a pretty close farplace then your going to lose the nice effect of being able see accorss the rivier. i would set it slightly futher then the distance accross the river so if your near the shore you can see acorss but there are no isues of the whole map being drawn

fraplane is fine to help in the large open area but this doesnt mean you can forget about vis within the ruins/buildings. With this im pretty sure you could draw at least half the tris you would have with just farplane

also im not sure of this but im pretty sertain tris that are larger and closer to the player are more of a strain on fps beacuse of the more detailed texture information and screen writing space they use so far off buildings can be ok but its the closer tris you need to takecare of the most


(Krischan) #16

Carnage, you’re right - the distance from shore to shore is approximate 4096 - so I should leave this value. Damn. I must check if Firefly’s suggestions can do the trick here, I’m not quite sure how to do it right now but I’ll find out. But this can take some time, I will post the results later this week.

Thanks to all for your help!


(aburn) #17

well in my case it ment rebuilding the whole map I had…
(I used firefly’s tip)
but d00d this is really a big adventage…

u have nice structureal blocks… with which u do Visblocking/hinting… and the other stuff that players will see is detailed and also it helps cause when u turn on detail filter u can see a lot better in the editor what u want to create more…
Really nice way to map…

BTW…
If you do a complete rebuild… use everything u had b4… just like copy pasting or makeing the things u copy/move prefabs… than edit them seperately so they will have detailed/structural done nice and put them in the rebuilded map… did that with my project and it helped a lot :smiley:


(iwound) #18

What software was used to make this pic?


(psyco_mario) #19

I bet it was photoshop :stuck_out_tongue: