Indoor Portals

Tutorials for CoD:WaW Mapping

Moderator: Core Staff

Post Reply
steveuk
CJ G0D!
CJ G0D!
Posts: 1330
Joined: November 21st, 2006, 12:51 pm

Indoor Portals

Post by steveuk » November 25th, 2008, 4:07 pm

Indoor Portals
Image
What is a Portal?

Portals are very important aspect of a map but are often overlooked and some notice the consequence. Portals have a sharp learning curve but once over the hurdle you will see how basic and easy they are to do, many have had this happen once they successfully portal a map.

Why are portals Important?

* Portals are an essential part of any detailed map, they will help you keep the frame rate up to an acceptable level. All maps should be portaled because of different computer setups. While your map may run at 60fps on your awesome rig, your buddy's budget rig may suffer if you don't include optimization like portaling. Portals seal off an area into a cell and your map can be made up of as many or as little cells that you want, just keep it reasonable. There will be a point that you may have so many cells that you actually lose the frame rate benefit to the game trying to figure out what is drawn or not, ten to twenty cells is about average.

Ok, so what is a portal?

* Imagine the room your inside is in the game; walls, door, maybe some windows. Without portals, the game engine is actually rendering everything on the other side of the wall, below you, and above. This is unnecessary as you can't see it and will increase the work needed to be done by the game resulting is a lower frame rate. If your room or map is portaled, what you see is what is rendered. On the other side of that door should be another cell, your in a cell, and your buddy is in another room down the hall. The game will render your room, the hall, but not your buddy and his room down the hall. This results in only the part relevant to the player is being rendered thus increasing the player's frame rate. If the map is highly detailed and there aren't sufficient portals then it may also result in lag related to poor frame rate.


Prepping your map

First setup your filters "F" like the picture, these are the only thing we have to consider with portals.
Image

Now all you should see are your brushes, but were not done. Select items like trim and other small things that are not going to be part of the portal walls like the floor, ceiling, and walls. Then press "Ctrl Shift D" to make these detail brushes and they will be hidden because "Detail" is unchecked. To change a brush back to Structural press "Ctrl Shift S" when the brush is selected. These brushes are not gone but just hidden.
BEFORE:
Image
AFTER:
Image
Correct portal setup

The only two textures you will need for most portaling is "portal" and "portal_nodraw". Only 1 face of a brush can have a "portal" texture, all other sides must have "portal_nodraw". Once your map is prepped for portaling then continue.
ImageImage

In this map I have two rooms boxed in with a thick wall in the center and a roof over one. Lets portal the covered room, this is the easiest one to do.
1. Fill each doorway with the "portal_nodraw" texture and give the face facing OUT of the cell the "portal" texture.
2. This is just a copied portal brush showing the other side, if you made this as well, delete it.
3. Shrink the thickness of your portal brush so that it takes up less than half of the entire doorway. You may have to change the grid size to do so.
You have just portaled your first room, to make sure, check for leaks like if it was full of water. Where ever there is a leak you need to cover it like the doorways
Image
Fill in the doorways the same way for the other room and don't let the portal walls touch for the different cells like in the picture
Image
Now fill in the roof using the same concept as the doors, make it flush with the top.
Image
This map is now done being portaled but chances are you map isn't this simple.

Doors and Windows

Doors and windows follow the same principal as any portal, seal the room off. So all that needs to be done is fill the hole, window or door, with "portal_nodraw" and make the outside face "portal". Here is an example using the previous map.
Image
Remember to make the brushes inside the window Detail or you will get errors when compiling.
Image


Multistory house

In this picture I added another floor connected by a ladder, simple enough. Remember to make the ladder Detail so we don't have to worry about it when portaling.
Image
Image
Now shrink the top portal brush so two can fit without touching, copy, flip. Now you should have both portal faces looking at each other.
Image
Your room is now complete, use these principals when portaling your own buildings.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests