AAO25.com

America's Army => mAAp Project => Topic started by: Spanky on Saturday, November 02, 2013, 16:44:48 PM

Title: AntiPortals
Post by: Spanky on Saturday, November 02, 2013, 16:44:48 PM
Just a heads up to you guys (mostly to those of us working on AA3 maps) that are editing. Working on AA3 Alley, I added an AntiPortal via the editors button and it did absolutely nothing. It didn't occlude objects, even from inside of it. Playing around some more, I found that using the Add Special button and creating an AntiPortal that way DID work as it should. The only change here is that the brush is now dark green rather than the familiar orange. I don't know if this is just a problem on Alley or if it's an AA3 map problem or if it's a global issue.
Title: Re: AntiPortals
Post by: ELiZ on Saturday, November 02, 2013, 16:57:44 PM
My antiportals are orange, and I used Antportal button
Title: Re: AntiPortals
Post by: Spanky on Saturday, November 02, 2013, 17:27:13 PM
But do they work?

*EDIT*
I made one AntiPortal successfully with the Add Special button but now I can't seem to make a second one that actually works.
Title: Re: AntiPortals
Post by: NoBigDeal on Saturday, November 02, 2013, 18:04:57 PM
But do they work?
Not exactly...

Antiportal made by:

Add Special Brush - dark green color; can be visible; used to separate different zones; in Real Time Preview its surface is invisible; copy/paste is supported; it's a Portal imitating Antiportal.
Add Antiportal - orange color; must be embedded in geometry (if not, will cause rendering problems); used to occluding planes; effect is visible only in Realtime Preview; copy/paste is not supported.

BTW: For testing, in game mode open console, type RMODE 1 and hit enter.
Title: Re: AntiPortals
Post by: Spanky on Saturday, November 02, 2013, 18:40:25 PM
I test it out in the editor by doing "stat render" in the console and looking at the mesh poly count before & after. If it's BSP with AntiPortal surface flag, you can also hide BSP in the editor and see the AntiPortal effect on meshes behind the surface. I guess you could also do RMODE 1 which is wireframe if I remember correctly but that can sometimes bog down your FPS to the point where it's impossible to do anything.

I'm having mixed results on both brushes. I've never had this issue before. I'm wondering if it's something with the AA3 map conversion because there was also that issue with the main subtraction.
Title: Re: AntiPortals
Post by: ELiZ on Saturday, November 02, 2013, 19:16:07 PM
I had no issue adding the Add Antiportal button, a nice brown/Orange brush appeared.
And after a rebuild, it worked without any issues
Title: Re: AntiPortals
Post by: NoBigDeal on Saturday, November 02, 2013, 19:20:21 PM
I guess you could also do RMODE 1 which is wireframe if I remember correctly but that can sometimes bog down your FPS to the point where it's impossible to do anything.
On what hardware do you work ..?  :D

I'm having mixed results on both brushes. I've never had this issue before. I'm wondering if it's something with the AA3 map conversion because there was also that issue with the main subtraction.
The gaps in the brushes can cause some problems (you can check this in Zone/Portal mode..), but first reset everything on Red Builder brush before do anything - if not, because of pivot offset, brush collision can be in quite a different place. Don't forget to rebuild...
Title: Re: AntiPortals
Post by: Spanky on Saturday, November 02, 2013, 19:29:00 PM
On what hardware do you work ..?  :D
AMD 1090T at 3.5GHz and a 9500GT GPU. But, I still had FPS issues under some scenarios with a GTX 275. Although now, I just opened the map and there's no FPS issues in RMODE 1. I get less FPS in normal mode. Weird.

The gaps in the brushes can cause some problems (you can check this in Zone/Portal mode..), but first reset everything on Red Builder brush before do anything - if not, because of pivot offset, brush collision can be in quite a different place. Don't forget to rebuild...
I wouldn't have thought the pivot would bother the collision at all but on the brush I'm using, I made it from the builder and it's all default. One of the problems is AA3 Alley takes so damn long to build -_-
Title: Re: AntiPortals
Post by: Spanky on Saturday, November 02, 2013, 19:50:47 PM
Here's a screenshot of what's going on:
(https://dl.dropboxusercontent.com/u/464376/aac_maap/antiportal.PNG)

The red builder brush was just used to create an AntiPortal brush via the button in the editor. I then rebuilt. You're seeing a live view of RMODE 1 and yet you can still see the meshes and even the terrain polys on the other side of the AntiPortal brush.

Now, I can go set a BSP surface as an AntiPortal and it works just fine (press Q to hide BSP, see meshes pop in and out) but the actual AntiPortal brushes aren't doing jack shit. I know I'm not a noob and it's not an editor problem, my other AntiPortals work;

View from behind a building with an AntiPortal brush inside:
(https://dl.dropboxusercontent.com/u/464376/aac_maap/antiportal2.PNG)
View from just above previous building:
(https://dl.dropboxusercontent.com/u/464376/aac_maap/antiportal3.PNG)
Title: Re: AntiPortals
Post by: ELiZ on Saturday, November 02, 2013, 19:57:24 PM
If you are having an issue, and I'm not, try resetting ini's
Title: Re: AntiPortals
Post by: Spanky on Saturday, November 02, 2013, 20:02:39 PM
Does the AntiPortal work for you in Alley? There's only 1 there (I think) and you should be able to find it with the red brush.
Title: Re: AntiPortals
Post by: ELiZ on Saturday, November 02, 2013, 20:12:42 PM
Does the AntiPortal work for you in Alley? There's only 1 there (I think) and you should be able to find it with the red brush.

A Antiportal brush placed inside the negative space of the BSP will not block anything.
That's what I've read anyway.

The Builder brush on the Alley map on dropbox, it's inside the negative space.
However, I cant find the antiportalbrush
Title: Re: AntiPortals
Post by: Spanky on Saturday, November 02, 2013, 20:20:41 PM
Ah, I must not have saved it with the AntiPortal. Still though, it's right where the builder brush is, inbetween the outside of the addition and the inside of the subtraction. It's inside the wall of the subtraction, it shouldn't be an issue. The AntiPortal should work anywhere, it's just up to the map editor to place it where it won't cause visual artifacts to the user.
Title: Re: AntiPortals
Post by: Spanky on Saturday, November 02, 2013, 20:23:52 PM
Nevermind. I'm dumbfounded by my own stupidity.

Typically I press O and C upon opening the editor, to hide the annoying playerblocks, commvolumes AND AntiPortal brushes. Apparently, hiding the brush also hides the effect unlike when hiding BSP with a surface flag of AntiPortal, the effect is still there. Pressing O in the live view with RMODE 1 will toggle the AntiPortal on/off.

I faintly recall running into this before, many years ago but it's not something I remembered for whatever reason.
Title: Re: AntiPortals
Post by: ELiZ on Saturday, November 02, 2013, 20:26:44 PM
Ah, I must not have saved it with the AntiPortal. Still though, it's right where the builder brush is, inbetween the outside of the addition and the inside of the subtraction. It's inside the wall of the subtraction, it shouldn't be an issue. The AntiPortal should work anywhere, it's just up to the map editor to place it where it won't cause visual artifacts to the user.

According to this video, at least some of the brush must be in the space we can see(Outside of the BSP), or as in the video, the exact dimension as the addative brush of the wall.
http://www.youtube.com/watch?v=zDGTEeiEEuA
Look at 05:30

I've never experimented much. but as a rule, I've only added antiportal to space inside Staticmeshes, not inside BSP.
Title: Re: AntiPortals
Post by: Spanky on Saturday, November 02, 2013, 20:49:57 PM
I think what that video is saying is that since that map only has that small room, and because the wall in the middle is the same height as the room, it's in effect a donut shape. If you place an AntiPortal brush inside that that does not touch the wall (slightly thinner and smaller than the wall), it's technically outside the subtracted space because that map is so small. However, in Alley, since there's a HUGE subtraction to work inside of, the AntiPortal can be anywhere inside the main subtraction, regardless of whether or not it's inside BSP, mesh or just out in the open.
Title: Re: AntiPortals
Post by: NoBigDeal on Saturday, November 02, 2013, 21:17:17 PM
... the AntiPortal can be anywhere inside the main subtraction, regardless of whether or not it's inside BSP, mesh or just out in the open.
Not quite right... Make Antiportal outside of geometry, zoom out in 2D viewport and move map around - you can then noted disappearing parts of the map. Antiportal should be inside of geometry - completely invisible from outside.
Title: Re: AntiPortals
Post by: ELiZ on Saturday, November 02, 2013, 21:50:55 PM
I did some testing.

It might be a difference in the engine, but my tests with a map styled like the one in the video, having the Antiportal brush the exact same dimension, did NOT occlude objects.
DropBox: AntiPortal-Test1-DontWork.aao

Same Scenario, but the Antiportal a bit smaller than the wall and inside it, did NOT occlude objects.
DropBox: AntiPortal-Test2-DontWork.aao

But if the Antiportal brush sticks out, just by a little, it DOES Work, however that will cause objects to be occluded when they are not supposed to be.
DropBox: AntiPortal-Test3-Works.aao

So I recommend that you avoid Antiportal Brushes when dealing with the BSP, use the Surfaceflag instead.
Title: Re: AntiPortals
Post by: Spanky on Saturday, November 02, 2013, 21:58:58 PM
Not quite right... Make Antiportal outside of geometry, zoom out in 2D viewport and move map around - you can then noted disappearing parts of the map. Antiportal should be inside of geometry - completely invisible from outside.
Right, do you do want it inside geometry so the player doesn't notice the engine occluding objects. I just was saying that it doesn't matter as far as the engine is concerned, as long as the AntiPortal is inside ANY subtraction, it will work.

ELiZ, I usually make AntiPortals slightly smaller than the geometry I'm putting them in for 2 reasons:
1. It's faster than figuring out the exact size of the geometry.
2. To avoid any potential sizing issues of getting the AntiPortal just outside the geometry.

Now that I figured out my problem, I don't have any issue putting AntiPortals inside of BSP. The AntiPortal surface flag is more efficient however you can only use it on Additions that don't have Subtractions in them (i.e. a door) otherwise the player will see a HOM effect in the doorway until they go through it. In that case, you either rebuild the building with different BSP (adding more) or just throw an AntiPortal brush inside the wall and call it good.
Title: Re: AntiPortals
Post by: ELiZ on Saturday, November 02, 2013, 22:07:17 PM
I'm rather sure
DropBox: AntiPortal-Test2-DontWork.aao

Proves that placing it inside the BSP will not work.
Title: Re: AntiPortals
Post by: NoBigDeal on Saturday, November 02, 2013, 22:22:38 PM
I'm rather sure
DropBox: AntiPortal-Test2-DontWork.aao

Proves that placing it inside the BSP will not work.
Send me this map and a will tell you why...
Title: Re: AntiPortals
Post by: Spanky on Saturday, November 02, 2013, 22:25:26 PM
I'm rather sure
DropBox: AntiPortal-Test2-DontWork.aao

Proves that placing it inside the BSP will not work.


ELiZ, it's because of the reason I tried to explain before. You have the room setup as a donut shape. That wall is the same height as the main room subtraction thus when the engine 'compiles' (or whatever) the BSP, it ends up being donut-shaped and your AntiPortal is technically outside the map (main subtraction). If you make that wall slightly shorter and hovering above the ground, it would work. OR if you add another larger subtraction around the whole room.

*EDIT*
Maybe this view can explain it better than I can:
https://dl.dropboxusercontent.com/u/464376/aac_maap/antiportal4.PNG

The editor optimizes the BSP cuts and when 2 BSP surfaces are aligned (the wall against the ceiling and floor) it merges them so there's less to render.


I was wrong. See the next post.
Title: Re: AntiPortals
Post by: Spanky on Saturday, November 02, 2013, 22:37:32 PM
Slap my ass and call me Judy. Your Test2 actually does work without any modifications:
(https://dl.dropboxusercontent.com/u/464376/aac_maap/antiportal5.PNG)

So, it doesn't matter that the AntiPortal is technically outside the main subtraction/geometry. Maybe Epic fixed that in the build we have?
Title: Re: AntiPortals
Post by: ELiZ on Saturday, November 02, 2013, 22:47:04 PM
Slap my ass and call me Judy. Your Test2 actually does work without any modifications:
(https://dl.dropboxusercontent.com/u/464376/aac_maap/antiportal5.PNG)

So, it doesn't matter that the AntiPortal is technically outside the main subtraction/geometry. Maybe Epic fixed that in the build we have?

Whatever you see in the editor, is not what the client sees
AntiPortal-Test2-Fixed-Works-Spanky.aao
Do not work..
Something makes it work in your editor, but not ingame for a client:
I'm uploading a video to youtube.. will post shortly

@VendorX

https://dl.dropboxusercontent.com/u/62876385/AntiPortal-Test2-DontWork.aao
Title: Re: AntiPortals
Post by: ELiZ on Saturday, November 02, 2013, 22:50:37 PM
[youtube]k-JCNVU4itc[/youtube]
Title: Re: AntiPortals
Post by: ELiZ on Saturday, November 02, 2013, 22:53:18 PM
The above video was shot in 2.4.1 Client.
Title: Re: AntiPortals
Post by: ELiZ on Saturday, November 02, 2013, 23:00:21 PM
I'm been unable to issue the command RMODE 1 in the 2.5.0 client.


But here is a SS showing STAT RENDER, and looking on the amount of triangles it shows rendered, I think it's clear that it renders all those balls behind that wall..

(https://aao25.com/forum/proxy.php?request=http%3A%2F%2Fi39.tinypic.com%2Ftalj7t.png&hash=fa92bf9b37c497236ec0af1807169818)
Title: Re: AntiPortals
Post by: Spanky on Saturday, November 02, 2013, 23:09:07 PM
ELiZ, do the same test again except get right up against the wall, you will see StaticMesh poly count start to drop to 1/3 or so. I think this is due to the fact that the AntiPortal brush isn't very large and you're so close to the objects, being in the same room. I'm not sure why the editor shows the StaticMeshes fully occluded even when at a significant distance from the wall, perhaps it's just rendering differences.

This effect happens on your version 2 and both of the ones I edited.
Title: Re: AntiPortals
Post by: ELiZ on Saturday, November 02, 2013, 23:24:56 PM
This is me standing right up to the wall in the v2 you edited.

(https://aao25.com/forum/proxy.php?request=http%3A%2F%2Fi43.tinypic.com%2Fsv5nhh.png&hash=4984f233f1007b62189cba7a565ddc81)

Sure, less triangles, but that because there is less balls in view
Title: Re: AntiPortals
Post by: ELiZ on Saturday, November 02, 2013, 23:33:27 PM
If I convert the middle wall to a staticmesh, and place the Antiportal into that mesh this is the result:

(https://aao25.com/forum/proxy.php?request=http%3A%2F%2Fi42.tinypic.com%2Fbilau8.png&hash=a5c9e145f176cc468d992d42bfc20153)

Up close, not a ball in sight
(https://aao25.com/forum/proxy.php?request=http%3A%2F%2Fi40.tinypic.com%2Fiqke0w.png&hash=4391e0f44672af598768d4856ca66863)


All I'm saying is that don't count on what you see in the editor
Title: Re: AntiPortals
Post by: Spanky on Saturday, November 02, 2013, 23:49:38 PM
Sure, less triangles, but that because there is less balls in view

I didn't think about that.

Hmmm. This is weird.
Title: Re: AntiPortals
Post by: NoBigDeal on Sunday, November 03, 2013, 19:58:16 PM
Yeah, sometimes for some reason, engine can disable Antiportal - especially in small maps (maybe because they are not too complex...). Try the same test map but based on hexagon shape - should work. This issue should not occur in normal maps.