PORTALS

Portals are not teleports! Its 4 points usually on doors and windows makes visible hole inside that 4 points.
Being inside interior, whole outside world is invisible, same when you are outside interior, you cant see whats inside. And portals can change it - you can see whats inside being outside (or whats outside being inside) cuz portals make "visible holes"
Heres demonstration:
Theres 3 types of portals:
1. Exit portals
2. Mirror portals
3. Floor portals
They way of creation is same for all types of portals. Difference is only with flags and placement.

To create portal you can use simple plane with 1x1 segs:
And each vertex at corner will correspond to portal point (4 corners):
Place this plane on door hole and/or window hole in interiors collision to cover it. Or select each vertex at door/window corner to get coords in 3dsmax.
ALWAYS USE COLLISION NOT SHELL FOR TAKIN COORDSFOR PORTALS
Depends how you look at doors (outside or inside) they way of taking point will be different!

If you looking at door in 3ds max outside interior like this:

Then way of taking portals corners will be like this:
1. Select Right Down Corner and take coords
2. Select Right Up Corner and take coords
3. Select Left UP Corner and take coords
4. Select Left Down Corner and take coords
But if you looking at door in 3dsmax inside interior like this:
Then way of taking portals corners will be like this:
1. Select Left Down Corner and take coords
2. Select Left UP Corner and take coords
3. Select Right Up Corner and take coords
4. Select Right Down Corner and take coords
Setting portal (roomFrom and roomTo)
To proper set portal always use (from inside to outside). If you have only one room in interior then set it
from 1 to 0 (1 is id of room 1 and 0 is id of limbo - limbo is always 0 - its kinda outside world)


Another important thing is Flag:
<flags value="8256"/> this flag is for doors
<flags value="9"/> this flag is for windows
<flags value="1284"/> this flag is for mirror
<flags value="0"/> this flag for doors between rooms

Examples:

On above picture you have interior with 2 rooms. ID2 room and ID1 room.
So in this case there will be 2 portals:
1. From room 2 to room 1, flag 0
2. From room 1 to 0 (limbo), flag 8256
On above picture you have interior with 2 rooms and 3 windows. ID2 room with 2 windows and ID1 room with 1 window.
So in this case there will be 5 portals:
1. From room 2 to room 1, flag 0 <-this is for door between rooms
2. From room 1 to 0 (limbo), flag 8256 <- this is for door to outside
3. From room 2 to room 0, flag 9 <-this is for first window in room 2
4. From room 2 to room 0, flag 9 <- this is for second window in room 2
5. From room 1 to room 0, flag 9 <- this is for window in room 1
To create portal mirror you need:
1. In ytyp for mirror object (CBaseArchetypeDef) flag 8192
2. In interior ytyp placing of mirror (CEntityDef) flag 559415298
3. In portal (flag for portal not for room) flag 1284
4. If you got only one room then will be from 1 to 0