ThePlatoon.com
July 30, 2010, 05:15:41 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: WELCOME! As you can see we have changed forum systems, for good I hope.
 
  Home   Forum   Help Search Calendar Login Register  
  Shop Gallery  
Pages: [1]   Go Down
  Print  
Author Topic: GRAW2: The Editor  (Read 3207 times)
0 Members and 1 Guest are viewing this topic.
Wolfsong
One with nature...
Administrator
Sr. Member
*****

Rep: 9
Offline Offline

Posts: 559
2743.50 credits

View Inventory
Send Money to Wolfsong

75672554 WolfsongMods@Hotmail.com
View Profile
« on: August 12, 2007, 07:22:38 PM »

Chapter 1: Getting Started

This tutorial will cover the basics of the editor. Not all the small details, but the basic stuff you need to know to create a new level from existing units.

The editor provided to the public is the exact same version that has been used by Grin during the development of GRAW2. It’s not designed especially for public use, which many other editors released to the public are, and as such it has an interface that is a bit rough around the edges and not totally logical due to constant changes and additions to the game functions during development, but I’ll cover all that and try to straighten things up a bit. It’s also not fully stable so play it safe and save often.

Requirements
The only requirements when working in the editor, besides that you have the hardware to run the game of course, is that you have a 4 button mouse. The thumb button [mouse 4] is important for placing units, and you can’t rebind keys in the editor, so you must have it.

Preparations
The simplest way to keep things clean is to start by creating a new folder for your level. If you don’t create a new folder, a default folder called “world_xml” will be used. In that case you’ll then have to move your files into a new folder when you want to share your level, or else all levels exported with the default folder name will override each other and create problems for the players, so my suggestion is that you create a new folder from start. In this document the custom level folder will be called “tutorial”. Where the level folders are located varied depending on if you are using XP or Vista. In XP they are located where your game is installed under GRAW2/data/levels. In Vista all the files are found under your profile folder, where a similar folder structure can be found.

Note: Only use lower case letter for all folder and file names in GRAW2, and no special characters.

The next step is to edit the “GRAW2_Editor.bat” file to tell it which folder you are going to work inside. If you know a little bit of BATCH programming you’ll notice when you open it that you don’t have to edit this file. It uses a wildcard which takes in the string written after the filename and uses it as the folder name to open.

Still, I suggest that you create a copy of “GRAW2_Editor.bat” and then do these changes inside the copy as that will help you in the future to faster and easier start the editor with the right level or if you want to create more then one level you can have one start file for each of them. Just give the new copy a descriptive name, like “GRAW2_Editor_Tutorial.bat” for example as the level folder is called “tutorial”, so you can easily find it. Inside the copy you should edit the last part so that it contains the name of your level folder you want to work inside after the
“-path” tag and it should work fine.

Contents of GRAW2_Editor_Tutorial.bat:
Quote
graw2_win32_release.exe -o context-editor.xml -path tutorial
With that done you are now ready to start building your level. Run the new
“GRAW2_Editor_Tutorial.bat” start file and let’s take a look at the first steps inside the editor.
Logged

---===[ STAFF ]===---
Technical Artist @ Avalanche Studios
Wolfsong
One with nature...
Administrator
Sr. Member
*****

Rep: 9
Offline Offline

Posts: 559
2743.50 credits

View Inventory
Send Money to Wolfsong

75672554 WolfsongMods@Hotmail.com
View Profile
« Reply #1 on: August 12, 2007, 07:26:08 PM »

Chapter 2: Interface

Once the editor has started you are facing a blank world with a default environment and nothing else in it. In the upper left corner you can find “layer” and “rendering” options menus. On the right side you’ll find the “unit list” window, which shows available units to be placed in some layers and which units have been placed in others.

Tip: All windows inside the editor can be moved around by using the left mouse button, clicking on the top part of the window, hold down and move.

Rendering
The “rendering” menu decides how you are currently watching the level inside the editor. This can be useful as you can for example turn to “albedo” and that way turn of the environment lighting and shadows to get a better look at what the layout of the level is even when light maps have not yet been rendered.

Rendering options found in the editor:
Quote
Albedo
- Shows the level in only diffuse textures.
Ambient
- Shows the level in grey with only ambient shadows.
Lighting
- Shows the level with the assigned environment, like it will look inside the game.
Normal
- Shows the level in only normal map textures.
Layers
The “layer” menu decides which units are shown in the unit list on the right side of the screen. It also automatically hides units from other layers then the one being worked on, with some exceptions for static and dynamic units, to make it easier to work. Also, only units from the current layer can be selected and edited.

Layers found in the editor:
Quote
Static
- Contains units like landscapes and props. Even props that can be destroyed are found under static, with the exception of destroyable vehicle props.
Dynamic
- Contains working vehicles as well as prop versions of vehicles that can be destroyed, called covers.
Markers
- Contains markers used for defining minimap borders,
compass north direction, cinematic points and other things.
Light
- Contains extra light sources.
Sound
- Contains sound points used to place environment sounds.
Electric
- Contains all wires.
Props Brush
- Contains brushes for grass, small debris, decals and similar.
Human
- Contains all human AIs.
AI Graph
- Contains the human and vehicle AI graphs.
Locations
- Contains all zones.
Sub-Layers
Some layers have sub-layers as well, which allows it to only show parts of the contents of the layer in the unit list at the time. Like with layers, only units from the current sub-layer can be selected and edited.

Keys for switching between Static sub-layers:
Quote
Ctrl+1   Static (default)
Ctrl+2   Small Static (includes destructible objects)
Ctrl+3   Landscape
Keys for switching between Dynamic sub-layers:
Quote
Ctrl+1   Cover (default)
Ctrl+2   Vehicles
The AI Graph layer has a toggle function and will only show one graph at the time as working with two graphs showing would be very annoying.

Key for toggling between AI Graph sub-layers:
Quote
M   Toggle between Human (default) and Vehicle graph.
Unit List
The contents of the “unit list”, and its existence, vary depending on which layer you are currently in. It has a “mask” input field which can be used to filter the contents of the current list. Filtering can only be made from the beginning of the unit name, and it doesn’t work with wild cards like “*” or “?”.

When in “Light”, “Sound” and “Locations” layers, the unit list contains units that have placed on in level already, but in all other layers where it’s available it holds all the units you can select to create.

Commands
The editor is controlled by keyboard shortcuts only, with the exception of the two menus covered earlier. There is no way around using these, so you simply have to learn to use them like Grin has.

Quote
Alt + F4   Quit Editor
Ctrl + S   Save Level
Ctrl + L   Load Latest Save
Ctrl + Backspace   Generate Lightmaps
L
Spawn Player (at current tool indicator location)
O   Generate Orthographic Minimap (requires markers)
Shift + O   Generate Cube Map (require marker)
F6   Toggle Editor Light - On / Off (default)
F8   Toggle Mode - Editor (default) / First Person (require spawn)
F12   Show Editor Console (provides some feedback)
Numpad -   Toggle Unit Info Mode  (uses FFM controls)
Numpad /   Toggle Render View Stats Window

Alt + 1 (or 2)   Static Layer
Alt + 3   Electric Layer
Alt + 4   Props Brush Layer
Alt + 5   Human Layer
Alt + 6 (or 7)   Dynamic Layer
Alt + 8   Markers Layer
Alt + 9   AI Graph Layer

Space   Enter / Exit “Free Flight Mode” (FFM)
W   Move Forward in FFM (camera coordinates)
S   Move Backward in FFM (camera coordinates)
A   Move Left in FFM (camera coordinates)
R   Move Right in FFM (camera coordinates)
E   Move Upward in FFM (world coordinates)
Q   Move Down in FFM (world coordinates)
Mouse Movement   Rotate Camera
Scroll Forward   Increase FFM Move Speed
Scroll Backward   Decrease FFM Move Speed

N   Toggle Place Alignment - Normal (default) / Grid
G   Increase Grid Size
Shift + G   Decrease Grid Size
Hold TAB   Show Grid Plane

Mouse 1   Select Unit
Mouse 2   Place Unit
Mouse 3   Snap Rotate Selected Unit (45 degree ccw per click)
Mouse 4   Move Selected Unit (along Normal or on Grid)

B   Pick Selected Unit Type (to use for “place unit”)
Home   Reset Unit X & Y Rotation
Del   Remove Selected Unit
Up Arrow   Free Rotate Selected Unit, Y Axis (object coordinates)
Down Arrow   Free Rotate Selected Unit, Y Axis (object coordinates)
Left Arrow   Free Rotate Selected Unit, Z Axis (object coordinates)
Right Arrow   Free Rotate Selected Unit, Z Axis (object coordinates)
Shift + Up Arrow   Free Rotate Selected Unit, X Axis (object coordinates)
Shift + Down Arrow   Free Rotate Selected Unit, X Axis (object coordinates)
Ctrl + Up Arrow   Move Selected Unit Upward (world coordinates)
Ctrl + Down Arrow   Move Selected Unit Downward (world coordinates)
That’s the controls to use. With that I think it’s time to move on to start creating a level by taking a closer look at the Static layer.
Logged

---===[ STAFF ]===---
Technical Artist @ Avalanche Studios
Wolfsong
One with nature...
Administrator
Sr. Member
*****

Rep: 9
Offline Offline

Posts: 559
2743.50 credits

View Inventory
Send Money to Wolfsong

75672554 WolfsongMods@Hotmail.com
View Profile
« Reply #2 on: August 12, 2007, 07:27:03 PM »

Chapter 3: Static Layer

The main parts of any level are static units. Landscapes, buildings, plants and props are all included in this category. Some have destructible, or dynamics versions which are more expensive to use when it comes to performance, so try to use their static counterparts as often as possible without sacrificing game play to gain better FPS.

When combining static units there come always the problem that you can’t load all textures into memory at the same time. Because of this GRAW2 uses texture scopes in GRAW2, which are defined per level and decided which texture atlases to use when playing each specific level. Unlike in GRAW1 these will not be predefined for you. The editor has access to all textures, so you won’t get any notice about this problem in there, but once you play test the level inside the game you’ll get a blue and yellow checker pattern where textures are missing. If this occurs you have the option to either remove those props and maybe replace them with something else or expand the texture scope. I’ll cover how to edit the texture scope later in chapter 13.

Landscape
The first thing you’ll have to add to any level is a landscape static unit, which will act like the ground for the players to walk on. The available landscape units are found in the Static layer [Alt+1] under the Landscapes sub-layer [Ctrl+3].

Many of the original SP/Campaign Coop landscapes have a built-in low-poly backdrop which can’t be removed. Those low-poly houses also have low texture quality and lack collision, so avoid designing a level among them. Wink The landscapes also have roads and other ground deformations built in especially for the original game design, which can’t be removed either obviously, but besides that they can be used to build entirely new levels on. Some landscapes, like for mission01 and mission07, have objects that are built to fit into the landscape very exactly, but are not spawned with it when you place the landscape in the editor. If you want to use such a landscape I suggest copying the files from the level using that landscape and cleaning it of the units you don’t want which is fastest done inside the world.xml with an xml editor, as for example trying to align the bridge in the mission01 landscape inside the editor is virtually impossible.

Modders will be able to create their own landscape units. They need to be modelled and UV-Mapped inside 3DS Max, then exported and setup with the required XML files, upon which they will appear in the list among the other landscapes. This will be covered in another tutorial that will be available as soon as possible.

Once you have selected which landscape you want to use, let’s move on to other
sub-layers.

Static
Back in the Static sub-layer [Ctrl+1] you’ll find all large static units like for example houses and huge billboards. These are the main building blocks used to form the level and create paths that the player can use. There is nothing really special about these, so it’s just to pick what you want from the list and start building.

Small Static
In the Small Static sub-level [Ctrl+2] you’ll find all the smaller props that can be used to add detail to your level. In here you can also find placeable effects (use mask with “efx”), vegetation (use mask with “vgt”), and some usefully level design tools like mover collisions to prevent players from going somewhere (use mask with “mov”), the cover dummies for extra the AI cover points (use mask with “cov”) and the ambient dummy for extra ambient sample points around props that appear black (use mask with “amb”).

There are also static versions of some vehicles here. The difference between these and those found in the dynamic layer is that these can’t be destroyed or moved in game, and as such can be used to block paths you don’t want the player to go to or to add more atmosphere where the player can look out in the near surrounding outside the level and it would be unnecessary to have an performance expensive dynamic vehicle.

Although there are no dynamic vehicles in this layer that doesn’t apply to other props. Many small props come in two versions but when that’s the case, the naming convention varies some. One of them always has its type defined if there are two versions though. If there is one version called “_dynamic”, that is obviously dynamic and the other is static, and where there is one called “_static”, that one is obviously static and the other dynamic. Don’t use dynamic props where the player can’t get to or where you want to block the player from going. Dynamic props are much more expensive to use and should be avoided on MP levels other then Campaign Coop where there are few players as they have to be synced between the players and many dynamic units will take a lot of bandwidth.

Besides destructible dynamic units, there are also non-destructible units that are affected by the game physics, most notably the wind and collision with characters. Where there are optional versions these have “_cloth_high”, “_cloth_low” or “_wind” in their names. Like other dynamics objects, try to avoid these in MP levels other then Campaign Coop.

Lastly there are AGEIA hardware props (use mask with “xag”). These are very CPU expensive to use and should be avoided unless the map is made for AGEIA hardware users. People with top of the line CPU can probably handle these anyhow, but make sure to test the level on such a computer if you want to try and use them without an AGEIA card.

That should cover the entire Static layer. Let’s move on to Dynamic.
Logged

---===[ STAFF ]===---
Technical Artist @ Avalanche Studios
Wolfsong
One with nature...
Administrator
Sr. Member
*****

Rep: 9
Offline Offline

Posts: 559
2743.50 credits

View Inventory
Send Money to Wolfsong

75672554 WolfsongMods@Hotmail.com
View Profile
« Reply #3 on: August 12, 2007, 07:27:57 PM »

Chapter 4: Dynamic Layer

In the Dynamic layer [Alt+6] you’ll find all the vehicles.

When placing dynamic units you’ll notice that they interact with the environment. Hitting static units will make them rotate and they will also push other dynamic unit around. From my experience the best way to place a dynamic object is to use FFM and move as close to the position you want to place the unit at as possible, leave FFM, select the unit in the list and place it carefully a little bit above the ground. It will fall down and adjust itself to the shapes it now stands on. Avoid selecting the unit in the list first and try to fly it in with FFM.

Cover
In the Cover sub-layer [Ctrl+1] all the dynamic vehicles that don’t have any AI or animated sequences can be found. Most are just used as normal props, but there are some special versions found here as well.

Some of these have built it fire effects, which are of course more expensive to use then the versions without fire. These have “burning” in there names. Don’t use too many of those on a level.

There are also heavy physics versions of the M1078 truck, whose covers are affected by the wind. These have “_high” and “_low” in their name and should be used with care like all other units for heavier physics settings.

Other then that, simply use these dynamic units like static units, but make sure it’s ok that the player can move them from the position you have placed them.

Vehicle
In the Vehicle sub-layer [Ctrl+2] we find all the vehicles that have AI or are
pre-animated sequences. To make use of the AI vehicles you must have a Vehicle AI Graph on the map.

Vehicles also need room if they are to move, so think about that when placing you props and designing your level. They require clearance of about their double width to be quite sure that they can pass narrow passages. They also require clearance upwards which is calculated by the biggest vehicle in the game, so don’t place to much overhanging details where you want the AI vehicles to be able to move.

Important to notice on vehicles is that they have a few options that affect how they are used in the game.

First they need a unique name so you can call it from within your mission script to spawn them if they aren’t spawned from start, remove them from the game world, destroy them or use them inside conditions for triggers.

Second they need to be in the correct team slot, “friendly”, “hostile” or “neutral” so they interact correctly with the player and hostiles.

Lastly they need to be prepared for how they are going to be used, a bit more specifically how they are going to start the mission and if the player is going to be able to interact with it. “Sequence spawn” starts the vehicle hidden from the world and it has to be activated through the mission script. “Sequence death” starts the vehicle as destroyed when spawned. “Enter_exit” sets if the player will be able to enter or exit the vehicle and it will show in the game by displaying the “press x to enter” or “press x to exit” messages to the player once close to an entry or exit point.

Orders
You’ll notice that you can’t place paths for the vehicles to move along inside the editor. All orders for vehicles have to be added in the mission script. Some of them will require coordinates, which can be gotten in a few different ways.

The first is to use the Stats Window [Numpad /], which among other things show the coordinates that the camera is currently at. This can be used to get a rough idea of the coordinates you want.

The second is to place units on the map and giving them a specific name like “vehcile1_waypoint_a” and so on and then saving the map. Exit the editor and open the world.xml in your XML editor and to a search for the name you gave the unit. In its data you’ll find the exact coordinates it was placed on, which you can then use inside the mission script. Remember to remove those dummy units later.

It’s up to how exact you want to the coordinates to be, as well as if it’s a flying vehicle or a ground based one of course. You’ll always have to test the paths in-game to make the final adjustments in the end. When doing that, remember that vehicle movements are FPS dependant. They operate like they should at about 35 FPS and up. Under that they will start to deviate from the set path as they won’t reach the given waypoints in time.

That’s all the info I can give you here. Let’s check out the Electric layer.
Logged

---===[ STAFF ]===---
Technical Artist @ Avalanche Studios
Wolfsong
One with nature...
Administrator
Sr. Member
*****

Rep: 9
Offline Offline

Posts: 559
2743.50 credits

View Inventory
Send Money to Wolfsong

75672554 WolfsongMods@Hotmail.com
View Profile
« Reply #4 on: August 12, 2007, 07:28:13 PM »

Chapter 5: Electric Layer

When you get to the Electric layer [Alt+3] you’ll see… nothing! No “unit list” or other window that gives us any clue on what to do. Well, don’t worry because it’s really simple. The only thing that can be done in this layer is placing wires to make the level look more inhabited, to simulate electric wires or telephone wires for instance.

This is done by right clicking [Mouse 2] where you want the wire to start, then right clicking [Mouse 2] where you want the wire to end. While the wire is still selected you can adjust the slack on the wire by using [Up Arrow] to decrease slack and [Down Arrow] to increase slack. If you want to adjust the slack later on a wire, just select the wire with a left click [Mouse 1] and use the arrow controls. You can’t move the start and end points once they are placed though so if you want to move those simply select and delete the old wire [Delete] and create a new one.

With nothing more to cover here, let’s move on to the Sound layer.
Logged

---===[ STAFF ]===---
Technical Artist @ Avalanche Studios
Wolfsong
One with nature...
Administrator
Sr. Member
*****

Rep: 9
Offline Offline

Posts: 559
2743.50 credits

View Inventory
Send Money to Wolfsong

75672554 WolfsongMods@Hotmail.com
View Profile
« Reply #5 on: August 12, 2007, 07:28:47 PM »

Chapter 6: Sound Layer

When you get to the Sound layer (which doesn’t have any keyboard shortcut), we find an empty “unit list”. This is because there is only one type of unit to place in this layer and the “unit list“ is instead used to list all the placed sound units currently in the level.

To place a new sound unit, simply right click [Mouse 2] and it will appear at the location where the camera is currently at. To remove a sound unit, select it in the “unit list” by left clicking on it [Mouse 1] and hitting [Delete].

For each sound you place you are given the option to give it a “name”, which is only used if you want to be able to reach it inside the mission script so it’s not commonly used, and a “cue”. The “cue” should be given the name of the sound you want to play. For a full list of the available sound cues in the original game, check out appendix 1 at the end of this tutorial, besides all the sound cues it also lists which sound banks each sound belongs to.

Now that the level has been given some more environment feelings, let’s move on to the Props Brush layer.
Logged

---===[ STAFF ]===---
Technical Artist @ Avalanche Studios
Wolfsong
One with nature...
Administrator
Sr. Member
*****

Rep: 9
Offline Offline

Posts: 559
2743.50 credits

View Inventory
Send Money to Wolfsong

75672554 WolfsongMods@Hotmail.com
View Profile
« Reply #6 on: August 12, 2007, 07:29:19 PM »

Chapter 7: Props Brush Layer

The Props Brush layer contains grass; small debris units and decals used to add the final touch to the levels. These are useful to remove repetition in larger units in the level, and also add a more used feeling in the level.

These units are “painted” onto the level and are not found inside the “world.xml” like the others. They are stored inside an encrypted “massunit.bin”, so if you want to remove all units placed with this tool, simply remove that file before starting the editor (or to be safe always save a copy somewhere in case you change your mind), and they will all be gone once the editor has been started.

As this layer has a special brush tool, it also has special tool settings to control it.

.
.
.

To be continued in the 1.3 Patch. Smiley
Logged

---===[ STAFF ]===---
Technical Artist @ Avalanche Studios
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
SMF Theme © Gaia
Valid XHTML 1.0! Valid CSS!