View Full Version : Interesting Fact about Portals :)
N.U.K.E.E.
02-23-2004, 04:57 PM
Okay everybody, I just ran across this little "quirk" of the MP2 engine. Just remember, when creating your exits...IT MATTERS WHERE YOU DRAW THEM FROM!
Basically what this means is, the room your looking out into when drawing an exit gets the maximum draw distance on particle effects. Whereas the room your in, gets a draw distance of only a few meters on effects.
What does all that mean, okay, I'll try to explain as best I can :P If your standing in the room in-game that you drew the exit from, an fire a bullet through the exit into the other room that has the maximum draw distance, the particle effect shows up always, no matter where you fire it from within that room. If you go outside that room and fire in now, you'll notice that if your not standing within a few meters of the exit that the effect won't show up.
So it's just good to keep this in mind when building your rooms http://forums.3drealms.com/ubbthreads/images/graemlins/grin.gif I'm not too sure how this all really works, but this is just what I have observed.
Joonas
02-23-2004, 05:03 PM
Could you provide us some visual data?
Ghast
02-23-2004, 05:45 PM
I did a prefab of an emergency exit bar and on one side of the portal you could see the bars in both rooms, but on the other side, the prefabs disappearred except for the one in the room you left. what a world, watta world, particles too hmmm?
N.U.K.E.E.
02-23-2004, 06:00 PM
I hope this helps.
N.U.K.E.E.
02-23-2004, 06:11 PM
As far as I know, Ghast, when it comes to objects the engine seems to render whatever is in a room onto the plane of the portal. I'll try to explain this one aswell, cuz I had problems with it too. Basically if an object exists outside of the room it's grouped to, it will only render as long as it's positioned in your line of site of the portal. So if you step to the side and you no longer can see the portal, but an object that is grouped to the inside room is positioned so that it's between the two rooms, the part that is outside will no longer render.
Ghast
02-23-2004, 06:33 PM
Well its probably some faulty building on my part, when a room mesh refuses to participate in an all group, something is wacky already.
BUt yeppers, removing the portal helped, but tis moot for me anywho now, pulled the ultimate noob error, reinstalled and click yes (I was THAT tired! *G*) to delete folders instead of no. Luckily all the custom prefabs were on the desktop where I thought my levels were saved to too *LOL*
N.U.K.E.E.
02-23-2004, 07:31 PM
Okay, just an update. What I said earlier dosn't seem to apply to all exits. I think it's just because the room with this problem has multiple exits. Anyway, it's more info about how the engine works thou http://forums.3drealms.com/ubbthreads/images/graemlins/grin.gif
N.U.K.E.E.
02-23-2004, 10:13 PM
Okay, disregard everything I've just said. I finally figured out what's going on with these wacky portals. Basically when making your portals, follow these two rules. Never let the line of sight of a portal be able to see another portal. Never have two or more portals on screen at the same time.
The first rule is pretty easy to follow, but I ran into problems with the second when I started putting multiple exits on the same room. I guess when you have two portals drawen on screen at the same time it cause the engine to disable effects to be drawen in the opposite room for some reason.
I wounder if hiearchy effects portals. I'm woundering if only one of the two portals on screen at the same time has the ability to draw effects, and depending on the hiearchy it switches to the highest........hmmmmm, have to experiment.
N.U.K.E.E.
02-23-2004, 10:37 PM
Good news, there is a hiearchy as to which portal of the two on screen gets to render effects. Bad news, I don't think it can be controled http://forums.3drealms.com/ubbthreads/images/graemlins/brickwall.gif
Hopefully Remedy will shed more light on how portals work with the engine.
Aknott
02-24-2004, 03:17 AM
Never let the line of sight of a portal be able to see another portal. Never have two or more portals on screen at the same time.
I think you're making doubtful and dangerous conclusions really fast. You have to make lots of experiments before telling these general conclusions on exits like that.
And you should give directions for shown and hidden exits (by doors, for example) when talking about exits.
biXen
02-24-2004, 03:38 AM
You shouldn't let an exit see another exit, that's a known fact. It can ****** up performance, all in all I wouldn't use exits unless my map was very corridor based and linear in style. In large room based stuff they can be quite useless unless used well.
N.U.K.E.E.
02-24-2004, 07:04 AM
Aknott, these are just my observations, don't take it to heart or anything :P
Maddieman
02-24-2004, 07:26 AM
I'll repost what mixuk said on irc a while back, hopefully he won't mind too much, since there isn't a tutorial on exits. I had to take it out of context somewhat, so apologies if it seems confusing in places.
The ideology behind exit placement is simple - see as little of exits as possible. That's why they are in a 45 degree angle compared to the walls. When you stand at the corridor, you won't see neither exit except when you get close.
If you see an exit, all primitives in the room behind it will be loaded; and if there are two exits to the same room, the primitive count is doubled (if you see em both at the same time). You can easily create situations like that in these kinds of levels where you circle around a lot of buildings.
The point is, that at the beginning of the level, when you look at the ajoining room, if the exit was parallel, you'd take the whole room's primitives into memory, but when the exits are angled, we're just mainly drawing a couple of more polygons.
Just to recap the main points there -
If you look through and exit, the primatives of the room behind it are loaded into memory.
If there are two exits leading into that room (ala murderburger, for instance) the primatives of that room will be loaded twice (if they're both seen by the player at the same time).
Similarly, it's bad practise to have exits within los of each other, since it would make it possible for the player to look through them all, causing half the level to get loaded. http://forums.3drealms.com/ubbthreads/images/graemlins/smile.gif
With corridors and things like T-junctions, try angling your exits at 45 degrees so that they're out of sight for the most part, until the player leaves the room.
EDIT: Not sure why the quote formatting is screwed up, but I hope it's still readable.
Aknott
02-24-2004, 07:48 AM
It can ****** up performance
Maybe, it can, but not in every case! So i do not agree with :
Never let the line of sight of a portal be able to see another portal. Never have two or more portals on screen at the same time.
I'm not flaming... It is good to analyse the MP2 3D engine.
But, new mappers have lots of difficulties to understand how exits work. IMO, it is confusing, and it is incorrect to affirm the above sentence in a general way, without in-depth examples.
I also have to add that new mappers should play the game in dev mode with the F4 display option activated. The colors correspond to :
white - exit
cyan - trigger
blue - character collision "capsule" area
light blue - character animation
magenta - dynamic object
light magenta - hidden dynamic object
grey - FSM or waypoint
red - animated object
yellow - level item
green - camera
Edit : Thanks Maddie for the explanation.
theHunted
02-24-2004, 08:27 AM
Never have two or more portals on screen at the same time.
just to enforce what aknott has already posted above: you should seriously provide a little more information before posting stuff like that. these days it seems that people keep off placing exits at all, and that's propably why even poorly detailled maps tend to play much slower than remedy maps. it sure depends a lot on the type of map that you are working on, but exits can definately be placed frequently. it unfortunately requires quite some experience and know how in order not to make it worse than before, but not placing exits at all (or placing them as few as possible) is not the way to go either.
N.U.K.E.E.
02-24-2004, 08:39 AM
LOL, cut me some slack guys. It was late when I posted that and I was a little angry when I finally figured out why my map wasn't working the way I wanted it too.
Okay, how's this " it's a good idea to make sure the line of site of a portal can't see another portal and and to build your room so that no two exits from that room are on the screen at the same time." Don't get me wrong, the engine dosn't have a problem with this, but it'll make things act funny. Like not drawing particle effects in the other room.
I apologize for my choice of words, sorry everyone. I didn't mean to be misleading http://forums.3drealms.com/ubbthreads/images/graemlins/smile.gif
OR DID I!........MUUUUHAHAHAHAHAHAHAaaaaaaaa.......
Aknott
02-24-2004, 09:39 AM
Like i said, it's good to analyse and find solutions. So keep up this way and be more cautious. http://forums.3drealms.com/ubbthreads/images/graemlins/wink.gif
I'd like this community have more people making experiments and sharing their observations. There are still many things to clarify.
Ghast
02-24-2004, 12:28 PM
The ideology behind exit placement is simple - see as little of exits as possible. That's why they are in a 45 degree angle compared to the walls.
This is very helpful, I think RTCW had a problem with 45 degree portals (& hint brushes) I had given up trying to place portals like the one in the ExampleLevel!?! and gone back to doorways.
Yes, confusing to newcomers, and for the record my prefab problem was a circular path where I had sort of outsmarted the editor. A good test for me now is if I can remove a portal but the editor prevents replacing it, maybe I need to rethink? *G*
Kozak
02-24-2004, 02:46 PM
I'll repost what mixuk said on irc a while back, hopefully he won't mind too much, since there isn't a tutorial on exits. I had to take it out of context somewhat, so apologies if it seems confusing in places.
The ideology behind exit placement is simple - see as little of exits as possible. That's why they are in a 45 degree angle compared to the walls. When you stand at the corridor, you won't see neither exit except when you get close.
If you see an exit, all primitives in the room behind it will be loaded; and if there are two exits to the same room, the primitive count is doubled (if you see em both at the same time). You can easily create situations like that in these kinds of levels where you circle around a lot of buildings.
The point is, that at the beginning of the level, when you look at the ajoining room, if the exit was parallel, you'd take the whole room's primitives into memory, but when the exits are angled, we're just mainly drawing a couple of more polygons.
Just to recap the main points there -
If you look through and exit, the primatives of the room behind it are loaded into memory.
If there are two exits leading into that room (ala murderburger, for instance) the primatives of that room will be loaded twice (if they're both seen by the player at the same time).
Similarly, it's bad practise to have exits within los of each other, since it would make it possible for the player to look through them all, causing half the level to get loaded. http://forums.3drealms.com/ubbthreads/images/graemlins/smile.gif
With corridors and things like T-junctions, try angling your exits at 45 degrees so that they're out of sight for the most part, until the player leaves the room.
EDIT: Not sure why the quote formatting is screwed up, but I hope it's still readable.
Ok sorry but me being Dutch really got me in a disadvantage here. I don't understand the most part of all those words there. What do you mean when you say something is 45 degreees? And what is a T-junction?
And why does everyone keep saying line of sight of the exit. Isn't it FOV?
theHunted
02-24-2004, 03:05 PM
butt ugly, but effective (i hope):
http://maxpayne.gamigo.de/screens/tutorials/45_exit.jpg
if you think about it for a while you'll soon see that this 45° placement is way smarter compared to the first version on the image.
line of sight means a virtual single line, while fov means some kinda viewing cone, i'd say. in the case of the things said above it doesn't really matter which word you use.
Uisor
02-24-2004, 03:13 PM
and this is top view of hallway with T-Junction
Aknott
02-24-2004, 05:15 PM
Yes, but afaik the second case is for an outdoor level gameplay. It will optimize the performance in the outdoor room, but it will lower the performance in the indoor room.
Joonas
02-24-2004, 05:42 PM
So... I really should use just one exit with dummy wall pieces instead of having four windows and having one exit assigned to all of them... right? http://forums.3drealms.com/ubbthreads/images/graemlins/rolleyes.gif
News for modders #4 (http://dynamic4.gamespy.com/~maxpayne/site/index.php?option=content&task=view&id=283&Itemid=2) it is... http://forums.3drealms.com/ubbthreads/images/graemlins/smile.gif
Joonas
02-24-2004, 06:05 PM
butt ugly, but effective (i hope):
http://maxpayne.gamigo.de/screens/tutorials/45_exit.jpg
if you think about it for a while you'll soon see that this 45° placement is way smarter compared to the first version on the image.
line of sight means a virtual single line, while fov means some kinda viewing cone, i'd say. in the case of the things said above it doesn't really matter which word you use.
Could you explain _how_ can that be so useful? I didn't see anything like that in the game levels.
theHunted
02-25-2004, 01:00 AM
Yes, but afaik the second case is for an outdoor level gameplay. It will optimize the performance in the outdoor room, but it will lower the performance in the indoor room.
yeah, as far as i've understood it should be used when you have that type of situations, speaking of this outdoor/indoor situation. for example a window to a room in a scyrscraper where you don't happen to play long. but for those t-juctions (streets for example) it should work better in all cases.
Aknott
02-25-2004, 04:12 AM
So... I really should use just one exit with dummy wall pieces instead of having four windows and having one exit assigned to all of them... right?
Yes, you're right.
http://aknott.free.fr/mp2/exits/Upper_East_Side_exits.jpg
Another similar case of exit (here we have an atrium room (several floors in the same room) and an elevator shaft room).
The conclusion, here, could be : http://forums.3drealms.com/ubbthreads/images/graemlins/wink.gif
Only one exit should connect two rooms.
Aka from Maddie's post :
If there are two exits leading into a room, the primatives of that room will be loaded twice (if they're both seen by the player at the same time).
http://aknott.free.fr/mp2/exits/Construction_Site_Elevator_shaft.jpg
Another one? http://forums.3drealms.com/ubbthreads/images/graemlins/grin.gif
http://aknott.free.fr/mp2/exits/Gognittis_lot_exit.jpg
Joonas
02-25-2004, 10:05 AM
Wouldn't the game slow down an irritating amount if the exit would be e.g. eight floors high? (the elevator shaft, atrium-thingy)
Uisor
02-25-2004, 10:22 AM
I guess it wont because RMD did it.
Whit using one big exit, not 3, room on other side of the exit is only rendered once, if you would use 3 exits that room would be rendered 3 times. So it makes game quicker. That's what I understood.
Aknott
02-25-2004, 10:30 AM
Yep, absolutely. It sounds that it is the best way for exits' placements between two large rooms.
I'll post some screenshots of the atrium of the condemned building which is, in fact, a huge outdoor room.
Aknott
02-25-2004, 02:54 PM
The condemned building atrium and its outdoor area is a single room, because it would need several exits to split them.
Each exit leads to a different room. And there is a door for each exit.
http://aknott.free.fr/mp2/exits/Condemned_building_atrium_1.jpg
http://aknott.free.fr/mp2/exits/Condemned_building_atrium_2.jpg
MrUniq
02-25-2004, 11:03 PM
I'm a novice but from what I know.....exits are best placed when the room or area may be completely hidden from site for a period of time.
And if you have muliple windows and doors connecting two rooms....just use a large exit just behind/in-front of the wall of those doors and windows. Don't place exits in individual windows unless it is the only hole joining the two rooms.
And as said before exits shouldn't be in LOS of each other.....its best just to divide your room up into larger sections if u can't avoid exits being within site of each other.
Now....how about exits....and internal/external area combination maps.......yup i'm beating the dead horse.
Aknott
02-26-2004, 03:05 AM
just use a large exit just behind/in-front of the wall of those doors and windows
Not really effective imo. It would be like placing an exit in a middle of a corridor. And most of the time, exits should be as small as possible.
Aknott
02-27-2004, 06:33 AM
Other examples :
http://aknott.free.fr/mp2/exits/Exits_window_1.jpg
http://aknott.free.fr/mp2/exits/Exits_outdoor_room_2a.jpg
http://aknott.free.fr/mp2/exits/Exits_outdoor_room_2b.jpg
http://aknott.free.fr/mp2/exits/Exits_outdoor_room_3a.jpg
http://aknott.free.fr/mp2/exits/Exits_outdoor_room_3b.jpg
http://aknott.free.fr/mp2/exits/Exits_stairs_1.jpg
http://aknott.free.fr/mp2/exits/Exits_stairs_2.jpg
http://aknott.free.fr/mp2/exits/Exits_stairs_3.jpg
http://aknott.free.fr/mp2/exits/Exits_floors_1.jpg
http://aknott.free.fr/mp2/exits/Exits_floors_2.jpg
theHunted
02-27-2004, 09:52 AM
Other examples :
http://aknott.free.fr/mp2/exits/Exits_window_1.jpg
http://aknott.free.fr/mp2/exits/Exits_outdoor_room_2a.jpg
http://aknott.free.fr/mp2/exits/Exits_outdoor_room_2b.jpg
http://aknott.free.fr/mp2/exits/Exits_outdoor_room_3a.jpg
http://aknott.free.fr/mp2/exits/Exits_outdoor_room_3b.jpg
http://aknott.free.fr/mp2/exits/Exits_stairs_1.jpg
http://aknott.free.fr/mp2/exits/Exits_stairs_2.jpg
http://aknott.free.fr/mp2/exits/Exits_stairs_3.jpg
http://aknott.free.fr/mp2/exits/Exits_floors_1.jpg
http://aknott.free.fr/mp2/exits/Exits_floors_2.jpg
good stuff. thanks for all those i appreciate it http://forums.3drealms.com/ubbthreads/images/graemlins/wink.gif
Joonas
02-27-2004, 03:51 PM
Other examples :
http://aknott.free.fr/mp2/exits/Exits_window_1.jpg
http://aknott.free.fr/mp2/exits/Exits_outdoor_room_2a.jpg
http://aknott.free.fr/mp2/exits/Exits_outdoor_room_2b.jpg
http://aknott.free.fr/mp2/exits/Exits_outdoor_room_3a.jpg
http://aknott.free.fr/mp2/exits/Exits_outdoor_room_3b.jpg
http://aknott.free.fr/mp2/exits/Exits_stairs_1.jpg
http://aknott.free.fr/mp2/exits/Exits_stairs_2.jpg
http://aknott.free.fr/mp2/exits/Exits_stairs_3.jpg
http://aknott.free.fr/mp2/exits/Exits_floors_1.jpg
http://aknott.free.fr/mp2/exits/Exits_floors_2.jpg
good stuff. thanks for all those i appreciate it http://forums.3drealms.com/ubbthreads/images/graemlins/wink.gif
Me too. http://forums.3drealms.com/ubbthreads/images/graemlins/smile.gif
Makes me wonder why the windows were blinded from outside... just not to show anything inside the building? Or is that somekind of optimization I'm not aware of?
By the way, this thread has gone pretty popular... and reeeeeeeeeeeeeeally useful. http://forums.3drealms.com/ubbthreads/images/graemlins/smile.gif
theHunted
02-27-2004, 03:59 PM
Makes me wonder why the windows were blinded from outside... just not to show anything inside the building? Or is that somekind of optimization I'm not aware of?
optimization i'd say. since - without cheating or using dev. keys - you wouldn't be able to see inside it'd be a waste of resource. because the exit could be in your fov and all primitives got loaded, although you'd hardly see any details (except for the roof), and even those would be too far away to make it pay. so the texture does its job just fine.
on the other hand you get to play those parts from the inside at the level of the windows. from that point you do have quite a good view on the outside part which is why they made it visible from the inside.
Joonas
02-27-2004, 04:19 PM
But wouldn't the primitives still be loaded no matter if there's a texture in the way or not? Or are the exits disabled outside and then enabled when Max is in?
theHunted
02-27-2004, 04:31 PM
But wouldn't the primitives still be loaded no matter if there's a texture in the way or not? Or are the exits disabled outside and then enabled when Max is in?
you can enable and disable both sides of one exit seperately. that'd be my assumption of what they did. disable the outside and leaving the inside enabled that is.
Joonas
04-13-2004, 05:21 AM
Information-in-this-thread-is-so-useful-bump http://forums.3drealms.com/ubbthreads/images/graemlins/smile.gif
Joonas
07-05-2004, 06:06 PM
Another informative *bump* http://forums.3drealms.com/ubbthreads/images/graemlins/smile.gif
Oh, and could someone explain what mixuk means by this:
http://maxpayne.gamigo.de/screens/tutorials/45_exit.jpg
I don't understand what's the use of that. http://forums.3drealms.com/ubbthreads/images/graemlins/confused.gif
Ghast
07-05-2004, 08:15 PM
http://aknott.free.fr/mp2/exits/Exits_outdoor_room_1.jpg
Its what was done for MP1. I still use it on occasion, but it doesn't really help in the example, or the fact that their image file is corrupted?
Sayantan
07-05-2004, 11:16 PM
@ Joonas:
I didn't get it either. http://forums.3drealms.com/ubbthreads/images/graemlins/confused.gif Can anybody help ??
Secondly, how do I make an exit like this one (http://aknott.free.fr/mp2/exits/Gognittis_lot_exit.jpg) ? I mean there has to be some surrounding which gets red while making an exit. But in that kinda situation there isn't any http://forums.3drealms.com/ubbthreads/images/graemlins/confused.gif
Uisor
07-05-2004, 11:41 PM
The area of the wall you see "inside" the portal is seperate part (flipper mesh) and not actually room wall, thou making the exit work.
The pic what Ghast posted (mixuk) shows that it's better to split room (even better whit hallways) whit 2 exist like that, than making one exit right between the two rooms (window/doorway what ever it is in that pic).
Because when looking through the exit when there is only one portal (top picture) the whole room on the other side will be rendered causing slowdown. In the second pic the room is splitted in 3 parts and the parts you wont see through window (or doorway) wont be rendered making the game run a tad smoother.
I'm propably totally wrong, but that's what I've understood of all this portal thing.
Sayantan
07-06-2004, 05:00 AM
OK I think that u r absolutely right about the pic of mixuk(according to logic).
But I still didn't understand how to make such an exit as shown in my previous post. Maybe I'll make one and show ya. http://forums.3drealms.com/ubbthreads/images/graemlins/confused.gif
Sayantan
07-06-2004, 05:36 AM
Okay here's badly-put door and a window between 2 rooms. How would u draw a single exit between them?
Sayantan
07-06-2004, 05:40 AM
Okay here's the lv2 to help u draw it directly on it.
theHunted
07-06-2004, 06:07 AM
you don't have 2 seperate substracted holes. instead you just substract one big hole, that covers both, the door and the window. now you draw the exit. now you fill up the parts where you want to have concrete wall with a regular mesh.
http://maxpayne.gamigo.de/screens/tutorials/portal test1xx.zip
make sure to untick and then retick the rooms checkbox from the filter menu when you open the lvl file. i made 4 steps in 4 different rooms. the most left one is your original room. next to it on the right the version with one big hole instead 2. exit placed on the next one. wall mesh on the 4th one. and the the final result as the 5th room.
Sayantan
07-06-2004, 06:22 AM
Thanx a lot. That clears up a lot of stuff for me at least.
I owe you JC. http://forums.3drealms.com/ubbthreads/images/graemlins/wink.gif
Joonas
07-06-2004, 07:23 AM
But if you use two exits indoors... if you are inside the room yourself, then there wouldn't be any optimization for the outside area...
... still a bit confusing. http://forums.3drealms.com/ubbthreads/images/graemlins/confused.gif
Uisor
07-06-2004, 08:37 AM
But if you use two exits indoors... if you are inside the room yourself, then there wouldn't be any optimization for the outside area...
... still a bit confusing. http://forums.3drealms.com/ubbthreads/images/graemlins/confused.gif
Yeah, all 3 rooms would get rendered in same time if you look in that direction.
Joonas
07-06-2004, 09:39 AM
But if you use two exits indoors... if you are inside the room yourself, then there wouldn't be any optimization for the outside area...
... still a bit confusing. http://forums.3drealms.com/ubbthreads/images/graemlins/confused.gif
Yeah, all 3 rooms would get rendered in same time if you look in that direction.
Doesn't that render it useless?
Oh, an about that T-junction, no one answered that guys question about that 45 deegrees exits...
Ghast
07-06-2004, 11:03 AM
I think Remedy made some exits like one way glass. Big room with low FPS cannot look into little room?
But in this case its the additional rooms and hallways that benefit being one removed from the outdoor cityscape AFAIK?
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.