03-14-2008, 10:21 AM | #1 |
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. Last edited by Lt Llama; 03-23-2008 at 11:42 PM. |
|
03-14-2008, 07:35 PM | #2 | |
D&A Member
Wiki Team Fortress Forever Staff Join Date: Apr 2007
Posts Rated Helpful 31 Times
|
Quote:
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) Last edited by Crazycarl; 03-14-2008 at 07:41 PM. |
|
|
03-14-2008, 07:38 PM | #3 |
D&A Member
Wiki Team Fortress Forever Staff 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.
|
|
03-14-2008, 08:22 PM | #4 |
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?
|
|
03-14-2008, 10:50 PM | #5 |
D&A Member
Wiki Team Fortress Forever Staff 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. |
|
03-14-2008, 11:29 PM | #6 |
Wizard of Milk
|
Nice post Carl, real informative. Actually learned something useful today for once
|
|
03-15-2008, 12:23 AM | #7 |
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. |
|
03-15-2008, 04:40 AM | #8 |
Wiki Team
Fortress Forever Staff Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly Gametype: PAYLOAD Affiliations: DET- Posts Rated Helpful 19 Times
|
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf (Beta) alchimy_b1 (Lua) base_payload_2015 (Models) props_trainyard |
|
03-15-2008, 10:34 AM | #9 |
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 .
|
|
03-15-2008, 06:46 PM | #10 |
D&A Member
Wiki Team Fortress Forever Staff 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 |
|
03-15-2008, 06:53 PM | #11 |
Fortress Forever Staff
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.
|
|
03-24-2008, 12:05 AM | #12 |
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. |
|
04-12-2008, 12:08 AM | #13 |
Banned
|
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. |
|
04-12-2008, 01:12 AM | #14 |
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. |
|
04-12-2008, 03:16 AM | #15 |
D&A Member
Wiki Team Fortress Forever Staff 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. |
|
04-21-2008, 04:14 AM | #16 |
D&A Member
Wiki Team Fortress Forever Staff 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. |
|
04-22-2008, 07:16 AM | #17 |
Banned
|
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.
|
|
04-22-2008, 03:13 PM | #18 |
Wiki Team
Fortress Forever Staff 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 |
|
04-22-2008, 03:21 PM | #19 |
Community Member
Server Owner
Beta Tester Forum Moderator 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
__________________
|
|
05-18-2008, 04:22 PM | #20 | |
Retired FF Staff
Join Date: Mar 2007
Posts Rated Helpful 0 Times
|
Quote:
ff_aardvark uses the areaportals tho. |
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|