[visblocking] lots of questions..


BasieP
04-16-2005, 02:22 PM
hi guys,

because the map killer tomato and i are making (dod_vaals) has some problems with high epoly's (r_speeds) i am trying to figure out the fine art of vis blocking...

but i did some testing, and noticed that hintbrushes not always decrease epolys but sometimes also INcrease them.

i.e. I compiled our map 3 times
1 without hint brushes
2 with 2 horizontal and like 5 vertical hint brushes in hallways
3 with 3 horizontal and lots vertical hint brushes in hallways.

now you can really see improvements between 1 and 2, but between 2 and 3 sometimes i see that the epoly's are accually INcreases..

full report about those maps and my little testing, can be found here
http://home.wanadoo.nl/atia/dod_vaals/


now with 'gl_wireframe 2' I took a look at the map, and on places where i placed a hint brush the walls began to look like this:





now that is exactly the place where i placed the hint brush. I did place the brush IN the walls, but was not sure of this.

therefor i have 2 questions about that
first of all:
how should i place those brushes? should they end IN a wall? against a wall? or just 'float' in the 'room'?

and second:
why on gods (formerly) green earth do i see 2 lines instead of 1???
The brushes i use are entirely made of the 'skip' texture, and have just 1 side with the 'hint' texture.
so when the skip-texture is skipped then i should see only a single line..

well hope someone could help me with this, because in all the tuturials i read i can't find the exact placement of those brushes.



Also i have this other question.
in an old Q3 tuturial about visblocking i read that if you have a room full of useless junk (like tables, chairs etc.) you should make those 'detail' in order for hlvis.exe to know if they are part of the walls, or part of the decoration.
in case of decoration hlvis.exe only creates 1 'room' instead of the many it does when the tables are accual brushes...

now half-life doesn't have a 'detail' entity, so i tried 'func_wall'...
now except that with 'gl_wireframe 2' i see less lines (so less brushes) i don't get lower r_speeds..

can someone tell me why then i should make those items 'func_wall'? or doesn't hlvis.exe uses those things anymore? (is it a quake only thing?)

josh_u[RR]
04-16-2005, 02:34 PM
I didn't use any hint brushes in my map, so I am no expert on this, but I can help a bit..I think.

why on gods (formerly) green earth do i see 2 lines instead of 1???

instead of making a block, make the brush a pyramid with the "point" facing away from the hint face. that way there are no side faces that touch anything. if this doesn't make any sense, I'll post a pic later.

can someone tell me why then i should make those items 'func_wall'? or doesn't hlvis.exe uses those things anymore? (is it a quake only thing?)

changing them to func_walls will convert them from w_poly to e_poly. e_poly causes less lag.

*edit*
a better explaination:
I have a suggestion for eliminating extra splits by the skip faces where they would normally contact other brushes. Instead of making your hint brushes rectangular cubes, make them squashed pyramids, with the hint only on the bottom of the pyramid. This way, you can let the edge of the hint face touch other brushes, but the skip faces will not touch anything (so long as the hint doesn't pass through the other brushes).

Additionally, instead of 'cutting corners' with the hint face, make two hint brushes that meet at the corner and have a very slight angle TOWARD the walls that the corner is on.

Gorbachev
04-16-2005, 05:55 PM
func_walls are still wpolies.

The only epoly are from models. (and somewhat sprites, they're a totally different bag altogether.)

CoolHand
04-17-2005, 03:33 AM
I never map for hl1 and never will, but read a lot on hint for HL2 and beleive most of it is the same.

First, yes hint can go into wall but will create extra splits, so it's better not to if possible.

Placement is a millon dollars question and really depend on each map.

Fist the square you talk about are called leaf. The engine use those leaf to calculate visibility. the way Vis calculate is that any leaf that the leaf the player is in will be draw. All these leaves are a level one leaf. The engine will also draw the leaf seen from those level one leaves. those are called level 2 leaves. All leaf not seen called level 2 will not draw any other leaf that would not fall in those categorie. those would be the level 3 leaves.

This is why no one can tell you where to place leaf unless we would actually place it ourself. the only way to find out is to place then and check the result to see if you draw less poly. if not then you should remove it and place it else where.

I don't know about HL1 but in HL2 hammer, you can see the leaves with a program called glview. this make it easier to find hint placement.

Also what josh_u[RR] mentioned about make it pyramid is true. Reason is that even if you put skip on all other faces it still create extra split.

For example you are in a rectangle corridor and Vis create one rectangle leaf. You put a brush in the middle as a one unit tick brush with hint on one face and skpip on all other face, you will end up with three leaves in the room. one will be the one unit tick exactly where you have put the brush with the hint on it. the pyramid technique will prevent that.

A other way would be in that case to extend the side with skip on it so that it make all the rectangle you actualy want up the the wall at the other end. This would only make 2 leaves instead of three.

The less leaves you have the faster the map will compile. I heard some mappers say it take them 40 hours to make a full compile in HL2. That is because they have way to many leaves. I made a very big map for CS Source and it took me less then one hour to make a normal full compile, not the fast one.

In HL2 we have a Func_detail. I don't know how this is called in HL2 but do know something of the kind exist.

Basically what should be made into a detail. anything that won't serve to seal a room (block visibility). Why use them: because they will create ton of extra leaves and make so much more calculation for the engine, thus slow your map in certain area.

Balcony need to be made detail since they do not block any thing. tables made of brush. basically any brush that is not a wall, a ceiling, a floor would become a good candidate depending on their use in a map.

Lets say you have a broken wall, will this seal anything? Probably not and should then be made as a detail.

So there are no definitive answer, it really by trying to understand how to use the tools given to you and test the result of anything you place to see if you gain something.

BasieP
04-17-2005, 06:52 AM
oke did an other rebuild tonight but can't get this stuff to reduce epoly's as much as i hoped...

currently i have 3 layers of horizontal hint brushes across the entire map.
they are at the hight of the walls i have in the map
kinda like this image:
http://countermap.counter-strike.net/Tutorials/Relic25/Hints72.gif

now in our map we have typical outdoor scenario, with houses and stuff.

the problem is that none of the buildings reach the sky, and therefor i placed the horizontal hints.

now i placed vertical brushes to split area's into smaller once kinda like this:
http://countermap.counter-strike.net/Tutorials/Relic25/Hints24.gif
but then again, when looking at the level with gl_wireframe 2, i still can see things i should not be able to...

i.e. this:
http://home.wanadoo.nl/atia/temp/why_s.png (http://home.wanadoo.nl/atia/temp/why.png)
click to enlarge

now i planned on redoing the entire visblocking thing, and made a overview to draw the brushes first.

this is the overview:
http://home.wanadoo.nl/atia/temp/overview_s.png (http://home.wanadoo.nl/atia/temp/overview.png)
click to enlarge

and this is it after i drawed some stuff:
http://home.wanadoo.nl/atia/temp/visblocking_s.png (http://home.wanadoo.nl/atia/temp/visblocking.png)
click to enlarge

now is this wise to do?
i'm kinda running out of idea's and after reading like 20 tuturials i still can't figure out the BEST way for an outdoor map...

when working with indoor maps it's kinda easy, but outdoors is a whole other story..
can someone enlight me?
tnx.

BasieP
04-17-2005, 11:54 AM
oke i worked some things out, and came up with this drawing:
http://home.wanadoo.nl/atia/temp/visblocking2_s.png (http://home.wanadoo.nl/atia/temp/visblocking2.png)

red is (offcourse) the hint brushes

josh_u[RR]
04-17-2005, 12:02 PM
instead of using hint brushes on top of the houses, simply draw a wall of sky from the top of the roof up to map ceiling. every section will then be its own room, just like an indoor map.

Gorbachev
04-17-2005, 02:15 PM
Originally posted by josh_u[RR]
instead of using hint brushes on top of the houses, simply draw a wall of sky from the top of the roof up to map ceiling. every section will then be its own room, just like an indoor map.

This is the route you should be taking. Using hint brushes hardly works with HL1. They are not what you should rely on. It's better to have an almost modular map as opposed to trying to "repair" it with hint brushes. Your whole problem is that the hint brushes still see the other sides of the map, it is only not rendering stuff that wouldn't be rendered anyway. Bring either the "ceiling" down or have extensions of a single wall of sky along the top ridges of the houses.

(And I suggest changing the top of the church so you don't go on the roof...it'll remove a lot of hassle. So open up either windows or destroy a different side in such a way that it's only a "window" and you don't have the trouble of access outside and thus view of a huge space of the map.)

[edit] And looking at your method of hint brushes you're probably making it worse than it was to begin with. Because if you look carefully you're making it so that it actually renders a whole extra chunk of area that it wouldn't by default because it can see even a bit of the other leaves.

Personally I would recommend ignoring hint brushes altogether, and if anything using it only once or twice in very select locations.

BasieP
04-17-2005, 03:04 PM
Originally posted by Gorbachev
This is the route you should be taking. Using hint brushes hardly works with HL1. They are not what you should rely on. It's better to have an almost modular map as opposed to trying to "repair" it with hint brushes. Your whole problem is that the hint brushes still see the other sides of the map, it is only not rendering stuff that wouldn't be rendered anyway. Bring either the "ceiling" down or have extensions of a single wall of sky along the top ridges of the houses.

(And I suggest changing the top of the church so you don't go on the roof...it'll remove a lot of hassle. So open up either windows or destroy a different side in such a way that it's only a "window" and you don't have the trouble of access outside and thus view of a huge space of the map.)

[edit] And looking at your method of hint brushes you're probably making it worse than it was to begin with. Because if you look carefully you're making it so that it actually renders a whole extra chunk of area that it wouldn't by default because it can see even a bit of the other leaves.

Personally I would recommend ignoring hint brushes altogether, and if anything using it only once or twice in very select locations.

first of all: thanx for the tips

about the sky texture with the houses:
i will do that, that's good tip

about the hint brushes:
i placed them so, that when you are on the edge of one leaf, you just can't see the leaf behind the hint brush. this way it SHOULD work. but indeed i found the results of my little test depressing :(

we allready agreed to make some changes to the layout that can reduce r_speeds a little.
but also i managed to reduce r_speeds about 33% with hint brushes.

when done, i hope to have that up to 50%, but am not sure if i can do that.


about the church:
you can't accually walk on the roof of the church, you get pushed off.
you CAN walk on the top of the tower, but it isn't really that great advantage, so a little lower fps will not really matter.

Knightlore
04-17-2005, 03:13 PM
try this
http://www.valve-erc.com/srcsdk/Levels/performance_and_visibility.html
yes is is about hl2 but a lot applies to hl1 mapping - hints in hl1 is tbh not worth it (works a treat in source mapping tho)

josh_u[RR]
04-17-2005, 03:21 PM
about the hint brushes:
i placed them so, that when you are on the edge of one leaf, you just can't see the leaf behind the hint brush. this way it SHOULD work. but indeed i found the results of my little test depressing

um, I'm pretty sure thats not how they work. hint brushes don't block anything, they just split the leaves differently. there are some decent tutorials on verc, but you're probably better off just disgarding them completely and blocking with sky.

Knightlore
04-17-2005, 03:44 PM
aye Dont bother with hints on hl1 they are more trouble than they are worth use vis blocking like doors, walls and S shaped corridors as for as hint brushes see here for how the work, you have the wrong end of the stick slightly and your hint brushes shoud really be at angles if your blocking streets and stuff

http://www.hl2world.com/wiki/index.php/Talk:Hintbrushes

this really only applies to source as it works on there

BasieP
04-17-2005, 03:57 PM
Originally posted by josh_u[RR]
um, I'm pretty sure thats not how they work. hint brushes don't block anything, they just split the leaves differently. there are some decent tutorials on verc, but you're probably better off just disgarding them completely and blocking with sky.
mm you don't quite get me..
what you say is true, and i use them like this:

normal vis build of 3 ways (black are buildings)
http://home.wanadoo.nl/atia/temp/vis_normal.png

this below is the max you can see from the right leaf
http://home.wanadoo.nl/atia/temp/vis_view.png

therefor i place 2 hint brushes on the left leaf so that the yellow part isn't renderd
http://home.wanadoo.nl/atia/temp/vis_hint.png

Gorbachev
04-17-2005, 04:32 PM
The church doesn't make sense though, why would you be pushed out? It doesn't make logical sense, you get hurt for no reason, it's the same thing with having spawn protection with not visual indication that it's going to occur. Either block it off, or give a reason for the push. Getting hurt for just exploring sucks.

josh_u[RR]
04-17-2005, 05:39 PM
just ran around it a bit. first, it looks awesome. nice work on texturing.

your layout is tight enough, you shouldn't need any hint brushes at all. just extend the sky from the tops of your roofs on up and you'll be fine.

I agree about the church tower. make it so you can't get up there. you can see WAY too much from up there and it is killing your r_speeds. several spots I saw like 20,000 epoly. it might not seem bad for someone up there to have low frame rates, but making it so that he can see over the buildings means that the engine thinks that everyone on the ground can see over them too, and that is the problem.

also, null out everything that a player will never see.

Gorbachev
04-17-2005, 05:43 PM
It's not so much that you can't get up there, but limit how you're doing it so that it's just a small portion and not a huge gaping hole that you can get out of, but then are punished for doing so. Either make it un-accessable, make smaller view-holes in some form or just make it a hide-out with minimal view in one direction only through a small crack.

josh_u[RR]
04-17-2005, 05:50 PM
this is what I mean, if I was unclear:

http://josh.whatsupslc.com/pics/dod_vaals0000.jpg

fill all of the red boxes with sky texture up to the roof of the map. it won't look any different from the ground.

BasieP
04-17-2005, 06:00 PM
Originally posted by Gorbachev
It's not so much that you can't get up there, but limit how you're doing it so that it's just a small portion and not a huge gaping hole that you can get out of, but then are punished for doing so. Either make it un-accessable, make smaller view-holes in some form or just make it a hide-out with minimal view in one direction only through a small crack.
i agree on that.
you can see the entire 2nd flag and that's accually not what the intention was.
i'll limit it

http://josh.whatsupslc.com/pics/dod_vaals0000.jpg
josh, (and also Gorbachev) the extention of the sky texture doesn't work in my testmap.

i did like the picture (and some other tests) but when i fill it with sky texture i can't look trough it.
i.e. when i have 2 buildings, and one is lower, and normaly i can see over that lower building the bigger one
like this:

_
| | _
|_|__|_|_________i

(where 'i' is a player)

with the sky 'box' on the lower building i can't see the bigger one

josh_u[RR]
04-17-2005, 06:16 PM
yes, you won't be able to see over the building, all you'll see is sky. that is kinda the point. if its a critical thing to see over some buildings then don't vis block them...you'll be taking an r_speed hit though. thats why so many people have 3 story buildings in thier maps ;) short buildings that don't touch the sky might as well not even be there afa vis blocking goes.

izuno
04-17-2005, 10:55 PM
I've been out of town all weekend and not checking the boards until now, but great work in describing the process of vis blocking and using hints. they are basically the same in source, but all is yet to be learned about how it exactly works in the new engine. Anyway the best way to learn visblocking is to do exactly what you've done here: trying out ideas yourself and posting screens of before/after while asking questions the tutorials can't seem to answer. this is a great thread...bravo to the mapping community.

Gorbachev
04-18-2005, 02:40 AM
Only extending the ceiling of sky will not do it, you have to make little "pods" of areas where you're actually completely sealed with sky like a box (so each alley is its own pod) or else you're really doing nothing.

BasieP
04-18-2005, 02:46 AM
Originally posted by Gorbachev
Only extending the ceiling of sky will not do it, you have to make little "pods" of areas where you're actually completely sealed with sky like a box (so each alley is its own pod) or else you're really doing nothing.
i get the idea

something like this:

_ ___ _
| | | |
|_|_i_|_|

where the skyblue thing should be sky..

i'm not gonne do that, although i know your right and it will save me lots of r_speeds.

the fact is that i try to simulate a little town. Therefor in many cases you need to see the rooftops in order to keep the 'small' feeling
i allready extended some buildings and placed a sky texture to the top of them, but (as you said) i don't think that'll do it.

Gorbachev
04-18-2005, 05:16 PM
There are little tricks you can use such as making the extension from the ceiling not quite touch the rooftop or sides so that it still renders the full rooftops, but stops rendering other things out of view other than the roof. It's what I did with kettle to stop all the "cuts" and missing rooftops from certain angles while still keeping the r's roughly the same.

skdr
04-18-2005, 05:53 PM
We did some nifty skybox stuff for Day of Defeat 1.3 map updates. It works well and blocks visibility nicely.

Basically, you make the roof normally and then tie it to func_wall and add skybrush inside the roof starting from the actual house part. With this trick, you can make working visblock and you dont have to worry about skybox textured brushes splitting your faces so the player can see it :)

If anyone wants to see example of this, just let me know. I can whip up a .rmf for you guys.

josh_u[RR]
04-18-2005, 06:19 PM
Originally posted by skdr

Basically, you make the roof normally and then tie it to func_wall and add skybrush inside the roof starting from the actual house part.

nice one! that actually helps me out in a couple of spots. thanks.

skdr
04-18-2005, 06:32 PM
Yes is a nifty trick. Player can see the whole roof but the skybox is going straight thru the roof. Engine just renders the func_wall and blocks everything properly with the skybox brush :)

BasieP
04-19-2005, 05:01 AM
indeed a great tip, i'll do it right away :)

btw skdr, your mailbox is full

BasieP
04-20-2005, 12:29 PM
oke, i ran lots of tests as posted above.

the latest one is my original map, with extended rooftops. this i do with sky brushes.
as you can see here (http://home.wanadoo.nl/atia/dod_vaals/vis.html)

but.. I GET HIGHER R_SPEEDS!!!
it really drives me crazy..

unlike everybody says, my rspeeds don't go down after i extended the rooftops.

they didn't go down bigtime when i thought up exactly how to place hint brushes.

the only time they did really lower was when i placed hintbrushes randomly in my map!

whole story here:
http://home.wanadoo.nl/atia/dod_vaals/

josh_u[RR]
04-20-2005, 12:46 PM
I took a look at your link and your e_poly looks fine to me. what about your w_poly?

Originally posted by Craftos

If they are higher than wpoly 1000 epoly 10000 that's not good.
For more info look at links posted above.

depending on what your w_poly is anything under 10000 for e_poly should be fine.
I'll have some time over the next couple of days, I'd be willing to take a look at your .rmf if you're interested.

BasieP
04-20-2005, 12:48 PM
my wpolys are somewhere around 400-1000, but i'll check it out on the same points i checked the epoly's (for the maps i still have)

edit:
oke i have on the same site the wpolys:
http://home.wanadoo.nl/atia/dod_vaals/vis.html


what also is weird, that when i load a map
'map dod_.....bsp' in console

the r_speeds are the first time _exactly_ twice as high as the second, third etc. time i load a map.

josh_u[RR]
04-20-2005, 12:56 PM
I'll check again, but when I ran around the middle of your map, I was seeing like 20,000 epoly...can't remember the w_poly number. its not the little window areas that will be the problem, its when your out in the open.

BasieP
04-21-2005, 01:26 AM
oke in the latest to rebuilds i had this error:


first i thought it was a compile error, but i had it twice now.

this are the rooftops i extended with the sky brush.

anyone knows how to fix it?

josh_u[RR]
04-21-2005, 01:36 AM
do you have sky on all faces of the brush? it looks like your sky brushes are casting shadows on the roofs.

Gorbachev
04-21-2005, 01:54 AM
Be sure they aren't tied to entities in any way, and that those in turn are not set to opaque. If that's even possible.

BasieP
04-21-2005, 02:41 AM
oke here is how i do the sky:

http://home.wanadoo.nl/atia/temp/skybox.gif

green is a func_wall
light blue is skybox
blue is normal brush

Gorbachev
04-21-2005, 04:32 PM
I'd do it the other way, parallel and alongside the top of the arch.

BasieP
04-21-2005, 05:02 PM
sorry i don't quite follow...
you mean something like this?
http://home.wanadoo.nl/atia/temp/skybox2.gif

so 4 brushes?

Gorbachev
04-21-2005, 06:30 PM
No, one brush that would basically from your angle of picture would be directly in the middle and only a few units wide.

This is an example from dod_kettle.

Ca-Chicken-Soup
04-21-2005, 10:56 PM
Why dont you just bend the skybox to touch the top of the roofs? Thats what I've done on my map but maybe this way is better...?

BasieP
04-22-2005, 03:37 AM
tnx gorbachev

and Ca-Chicken-Soup, i will try that one out, it should give more performance, but i can't do it in all cases in this map, because you must in some cases also be able to look down trough the sky

Eric the Pixie
04-22-2005, 07:41 PM
Here is my limited understanding about hinting. (most of what you need to know will fit nicely on the back of a postage stamp).

Hint brushes are used to block vis. If you understand how the engine decides which polygons get rendered and which do not, you will begin to understand how hint brushes work.

During the compile process, the map is split into chunks. From a given point in the map, if any part of a chunk is visible, the engine will render all the polys in that chunk. This is why the engine see's far more polygons than the player does.

As some of the diagrams in previous posts have shown, the engine renders hidden geometry behind walls and round corners because it can see a small visible part of the chunks that make up the hidden geometry and therefore renders all the hidden stuff. The player on the other hand only see's what is visible from where he is standing.

You can use ordinary brushes to vis block. You can also think about how you construct your rooms and stuff so that the engine won't render whole rooms that are just around the corner from where the player is looking.

Unfortunately, brushes are visible, and their effectiveness as a vis-blocker also depends on how suitable their placement is in a map. If the layout of your corridors and rooms would be screwed up by vis-blocking brushes, then this is where the hint brushes come in.

Essentially, hint brushes do the same job as a normal brush regarding vis-blocking but they are invisible and they don't block player movement. Just as a normal brush affects how the world is sliced up into chunks, so does a hint brush. This means you can force the vis program to create chunks where the hint brushes are placed.

Placing hint brushes in the correct place is important. They should be used to stop the engine from seeing around corners, over walls, etc.

Placing hint brushes in the wrong place can cause more polys to be rendered than you started off with. This wrong placement usually splits chunks into smaller ones which the engine can still see - increasing the poly count

Hint brushes split faces wherever they touch them. For this reason, many mappers use hint brushes that are pyramids (made from 5 points). These brushes are orientated so that only one edge touches each surface - making only one split on each brush they touch.

Hint brushes use the hint texture on one side only, the rest of the faces are textured with the skip texture. It doesn't matter which way the hint textured faces are looking - they work just the same.

Thats about all there is to know about hinting. The real skill is in understanding where to place them, but its all kinda logical really.

I hope this helps those who consider all things hinting as a 'black art' - its not :D

Pix

(I wish I had some nice diagrams to add to this, but I don't - sorry)

BasieP
04-23-2005, 04:35 AM
well in fact all the diagrams there are are in previous posts.

I learned a lot from this topic. Most important is that in some cases you just can't lower poly's more then a certain point.

i got an average of 15-20% reduced from our outdoor map, but when i could remake the layout, the map would have way lower r_speeds.

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.