Difference between revisions of "Level editor"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(import from extranet)
 
(Mentioned a bug that editors should beware of.)
 
(93 intermediate revisions by 16 users not shown)
Line 1: Line 1:
The level editor is used to generate the level layouts that are the basis for creating [[area]]s. A level layout is a non-interactive resource; the objects placed within it serve only to provide the physical structure and appearance of the area. If you need the player to interact with objects within an area you'll need to use interactive [[placeable]]s instead.
+
{| style="float:right;"
 +
|-
 +
| {{resource palette}}
 +
|-
 +
| {{Infobox level editor}}
 +
|}
 +
The level editor is used to generate the level layouts (also called Area layouts) that are the basis for creating [[area]]s. A level layout is a non-interactive [[Art Resources|resource]]; the objects placed within it serve only to provide the physical structure and appearance of the area. If you need the player to interact with objects within an area you'll need to use interactive [[placeable]]s instead.
  
== Creating a new level ==
+
Note that unlike the [[Area]] editor, only two modes of camera control are currently supported: "flycam" mode ([[Image:IconFlycamStyle.png]] button in the toolbar) and 3DS Max mode ([[Image:Icon3DSMaxStyle.png]] button). NWN style is not currently supported.  (Use a combination of the mouse wheel + Ctrl or/and Alt (dependant on camera mode) to control the camera.  In either mode Numpad 5 will reset the camera.)
  
When creating a new level layout you'll be presented with a wizard that sets up several basic attributes. Note that some of these attributes can't be changed once the level has been created.
+
Area layouts are an [[Art Resources|Art Resource]].
  
[[Image:Level editor level creation wizard start.png]]
+
You can download the source files for the levels in the main campaign from here: [http://social.bioware.com/project/1331/#files].  (See also [[Area layouts used in the single player module]] for a listing of what each one is.)
  
The first choice is whether to have a terrain mesh (the "ground") or not. If you choose to have a room-based level you'll have to place chunks of floor, walls, and ceiling to enclose the player on all sides. Room-based levels have no further attributes that need to be configured during new level creation, so if you select "room-based" you'll be taken straight to the level editor from here.
+
== Terminology ==
  
[[Image:Level editor level creation wizard terrain basic.png]]
+
*Sector: A sector is a square of geometry and is currently exported to the game as a “Chunk”.  For all intents and purposes, we can consider a sector and a chunk to cover the same area.  The different term is kept to distinguish between source (sector) and output (chunk).  Sectors are always square.
 +
*Chunk:  A Chunk is the game-side basic building blocks of Terrain based levels.  Each Chunk is self-contained, has its own levels of Detail (LOD), RIMs, model lists, tree lists, etc.  It is what is streamed in and out during gameplay.
 +
*Base Resolution:  This is the starting resolution of each cell, and can be specified in the wizard.
 +
*Cell:  A cell is the basic building block of the terrain geometry.  Each cell starts off at the base resolution as a square and is made up of 2 polygons.
 +
*Blend Mask:  The blend mask is the mask that is used to paint textures on the terrain. It is a blend16 algorithm, where it blends the highest 4 texture values (out of a possible 16) on each texel to come up with a texture mapped terrain.
 +
*Texture Palette:  The texture palette is essentially a list of textures, one after the other.  When an artist wants to use a texture to paint on the terrain he/she would add a texture to this palette.
 +
*Blend Texel:  These are the building blocks that make up the blend Mask. Each texel is comprised of 4 sets values and each value set is essentially a percentage of how much of that texture on the palette shows up, and a mapping of where it maps onto the mask.
 +
*Tessellation:  Tessellation is the breaking up of a cell into more resolution of polygons.  For each tessellation level it breaks up each polygon into 4 equal parts.
  
If you choose terrain-based, you'll be asked to define some attributes for the terrain mesh. By default you're shown the basic set of attributes:
+
== Camera controls ==
*Terrain mesh dimensions, in meters. Note that 64 by 64 is about the minimum that can produce a serviceable level, and that 256 by 256 is the maximum before one starts risking bad performance - though levels can be made larger than this if one takes care.
+
*Base mesh resolution - determines the size of the individual triangles that make up the terrain mesh. The default has 2 meter triangles. Note however that you'll be able to manipulate the terrain at a much higher resolution than this by using the tessellation tool; each tessellation level splits the previous level's triangles up into four smaller triangles.
+
*Chunk size - chunks are the basic simulation unit used by the engine. The default 32m is a good chunk size. You'll probably not want to reduce it smaller since you can't have the terrain mesh overhang from one chunk into another; smaller chunks could place limits on the sorts of terrain warping you'll be able to do later.
+
*Create a default water plane - Creating additional water planes later on is quick and easy, but this option provides a pre-made one by default.
+
  
[[Image:Level editor level creation wizard terrain advanced.png]]
+
=== Movement speed ===
  
If you click the "advanced" button you'll be provided with a different presentation of the level's dimensions. Instead of defining its dimensions directly you can set how big chunks are and how many chunks there are in each dimension, defining the level's overall dimensions implicitly.
+
In a level editor, camera movement speed in "flycam" mode can be increased and decreased by holding down a left CTRL and using a mouse wheel.  
  
There's one important attribute that can only be set in the advanced pane; the texel map's resolution. A texel is a "texture element", a sort of high-level pixel equivalent that defines a texture instead of just a single uniform colour. The terrain is "painted" with texels, described later.
+
== Interior and exterior levels ==
  
== Layout name ==
+
There are two basic types of levels; interior and exterior. Many features of these two level types are the same and level editor documentation will generally be applicable to both types unless specifically noted. Their key difference is that exterior levels have a terrain mesh (the "ground") and interior levels don't. Note however that there's no reason why you couldn't use one level type to "fake" the other - for example you could create a an entirely underground cave using an "exterior" level with the terrain mesh as the cave's floor.
 
+
The name of a layout is limited to seven characters. BioWare uses the following naming system:
+
 
+
*Three-letter prefix that describes the region or plot the layout is for. For example, "ost" for Ostagar and environs.
+
*Three-digit number that uniquely identifies the layout within that region. Increments of one hundred are commonly used for major areas to allow sub-regions to be grouped together.
+
*A single character identifying variants of the layout. For example, a "d" suffix for the "daytime" version of an exterior layout.
+
 
+
So for example the layout "ost101d" is a layout in the Ostagar region with a daytime ambience.
+
  
 
== Toolbar ==
 
== Toolbar ==
Line 39: Line 40:
 
See sections below for detailed information on level editor specific toolbar buttons.
 
See sections below for detailed information on level editor specific toolbar buttons.
  
== Interior and exterior levels ==
+
=== Terrain mesh ===
 
+
There are two basic types of levels; interior and exterior. Many features of these two level types are the same and level editor documentation will generally be applicable to both types unless specifically noted. Their key difference is that exterior levels have a terrain mesh (the "ground") and interior levels don't. Note however that there's no reason why you couldn't use one level type to "fake" the other - for example you could create a an entirely underground cave using an "exterior" level with the terrain mesh as the cave's floor.
+
 
+
== Terrain mesh ==
+
  
The terrain mesh is a deformable surface used in exterior levels to provide a "ground". This toolbar contains the tools that deals with the terrain mesh:
+
The [[terrain mesh]] is a deformable surface used in exterior levels to provide a "ground". This toolbar contains the tools that deals with the terrain mesh:
  
 
[[Image:Level editor toolbar terrain editing.png]]
 
[[Image:Level editor toolbar terrain editing.png]]
  
Each of these buttons brings up a "brush" that's used for various tasks.
+
Each of these buttons brings up a "brush" that's used for various tasks. See [[Terrain mesh]] for details.
  
*[[Image:IconTerrainDeform.png]] "Deform" allows the terrain mesh to be raised or lowered, or it can extrude the ground "outward" or "inward" along its surface normal. In other words, if you were to apply the brush to the side of a cliff in extrude mode you could create a cave-like hollow or a bulging overhang. Note that the walkmesh used by the game is two-dimensional, ie, it doesn't allow pathfinding both over and under an overhang. The walkmesh will always be generated on the overhanging part of the land. Also note that you cannot have an overhang from one terrain chunk into another terrain chunk - turn on "view chunk boundaries" to check if this has happened and reposition any overhangs that violate these boundaries.
+
=== Other tools ===
 +
* Chunk boundary visualization - The chunk visualization tool is a button that will highlight where all the chunk/sector boundaries are, allowing the artist to plan the level accordingly.  As you can see, it also highlights the models that fall into a colored chunk so that you can see which chunk these will fall into on export.
 +
* Highlight impassible terrain - The game imposes limits on the slope of a walkable surface. Toggling this viewport button will display red highlights on the terrain wherever this limit is exceeded.
 +
* Fade Cutaway Toggle - Cutoff, or 2 meter cutoff as it is called, is where we cut off the tops of models in interiors when we go into tactical camera mode, or overhead camera. This way we can still see the players.  The cutoff tool allows the artists to visually see from the editor what will get removed when going into the tactical camera.
 +
* Fade Punchthrough Toggle - Punch through is a system that allows the artists to put a flag on a model to say that it will get “punch through”.  What this means is that when the game user is in tactical (overhead) camera mode, any model that is between the main character and the camera will get a punch through mask applied to it.   This tool allows the artists to see in the editor what will get punched through in the game.
 +
* Visualize Collision Objects - Turning on the visualize collision toggle will display all collision shapes in green/red wireframes. The green-red tinting is provided to make it easier to distinguish multiple objects from one another.
 +
* Continuous Refresh Toggle - When the continuous refresh toggle is activated, the viewport will constantly redraw whenever it has free CPU time.  This is useful for visualizing VFX and another animated models.
  
*[[Image:IconTerrainPlateau.png]] "Plateau" flattens out the land the brush is applied to, removing bumps or dips and making the ground level. This is a good tool for making a path through rough terrain, or for smoothing out a flat field.
 
  
*[[Image:IconTerrainSmooth.png]] "Smooth" is a more generic form of flattening tool. It doesn't force the ground toward a horizontal plane, instead just averaging out the nearby terrain in whatever orientation it averages out to.
+
== Lighting ==
  
*[[Image:IconTerrainTessellate.png]] "Tessellate" changes the resolution of the terrain's mesh, increasing or decreasing the number of triangles a given region. This allows for a more fine-grained control of the shape of the land and prevents small features from being given obvious straight edges caused by the underlying triangle mesh. Left-clicking increases the number of triangular subdivisions and right-clicking reduces it. The "max level" and "min level" settings on the tool constrain these values - lower numbers indicate a coarser mesh with fewer, larger triangles.
+
There are many different types of [[lighting]] and light combinations that can be placed in the editor.
  
*[[Image:IconTexturePaint.png]] "Texture paint" paints materials from the material palette onto the terrain. The material palette for any given level can hold up to eight materials, and they can be blended together seamlessly.
+
There are also many tools used to create lighting and generate lighting and even visualize lighting in the editor. The goal with the editor is to give the artist the same experience as he/she would see in the game. This will help them to be able to create the levels and tweak lighting quickly without having to stop to see it in-game.
  
*[[Image:IconTextureSmooth.png]] "Texture smooth" blurs the boundaries between different material types, allowing them to fade more gradually from one terrain material type to another.
+
Lights for the game are split into two categories based on what they affect: levels and characters. Character lights will affect the player, NPCs, and creatures.  The level lights will affect static geometry and designer placeables.
 +
 
 +
See [[Lighting]] for more detail.
  
*[[Image:IconTextureRelax.png]] "Relax map" causes stretched ground textures to relax back toward their default resolution. Terrain texture stretching can occur when you deform the ground. For example, if you were to stretch the ground upward in a small area to form a tall cliff, the texture on the cliff's face would be vertically stretched and could look unrealistic as a result.
 
  
 
== Models ==
 
== Models ==
  
Models are used to create any other objects that may be used as part of the level art - walls, floors, ceilings, non-interactive furnishings, visual effects, etc. To place them click on the [[Image:IconModelPlacement.png]] icon in the toolbar to go into model placement mode.
+
[[Model]]s are used to create any other objects that may be used as part of the level art - walls, floors, ceilings, non-interactive furnishings, visual effects, etc. ([[Image:IconModelPlacement.png]])
  
Trees are added using the "scatter object" mode ([[Image:IconScatterObject.png]]).
+
:''See Article: [[Model Placement|Model Placement]]
  
=== Model palette ===
+
Trees and Vegetation is added using the "scatter object" mode ([[Image:IconScatterObject.png]]).
  
The model palette contains all the basic building blocks that you'll have available to build a level layout with. These building blocks are created using third-party 3D studio programs such as 3DSMax, a process that we won't go into here.
+
:''See Article: [[Vegetation|Vegetation Placement]]
  
Unlike the database resource palette, the model palette doesn't have a heirarchy of folders and subfolders. Since there are usually a vast number of models available this can make the palette cluttered and difficult to work with. To make it more manageable you should set the toolset's configuration to "fake" a folder structure. The toolset will divide models up based on their names, using underscores as dividers; for examle the models dwe_face and dwe_orzent would both be placed inside a "dwe" folder. The option for setting this can be found under the palette options menu:
+
===Animations===
  
[[Image:Level editor palette fake folders.png]]
+
Some models have animations associated with them which may be set through the DefaultAnimation field of the Object Properties. For example, if you want a windmill or water wheel to turn you need to set that animation in the level editor. The animations for those two models are:
  
Models are grouped into "tilesets" with pieces that share common structural themes. For example, there might be a "dwarven fortress" tileset that contains a variety of structural pieces and furniture of dwarven manufacture, and a "Tevinter" tileset that contains a variety of pieces with Tevinter architectural motifs.
+
Windmill - wind
  
Since the names of these models can often be a bit inscrutable, a more convenient way of working with models that you're frequently using on a level (such as wall segments) is to bring them into the level's "scratch space" and copy them as needed. Objects in the scratch space can be positioned within the level just like ordinary objects but will not be exported when the level is exported for use as an area layout.
+
Waterwheel - turn
  
[[Image:Level editor scratch space.png]]
+
== Room visibility and connectivity==
  
=== Selecting objects ===
+
Interior based levels have explicit connections between rooms, unlike exteriors where there is an implicit connection between two neighboring chunks.  For this reason the connectivity must be set up by the artists.  This should be done through planning and iteration as it will affect the streaming and performance of the level in the game. 
 +
 +
If you select a room, you will see that that room appears highlighted in red.  The Room Properties window can be brought up by pressing the Room Properties button. This behavior can be disabled by unchecking the Highlight visible rooms checkbox.  All of the rooms that are visible to this room show up in green.  You will see the list of these rooms show up in the Visible Rooms list in the picture above. 
  
When clicking on models in the layout there will often be other foreground objects that are in the way, preventing the immediate selection of the object you wanted. Simply keep clicking on the same spot to cycle through all of the objects that are underneath the mouse pointer.
+
The ideal way to generate this visibility information is to press the button called “Generate Visibility Graph”.  This will take a little bit of time, so sit back after you press it and be patient.  What it does is take a render of each room in the level and generate a list of all rooms that can be seen from it.  
  
=== Moving and placing objects ===
+
NOTE: You must have generated pathfinding data for the level before you generate the visibility info, as it uses the pathing points in this process.
  
Clicking on the "snap options" button [[Image:IconSnapOptions.png]] on the toolbar brings up the following options:
+
Of course this can be tweaked manually afterwards using the add and remove buttons. However if you ever press the Generate button again it will wipe out all manual changes.
  
[[Image:Level editor snap options.png]]
+
The visibility system is used for streaming as well as the fog of war system, and determining what rooms are visible to the player depending on his/her current room.  There is one other factor however to this, the connectivity system, which is detailed next.
  
"snap to grid" causes the position of objects you place or move to be constrained to specific points in an imaginary three-dimensional grid. This is very useful when placing things such as floor tiles, which must be arranged in a precise grid in order for their edges to match up correctly.
+
The Room Connectivity System is necessary because there are things that can block visibility from one room to another.  For instance if I’m looking up a hallway and I can see 3 rooms in the distance, but then I close the door in front of me, the game needs a way to know that those rooms are now invisible. This is where this system comes in.
  
"snap rotation" similarly constrains the rotation of objects to specific angles.
+
The room connectivity system can be visualized by the other checkbox under the Connected Rooms list in the Rooms properties window.
 +
 +
Notice that the rooms connected to the current room show up in brown.  This is a reminder that you are looking at connectivity and not visibility.  As you can see only the rooms that are DIRECTLY connected to the selected room should be in this list.  This has to built up manually, by clicking add and then clicking on the rooms that are connected to it.  The add button in this case is more of a node, click it, then click the rooms you want to add, then you have to click it again to turn it off.  This was done to make adding all the rooms faster.
 +
 
 +
 
 +
== Black boxes ==
 +
 
 +
When creating an indoor layout you'll need to manually insert "black box" objects on the outer sides of the layout's walls. This allows the player to see through the walls when the camera is outside them, and obscures any parts of models that protrude out where the player shouldn't be able to see them.
  
"snap to surface" is useful when placing furniture and other objects on an existing surface (terrain, floor, etc.). It forces the object to rest "on" the surface. Once placed you can disable surface snapping and fine-tune the object's location as needed.
 
  
 
== Trees, grass, and shrubberies ==
 
== Trees, grass, and shrubberies ==
Line 109: Line 120:
 
Once this is done you can use the scatter object tool ([[Image:IconScatterObject.png]]) to place specific examples of the vegetation you've added controllers for.
 
Once this is done you can use the scatter object tool ([[Image:IconScatterObject.png]]) to place specific examples of the vegetation you've added controllers for.
  
== Light probes ==
+
See [[Vegetation]] for a gallery of the vegetation types included with the core resources.
  
Light probes are used to generate the appearance of nearby reflective surfaces. A light probe consists of an imaginary sphere that is textured with a pre-rendered view of its surroundings in every direction; reflective objects will use the texture of the nearest light probe to produce an approximation of what a reflection should look like. Light probes are particularly important where water planes are used.
 
  
The following example shows a light probe with the reflection texture rendered onto it (to make the light probe's texture visible you need to have "view models fully lit" turned off and "display light maps" turned on). The water below the light probe is using the probe's texture to determine its reflection.
+
===Scatter Object Tool ===
 +
The scatter object system allows the artist to place down both trees (and grass) and instanced models. An example of an instanced model would be some rocks scattered around on the ground.  Objects that are scattered across the terrain level will be placed randomly inside the brush, and will also randomly fluctuate in size and orientation as well.
  
[[Image:Level editor light probe.png]]
+
The Scatter object tool allows the artist to paint scatter object on the terrain.  These scatter objects cannot be selected individually, but can only be added or removed with this tool.  Left clicking adds scatter objects within the brush, right clicking removes them. 
 +
 
 +
*Fill Rate:  This is the rate at which the objects are scattered inside the brush.
 +
*Radius:  This is the radius of the brush that adds/removes scatter objects.
 +
 
 +
When the artist is painting scatter objects, he/she gets a palette, or Scatter Object Selection, from which to select which scatter object to paint.  Currently there are 2 tabs, one for trees and the other for instanced models.
 +
 +
The artist can add items to this list by right clicking on the Terrain World and selecting Insert, and then choosing either new Tree Scatter Object or new Model Scatter object.  In each case the artist will be able to browse a list of available resources.
 +
 +
*Ignore Density Setting:  This allows the artist to ignore the density setting and paint scatter objects in much the same way as one would use a can of spraypaint.
 +
*Maximum Density:  This allows the artist to specify the maximum density of scatter objects in the brush radius, and the brush will only paint up to this maximum.
 +
*Maximum Scale:  This caps the maximum scale of the scatter objects, 1 being the same size as the original.
 +
*Minimum Scale:  This caps the minimum scale of the scatter objects, 1 being the same size as the original.
 +
*Number of Painted Object:  Lists the current number of this type of object that has been painted in the level (un-editable).
 +
*Orient On Terrain Surface:  When this is set to true, the objects will orient themselves according to the orientation of the terrain on which they are placed.  For instance if you put a rock on the side of a hill, it will still appear “flat” to the ground. NOTE: Currently this does not work for trees or grass, they will always be complete vertical.
 +
 
 +
 
 +
== Water tools ==
 +
 
 +
See [[Water]] for detailed documentation on placing water in the level editor.
 +
 
 +
 
 +
== Wind ==
 +
 
 +
Each level can have one active wind object in it. The location of the wind object doesn't matter. The wind object defines how wind behaves on this level, which is used for such things as flapping banners and swaying trees.
 +
 
 +
To insert a wind object, right click on the terrain, and choose Insert > New Wind Object.
 +
 
 +
[[Image:Level editor wind object.png|center|]]
 +
 
 +
For other weather effects, see [[Weather]].
  
If you make any changes to the level that would make a visible difference to what a light probe "sees" you'll have to re-render the light probes to update the reflection texture. This command is under the menu "Tools -> Render -> Render light probes", or you can click the toolbar button [[Image:IconRenderLightProbe.png]]
 
  
 
== Pathfinding ==
 
== Pathfinding ==
  
 
Pathfinding is generated by clicking the toolbar button [[Image:IconGeneratePathfinding.png]]. The pathfinding process lays down a grid of points that are marked "accessable" if they can be reached from a pathfinding start spot via passable terrain. This is essentially a flood-fill algorithm.
 
Pathfinding is generated by clicking the toolbar button [[Image:IconGeneratePathfinding.png]]. The pathfinding process lays down a grid of points that are marked "accessable" if they can be reached from a pathfinding start spot via passable terrain. This is essentially a flood-fill algorithm.
 +
 +
In the case of exterior areas, you must select an [[exportable area]] before it will generate it, the error message will reflect this.
  
 
To see the existing pathfinding grid, click on the [[Image:IconDisplayPathfinding.png]] toolbar button or select "Pathfinding nodes" under the "View" menu.
 
To see the existing pathfinding grid, click on the [[Image:IconDisplayPathfinding.png]] toolbar button or select "Pathfinding nodes" under the "View" menu.
  
"Passable" or "impassable" depends on a variety of factors such as the slope of the land, obstructions, or water depth. Accessibility  
+
"Passable" or "impassable" depends on a variety of factors such as the slope of the land, obstructions, or water depth. Accessibility Start points are represented by a blue ring with a red arrow. Note that these are different from [[waypoint]]s, and are only used by the level editor for pathfinding purposes.
  
Start points are represented by a blue ring with a red arrow. Note that these are different from [[Image:waypoint]]s, and are only used by the level editor for pathfinding purposes.
+
[[Image:Level editor pathfinding start spot.png|thumb|center|300px]]
  
[[Image:Level editor pathfinding start spot.png]]
+
Models will often contain collision volumes that will automatically make the places they're located impassible. Likewise, you can set a certain depth of water as being impassible and pathfinding will take this into account.  
  
Models will often contain collision volumes that will automatically make the places they're located impassible. Likewise, you can set a certain depth of water as being impassible and pathfinding will take this into account. To manually "fence off" an area, use the "Generate Terrain Collision" tool ([[Image:IconGenerateTerrainCollision.png]] in the toolbar) to place invisible barriers that pathfinding will treat as impassible. You should include some sort of visual barrier as well, if possible, to let the player know why he can't pass through that spot.
+
In order to get pathfinding to work, you must generate your starting point AFTER you create the exportable area, and use the name that is automatically generated for the starting point. DO NOT change the name of the starting point otherwise pathfinding will fail.
  
== Wind ==
+
=== Terrain Collision ===
  
Each level can have one active wind object in it. The location of the wind object doesn't matter. The wind object defines how wind behaves on this level, which is used for such things as flapping banners and swaying trees.
+
You will need to block off terrain using the Terrain Block tools [[File:terrainBlockButtons.png]].  The first button toggles the display of the terrain blocks, the second button enables you to place terrain blocks, and the third snaps existing blocks to terrain verticies.  Left-clicking will start a new block, with additional left-clicks chaining the blocks together.  Right-clicking will end the current chain.  In addition, right-clicking on an existing block will delete it.
  
[[Image:Level editor wind object.png]]
+
An example of a terrain block chain showing the path finding
  
== Black boxes ==
+
[[File:terrainBlockExample.png|thumb|center|600px]]
 +
 
 +
== Hotkeys ==
 +
 
 +
{| border="1" cellspacing="0" cellpadding="2"
 +
|-
 +
! Key || Function
 +
|-
 +
| R || Standard Selection
 +
|-
 +
| Q || 3D Axis Manipulator
 +
|-
 +
| E || Rotation Manipulator
 +
|-
 +
| T || Local Coordinates (Toggle)
 +
|-
 +
! Key || Camera Functions
 +
|-
 +
| W || Camera Forward / In
 +
|-
 +
| S || Camera Back / Out
 +
|-
 +
| A || Camera Pan Left
 +
|-
 +
| D || Camera Pan Right
 +
|-
 +
! Key || Brush Size
 +
|-
 +
| - || Decrease Brush Radius
 +
|-
 +
| = || Increase Brush Radius
 +
|-
 +
! Key || Editing
 +
|-
 +
| Ctrl-X || Cut Selected Object(s)
 +
|-
 +
| Ctrl-C || Copy Selected Object(s)
 +
|-
 +
| Ctrl-V || Paste Selected Object(s)
 +
|-
 +
| Ctrl-Z || Undo last action
 +
|-
 +
| Ctrl-Y || Redo last action
 +
|-
 +
| Ctrl-A || Select All
 +
|-
 +
! Key || General
 +
|-
 +
| Ctrl-S || Save Map
 +
|-
 +
| Ctrl-O || Open Map
 +
|-
 +
| F5 || Refresh Screen
 +
|-
 +
| Del || Delete Selected Object
 +
|-
 +
| 5 (Numpad) || Camera Reset/Home (Looks at bottom right corner of map)
 +
|-
 +
| Ctrl-H || Hide Selected Object(s)
 +
|-
 +
| Ctrl-/ (Numpad) || UnHides Selected Object(s)
 +
|-
 +
| Ctrl-* || UnHides all hidden objects
 +
|-
 +
| Ctrl-\ || Invert Selection
 +
|}
 +
 
 +
== Tips ==
 +
Groups are your friend.
 +
 
 +
Selecting a group will select all models inside that group folder.
 +
This allows you to move several objects at the same time as well as apply other settings to that entire group.
 +
 
 +
This also makes placing several grouped objects like torches with flame and lights very quick and easy.
 +
For example, Setting several candles with flame effects would take a lot of time to place each candle stick individually, and then placing the flame effect exactly on top of the candle for each. By using group folders you only need to set this up once. To place more candles simply select the group folder, Ctrl+C to copy, select its parent group, or other place you want to put the next candle and Ctrl+V to past the new group. Then simply drag it to where you want it.
 +
 
 +
[[File:Tip_1.jpg|thumb|center|600px]]
 +
 
 +
In addition, the Selection Lock and Visible properties of objects can be useful when trying to manipulate objects when larger objects obscure or get in the way of the desired selection. This is especially handy with water meshes.
 +
 
 +
[[Category:Level layouts]]
 +
 
 +
== Manage exports==
 +
 
 +
The "Manage Exports" window is accessible from the Tools -> Exports -> Do All Export Operations menu option. It brings up a window where you can select from all steps in the level-exporting process:
  
When creating an indoor layout you'll need to manually insert "black box" objects on the outer sides of the layout's walls. This allows the player to see through the walls when the camera is outside them.
+
[[File:Manage exports.png|center|]]
  
== Exportable area ==
+
== Known Issues ==
  
A layout requires at least one exportable area. This is the area that the player will be able to operate in and percieve when the layout is exported for use in the game.
+
* Owing to path bugs, the safe approach is to do all custom level processing (light mapping and local posts) in the Single Player module. For compatibility, move the output to your add-in's core override folder before distribution to players. Note that if you try to play Dragon Age with any exported Single Player resources, your game may have strange bugs (not being able to add party members) - so never play without removing all output from the Single Player module!
  
It's possible to have a large level with several different exportable areas. The player will have to go through an area transition to travel between exportable areas, just as if they were separate layouts entirely, but by combining them into one level in the level editor it becomes easier to maintain consistency between them. This is particularly useful in layouts where a player in one exportable area can see into the other exportable area but not reach it directly.
+
* "RPU process failed with a return code of -1073741811" may occur if AVG anti-virus Identity Protection is enabled.

Latest revision as of 00:35, 3 July 2012

Level editor topics

The level editor is used to generate the level layouts (also called Area layouts) that are the basis for creating areas. A level layout is a non-interactive resource; the objects placed within it serve only to provide the physical structure and appearance of the area. If you need the player to interact with objects within an area you'll need to use interactive placeables instead.

Note that unlike the Area editor, only two modes of camera control are currently supported: "flycam" mode (IconFlycamStyle.png button in the toolbar) and 3DS Max mode (Icon3DSMaxStyle.png button). NWN style is not currently supported. (Use a combination of the mouse wheel + Ctrl or/and Alt (dependant on camera mode) to control the camera. In either mode Numpad 5 will reset the camera.)

Area layouts are an Art Resource.

You can download the source files for the levels in the main campaign from here: [1]. (See also Area layouts used in the single player module for a listing of what each one is.)

Terminology

  • Sector: A sector is a square of geometry and is currently exported to the game as a “Chunk”. For all intents and purposes, we can consider a sector and a chunk to cover the same area. The different term is kept to distinguish between source (sector) and output (chunk). Sectors are always square.
  • Chunk: A Chunk is the game-side basic building blocks of Terrain based levels. Each Chunk is self-contained, has its own levels of Detail (LOD), RIMs, model lists, tree lists, etc. It is what is streamed in and out during gameplay.
  • Base Resolution: This is the starting resolution of each cell, and can be specified in the wizard.
  • Cell: A cell is the basic building block of the terrain geometry. Each cell starts off at the base resolution as a square and is made up of 2 polygons.
  • Blend Mask: The blend mask is the mask that is used to paint textures on the terrain. It is a blend16 algorithm, where it blends the highest 4 texture values (out of a possible 16) on each texel to come up with a texture mapped terrain.
  • Texture Palette: The texture palette is essentially a list of textures, one after the other. When an artist wants to use a texture to paint on the terrain he/she would add a texture to this palette.
  • Blend Texel: These are the building blocks that make up the blend Mask. Each texel is comprised of 4 sets values and each value set is essentially a percentage of how much of that texture on the palette shows up, and a mapping of where it maps onto the mask.
  • Tessellation: Tessellation is the breaking up of a cell into more resolution of polygons. For each tessellation level it breaks up each polygon into 4 equal parts.

Camera controls

Movement speed

In a level editor, camera movement speed in "flycam" mode can be increased and decreased by holding down a left CTRL and using a mouse wheel.

Interior and exterior levels

There are two basic types of levels; interior and exterior. Many features of these two level types are the same and level editor documentation will generally be applicable to both types unless specifically noted. Their key difference is that exterior levels have a terrain mesh (the "ground") and interior levels don't. Note however that there's no reason why you couldn't use one level type to "fake" the other - for example you could create a an entirely underground cave using an "exterior" level with the terrain mesh as the cave's floor.

Toolbar

Level editor toolbar labeled.png

See sections below for detailed information on level editor specific toolbar buttons.

Terrain mesh

The terrain mesh is a deformable surface used in exterior levels to provide a "ground". This toolbar contains the tools that deals with the terrain mesh:

Level editor toolbar terrain editing.png

Each of these buttons brings up a "brush" that's used for various tasks. See Terrain mesh for details.

Other tools

  • Chunk boundary visualization - The chunk visualization tool is a button that will highlight where all the chunk/sector boundaries are, allowing the artist to plan the level accordingly. As you can see, it also highlights the models that fall into a colored chunk so that you can see which chunk these will fall into on export.
  • Highlight impassible terrain - The game imposes limits on the slope of a walkable surface. Toggling this viewport button will display red highlights on the terrain wherever this limit is exceeded.
  • Fade Cutaway Toggle - Cutoff, or 2 meter cutoff as it is called, is where we cut off the tops of models in interiors when we go into tactical camera mode, or overhead camera. This way we can still see the players. The cutoff tool allows the artists to visually see from the editor what will get removed when going into the tactical camera.
  • Fade Punchthrough Toggle - Punch through is a system that allows the artists to put a flag on a model to say that it will get “punch through”. What this means is that when the game user is in tactical (overhead) camera mode, any model that is between the main character and the camera will get a punch through mask applied to it. This tool allows the artists to see in the editor what will get punched through in the game.
  • Visualize Collision Objects - Turning on the visualize collision toggle will display all collision shapes in green/red wireframes. The green-red tinting is provided to make it easier to distinguish multiple objects from one another.
  • Continuous Refresh Toggle - When the continuous refresh toggle is activated, the viewport will constantly redraw whenever it has free CPU time. This is useful for visualizing VFX and another animated models.


Lighting

There are many different types of lighting and light combinations that can be placed in the editor.

There are also many tools used to create lighting and generate lighting and even visualize lighting in the editor. The goal with the editor is to give the artist the same experience as he/she would see in the game. This will help them to be able to create the levels and tweak lighting quickly without having to stop to see it in-game.

Lights for the game are split into two categories based on what they affect: levels and characters. Character lights will affect the player, NPCs, and creatures. The level lights will affect static geometry and designer placeables.

See Lighting for more detail.


Models

Models are used to create any other objects that may be used as part of the level art - walls, floors, ceilings, non-interactive furnishings, visual effects, etc. (IconModelPlacement.png)

See Article: Model Placement

Trees and Vegetation is added using the "scatter object" mode (IconScatterObject.png).

See Article: Vegetation Placement

Animations

Some models have animations associated with them which may be set through the DefaultAnimation field of the Object Properties. For example, if you want a windmill or water wheel to turn you need to set that animation in the level editor. The animations for those two models are:

Windmill - wind

Waterwheel - turn

Room visibility and connectivity

Interior based levels have explicit connections between rooms, unlike exteriors where there is an implicit connection between two neighboring chunks. For this reason the connectivity must be set up by the artists. This should be done through planning and iteration as it will affect the streaming and performance of the level in the game.

If you select a room, you will see that that room appears highlighted in red. The Room Properties window can be brought up by pressing the Room Properties button. This behavior can be disabled by unchecking the Highlight visible rooms checkbox. All of the rooms that are visible to this room show up in green. You will see the list of these rooms show up in the Visible Rooms list in the picture above.

The ideal way to generate this visibility information is to press the button called “Generate Visibility Graph”. This will take a little bit of time, so sit back after you press it and be patient. What it does is take a render of each room in the level and generate a list of all rooms that can be seen from it.

NOTE: You must have generated pathfinding data for the level before you generate the visibility info, as it uses the pathing points in this process.

Of course this can be tweaked manually afterwards using the add and remove buttons. However if you ever press the Generate button again it will wipe out all manual changes.

The visibility system is used for streaming as well as the fog of war system, and determining what rooms are visible to the player depending on his/her current room. There is one other factor however to this, the connectivity system, which is detailed next.

The Room Connectivity System is necessary because there are things that can block visibility from one room to another. For instance if I’m looking up a hallway and I can see 3 rooms in the distance, but then I close the door in front of me, the game needs a way to know that those rooms are now invisible. This is where this system comes in.

The room connectivity system can be visualized by the other checkbox under the Connected Rooms list in the Rooms properties window.

Notice that the rooms connected to the current room show up in brown. This is a reminder that you are looking at connectivity and not visibility. As you can see only the rooms that are DIRECTLY connected to the selected room should be in this list. This has to built up manually, by clicking add and then clicking on the rooms that are connected to it. The add button in this case is more of a node, click it, then click the rooms you want to add, then you have to click it again to turn it off. This was done to make adding all the rooms faster.


Black boxes

When creating an indoor layout you'll need to manually insert "black box" objects on the outer sides of the layout's walls. This allows the player to see through the walls when the camera is outside them, and obscures any parts of models that protrude out where the player shouldn't be able to see them.


Trees, grass, and shrubberies

Trees, grass and shrubberies are handled somewhat differently from other models. They are created using a program called SpeedTree that includes information allowing them to respond to the wind. To place trees on a level, you first need to add that tree type's tree controller:

Level editor insert tree controller.png

Once this is done you can use the scatter object tool (IconScatterObject.png) to place specific examples of the vegetation you've added controllers for.

See Vegetation for a gallery of the vegetation types included with the core resources.


Scatter Object Tool

The scatter object system allows the artist to place down both trees (and grass) and instanced models. An example of an instanced model would be some rocks scattered around on the ground. Objects that are scattered across the terrain level will be placed randomly inside the brush, and will also randomly fluctuate in size and orientation as well.

The Scatter object tool allows the artist to paint scatter object on the terrain. These scatter objects cannot be selected individually, but can only be added or removed with this tool. Left clicking adds scatter objects within the brush, right clicking removes them.

  • Fill Rate: This is the rate at which the objects are scattered inside the brush.
  • Radius: This is the radius of the brush that adds/removes scatter objects.

When the artist is painting scatter objects, he/she gets a palette, or Scatter Object Selection, from which to select which scatter object to paint. Currently there are 2 tabs, one for trees and the other for instanced models.

The artist can add items to this list by right clicking on the Terrain World and selecting Insert, and then choosing either new Tree Scatter Object or new Model Scatter object. In each case the artist will be able to browse a list of available resources.

  • Ignore Density Setting: This allows the artist to ignore the density setting and paint scatter objects in much the same way as one would use a can of spraypaint.
  • Maximum Density: This allows the artist to specify the maximum density of scatter objects in the brush radius, and the brush will only paint up to this maximum.
  • Maximum Scale: This caps the maximum scale of the scatter objects, 1 being the same size as the original.
  • Minimum Scale: This caps the minimum scale of the scatter objects, 1 being the same size as the original.
  • Number of Painted Object: Lists the current number of this type of object that has been painted in the level (un-editable).
  • Orient On Terrain Surface: When this is set to true, the objects will orient themselves according to the orientation of the terrain on which they are placed. For instance if you put a rock on the side of a hill, it will still appear “flat” to the ground. NOTE: Currently this does not work for trees or grass, they will always be complete vertical.


Water tools

See Water for detailed documentation on placing water in the level editor.


Wind

Each level can have one active wind object in it. The location of the wind object doesn't matter. The wind object defines how wind behaves on this level, which is used for such things as flapping banners and swaying trees.

To insert a wind object, right click on the terrain, and choose Insert > New Wind Object.

Level editor wind object.png

For other weather effects, see Weather.


Pathfinding

Pathfinding is generated by clicking the toolbar button IconGeneratePathfinding.png. The pathfinding process lays down a grid of points that are marked "accessable" if they can be reached from a pathfinding start spot via passable terrain. This is essentially a flood-fill algorithm.

In the case of exterior areas, you must select an exportable area before it will generate it, the error message will reflect this.

To see the existing pathfinding grid, click on the IconDisplayPathfinding.png toolbar button or select "Pathfinding nodes" under the "View" menu.

"Passable" or "impassable" depends on a variety of factors such as the slope of the land, obstructions, or water depth. Accessibility Start points are represented by a blue ring with a red arrow. Note that these are different from waypoints, and are only used by the level editor for pathfinding purposes.

Level editor pathfinding start spot.png

Models will often contain collision volumes that will automatically make the places they're located impassible. Likewise, you can set a certain depth of water as being impassible and pathfinding will take this into account.

In order to get pathfinding to work, you must generate your starting point AFTER you create the exportable area, and use the name that is automatically generated for the starting point. DO NOT change the name of the starting point otherwise pathfinding will fail.

Terrain Collision

You will need to block off terrain using the Terrain Block tools TerrainBlockButtons.png. The first button toggles the display of the terrain blocks, the second button enables you to place terrain blocks, and the third snaps existing blocks to terrain verticies. Left-clicking will start a new block, with additional left-clicks chaining the blocks together. Right-clicking will end the current chain. In addition, right-clicking on an existing block will delete it.

An example of a terrain block chain showing the path finding

TerrainBlockExample.png

Hotkeys

Key Function
R Standard Selection
Q 3D Axis Manipulator
E Rotation Manipulator
T Local Coordinates (Toggle)
Key Camera Functions
W Camera Forward / In
S Camera Back / Out
A Camera Pan Left
D Camera Pan Right
Key Brush Size
- Decrease Brush Radius
= Increase Brush Radius
Key Editing
Ctrl-X Cut Selected Object(s)
Ctrl-C Copy Selected Object(s)
Ctrl-V Paste Selected Object(s)
Ctrl-Z Undo last action
Ctrl-Y Redo last action
Ctrl-A Select All
Key General
Ctrl-S Save Map
Ctrl-O Open Map
F5 Refresh Screen
Del Delete Selected Object
5 (Numpad) Camera Reset/Home (Looks at bottom right corner of map)
Ctrl-H Hide Selected Object(s)
Ctrl-/ (Numpad) UnHides Selected Object(s)
Ctrl-* UnHides all hidden objects
Ctrl-\ Invert Selection

Tips

Groups are your friend.

Selecting a group will select all models inside that group folder. This allows you to move several objects at the same time as well as apply other settings to that entire group.

This also makes placing several grouped objects like torches with flame and lights very quick and easy. For example, Setting several candles with flame effects would take a lot of time to place each candle stick individually, and then placing the flame effect exactly on top of the candle for each. By using group folders you only need to set this up once. To place more candles simply select the group folder, Ctrl+C to copy, select its parent group, or other place you want to put the next candle and Ctrl+V to past the new group. Then simply drag it to where you want it.

Tip 1.jpg

In addition, the Selection Lock and Visible properties of objects can be useful when trying to manipulate objects when larger objects obscure or get in the way of the desired selection. This is especially handy with water meshes.

Manage exports

The "Manage Exports" window is accessible from the Tools -> Exports -> Do All Export Operations menu option. It brings up a window where you can select from all steps in the level-exporting process:

Manage exports.png

Known Issues

  • Owing to path bugs, the safe approach is to do all custom level processing (light mapping and local posts) in the Single Player module. For compatibility, move the output to your add-in's core override folder before distribution to players. Note that if you try to play Dragon Age with any exported Single Player resources, your game may have strange bugs (not being able to add party members) - so never play without removing all output from the Single Player module!
  • "RPU process failed with a return code of -1073741811" may occur if AVG anti-virus Identity Protection is enabled.