Antiportal details, occluding zones ... Learning

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

gunslingor

FNG / Fresh Meat
Jan 11, 2011
232
56
0
http://www.angelmapper.com/gamedev/tutorials/optimization1.htm

This tutorial explains things fairly well for me. One thing that doesn't match up, the tutorial says zones will occlude static meshes in other zones automatically if you can't see any part of the mesh. It says you should be able to see the effect in the viewport. My viewport shows every mesh, every bsp, everything in the map all the time. I have 3 zones, I've checked different angles and everything is always there. Any ideas? Maybe I don't need any anti-portals at all? Maybe I just need to set some sort of zone auto-occlude setting somewhere? Anyone with knowledge would be appreciated.

More background info from another thread:
I am pretty sure I do need them as my map is pretty big and is lagging in certain area's especially as I add more detail. I'm not entirely sure what the best approach is going to be for adding them since, as you say, they need to be used sparingly. You should be able to see pictures of my map on my screenshoots page, if you can get to it. Anyway, I'll describe it quickly. The map contains one large building that takes up an entire city block, all the other buildings or city blocks are filled with BSP surfaces for the buildings and these area's are blocked off to the player... just stuff to make it look like a real city in the background. The one building that takes up an entire city block is the main playing area, you can play in front of the building in the street or inside the building in a plethoria of rooms, one of which is a huge concert hall, and the roof.

I am pretty sure you've seen the map I'm working on for the past year, you may even have a copy of an older version.... didn't you fix that red tint on my meshes problem for me?


Anyway, I am 90% sure I want to cull everything inside the building when the player is outside the building; also, I would want to cull everything outside the building when the player is inside the building... does this require two antiportals? One of the inside wall and one for the outside? Should I use a Zone antiportal for this?


Also the big concert hall room should always be culled when the player isn't in it... it could be a map in itself... also, the rest of the map should be culled when the player is in the main concert hall.


Basically what I am proposing is to put a antiportal box around the entire building and within that building, puting antiportal sheets within the BSP to cull the concert hall. But again, the culling needs to apply in both directions... when your in the room, cull the map, when your not in the room, cull the room. I haven't found this functionality discussed anywhere, so seems like something special needs to happen.


Note also that the main building has tons of windows and the building is zoned off from everything else. I would like to maintain visibility through the windows from the outside, so the anitportal needs to replicate the windows. I though using the BSP service would be the best thing, but I've read that it will ignore the windows and doors. Basically the outside of the building walls is all BSP with a static mesh stuck on top of it. Same type of issue with the doors in the concert hall.


I have also read that anitportals can negate each other so that this proposal wouldn't work. Like, with this proposal, if a player is outside and looks at the building, everything in the building (not seen through windows) would be culled, except for the main concert hall which has it's own antiportals that are behind the buildings antiportals. How do I deal with this?
 
Last edited:

gunslingor

FNG / Fresh Meat
Jan 11, 2011
232
56
0
interesting, it looks like wiremesh view is the only view that DOESN'T occlude in killingfloor sdk, exactly converse to what the tutorial said... very wierd. Anyway, looks like setting zoneinfo-->zonevisability-->manual excludes, i still can't get it to work as I expect. I mean, I am supposed to set lonely zone to true so that only that zone renders will the user is in that zone, than manual exclude all the zones that are still supposed to be generated right? Or am I supposed to set lonely zone to false and manually exclude the zones from rendering, it doesn't make sense to me. Thats what I want to be able to do though, exclude zone A while I'm in zone B.... Please help.
 
Last edited:

gunslingor

FNG / Fresh Meat
Jan 11, 2011
232
56
0
Update

Update

Starting to figure some of it out, like you gota play the game in wire mode to see the occlusion really.

I think when you set manual exclusion on one zone, it has to be set for a zone that touches it, and it seems to cull all objects behind it and all zones behind or touching the one you excluded; at least thats what I see in sdk.

In game, however, wire mode shows much better occlusion than I anticipated, and game play is much better. All I did was add a new zone. So, yeah, zones seem to occlude automatically quite well.

Also of note, things in game seem to occlude in an AI type manner, meaning its making some decisions and is imperfect. I think this is where the anti portals come in. Like for example when I'm in the top floor of my building, the outside buildings in game in wire frame mode and seen through the roof, nothing the player can see, are still visible. Therefore I should put an antiportal inside the ceiling mess....assuming I already have zones set up decently.

Am I picking it up? Any more hints for me??
 
Last edited:

ro_sauce

FNG / Fresh Meat
Sep 26, 2007
3,135
329
0
bwhgaming.com
just keep working at it, i had to learn it all from trial and error, cause i dont have internet at home (i was finally able to find a local free dialup service, last week.)