why portal flow is taking to long?

  • If you're asking a question make sure to set the thread type to be a question!

ricardojvc6

L6: Sharp Member
Jun 8, 2009
268
66
i'm wondering why portal flow is taking to too much time is there any help like videos to help because of this i quit for making manny maps because i tought there no repairing
 
Last edited:

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
First step: convert any detail geometry into func_detail, func_lod or func_brush
second step: add hint-skip brushes.

additionally, go to map>Load Portal file in hammer to see how your visleaf's were contstructed without going ingame and having to type in sv_cheats and r_drawvisleafs. Loads of small blocks are bad, especially if they are at unusual angles.
 
Last edited:

ricardojvc6

L6: Sharp Member
Jun 8, 2009
268
66
well i think that should help thx :)
 

Sgt Frag

L14: Epic Member
May 20, 2008
1,443
710
First step: convert any detail geometry into func_detail or func_brush
second step: add hint-skip brushes.

additionally, go to map>Load Portal file in hammer to see how your visleaf's were contstructed without going ingame and having to type in sv_cheats and r_drawvisleafs. Loads of small blocks are bad, especially if they are at unusual angles.

I'd actually recommend loading the portal file BEFORE adding hints. Then you actually know where they are needed. But you need to do a full vis compile first (don't do lighting), a fast vis won't give you accurate results.

Then learn how hints work and implement them based on how your full vis comes out.

Adding hints willy nilly will not only have bad effects on performance but will add more vis_leafs which in turn will slow down the compile process.
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
One other thing to watch out for is that if you have huge outdoor spaces VVIS may take a while with the boxes it creates inside those, but func_viscluster can help speed this up.

(It only speeds up VVIS, It won't speed up the actual in-game performance, and if used incorrectly will harm in-game performance.)
 

ricardojvc6

L6: Sharp Member
Jun 8, 2009
268
66
it apears small medium large cubes how to do i know what is good and its bad and how to place the vis leafs in places what are good and are bad
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Go here:
http://optimization.interlopers.net/

Chapters 4 and 5 are what you want to look at. The boxes themselves are normal--you'll always have some--but the goal is to avoid creating lots and lots of weird tiny boxes, because this makes the "can box X see box Y" calculations take a long time.

func_detail is a method to tell the system to not bother trying to calculate whether a brush fully blocks things behind it. Like the bars in a prison cell door, a thick pillar in a lobby, or a bookshelf along the wall, etc. It doesn't directly affect whether or not the player can see through it with their eyeballs, whether they can shoot it, or whether they can stand on it, it just tells the computer not to bother paying attention to it the same way it does with walls/floors.
 
Last edited:

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
Adding hints willy nilly will not only have bad effects on performance but will add more vis_leafs which in turn will slow down the compile process.

Loading the portal file before hand is a good idea to see the damage. But,

Long portal flow is a result of the computation of what can be seen from where more than how many leafs are being created. The time is put into the mathematics involved in resolving said inneficient leafs. Not that you should place hints 'willy nilly', but 'willy nilly' hints would negligably effect compile time (relavent to your system capabilities). The worst result would be an increased file size. As long as your computer isn't 8+ years old, hundreds of hints wont really make a whole lot of difference to the compile time.

Whilst you seem to grasp the mechanics of hints, you don't seem to understand the process of vvis.exe.
 
Last edited:

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Having too many tiny visleaves is a problem for VVIS, but for the actual in-game engine... the main issue would be memory use rather than CPU power, if anything.

IIRC, the output of VVIS is a huge hash table of visleaves:
  • X can see W,Y,Z
  • Z can see X
  • W can see X, U
  • U can see W
    ... And so on.

This is--by design--a relatively fast thing for your computer to look up every time you enter a new visleaf. Having the visleaf landscape be unnecessarily-detailed (that is, lots of visleaves, not lots of func_detail) isn't that big of an in-game performance hit. The hash table scales pretty well, so it would show up as a relatively-minor increase in memory usage.*


Summary:
  • Having lots of visleaves (or a few highly-connected ones) slows down VVIS, but doesn't harm in-game performance anywhere near as much.
  • The opposite problem--enclosing your entire map in a func_viscluster or func_detailing all your walls--is extremely easy on VVIS, but very hard on your in-game performance.
  • Could hint-brushes "willy nilly" harm gameplay speeds? Yes, but by a relatively small amount compared to other sources of performance issues. Could they harm VVIS speeds? You'd have to place a lot of them.


*Assuming your "many tiny visleaves" aren't parts the player would put their body into, which would have a bigger effect since it would trigger more lookups.
 
Last edited:

ricardojvc6

L6: Sharp Member
Jun 8, 2009
268
66
i have put all stairs roofs func_detail but nothing changes what i can do to change the vis leafs it apears the leafs the same
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Show use a screenshot of your map in Hammer with all func_details turned off.
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Woah. You need to func_detail that pyramid for a start.
 

sniprpenguin

L6: Sharp Member
Mar 14, 2008
266
258
Yeah, start with that pyramid as Psy said, then go in and func_detail all of those stairs! And remember that changes to the visleafs showing won't change unless you recompile your map.
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Huh? The pyramid itself doesn't look that bad to me. Just put a horizontal hint brush through the area at its apex-height to keep it from projecting upwards, or detail the top mini-pyramid to leave a flat roof. It's certainly big enough to be a legitimate vision-blocking item. (I may also just be jaded after working with the 2fort spiral ramp ceilings.)

I'd focus on the stair steps. Look at the last few pictures in this link to see how to do it.

Like sniprpenguin said, you need to re-run the VBSP step and then reload the portal file in order to see changes in the blue portal lines.

_____________

As a side note, the map looks a bit too much on the "large and open with long long hallways" side.
 
Last edited:

ricardojvc6

L6: Sharp Member
Jun 8, 2009
268
66
right i func_detailed the pyramid there is stairs what are func_detailed too and roofs too just know i need to optimize it with skip hint areaportal and occuluder well i need help where to put it
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Did you read through that Interlopers.net optimization guide?

IMO you may want to hold off on more than basic optimizing if you think you'll be making significant layout changes in the future.

If VVIS is still the annoying part, try putting a few func_viscluster blocks to group up, to enclose the bulk of that empty air in the central yard.
 
Last edited:

JoshuaC

L420: High Member
Sep 2, 2008
444
164
Really when you're starting out you only need to worry about learning how to use func_detail properly. Hints, Areaportals, and Occluders are tricky to set up and can mess the map up bad if used improperly.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
many tiny visleaves

Is unfortunatley a relative term. Particularly when we're talking about a real map scenario or for a 'for the sakes of arguement' one. If you're using hints properly then one shouldn't be abusing hint brushes and subsequently portal flow time. The point of hints are to get the most efficient leaf setup. Adding them willy nilly was interprited as unnecassery inclusion of hints for portals already efficient, and thus no change would be made to portal count at all.

The portal file will mostly help you find inefficient leaf setups around holes such as windows or doors, or missed detail geometry/generally complicated geometry (such as your stairs).

Determining more advanced usage of hints in open terrain is up to player tenacity and inginuity.