Call of Duty 4: Portals2

From COD Modding & Mapping Wiki
Revision as of 19:36, 27 October 2008 by One richard (talk | contribs)
Jump to navigation Jump to search

This tutorial will give you an overview about how to work with outdoor portals

In this tutorial I assume that you know hot to unite brushes in 45 degrees.

Basically what most be done is to divide your map in to cells.

First of all, I suggest you to open up and have a look to the Backlot map from stock, that you can find in the map_source folder.

At first glance it will look a bit confusing or complicated.


But, if you open the Filters window (¨F¨Key) and uncheck some options, you will see that everything is a bit simpler than appears and you will notice how the cells are made for this map.

File:Portals Example2


For this tutorial I´ve made a map with some basics features. a few buildings (some with second floor), an xmodel, spawnpoints, terrain and walls that works as limits.

File:Portals Example3


When Bringing the Filters window and uncheck some options like Detail , Terrain, Staticmodels, Clip, Mantle and decal.

As you can see here is I´ve made an structure of caulk brushes beneath the terrain height. i´ve created a caulk brush at the bottom of the hole map and caulk brushes below each structurals buildings and walls. At this time they look more like island.

File:Portals Example4


As seen here, what I do next is to add some caulk walls between buildings in order to enclose each cell.

File:Portals Example5


Now, as making a house, with the tool texture portal_no_draw I create the first cell. check that each brush is perfectly aligned to the next one.

File:Portals Example6


Select the external faces of the new brushes and apply them the portal texture.

File:Portals Example7


The first cell is ready. At this point, as players walk behind this house (entering in to the cell), everything that they can no see, will no be drown in game, increasing the Frame rate.

File:Portals Example8


The objective is to maintain this in the entire map. That´s why i´ll keep adding cells till I divide the hole map.

File:Portals Example9


When finish, I bring everything back and compile.

Note: It is healthy to create one cell at time, test it and then add the next one.

For seeing portals in-game you can type in console:

/r_showportals 1

Visual example For testing purposes I´ve left a caulk wall in an area outside the portals of this map.

File:Portals Example10


In-game the caulk texture is invisible.

File:Portals Example11


As you can see, as I walk behind the wall, everything that is in the other side and what the game assumes that I can not see, begin to disappear.

File:Portals Example12


Also, when I got completely behind the wall, almost half of the map is gone and the frame rate increases.

File:Portals Example13


That´s what portals does.