Rendering/optimisation

DeOntwerper

L1: Registered
Nov 20, 2013
46
1
Heya there,

I have the following situation...

eWNQCL3.png


Basically...The stuff you see (the locker/torches etc) shouldn't be rendered as I am on the floor above and cannot see them.

How would I be able to make them render if I'm on the stairs, but if I'm above them make them not render?

This is the first time I am learning full optimisation.
 

DeOntwerper

L1: Registered
Nov 20, 2013
46
1
That's the tutorial I read, however I am having issues with the hint/clip brushes not making stuff render properly.
 

yoghurt

L1: Registered
Aug 2, 2013
47
86
Did you try loading the portal file for your map to look at how the visleafs are looking?

Or did you maybe compile with Vvis on fast?
 

wareya

L420: High Member
Jun 17, 2012
493
191
Obviously, did you compile with full vis? Do you have no leaks? Is your floor not func_detailed?

I just realized that you're standing sort of in the same plane as the stair side of the ground. If you want that stuff to not render when you're in that position, you need to put an areaportal across the stair's hole in the floor. Make sure to not cause any areaportal leaks!
 

xzzy

aa
Jan 30, 2010
815
531
Don't optimize before you need to because you'll never convince Source to draw exactly what you want all the time and you'll drive yourself crazy trying to make it do the right thing. Vis culling is an algorithm geared more towards image quality than performance, so Source is alway going to be rendering extra junk.

A more sensible approach is to adhere to general map layout rules (divided fighting areas, S shaped halls, standard stuff) and deal with issues when they show up.

You don't need perfect fps, you just need it good enough that people don't suffer hitches when fighting.
 

UKCS-Alias

Mann vs Machine... or... Mapper vs Meta?
aa
Sep 8, 2008
1,264
816
To be honest i think its an acceptable thing in this case and not realy worth optimizing yet. The amount of props is far too low to harm in this state. And since you are still able to partialy look into that room dont bother. I would just wait for later to see if it gets worse with the amount being rendered.

If you want to be most effective areaportals might come in handy. They might take alot of effort, but are very effective at what becomes rendered. Specificly at windows and doorways they often are used as there they are most effective.

However, a few hint brushes might help aswel and could prevent the need for areaportals. I would make a vertical one next to the stair. Once you move a little forward it would stop rendering the area below except for the staircase. the 2nd one would be at the door to prevent the right side props from being rendered, maybe another one at the window itself since they might be visible through that aswel.

Also, is that wireframe set to 1, or set to 3? as 3 is more recommended due to it giving less lines. and might show the geometry better.
 

wareya

L420: High Member
Jun 17, 2012
493
191
That said, it doesn't hurt at all to plan your optimization out ahead of time. Keeping it in mind in the early stages helps save you from headaches in future versions.

A good rule of thumb is "don't build shit that is basicallyunoptimizable".
 

DeOntwerper

L1: Registered
Nov 20, 2013
46
1
There are more prop statics and prop dynamics in the area below now. It is mat_wireframe 2. The floor/stairs/walls are all prop details.

The reason I asked as I wanted to get the optimisation correct for the future stuff I put in. Such as parts of the map are excluded from one another as well as open arears/buildings.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
I'm guessing there's a staircase connecting the floor you're on to the one under it? That would be the reason you're seeing it; the hole the stairs go through is making Source assume you can see into it no matter where you are. Maybe stretch a func_areaportal across that hole if it bothers you.

EDIT: Oh, wait, yes of course you do; it's literally right next to you in that screenshot.
 
Last edited:

henke37

aa
Sep 23, 2011
2,075
515
I think the issue is that "prop_detail". That's not a what he actually meant. He meant that everything is func_detail. Which is wrong. Walls, floors and ceilings should be normal brushes so that they do cut up PVS-
 

xzzy

aa
Jan 30, 2010
815
531
The reason I asked as I wanted to get the optimisation correct for the future stuff I put in. Such as parts of the map are excluded from one another as well as open arears/buildings.

A better option might be to read around the internet about how vis in Source works, and how to block out a map in a way that allows vis to be the most effective. Spend a week building test maps with various techniques and study how it effects various parts of the map getting rendered.

The problem is that vis is not intuitive at all and very hard to explain in a way that makes sense. Learning through experimentation can teach you a whole lot more, a whole lot quicker.

Eventually you'll "get it" and will be able to return to your map with a bunch of awesome ideas to make everything super efficient.

(and then get frustrated creatively because getting "perfect vis" seriously restricts design. which is why "good enough vis" is a much more reasonable goal)
 

iiboharz

eternally tired
aa
Nov 5, 2014
857
1,291
A better option might be to read around the internet about how vis in Source works, and how to block out a map in a way that allows vis to be the most effective. Spend a week building test maps with various techniques and study how it effects various parts of the map getting rendered.

The problem is that vis is not intuitive at all and very hard to explain in a way that makes sense. Learning through experimentation can teach you a whole lot more, a whole lot quicker.

Eventually you'll "get it" and will be able to return to your map with a bunch of awesome ideas to make everything super efficient.

(and then get frustrated creatively because getting "perfect vis" seriously restricts design. which is why "good enough vis" is a much more reasonable goal)

I think "good enough vis" would be like, not dropping below 60fps on a low-end rig.

When you have people who typically run TF2 at like 200-300fps having their fps dropping to below 60fps you know you have vis problems.
 

xzzy

aa
Jan 30, 2010
815
531
FPS targets aren't super useful because everyone's computer is going to be a little bit different. A "low end rig" in 2014 is massively different than a "low end rig" from 2010 or whatever.

I will look for obvious problems by setting fps_max to -1 and observing a game with the max number of bots. Run around while they fight, look for big drops.

Other than that my MO is to ignore optimization until someone complains in a playtest.

(note that optimization is different than sensible layout, never ignore sensible layout)
 

henke37

aa
Sep 23, 2011
2,075
515
The two have some correlation, sightliness tend to lead to worse optimization while choke points and separate routes tend to lead to better optimization.