Basic Indoor Portalling

Tutorials for Call of Duty mapping

Moderator: Core Staff

Post Reply
User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Basic Indoor Portalling

Post by Drofder2004 » July 17th, 2006, 11:29 pm

Basic Room Portalling

What is portalling?
Portalling is a method of splitting your map up into "cells".
These cells contain "tri", or "triangles", the more triangles that the game needs to draw, the more fps you will
lose. The cells hold a set content (whatever is inside them), the triangles inside the cells are only drawn IF the
user can see them. This reduce the amount of tris drawn, increasing FPS.

Things to consider...
- Compile you map before portalling, then check your fps (cg_drawfps 1) while walking around you map.
If your fps drops sharply, then you may need to portal your map, if your fps is steady then don't bother.
- Too many portals can be bad, remember the game engine is always doing calculation to determine
whether or not you can see the cell, if you have too many cells, you have a lot of calculations.

Portalling.
There are a few things you need to know before settings out.
- If you do not know how to use mitre joints (45 degree joints on brushes) then portalling is out of
your league at the moment (its a requirement)
- There are two textures you will be using, Portal and Portal no draw. All of the sides of the
brush (except 1) will be portal_nodraw, the 1 left over will be your portal "wall".
- Portals must make up complete boxes. You must use either a portal or a Structural brush
to make this box. Detail brushes, curves and terrain cannot be used as a wall.

On to business.
We will be portalling basic rooms (windows and doors).

Image

Above we have a basic house. A door and a window, inside we have some models (toliet/sink/cow).
The house is created using only structural brushes, no detail brushes and it also has a flat solid floor.

Image

Above is how to use the portal textures. Firstly create a brush using "portal_nodraw".
Seal off all the windows/doors or any holes in the room.
Once you have done that, select ONE side of the brush (you should only have 2 sides you can see,
the other 4 should be flush against a wall),
the side you choose is not really that important, but I usually tend to make the
portal side line up with the outside of the walls (as shown),
but sometimes you may have to use the inside (when a room joins to another room).
Once you have chosen the side, give it the "portal" texture.

Image

Above is a broken house, it has an awkward shaped break in the wall (1).
To get around such problem, make the broken parts, DETAIL (Ctrl+Shift+D),
then press Ctrl+D to filter them out (2).
This will leave the hole in the wall as a nice even square, which is easily portalled (3).

If you have several holes in the house, e.g a chimney 2 doors and a window, then each of
those holes must be sealed, if there are any gaps then you will get errors.

Here is an example of what happens when rooms are portalled compared to when they're not...

Image
^ 2280 tris.
Image
^ 832 tris
(Do not be fooled by the fps (330) this is because the fps was jumping from 330-333,
and luck of the screenshot caught them badly :P)

Obviously this is VERY VERY basic on what portals can do, and what can be achieved,
so if your looking for more advanced, post up on what you are trying to portal and I will attempt to help.

Again remember when portalling ALWAYS filter out DETAIL, TERRAIN & PATCHES,
they are not considered solid, so cannot be used to seal a room.

And also remember, portals create CELLS, cells must be SEALED.
If there are any gaps in a room then you will get compile errors.

If you are getting any errors, post them in a new thread, and it may help if you can provide a .map
(you may want to do this via PM, if at all).

Questions?

---Edited Several times for Formatting---
Last edited by Drofder2004 on August 9th, 2006, 8:20 pm, edited 1 time in total.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

creator
CJ Worshipper
CJ Worshipper
Posts: 492
Joined: July 6th, 2006, 11:37 pm
Location: The Netherlands
Contact:

Post by creator » July 18th, 2006, 1:33 am

nice tut m8,
thanks for making it
i think alot people dont understand the older ones on modsonline.com ( well atleast me :P )
i apply it to my map soon :)
will it also reduse lag?

hmm i would like to be that cow cause he got a nice toilet + sink!! 8)
except if the cow is dead :oops:
Cod 1 Mapper&Modder&Moddeler

Pedsdude
Site Admin
Site Admin
Posts: 15908
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » July 18th, 2006, 6:50 am

So theoretically this could be used to hide objects in the middle of nowhere? (as if people use /r_showtris 1 they won't be able to see them)
Image
Image

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » July 18th, 2006, 2:13 pm

Erm, theoretically... but you can hide something but putting it in a closed room. If the room is sealed, then the room is portalled automatcially (might have to double check that)

Why would people use showtris to find something? O_O
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests