Call of Duty 4: Portals2

From COD Modding & Mapping Wiki
Jump to navigation Jump to search

By One_Richard

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.

In Radiant

  • 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 (by pressing the ¨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.

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

  • When Bringing the Filters window and uncheck some options like Detail , Terrain, Static models, Clip, Mantle and Decal you can see that I´ve created 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 structure, buildings or walls. At this time they look more like islands.

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

  • 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.

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

  • The first cell is ready. At this point, as players walk behind this house (entering in to the cell), everything that they can not see, will not be drawn in game, increasing the Frame rate.
  • The objective is to maintain this in the entire map. That´s why i´ll keep adding cells till I divide the hole map.

When finish, I bring everything back and compile.

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

In Game testing

  • Have a look around the map to see how it runs.

  • For seeing portals in-game you can type in console:
/r_showportals 1
  • The portals area will show up in light blue.

Visual example

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

In-game the caulk texture is invisible.

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.

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

That´s what portals does.