Optimization Help - Hint Brushes?

oxy

L5: Dapper Member
Nov 27, 2007
208
30
I have read through the infamous HL2 optimization guide many times. I am having a problem though. When I am using 'mat_wireframe 1' Every brush in my map is being drawn. So I decide to throw in some hint brushes to make sure my leafs break up visibility. No change!

Then I decide to make a test map to test some things out. Even in my simple test map with hint brushes everything is being drawn.

Here are some pics:


Overview of map with hint brushes. Celing removed for the pic.

ss01jp2.gif




In game shot of eveything being rendered.

ss02re5.gif



I am trying to optimize as I go along with my new map but I can't understand why Everything is always being rendered.


Thanks for your help.
 

ZargonX

L3: Member
Nov 30, 2007
109
4
You might want to put a horizontal hint brush over the tops of the walls, covering the open ceiling area.
 

dirtyminuth

L5: Dapper Member
Nov 5, 2007
221
15
Are your walls touching the floor and ceilings? It looks like they are, but make sure. Always abide by the grid. Are you using any func_details? They don't block vis.
 

Wiebbe

L1: Registered
Dec 25, 2007
49
4
Can you post a picture of the portals being drawn in either hammer or in GLview?


I think the issue is that because your walls are thick you can still see the LEAF that is created on the otherside. Check how your portals are being made so you can see why the VIS leaf at Player can see the VIS leaf at the pillars.

Oh, and make sure they are brushes not func_details and there are no leaks :p

(but thats kinda obvious ;P)

[edit]

Wait a minute, why does the portal you are currently in stop at that location and doest go till the end?
Check for that as well!
 

oxy

L5: Dapper Member
Nov 27, 2007
208
30
ZargonX, thanks for the reply. I have a celing there, it was just removed for that pic.

dirtyminuth, Yes, Grid snapping is on at 32 units and everything touches. This was a fresh map and nothing tied to entities.

Wiebbe, I will post a pic of the portals this afternoon. I am confused as to why the thickness of a wall would allow me to see other leaves?! The hints are drawn perfectly with grid snapping on and they touch flush with the corners.

Yea, I see in red that the portal stops there. Do have have to compile in advanced mode for hints to work? I compiled with the quick/default setting.

Thanks all.

oxy
 

oxy

L5: Dapper Member
Nov 27, 2007
208
30
Ok. Here is an overhead shot from GLview. The ceiling is removed for the pic from what it looks like the hint brushes are creating portals but hammer is still creating it's own. I think I am understanding this correctly.

20153994bu9.gif


If the walls a world brushes and everything is cleanly snapped right against each other then the brushes and entities 2 visleafs away should be the only stuff being drawn.



Why in the first shots is everything being drawn then?

Thanks again.

oxy
 
Oct 25, 2007
219
690
Okay, here's the thing, and I mention it in my LEAKS, HINTS and AREAPORTALS guide.

Hint brushes won't remove the objects from the wireframe view. It just won't render them.

An areaportal will remove them until you cross the areaportal. If you put an open areaportal in the middle hall, you'll see that the objects sat the end of the map won't bee seen.

HINT brushes only help manage visleafs, they won't remove objects from the playing map. That's a job for areaportals.

Hope that helps.
 

oxy

L5: Dapper Member
Nov 27, 2007
208
30
Space, thanks for your reply! I re-read your post.

From what I understand a visleaf prevents certain brushes/world geometry from being displayed or rendered depending on if it sees other the other visleaf. If that is the case then the pillars and cube on the opposite side from the player shouldn't be drawn because the hint brushes would create portals which would prevent the visibility of those world brushes.

With using mat_wireframe 1 i thought I would be able to see the effects of my hint brushes and improved visleafs by showing that less of my level is showing up as wireframes. Should my entire level show up in mat_wireframe 1? If so am i understanding you correctly that area_portals are the only way to effect the rendering of world brushes?

Right now the only entities in the scene are the player and those two hint brushes. When you refer to 'objects' are you referring to 'brushes' or 'entities'?


Thanks again for helping me completly understand the topic of hints and optimization.
 
Oct 25, 2007
219
690
Right now the only entities in the scene are the player and those two hint brushes. When you refer to 'objects' are you referring to 'brushes' or 'entities'?

Objects refer to both entites and brushes.

Just because an object doesn't get rendered, doesn't mean it doesn't exist (wow, a triple negative). The object isn't rendered, but it still exists, and the map still has to calculate each object in existence in relation to you,

Areaportals separate the map into smaller sections, so certain objects only exist in that particular area.

Hope that clears it up.
 

oxy

L5: Dapper Member
Nov 27, 2007
208
30
So mat_wireframe 1 will show everything that exists.

Well is there anyway to show what isn't being rendered?

Am I right in thinking that visleafs help prevent objects from being rendered. I thought mat_wireframe 1 would help me see if my visleafs were optimized, from what you are saying mat_wireframe 1 only helps me see what exists and does not exist.

thanks a bunch, I think I am getting close here.
 
Oct 25, 2007
219
690
If you want to see your visleafs, type mat_leafvis 1 at the console.

I don't know about any commands that will show you what isn't being rendered.
 

oxy

L5: Dapper Member
Nov 27, 2007
208
30
Ok, mat_leafvis 1 will show me the visleaf I am currently standing in. But it doesn't show me which leafs are being rendered. Is that something I just have to know/trust that when my visleafs are laid out correctly and a clean as possible that only what is supposed to be rendered is actually being rendered.

Ok. I think I got it now. I was expecting mat_wireframe 1 to allow me to see what is only being rendered when in fact it is showing me everything in my map execept what is being blocked by area portals and func_occlusions.

Is that right?

:confused1::)
 

Voztron

L2: Junior Member
Jan 14, 2008
78
1
Visleafs will "cloak" the objects but they will still get rendered.
Visleaf areas will show on mat_wireframe 1 because the engine still caculates them.

Areaportals will stop object from being rendered.
Areaportals do not show on mat_wireframe 1 because the engine knows not to draw them.
 

zbandito

L1: Registered
Feb 12, 2008
21
2
having read this it makes a bit more sense for me now, too. Thanks! :)

Oh, and greetz, 1st post. :p