FPS - Performance


(stebbi67) #1

Hi all.

I have some FPS problems on the map I’m working on and did not fully understand why for example standing in a room where there I can just see the room and the corridor the FPS was really bad. I had hint brushes but it did not help much. I had made every brush detailed except the hulk to save compiling time which can be enorm with some structural brushes on the map.
So I jump on the search wagon through endless information on the net, but not that often useful, and was about to give up and sacrifice some work that I had done, when I saw a light at the end of the tunnel ( what a drama he he ).
This is what I found and would like to share with you, although most experienced mappers know about this :

Further more there is another link on that page called “Area Portals”.

I did not know about that detailed brushes does not work as vis blocker although I saw it in my map that it was not working, but my little gray bean did not connect it to structural and detailed brushes. That is only structural brushes block vis not detailed.
So I believe that the conclusion is to divide the map in to sections with structural brushes but with great care sine it has large impact on the compile time and should just be done when testing performance and in the final version.

Note that I have not tested this, but very hopeful that this can make a big difference in my map.

If I’m, over joyed, putting out some rubbish or misleading information please correct me.


(Magic) #2

Im not the right one to give to much info about visblocking - but only detailed brushes is not a good idea.
You got to have structural brushes to be able to set up some visblocking.
The best solution is to plan this before you start on your map - so you got an idea how to block.

Here is a couple of places you can learn :

Tramdesign
Tremmapping


(aaa3) #3

u should use the structurals as dividing elements, see those something a broad, wide, general stuff, use only a few, and make the most parts of the map from detail.
an indoor scenario example: u have 5 rooms in a house and thats all the map. then the outer box and all the 6 walls of each room are structurals. all the little stuff inside the reooms are detail, eg. chairs, tables, et c.

and a few hint brushes may or may not be useful, depending only on the rooms’ alignment.

this applies to outdoor scenarios too but its harder to realize this in those.

this stuff is important for the compiler to determine visibility in your map. this is maybe a bad idea to tell and may mislead you but imagine that all the detail stuff will be invisible, transparent, or made of smoke, or jelly and translucent; and only the structurals will be solid. but this is not the case the detail will not be REALLY transparent nor nonsolid, its just something an explanation…


(stebbi67) #4

I have a map that is very detailed and I think it is fair to say that I have some fps issues. I have been reading this tutorial : http://www.nibsworld.com/rtcw/tutorial_detail_and_hint_brushes_part1.shtml to get a better understanding of hint brushes. Then I have been looking at some map sources to see how this is set up there. In some of the map sources I have seen that one side of the brush is “hint” and the other “skip”.

Can anyone tell me the difference between having just a hint brush and then a hint/skip brush, that is if it is not to complicated to explain?


(-SSF-Sage) #5

Hint- You already know what this is. Causes splits to the portals.

Skip/Hintskip- These faces will be skipped/ignored by the compiler, so they doesn’t cause splits. You never want to hint every face of the brushes. Hintskip is exactly same as skip, but the difference is that when you filter hints in radiant, hintskip will be filtered too, but skip isn’t. That’s why use hintskip instead of skip. For those faces that you don’t want to have split at.


(Wezelkrozum) #6

I shall explain the work of visblocking.

Structural brushes: brushes that are used to create rooms. (always drawn) (example: a hollowed brush).
Detailed brushes: Brushes that are not drawed if the player can’t see the room where this brushes are placed. (these brushes aren’t always drawn) (example: a table in a room).

Explaination of visblocking:
see attached picture (sorry of the bad quality of the explaination, but I couldn’t attach a bigger jpg-file)


(isbowhten) #7

question if i understood it right:

you see always all detailed brushes in your direction AND in the actual hintbrush you are standing
=> without hints you see evereything, With hints you e.g. if the hint is one room you see all detailed brushes of one room!

structural brushes i can always see?? so why should i use structural brushes? if i have much time i could crowd my map with hints cant i?


(Magic) #8

If you use the command “r_showtris 2” in consol you will see what the engine draws.


(-SSF-Sage) #9

Erm… You better check your statements again. Structural brushes aren’t always drawn. Ok in general:

Detail brushes doesn’t block the view of the engine, even tho you might not notice it.

Structural brushes does block the view of the engine and causes vis to be broken into extra portals.

So the vis is cut into portals (radiant plugin prtviewer to see them). Let’s think you stand inside a specific “portal”, facing into specific direction (pvs). Now the compiler will calculate, which portals in your pvs ET can see from the portal you stand in.

Ok how the compiler calculates what you can see? It draws a straight line from any place of the portal to every portal (no matter what place of the portal). Now in this stage structurals jumps in. If it can draw the straight line from the portal to another portal without a structural brush “blocking” that line, the portal will be drawn… If you make the structural brush to block it , it can’t draw a straight line, without structural brush blocking all the ways from any point of the portal to any point of the other portal(s). If the brushes in the way are detail, the “line” will go straight throught it, just like you see throught a window.

Link


(-SSF-Sage) #10

Erm… You better check your statements again. Structural brushes aren’t always drawn. Ok in general:

Detail brushes doesn’t block the view of the engine, even tho you might not notice it.

Structural brushes does block the view of the engine and causes vis to be broken into extra portals.

So the vis is cut into portals (radiant plugin prtviewer to see them, you need to have the .prt file to do it). Let’s think you stand inside a specific “portal”, facing into specific direction (pvs). Now the compiler will calculate, which portals in your pvs ET can see from the portal you stand in.

Ok how the compiler calculates what you can see? It draws a straight line from any place of the portal to every portal (no matter what place on the portal). Now in this stage structurals jumps in. If it can draw the straight line from the portal to another portal without a structural brush “blocking” that line, the brushes inside that portal will be drawn… If you make the structural brush to block it , it can’t draw a straight line, without structural brush blocking all the ways from any point of the portal to any point of the other portal(s). If the brushes in the way are detail, the “line” will go straight throught them, just like you see throught a window.

Now the hints step in. You want to place some hints, to form extra cuts to the portals. To get the earlier as good as possible. Hints doesn’t block vis basicly. But it’s reforms the portals, so the visibility is calculated differently. Again hints DOESN’T block VIS to be accurate. But they certainly helps compiler to recalculate what you can see and what not, by adding extra portals.

Now you should never go too wild on portal count. Having too much or not enough are both bad things. Debending on the situations ofc. the balance has to be found. This why you should do as much brushes details as possible, aslong as you leave some to block the view of the engine.

Bah. I’m tired and my mind doesn’t work now. So here’s a couple links too. Also you can run around fueldump or other map with r_showtris 2 (as told already) to see yourself. But summarize the most basic thing: structural brushes blocks the vis and causes splits to portals. Detail brushes doesn’t block the vis and doesn’t cause splits to portals.

NOTE: the engine (r_showtris 2) will basicly always draw more than you (r_showtris 1) can really see, but vis blocking is about to get the engine part as near as possible to what you really see.

Link
Link
Link


(stebbi67) #11

Thanks everyone, I think that this has become a very good thread for people with performance issues and it should also be easy to find :slight_smile:


(Wezelkrozum) #12

But if structural brushes aren’t always drawn if you look to your direction why should you make detailed brushes? Because if you make everything structural the walls will automaticly block the view of the player and the structural brushes behind that walls will not be drawn? :s strange. I thought every structural you can see in your direction will be drawn


(-SSF-Sage) #13

Because detail brushes doesn’t cause portals. If you have everything structural you will have a lot problems cos you have too much portals. You probably wouldn’t been able to do vis AND light compile. Every portal adds bits to the vis data you have, which will lead to hunkmeg errors, and the compile time will be longer than santas beard. The first sign of problems is usually max_map_visibility etc. errors, if we ignore the compile times.

Structural walls doesn’t always block the view. They block only if they block the line between portals fully.

If you can draw a line from any part of the portal you stand on to any part of the portal you want to hide it will draw. If there’s even slightest hole or anything, the portal will be drawn. The important thing is that it’s ANYWHERE from the portal to ANYWHERE of the other portal.

Ofc if the portal isn’t your view, no matter what, it will NOT be drawn. Althought everyone knows this.

Edit. And again, the hintskip is for the faces of the hintbrush you don’t want to use to cause non needed portals. If you just need one hint face, you should have the other faces hintskipped. It’s basicly like caulk or nodrawn, but it’s used with hint.

Edit2 also a good note, if you have a brush, that extends from let’s call them portal 1 and portal 2. Even if you can see one of the portals, that brush will be drawn. If you can’t see any of those portals, it won’t be drawn ofc. I guess you might have got confused with that, Wezel.


(stebbi67) #14

Found this one about hint/skip, just thought of share it

http://www.quake3world.com/forum/viewtopic.php?t=3620