The Beginner's Guide to Red Faction Mapping

From Red Faction Wiki
Revision as of 13:07, 13 August 2022 by Goober (talk | contribs)


Overview

Goal

The goal of this Beginner's Guide is to show you how to build a very simple Red Faction map, entirely from scratch. We'll cover basic geometry, texturing, lighting, pickups, nav points, and enemies. You'll also learn the basics of how to navigate in the level editor, and the small number of hotkeys you'll need to use.

Audience

This Beginner's Guide is just that - a guide for beginners. If you've used RED before, you probably know most of this stuff. There's no harm in skimming down through it to see if there's a tip or two for you to pick up, but in general if you're an experienced RED user, you'll probably get more from some of the more advanced tutorials listed on the RF1 Editing Main Page.

Assumptions

If you're reading this tutorial, I'm assuming you've played Red Faction at least a few times and have a basic understanding of how to use software on a computer - that's it! Other than that, we'll take it from the ground floor and build up.

The Basics

Before we begin

Red Faction is the game, GeoMod is the engine on which the game runs, and RED is the level editing tool used to create maps for the game.

Red Faction was originally released for the PlayStation 2, then later for the PC - both in 2001. As you can probably imagine, there are a number of issues that can come up when trying to run software written over 20 years ago on a modern computer, not to mention the fact that the game hasn't received an official update since a few months after the initial release. Thankfully, the community stepped in to remedy that situation - Dash Faction is a community-made patch, which is basically essential for anyone planning to play or develop for the game these days. It adds tons of new modern features, fixes all of the most relevant problems the game has, and lets you play the game without issue on modern computers.

If you don't already have Dash Faction installed, you should go do that before proceeding with this tutorial - it's very simple to install, only takes a few minutes, and there's a full set of instructions over in the Dash Faction Installation Guide.

Launching RED

Open the Dash Faction launcher, then click the "Level Editor" button.

The RED window will appear, and it should look virtually identical to the screenshot on the right - a confusing mess of buttons, text, and 4 black panels. Not to worry, it'll start to make sense soon!

Viewports

Those 4 black panels in front of you are called viewports. Viewports offer a view into what your map is going to look like once you load it in-game. RED supports two different types of viewports: - 3D (perspective - ie. Free Look) - 2D (orthographic - ie. Top, Right, Front, etc.)

The active viewport at any given time is the viewport outlined with a red border. You can change the active viewport simply by hovering over a viewport with your cursor. Some hotkeys and other RED functions behave differently depending on which viewport is active, such as the movement and rotation of objects.

Moving around in the viewports

When looking at a viewport, you are viewing through a camera that you can control. RED offers the ability to move the camera around using the keyboard or the mouse. Generally, the keyboard camera controls are more user-friendly than the mouse controls. That said, the keyboard controls do require a numpad, so if your keyboard doesn't have a numpad, you'll need to use the mouse controls.

<hotkeys>

The rest of the UI

Rather than explain what every button and panel does right now, let's dive right into creating your first map and I'll explain the functions that you'll need to use along the way.

To note: I'm only going to explain the functions you need to use within the scope of this tutorial. If you're wondering what a function does, and it's not covered in this tutorial, the RED User Guide has a full and detailed explanation you can reference for each and every button, panel, toolbar option, etc. within RED.

Enough of that, I want to make a map!

How geometry works

In the middle of the free look viewport, you should see a cyan colored wireframe cube. The same cube is represented as a square in the 2D viewports. This is called the Cookie Cutter, and it represents the shape of the geometry you're about to add to your map. You can edit the shape and dimensions of the Cookie Cutter in order to customize the geometry you're adding.


To get some terms out of the way before we start using them:

  • Brush: a unique geometry object. When we refer to "geometry" or "brushwork" in the GeoMod engine, we're talking about the brushes that combine to form the structure of a map. All brushes are one of two unique types: air or solid.
  • Air Brush: these brushes subtract from the world and create usable/walkable space in your map.
  • Solid Brush: these brushes add to the world, creating occupied space.

<right aligned demonstration graphic> An easy way to think of air and solid brushes is to imagine a cave in the side of a mountain. The mountain is a solid brush, while the cave is an air brush. You can walk around in the cave - it's cutting out of the space that would otherwise be part of the solid mountain if the cave didn't exist. When you walk through the cave, you find a large boulder on the ground. That boulder is a solid brush, because it (like the mountain) is adding to the world.

One aspect of geometry in the GeoMod engine that frequently causes confusion is the concept of a completely solid world. In Red Faction's GeoMod engine, the entirety of the game world is solid - occupied space - until it is first carved out of by air brushes. Considering an example that relates a little more to Red Faction than our mountain/cave example - consider a case where you want to create a room, and within that room, you want to have a support column as well as a shipping crate. Because the entire world is solid, you must first carve out of the world by creating an air brush (ie. the room), then add to the world by creating two solid brushes (ie. the column and the crate).

Your first room

Now, let's make a room! In the brush properties panel on the left side of the screen, let's edit the dimensions of our Cookie Cutter. Let's set the height to 3.00, width to 10.00, and depth to 10.00 as well. Be sure the "Type" field is set to Air, and leave the other settings at their default values as shown in the screenshot below.

<left aligned screenshot of brush properties>

You may have noticed as you were setting the values, the size of the Cookie Cutter updated accordingly in each viewport - the values we just set will be used to specify the shape of our new brush once we create it.

Click the "Create Brush" button. You'll notice that where before your Cookie Cutter was displayed as a wireframe cyan cube, now you have a wireframe red cube - this is your new brush! When selected, brushes have a red wireframe outline, and when deselected, the outline is white. If you're wondering why you're only seeing the outline rather than a room, it's because we haven't yet told RED to "build" our geometry. Yay! New term!

  • Build: an operation that constructs your map using the brushes you've created. After you change the brushwork (geometry) of your map in any way - creating, deleting, or editing brushes - you must build before those changes will be reflected in the game world.

For any programmers out there, you can think of building essentially as commiting your changes to the world.

So how do we build? Simple - either press the "Build" button on the left side panel, or just hit the spacebar. So far, we've only been working within Brush Mode - we'll get to some of the other modes later, but just know that the spacebar hotkey for building geometry can be used in all modes.

When you build, you should see the walls, floor, and ceiling that comprise your room! Next, in any one of the viewports, click the black space outside of your room to deselect your new brush. Now you should see your Cookie Cutter once again.


IMPORTANT NOTE: While you can use the brush properties panel on the left to customize your Cookie Cutter, once you create a brush, those options no longer apply to it. If you edit the values in Brush Properties on the left side now, you'll notice the changes are reflected in the Cookie Cutter, but the room you've already created is unchanged. Of course, there are method that you'll learn later for editing brushes after they've already been created, but for now just understand that changing the settings for the Cookie Cutter after you've already created a brush will have no impact on the brush that was already created.

Your first hallway

Ok, now we've got a room and we can fly around in it. If we wanted to, we could walk around in our room now - but that wouldn't be much fun. Let's make our map a little more complex and then we'll give it a try!


Before we make a second room, let's create a small hallway to take us there. In the Brush Properties panel to the left (still in Brush mode), set the height to 2.50, width to 3.00, and depth to 8.00. Confirm that "Type" is still set to Air, and leave the other settings at their defaults as shown below.

NOTE: We're going to be moving the Cookie Cutter before we create our brush. Your Cookie Cutter should at the moment still be where it began - in the center of your existing room. If you've already moved the Cookie Cutter on your own, hit the following two hotkeys in sequence to reset the Cookie Cutter to the right place.

  • Home: The Home key (in any mode) resets the camera to the position of the Player Start. By default, this is the center of your map.
  • B: The B key (in Brush mode) sets the Cookie Cutter to the current position of the camera.

Now, let's move our Cookie Cutter to where we want our hallway. Make the top view active by hovering your cursor over it (the active viewport will always have a red outline) and click somewhere in the black space outside of your room to ensure nothing is currently selected. Then, while holding the M key, hit the Up arrow key on your keyboard 9 times - the Cookie Cutter should now be flush with the top edge of your existing room as shown below.

  • M: The move (M) key (in any mode) lets you move whatever you have selected. To use the move function in RED, hold M and use the arrow keys on your keyboard to move your selection. Note that the movement is relative to the currently active viewport - ie. holding M and using the Up arrow key with the top viewport active will move your selection in that direction in top view (Z axis). Doing the same with the front viewport active however, will move your selection in that direction in front view (Y axis). You should avoid moving with the free look viewport active as doing so can often result in a selection becoming unaligned to the world grid.

Next, we need to move our Cookie Cutter down slightly so that when we create our hallway, it'll be flush with the floor rather than centered vertically in the wall. To do so, we'll use the M key yet again to move it, this time in the front viewport. However, before we can do so, we need to adjust our grid size. When you first launch RED, the grid size will always be set to 1.00m, but in this case, we need to set it to 0.250m so we can properly align the Cookie Cutter for our hallway with the floor of our room. To do this, we'll use the bracket keys ([ and ]). Specifically, hit the [ key twice - when you do so, you'll notice the Grid Size setting on the top bar of the RED window now displays our desired grid size of 0.250m.

  • [ and ]: The bracket keys are a quick way to control the current grid size for movement. When you use the move (M) key, each time you press an arrow key, the selection moves in the direction you desire, one increment of your current grid size. If your grid size is 1.00m, holding M and hitting the Up key will move your selection 1m up in the active viewport. If however your grid size is set to 0.250m, doing the same thing will move your selection 0.250m (1/4 of a meter) instead.

Hold your cursor over the front viewport to set it as active, then, with your grid size set to 0.250m, hold the move (M) key and press the down arrow once - your Cookie Cutter should now be flush with the bottom of your room as shown below. Hit Create Brush to create your hallway, then press the spacebar to build your geometry. You should now see your room and hallway displayed as below.


We've learned how to move brushes, but before we can say we're done with our geometry, let's learn how to duplicate and rotate them as well. First, ensure your hallway is still selected (click it in the top viewport if it's not). Next, hold the Ctrl key, and hit C to copy the hallway, then while still holding the Ctrl key, hit V to paste. It may not be immediately obvious since they're both in the same position right now, but we've just duplicated our hallway! Keep your new hallway selected, make the front viewport active, hold the R key, then press the left arrow key 6 times. The new hallway should now have been rotated 90 degrees, and form a cross with the other hallway as shown in the screenshot below.

  • Ctrl + C: Copies the current selection to your clipboard (brushes and objects).
  • Ctrl + V: Pastes the clipboard contents into the world. Any brushes and/or objects you had previously copied will be duplicated (and placed in the same position as they were when you copied them).
  • R: The rotate (R) key (in any mode) lets you move whatever you have selected. To use the rotate function in RED, hold R and use the arrow keys on your keyboard to move your selection. Note that, like the move function, the rotate function applies relative to the currently active viewport. As with the move function, you should avoid rotating things with the free look viewport active as doing so can often result in a selection becoming unaligned to the world grid.

Now that we've got a duplicate of our hallway, let's move it into position - we're going to create a 90 degree turn in our hallway and then make it lead to a second room. First, ensure the new hallway is still selected (if it's not, click it in the top viewport - be sure you don't click the center of the new hallway where it's overlapping the old hallway, as that would select the old hallway instead). Next, set your grid size to 0.5m by hitting ] once. Then, hold the M key, and with the top viewport active, press the up arrow key 11 times and (still holding M), the right arrow key 5 times. Your hallway should now be aligned with the top edge of the old hallway as shown below.


Next we need to make our new hallway a little longer, so let's learn how to resize brushes! With the new hallway still selected, open the Stretch dialog by either pressing the Stretch button in the Brush Operators panel to the left, or with the D hotkey. In the Stretch properties dialog, leave the height and depth values as-is, but set the width from 8.00 to 11.00 as shown below, then hit OK to apply the change.


Hit the spacebar to rebuild geometry, and you'll see our room and two hallways in position as shown below.


Great work! One last step for our geometry before we start applying textures - let's create a second room! The room will be at the end of our new hallway, but I'll leave the specifics for this room up to you - you can either create a new brush by moving and resizing your Cookie Cutter as I've shown you before, or simply duplicate the existing room and move the duplicate.


For my demonstration, I duplicated the existing room and moved it into position (same process as we used for the second hallway). Once you're happy with how your second room looks, hit the spacebar key one last time to build your geometry, then let's test out our map before we head to texture mode.

Saving, packaging, and testing your map

To save your map, either use the Ctrl + S hotkey, or hit the "Save" button on the top bar of the RED window. When the Save dialog appears, navigate to the user_maps directory within your Red Faction folder, then go to the single directory as shown in the screenshot below. The filename is up to you, but you should try to make it fairly unique to avoid conflicts with other maps, and avoid using special characters or spaces. When you've decided on a filename, and navigated to the single folder, hit the Save button to save your map.

  • IMPORTANT: Red Faction cannot load map files (.rfl) directly. First, you need to package your map into a packfile (.vpp) in order for the game to load it.

To package your map, simply hit the "Pack" button on the top bar of the RED window (right next to the "Save" button). That's it - just remember for the future that hitting the pack button doesn't save your map before packaging it, so you need to remember to save your map before you hit the pack button.


Once your map is saved and packed, let's give it a try! Hit the "Play" button on the top bar of the RED window to load your map.


Well done! You can now move around in a world you created yourself - that must feel great! Granted, maps without any textures, lights, or anything to do (or shoot) would get boring pretty quickly - so let's fix that! When you're done running around your map, quit out of the game, come back to RED, and let's learn how to texture our geometry!