Fortress Forever

Go Back   Fortress Forever > Editing > Mapping

Reply
 
Thread Tools Display Modes
Old 03-14-2008, 09:21 AM   #1
Lt Llama
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
How to optimize maps with big open spaces?

Mr Hint Brush Noob reach out for help

Most tutorials on hint brushes shows simple examples with corridors with
T-junctions and doors. But how about an outdoor map with lots of hills and props? I want to add hint brushes to a map I'm working on, but I wan't to do it right.

I had to add a huge building in the middle of my map to block vis but as you can see from mat_wireframe 2 a lot of stuff is rendered inside the building which you can't see.





So I got 2 questions about this.

1. Should I cover the inside of the walls with hint brushes?

2. Anywhere I look all the props are rendered by vis, even if hills are in the way. Can and should I add hint brushes inside the displacements to solve this? All displacements have nodraw brushes under them as it is now.

But to make it real simple for a hint brush noob like me, is this a correct assumtion?:

If mat_wireframe 2 renders things you can't see you can and should block those areas with hint brushes

p.s. Plz don't mention area portals :P Not right now anyway.
__________________
http://www.signaturebar.com/uploads/images/50033.png

Last edited by Lt Llama; 03-23-2008 at 10:42 PM.
Lt Llama is offline   Reply With Quote


Old 03-14-2008, 06:35 PM   #2
Crazycarl
D&A Member
Wiki Team
Fortress Forever Staff
 
Crazycarl's Avatar
 
Join Date: Apr 2007
Posts Rated Helpful 31 Times
Quote:
Originally Posted by Lt Llama
But to make it real simple for a hint brush noob like me, is this a correct assumtion?:

If mat_wireframe 2 renders things you can't see you can and should block those areas with hint brushes
It's not correct, at least not in the way you are thinking. Before you can use a hint you must understand visleafs. All the space in your map is broken up into boxes called visleafs during compile. During the vvis part of the compile, all the leafs (leaves?) are tested for each other for line-of-sight(LOS) and the results are stored in the map. This is to save the game from having to do real-time visibilty testing, which is a huge load on the CPU. All it has to do is look at what leaf the player is in, then render everything that can be seen from that leaf.

The problem is that's not very precise. Sometimes the leafs are very big and extend to where it has line-of-sight into another area of the map. (Typing mat_leafvis 1 in the console gives you a visual of the leaf you are in.) The purpose of a hint face is to force all leafs to get clipped off so that the above does not happen.

Look at this. in an outdoor map the leafs tend to extend all the way up to the sky, as in the left image. What this means is that when you stand on one side of the hill, what's rendered is identical to what would be rendered if you were up in the sky. The engine considers the two forts to have LOS to each other, even though they really don't.

If you use a hint like I've illustrated, you limit the height of the leafs on the ground, where the player is likely to spend most of his time. Now there's no way for the forts to have LOS each other.

(FYI a portal is the name for a side of a leaf. They don't have anything to do with areportals. Vis actually tests portals for LOS, not the whole leaf at once. You don't need to know this)
__________________
Support FF:

Last edited by Crazycarl; 03-14-2008 at 06:41 PM.
Crazycarl is offline   Reply With Quote


Old 03-14-2008, 06:38 PM   #3
Crazycarl
D&A Member
Wiki Team
Fortress Forever Staff
 
Crazycarl's Avatar
 
Join Date: Apr 2007
Posts Rated Helpful 31 Times
Also if your only problem is preventing props from being rendered, an occluder might be what you need. However those don't help to hide map geometry.
__________________
Support FF:
Crazycarl is offline   Reply With Quote


Old 03-14-2008, 07:22 PM   #4
Lt Llama
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
Thx, that made it much clearer, and it was not like I thought it was. The problem here is, as you can see a boxy fort on a hill surrounded by a lower landscape. The players are supposed to get up to the top, and thats where the main battling are done. Instead of covering the insides of the walls with hints, as I thought, is it then better to just add a huge horisontal hint brush below the topmost hill, as the players who are below don't have LOS to the other lower hills on the other side?
Lt Llama is offline   Reply With Quote


Old 03-14-2008, 09:50 PM   #5
Crazycarl
D&A Member
Wiki Team
Fortress Forever Staff
 
Crazycarl's Avatar
 
Join Date: Apr 2007
Posts Rated Helpful 31 Times
That would help a lot. It's good to just pick two areas that should be seperated, and focus on boxing them out. If you set out trying to prevent EVERYTHING from being rendered unnecessarily, you will fail.

For any hill you think you might be able to use for vis-blocking purposes, the first thing you need to do is put a nodraw-textured wall inside it. It can be any thickness, but make it as tall as you can without it sticking out of the displacement. If it sticks out a tiny bit it's ok, but keep in mind that players and bullets can collide with it. Then hide the displacements and start with your hints, keeping in mind which areas you are trying to hide from which.

Horizontal hints work for the problem of seeing over (or under) walls, but it's also possible to see around walls, in which case you can use vertical hints using the same principal. Hints also can be diagonal. There's no reason they have to be straight.

If you can't get the hints working as well as you want (and depending on how your map is designed maybe you can't)I think func_occluders are going to be your best bet, since I think most of your FPS drop is going to be caused by props and player activity.
__________________
Support FF:
Crazycarl is offline   Reply With Quote


Old 03-14-2008, 10:29 PM   #6
cownaetion
Wizard of Milk
 
Join Date: Sep 2007
Location: Upstate NY, USA
Posts Rated Helpful 0 Times
Send a message via ICQ to cownaetion Send a message via AIM to cownaetion Send a message via MSN to cownaetion Send a message via Yahoo to cownaetion
Nice post Carl, real informative. Actually learned something useful today for once
cownaetion is offline   Reply With Quote


Old 03-14-2008, 11:23 PM   #7
Mr. Happy
FF LOL
 
Join Date: Sep 2007
Posts Rated Helpful 0 Times
You should also look into occluders, might be more appropriate since those screenshots make it hard to see the structure of your map.

Occluder's are usefull if you have alot of models being rendered when they shouldn't, and hints can't take care of it.
Mr. Happy is offline   Reply With Quote


Old 03-15-2008, 03:40 AM   #8
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
This thread is very helpful...you guys rock!

I'm adding it to Geokill's mapping resources thread.
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 03-15-2008, 09:34 AM   #9
Lt Llama
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
Yea, this was awsome. I'll try and make three versions. One without hints and occluders, one with hints and one with hints and occluders. I wanna see the differance. And yea Carl, at some of the hills the leaves stretch to the top of the skybox. The landscape was made with dispgen and it covers the area under the displacements with nodraw brushes, so thats covered. I'll let you know the results of my experiments .
Lt Llama is offline   Reply With Quote


Old 03-15-2008, 05:46 PM   #10
Crazycarl
D&A Member
Wiki Team
Fortress Forever Staff
 
Crazycarl's Avatar
 
Join Date: Apr 2007
Posts Rated Helpful 31 Times
One thing about occluders is they take up some CPU time because they have to check each model for visibility in real-time. Occluders can be turned on and off in the console with r_occlusion so you can easily compare the FPS with them on and off.

http://developer.valvesoftware.com/wiki/Func_occluder
__________________
Support FF:
Crazycarl is offline   Reply With Quote


Old 03-15-2008, 05:53 PM   #11
BlisTer
Fortress Forever Staff
 
BlisTer's Avatar
 
Join Date: Mar 2007
Posts Rated Helpful 4 Times
When mapping you just have to keep in mind to shape your leaves in such a way that the leaf you are in cannot see leaves it's not supposed to see.

__________________
Support FF:
untils you cry for the mercy like little shaven squirrel in my eating pot. - deathstriker666
BlisTer is offline   Reply With Quote


Old 03-23-2008, 11:05 PM   #12
Lt Llama
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
Occluders

Sorry, took longer time than expected to fix the 3d skybox so havent gotten around to optimising until now. I put my first bets on using func_occluders as Crazycarl suggested and that turned out ok with an fps boost of around 20.

Started adding func_occluder brushes at the spots I thought was the largest problem areas but it ended up not working very well, so I just slapped in a couple of huge occluders just to see the differance.

func_occluders in Hammer



Occluders of this size might get the server on its knees, but have to test it. They work quite well, and you don't notice much the models coming and disappearing in the line of sight. (the func_occluders are the yellow intersecting huge brushes. Trigger texture on both sides which means they occlude from both sides.)

mat_wireframe 2 on the map without occluders



As you can see all models are drawn, even those beyond the hills.

fps on the map without occluders



Not much to write home about

mat_wireframe 2 & r_visocclusion 1 on the map with occluders



Wohoo, models beyond hills are gone.

r_visocclusion 1 on the map with occluders



With r_visocclusion 1 it colors occluded models in green boxes, not occluded ones with red boxes.

My fps on the map with occluders



From 31 to 59 fps was a giant leap for my old computer .
Intel 4 - 2.66, 1 GB ram, Geforce MX 4000.
I guess this is concidered low end today, or low medium.

Anyway, experiments will continue next with hint brushes.

Thx again for the help in the rigth direction.
Lt Llama is offline   Reply With Quote


Old 04-11-2008, 11:08 PM   #13
Nuk3m
Banned
 
Join Date: Mar 2007
Location: New Jersey, USA!
Class/Position: Scout / Offense
Gametype: Capture the Flag
Affiliations: :e0: Founder
Posts Rated Helpful 0 Times
Send a message via AIM to Nuk3m
Alright, I have read through this thread, and still cannot wrap my noob head around hint brushes. I understand kind of what you are saying above, my problem is, in my map, the main room visleaf can see into the outside visleafs, ah i dont know how to explain. take a look at my mat_wireframe 1

http://www.nuk3m.net/murderball/mdberror.jpg

it is not only drawing the side room, but also the yard.
Nuk3m is offline   Reply With Quote


Old 04-12-2008, 12:12 AM   #14
Sidd
Lua Team
 
Join Date: Mar 2007
Posts Rated Helpful 1 Times
Is that a hole in the ceiling directly in front of you?
The yard leaf could extend all the way from ground to sky. If the leaf you are in can see the upper part of this yard leaf, it has to draw the whole of it.

A hint brush in the right place would force this big yard leaf to be split into two pieces. A top half which you can see, and a bottom half which you cannot, and therefore does not get drawn.

I might be totally off track as I can't really see what's going on, but it seems like a horizontal hint level with the top of the whole will do the trick.
Sidd is offline   Reply With Quote


Old 04-12-2008, 02:16 AM   #15
Crazycarl
D&A Member
Wiki Team
Fortress Forever Staff
 
Crazycarl's Avatar
 
Join Date: Apr 2007
Posts Rated Helpful 31 Times
I can never tell what's going on in these wireframe shots. It's like just a bunch of lines, lol. But I think I can remember how murderball is laid out. That's the front door behind your crosshair, right? I believe there should be a wall right in front of that that serves for vis-blocking. Make sure it's impossible to draw a straight line from the yard, past that wall, and into the base without touching any walls (hint: I use the clip tool to check line-of-sight in Hammer. It's good at drawing straight lines). The problem is either the front door or the sky, as Sidd said.

Wireframe is good for finding problems, but mat_leafvis is more useful at diagnosing. When you find yourself in a leaf that's rendering more than you think it should, use noclip and fly to each corner of the leaf to try and find where it extends too far. If the leaf you're in seems reasonable in size, go to the area that's rendering and inspect the leafs there. One of them will be able to take the hint.
__________________
Support FF:
Crazycarl is offline   Reply With Quote


Old 04-21-2008, 03:14 AM   #16
Crazycarl
D&A Member
Wiki Team
Fortress Forever Staff
 
Crazycarl's Avatar
 
Join Date: Apr 2007
Posts Rated Helpful 31 Times
Nukem: now that I've got a good look at your map, I can tell you that hint brushes will do you absolutely no good. This is because the player has a straight view out the front door, into the yard, and into the other bases. You've changed all the walls which, in the original map, served to block visibility.

That's ok, though, because it gives me a chance to talk about func_areaportalwindow. This handy entity can stop entire portions of a map from being rendered based on how far you are from it. It's like a door that "opens" when you approach and "closes" when you move far away.

There are some big limitations though. The first is technical. You must seal off an area completely for an areaportal to work. That is, if you put one in the front door of a house, you have to put one in the back door and all the windows and the chimney as well. Thus you define the outside as area 1 and inside as area 2.

The second is an important consideration in multiplayer games. When an areaportal is closed, you can't see anything behind it (That's the point). It looks like a blank wall. So if you have a sniper standing right behind one, he's at a huge advantage, because he can see everyone but they can't see him until they get close. So you shouldn't put one at any potential sniper spots. A glass window is a good place to use one, or you can put one around the corner from the entrance, so no one sees it until they are close enough to see through it anyway.

Aardvark uses these (It's why the big flagroom window goes opaque when you are on the other side of the yard), and I believe dropdown does too(the fog is there to hide the effect). I know exactly where you might use these in murderball. Let me know if you are interested.
__________________
Support FF:
Crazycarl is offline   Reply With Quote


Old 04-22-2008, 06:16 AM   #17
Nuk3m
Banned
 
Join Date: Mar 2007
Location: New Jersey, USA!
Class/Position: Scout / Offense
Gametype: Capture the Flag
Affiliations: :e0: Founder
Posts Rated Helpful 0 Times
Send a message via AIM to Nuk3m
I am, at the moment however I am occupied with other things I want to tweak around the map. Once I come around to this stage I will contact you.
Nuk3m is offline   Reply With Quote


Old 04-22-2008, 02:13 PM   #18
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
carl, you should start a new thread a do a mini tutorial on this...I know that personally I would love to know what this is and how it works.
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 04-22-2008, 02:21 PM   #19
GeoKill----->
Community Member
Server Owner
Beta Tester
Forum Moderator
 
GeoKill----->'s Avatar
 
Join Date: Mar 2007
Location: Hawthorne, California
Class/Position: Soldier/Spy/Scout
Gametype: AvD
Affiliations: :e0:Eternal Order Leader
Posts Rated Helpful 12 Times
http://www.snarkpit.net/editing.php?...ame=HL2&id=143
http://developer.valvesoftware.com/wiki/Areaportal
__________________

:e0: Will live on Forever
Support FF:
GeoKill-----> is offline   Reply With Quote


Old 05-18-2008, 03:22 PM   #20
Sh4x
Retired FF Staff
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
Quote:
Originally Posted by Crazycarl
Nukem: now that I've got a good look at your map, I can tell you that hint brushes will do you absolutely no good. This is because the player has a straight view out the front door, into the yard, and into the other bases. You've changed all the walls which, in the original map, served to block visibility.

That's ok, though, because it gives me a chance to talk about func_areaportalwindow. This handy entity can stop entire portions of a map from being rendered based on how far you are from it. It's like a door that "opens" when you approach and "closes" when you move far away.

There are some big limitations though. The first is technical. You must seal off an area completely for an areaportal to work. That is, if you put one in the front door of a house, you have to put one in the back door and all the windows and the chimney as well. Thus you define the outside as area 1 and inside as area 2.

The second is an important consideration in multiplayer games. When an areaportal is closed, you can't see anything behind it (That's the point). It looks like a blank wall. So if you have a sniper standing right behind one, he's at a huge advantage, because he can see everyone but they can't see him until they get close. So you shouldn't put one at any potential sniper spots. A glass window is a good place to use one, or you can put one around the corner from the entrance, so no one sees it until they are close enough to see through it anyway.

Aardvark uses these (It's why the big flagroom window goes opaque when you are on the other side of the yard), and I believe dropdown does too(the fog is there to hide the effect). I know exactly where you might use these in murderball. Let me know if you are interested.
Just for the record, ff_dropdown only uses the "Z clip plane" or something like that (cant remember the exact name) which is a property of the fog. So let's say I put the fog to end at 5000, then I put the clip plane right after that so it clips everything that you can't see anyways. I had to use fog cause the front of the base is so wide open and you can see deep into it even from far away.

ff_aardvark uses the areaportals tho.
Sh4x is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:25 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.