User login

Navigation

Poll

I downloaded the ETQW demo and....
...I'm too busy playing for polls.
0%
...it's awesome.
60%
...it's okay, I expected better.
20%
...I'm lost in the valley, anyone have a map?
0%
...my machine won't run it. :-(
20%
Total votes: 5

Who's online

There are currently 0 users and 39 guests online.

Welcome to RUST | Gamedesign.net

Real Constructive: Hammer Geometry for Unreal Mappers

Submitted by yesukai on Tue, 2005-04-19 00:04.

If your reading this, you're probably are like me, in that you started with Unreal engine based games and eventually found your way over to the Quake side of the fence. There are some rather radical difference between mapping in UnrealEd and mapping in Hammer, though. So, let's be constructive and get to it. ;)

The primary difference between all Quake and Unreal games is the way the engine handles geometry. Unreal uses what is called Subtractive Geometry. You start out with a huge expanse of solid world. From there, you use assorted shapes to carve pieces out of that world to create your level. Quake based games, on the other hand, use Constructive Solid Geometry (CSG). This is where you start out with a large piece of absolutely nothing, called the VOID. Your job as a mapper is to use solid blocks to construct a volume of VOID that is separate from the rest of the VOID. Confused? Lets take a more visual approach.

This is a picture of the void, as seen in Hammer.

Nothing. Abolute nothing.

Not much to look at, is it? Think of it as outer space (or Bill Gate's soul). You need to build a "spaceship" that will protect poor little Gordon from the harsh vacuum of space. Do do this, you need to build barriers. These are called "brushes" in quake based games. By adding brushes, you can construct areas that are completely sealed off from the VOID.

Before we go any further, you need to know a couple rules about brushes.

1. Brushes ABSOLUTELY have to be convex (oposite of concave). This means that if you were to draw a line through the brush at any given point, it will only hit TWO planes (or edges) of the brush. Here's a visual:

a square is convex. a "L" is not.

See how that works? The blue line is our imaginary line. On the first shape, it is impossible to have the strait line cross more then 2 sides. On the latter two shapes, however, its fairly easy.

2. Brushes are made out of planes. These planes need to be unique to the brush; you cannot have a duplicate plane in a brush. If you do, its called "coplanar". And, the visual:

Coplanar

The red dots are vertices (technically, in this example, edges) and the lines in between them are (portions of) planes. The brush on the left is perfectly valid. The brush on the right has two planes that are on the same plane. There is no reason to have a brush like this, and it will generate an error.

Now that you know how brushes are to be made, let's make a couple. We are going to make one of the more simple kinds of brushes, a cube. With a new map open in Hammer, press Shift-B to use the Block Tool. In a 2D view, drag to create an outline. Notice how it updates on all the views. When you are satisfied with the size of the outline, hit enter. This will change the outline into a brush. It is just a piece of solid matter floating in a VOID. Now make 5 more brushes, each to be one side of a square room (4 walls, ceiling and floor). It should look like this:

See how you have constructed some solid geometry to seal an area off from the VOID? By making many of these brushes, often thousands, you can shape entire worlds out of the VOID. But wait, you say. What happens if I defy the Gods of Mapping and don't completely seal off my area? What are they going to do about it? Good questions.

Should you choose (or accidentally stumble upon) the path of unrightesness and create a map that isn't sealed off from the VOID, the Gods will cause a plague called a "leak" to befall your map. To visualise this, lets think of the inside of our space ship-world as being filled with air, while the VOID has none. If there were a hole, all the air would leak out into the void, would it not? Same idea here, but fortunately Gordon won't suffocate. He will most likely lag though. Without the world completely sealed off, VIS can't do its job. VIS is the program that computes the visibility of different parts of the engine. It is VIS that tells your basement that it can't see your bedroom upstairs. Without VIS, your entire map is visible from any part of your map. Obviously, this is very bad. Luckily, if you do get a LEAK LEAK LEAK error when you compile your map, you can go to Map->Load Pointfile to see a nice red line that will show you the hole that your map is leaking through. Repent and fix your transgression.

Hope this gives you a good start on how to get started with Hammer after coming over from UnrealEd. I know it took a bit to get used to when I did. But don't worry, using this basic knowledge you should be able to build your way up to a very constructive future. As usual, if you have any questions related to this article, go ahead and post in the Hammer Forums or send me an email at jeffca51 at yahoo.

RUST | Gamedesign.net is your source for all the latest game-editing news and tutorials. If you are seeing this message, this means that you are using a browser that does not support CSS. Please upgrade your browser and enjoy your stay at RUST and if you have any questions, comments, or suggestions, please contact a site administrator.