The Beginner's Guide to Red Faction Mapping: Difference between revisions

From Red Faction Wiki
No edit summary
No edit summary
Line 75: Line 75:


'''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.  
'''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 second room==
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, then we'll jump in game and check it out.
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.





Revision as of 12:17, 13 August 2022


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 second room

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, then we'll jump in game and check it out.


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.