Difference between revisions of "Level editor"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(Pathfinding)
(Lighting)
Line 245: Line 245:
  
 
== Lighting ==
 
== 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.
 +
 +
The game supports several different light types, with the purpose of balancing quality vs performance.  To understand the use of the light types, one must first know the general lighting equation:
 +
 +
Diffuse = DynamicAmbient + F(DynamicLights, DynamicShadows) + (LightmapRGB + LightmapShadowMap * F(StaticLights , DynamicShadows) )
 +
 +
Where F is the a function to calculate light contribution given the dynamic shadow map.
  
 
Light Effect:
 
Light Effect:
  
* Baked: This is lighting that only affects things in the art tool. The player will not be lit by this.
+
* Baked: This is lighting that only affects things in the level layout. The player will not be lit by this. Its contribution to the lighting scene is encoded in the lightmap RGB.
* Dynamic: This only affects the Player Character
+
* Dynamic: This only affects the Player Character. The dynamic lights will light all geometry without regard for baked shadow maps.  They still however, respect the dynamically generated shadowmap.
* Static: This is lighting that is both baked and dynamic. The most “expensive” of the light types.
+
* Static: This is lighting that is both baked and dynamic. The most “expensive” of the light types. Static lights are those that don’t move.  This provides the opportunity to bake in the shadow contribution of that light into the lightmap.  Multiple static lights will mix together in this baked-shadow map.  No RGB contribution from the light will go into the lightmap when rendering lightmaps. During run-time, the game will calculate the RGB color of the static light and then only apply it in areas that are uncovered by the baked-shadow map.  Characters and placeable props are fully lit by the static lights.
* Animated: This is lighting that changes. Flickering, pulsing, etc.
+
* Animated: Animated lights are those that don’t move about, but do have animation properties on their light intensity.  These lights are baked into the shadow map.
  
 
Light Type:
 
Light Type:
Line 265: Line 277:
 
=== Light probes ===
 
=== Light probes ===
  
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.
+
Light probes are used to generate the appearance of nearby reflective surfaces and the illuminance values for characters. 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.
 
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.
Line 272: Line 284:
  
 
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]]
 
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]]
 +
 +
Light probes show up as a sphere with arrows pointing in each +/- axis direction.  The only editable property that is unique is the High LOD Model Radius.
 +
 +
High LOD Model Radius:  This is a setting that will flip all the models within this radius (in meters) of the light probe to high LOD before rendering it.  It is only really useful in outdoor levels as indoors everything defaults to high Level Of Detail.
 +
 +
The tool for rendering light probes will render all the light probes within the current level.  First what it does is switch the editor lighting to look exactly like it does in the game.  Then it renders the light probes.  Be patient, this can take a moment or two.
 +
 +
In general, you should render lightmaps first before rendering light probes because the otherwise, the probes would not reflect the final in-game lightmapped appearance of the level.
 +
 +
Once the light probes have been rendered they will be packaged up with the level,
  
 
=== Advanced Lighting ===
 
=== Advanced Lighting ===
 +
 +
==== Room-based lights ====
 +
 +
Each light placed in a room-based level is automatically attached to the parent room during export.  This ensures that only those lights that are under a room affect the geometry in that room.
 +
To specify lights in other rooms that can affect the selected room, the artist can bring up the Room Properties dialog and add references to additional lights in adjacent rooms.
 +
  
 
==== Bloom and Other Effects ====
 
==== Bloom and Other Effects ====
Line 286: Line 314:
 
** Under the Effect section, modify the Buffer Effect Name text field to “da_bloom”.
 
** Under the Effect section, modify the Buffer Effect Name text field to “da_bloom”.
  
If you do not immediately see bloom effects take place, you might have visualization off, be sure to have it on to preview your bloom  
+
If you do not immediately see bloom effects take place, you might have visualization off, be sure to have it on to preview your bloom
 +
 
 +
=== Light mapping ===
 +
 
 +
If the filename of your level file is <filename>.lvl, then the editor saves a <filename>.erf file in the same directory as <filename.lvl>. This ERF file contains the last set of lightmaps that the editor obtained from the lightmap rendering farm. When you share the LVL file with other artists, such as when you check it into perforce, you should also include the ERF so that the other artists can us your rendered lightmaps without having to render lightmaps themselves.
  
 
== Pathfinding ==
 
== Pathfinding ==

Revision as of 18:05, 10 September 2009

The level editor is used to generate the level 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.

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.

Creating a new level

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.

Level editor level creation wizard start.png

The first choice is whether to have a terrain mesh (the "ground") or not. A Room-based level uses a user-specified visibility graph that connects disjoint rooms together, useful for interiors and dungeon like areas. Rooms are constructed using only existing models created in 3dsmax or another modeling package. In comparison, the Terrain-based level is expansive, with no direct manipulation of what is visible from certain locations. It also contains a terrain mesh that can be manipulated in the editor. Models placement on top of this terrain mesh is similar to the Room-based levels.

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.

Level editor level creation wizard terrain basic.png

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:

  • 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.
Level editor level creation wizard terrain advanced.png

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.

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.

  • Cells Per Sector: This is the number of cells per side of a sector, for example if there are 8 cells per sector, then each sector will have 8x8 cells.
  • Base Cell Resolution: This is the length of a single side of a cell in meters. For instance, 8m means that each cell is 8m x 8m.
  • Blend Texel Size: This is the length on a single side of a Blend Texel. For instance 100.00cm means that each Blend Texel is 100cm x 100cm (1m x 1m). This is essentially the resolution at which you can paint. It makes sense to set this to something large, which is a good default for the whole level. An artist can set this on a sector by sector basis, later on, in the areas where he/she needs more detail.
  • Sector Size: This is the length of a single side of a sector and is reached by multiplying the cells per sector by the base cell resolution (un-editable).
  • BlendPageSize: This is the size of the Blend Mask for a Sector/Chunk, and is reached by dividing the sector size by the blend texel size. For instance 64 means the blend mask image for this sector will be 64 x 64. Due to graphics hardware limitations, the actual exported texture may be scaled to a power-2 texture.
  • # Cells: This allows the artist to specify the length and width of the terrain level by specifying the number of cells on each side.
  • Area Size: This is the length and width of the terrain level in meters, and is reached by multiplying the number of cells by the base cell resolution (un-editable).
  • # Sectors: This is the number of sectors/chunks in the terrain world, and is reached by dividing the number of cells by the cells per sector (un-editable).
  • Tessellation Level: This is simply to allow the artists to see what resolution they can reach at a given tessellation level, it has no lasting effect on the level. Set this to 4 (max) to see what resolution the artist can reach given the above settings.
  • Max. Resolution: This is the maximum poly resolution that the artist can reach given the tessellation level set in the Tessellation field to the left (un-editable).

Toolbar

Level editor toolbar labeled.png

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

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.

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.

  • 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.
  • IconTerrainPlateau.png "Plateau" flattens out the land the brush is applied to, removing bumps or dips and making the ground level. It grabs the height at the center of the brush and makes the terrain inside the brush radius that same height. It can go faster or slower depending on the max strength. This is a good tool for making a path through rough terrain, or for smoothing out a flat field.
  • 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.
  • 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.
  • 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.
  • IconTextureSmooth.png "Texture smooth" blurs the boundaries between different material types, allowing them to fade more gradually from one terrain material type to another.
  • 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.
General
Brush type
Deform mode
Grid Opacity
Visible level
Deform Tool
Distance This is the strength of the deform, a higher number makes it deform by larger increments.
Round Brush
Enable Noise When this is enabled it enters noise into the deform, so instead of smooth it will appear rough.
Inner Radius% This is the percentage of the radius that extrudes. For example, if it is set to 100%, all the mesh in the radius rises (or falls) the same amount.
Max Strength This controls the rate at which the deform is applied. Set it to a smaller number to allow for finer control.
Noise Frequency This controls how bumpy the noise brush is, the higher the number the bumpier it is.
Outer Radius This controls how big the deform brush is.
Tessellation Tool
Max level is the maximum level that the brush will tessellate the terrain.
Min level is the minimum level that the brush will tessellate the terrain.
Painting Tool
Max Contribution This is the maximum contribution that this material will contribute to the texel, even with continued painting. The number is a percentage of the total value of the texel, with 100% being full and 0% being none.
Smoothing Passes This is the number of smoothing passes that the editor applies after each paint. A smoothing pass is basically smoothing the current values with the texels on each side, in order to minimize the visible lines in between each one. Keep in mind that smoothing is expensive on the CPU so the higher this number is, the slower painting will be. There is also a tool that allows the artist to do this manually, the Texture Smooth Tool.

Material Palette

The Material Palette has 2 parts, the floating palette shown above that shows a picture of the diffuse channel of the material, and allows the artist to quickly choose materials to paint with. There is also the material editor. If you open up the palette in the hierarchy list, under Terrain World/Terrain Mesh, you will see a list of the materials in the palette. By default there are 4. Click on a material and you will see the material editor.

In the material editor you can see an entry for each of the parts of the terrain material, Diffuse, Heightmap, Normal, and Specular. This editor allows you to click on the Ellipsis.png button and select from a list of textures in resources. It also shows a preview of this texture.

You can add new materials by right clicking on the Palette in the hierarchy.

General
Material ID
Name
Selection Lock
Sound Material Type
Visible
Scales
Relief This is the strength of the relief (height) map.
UVTile This specifies the number of times the material tiles on a sector, the higher the number the smaller the material will show up.
Textures
Diffuse
Heightmap
Normal
Specular
Specular Color
Specular Exponent

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 IconModelPlacement.png icon in the toolbar to go into model placement mode.

Trees are added using the "scatter object" mode (IconScatterObject.png).

Model palette

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.

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 example 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:

Options menu use fake model folders.png

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.

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.

These three fence pieces are in the scratch space, and so will not be exported with the rest of the objects in this level.

Selecting objects

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.

Moving and placing objects

Clicking on the "snap options" button IconSnapOptions.png on the toolbar brings up the following options:

Level editor snap options.png

  • "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.
  • "Snap Z Size Independent" is only available when the Enable Snap To Grid is checked. It allows for the user to specify a different snap setting solely f or use in the z-axis.
  • "snap rotation" similarly constrains the rotation of objects to specific angles.
  • "snap to surface" This is only used in terrain levels, and will snap all objects when they are placed AND moved to the surface of the terrain. is useful when placing furniture and other objects on an existing surface (terrain, floor, etc.).

Model properties

When selected, the following common properties are shown for models in the object inspector.

General
Model Instance ID
Name This is the user-friendly name that shows up in the hierarchy window. There is no restriction on the name.
Selection Lock This controls whether this object is selectable or not. This could prevent someone or the artist him/herself from moving or selecting something accidentally.
Visible Sets the visibility of the model. Hidden models are displayed with a grayed-out box in the hierarchy window.
Export
Export to Game Flag to export this model to the game. Default is true. This can be used in conjunction with the Lightmap Export flag to create objects that cast baked light shadows but not display.
Lightmap Flag to send this model to the lightmapper. Default is true. This can be used in conjunction with the Export to Game flag to create objects that cast baked light shadows but not display. You can also set both to false in order to create guide-geometry.
Graphics
Cut Away Override
DefaultAnimation
High-LOD This displays the full model file name that will be used for high LOD.
Low-LOD This displays the full model file name that will be used for low LOD.
ModelFile This is the base name of the model file (mmh) that the user specifies. For LODed models, only the root is needed.
Scale
Show High LOD Controls the viewport display. If set to true, the high LOD version is displayed if available.
Lighting
Texture Size Multiplier This multiplies the base texture size of the original model. Default value is 1.0.
Location
Location This is the location of the model in world coordinates.
Location Relative
Location Relative This is the location of the model in its parent coordinates.
Pathfinding
Normal This property is no longer required
Overlapped This property is no longer required
Statistics
GPU Memory The number of bytes this model’s meshes and textures take up in memory. (This feature is no longer supported)
Part Count The number of parts this model is comprised of.
System Memory The number of bytes this model takes in memory, including animation blend trees, physics objects, animation controllers, and triggers. Does not include textures and materials.

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 was 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.

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.

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.

The game supports several different light types, with the purpose of balancing quality vs performance. To understand the use of the light types, one must first know the general lighting equation:

Diffuse = DynamicAmbient + F(DynamicLights, DynamicShadows) + (LightmapRGB + LightmapShadowMap * F(StaticLights , DynamicShadows) )

Where F is the a function to calculate light contribution given the dynamic shadow map.

Light Effect:

  • Baked: This is lighting that only affects things in the level layout. The player will not be lit by this. Its contribution to the lighting scene is encoded in the lightmap RGB.
  • Dynamic: This only affects the Player Character. The dynamic lights will light all geometry without regard for baked shadow maps. They still however, respect the dynamically generated shadowmap.
  • Static: This is lighting that is both baked and dynamic. The most “expensive” of the light types. Static lights are those that don’t move. This provides the opportunity to bake in the shadow contribution of that light into the lightmap. Multiple static lights will mix together in this baked-shadow map. No RGB contribution from the light will go into the lightmap when rendering lightmaps. During run-time, the game will calculate the RGB color of the static light and then only apply it in areas that are uncovered by the baked-shadow map. Characters and placeable props are fully lit by the static lights.
  • Animated: Animated lights are those that don’t move about, but do have animation properties on their light intensity. These lights are baked into the shadow map.

Light Type:

  • Point: The light originates from a spot. “Light Size” corresponds to the size of the object casting off light. “Num Samples” is the number of shadow render passes – the higher the number the “crisper” the shadows.
  • Ambient: This is ever-present light that affects everything.
  • Spot: This is directional light – not really working yet.

Only dynamic lights will affect placeables placed in the design tool. So a designer chest will not be lit properly next to a chest placed in the art tool. That’s a limitation of the engine. Any object that is animated has to be placed in the designer tool (nothing placed in the art tool can ever, ever move).

Lights from different rooms only are applied if they are visible from your current room. Even an ambient light isn’t applied if the room it’s placed in isn’t visible to that room.

Light probes

Light probes are used to generate the appearance of nearby reflective surfaces and the illuminance values for characters. 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.

Level editor light probe.png

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 IconRenderLightProbe.png

Light probes show up as a sphere with arrows pointing in each +/- axis direction. The only editable property that is unique is the High LOD Model Radius.

High LOD Model Radius: This is a setting that will flip all the models within this radius (in meters) of the light probe to high LOD before rendering it. It is only really useful in outdoor levels as indoors everything defaults to high Level Of Detail.

The tool for rendering light probes will render all the light probes within the current level. First what it does is switch the editor lighting to look exactly like it does in the game. Then it renders the light probes. Be patient, this can take a moment or two.

In general, you should render lightmaps first before rendering light probes because the otherwise, the probes would not reflect the final in-game lightmapped appearance of the level.

Once the light probes have been rendered they will be packaged up with the level,

Advanced Lighting

Room-based lights

Each light placed in a room-based level is automatically attached to the parent room during export. This ensures that only those lights that are under a room affect the geometry in that room. To specify lights in other rooms that can affect the selected room, the artist can bring up the Room Properties dialog and add references to additional lights in adjacent rooms.


Bloom and Other Effects

Bloom is activated the same way any other effect is activated. In order to activate the Bloom effect:

  • Interiors:
    • Select the interior AREA you want it to be applied to.
    • Under the Effect section, modify the Buffer Effect Name text field to “da_bloom”.
  • Exteriors:
    • Select the exterior area you want to apply the effect to and bring up it's Exportable Area Properties.
    • Under the Effect section, modify the Buffer Effect Name text field to “da_bloom”.

If you do not immediately see bloom effects take place, you might have visualization off, be sure to have it on to preview your bloom

Light mapping

If the filename of your level file is <filename>.lvl, then the editor saves a <filename>.erf file in the same directory as <filename.lvl>. This ERF file contains the last set of lightmaps that the editor obtained from the lightmap rendering farm. When you share the LVL file with other artists, such as when you check it into perforce, you should also include the ERF so that the other artists can us your rendered lightmaps without having to render lightmaps themselves.

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. To manually "fence off" an area, use the "Generate Terrain Collision" tool (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.

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.

Level editor wind object.png

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.

Exportable area

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.

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.

The name of an exportable area 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. "d" is also often used to mean "default", for areas where day and night are irrelevant (deep in a cave, for example).

So for example the layout "ost101d" is a layout in the Ostagar region with a daytime ambience.

Creating an Exportable Area (Room)

The area is created by default whenever a new level file is created. Its default layout name is “<name of exported…” which must be changed to something with seven characters or less. This is the prefix for all resources created specific to this layout. There is no provision for creating multiple areas inside a room based level file.

Creating an Exportable Area (Terrain)

It is possible to have multiple exportable areas in each outdoor level file. These can be created and their properties edited much like any other object in the editor. If you have an exportable area already, you can select it via the drop down menu shown below.

If you want to create or remove an exportable area, use the plus/minus buttons. New areas automatically get an invalid layout name called “<name of exported…” This needs to be changed to something with seven characters or less. This is the prefix for all resources created specific to this layout.

After a new layout entry has been created, you can edit it by clicking on the properties button with the desired area selected in the dropdown.

Exportable area properties

General
Area ID This is the ID of the area, this never needs to be changed.
Cutoff Height
Cutoff System Enabled
Layout Name This is the name which will be given to the layout on export, this name should never be longer than 7 characters, and if it is it will be truncated so that it is. This is due to the long names our lightmap files receive, and out 32 character limit.
Name This is the name that shows up in the drop-down list.
Start Point Name Artist can specify the name of a startpoint that he/she wants the character to start at when previewing this level in the game. They show up in the hierarchy tree, and can be created using the Start Point Tool.
Atmosphere
Atmo-Sun Color RGB color values for the sun. Usually white.
Atmo-Sun Intensity Sun power. Multiplies the extintion and In-scattering terms.
Atmosphere Alpha
Distance Multiplier Modulates the distance at which the fog effect is applied.
Earth Reflectance Specifies the amount of natural color to allow objects to emit.
Mie Multiplier Modulates the Mie scattering term.
Moon Alpha
Moon Rotation
Moon Scale
Rayleigh Multiplier Modulates the rayleigh term.
Skydome Model This is the model to use for the skydome. The resource list that appears when you click here is filtered for models beginning is “sb_”.
Turbidity Turbidity factor for the Mie term.
Atmosphere Cloud
Color The cloud layer uses this color.
Density Lower values make an overcast sky. Higher values give a scattered cloud layer.
Depth The depth value simulates thickness in the clouds. The lower the value, the darker and more opaque the base is. Higher values simulate more light passing through the cloud layer.
Range1 First UV offset into the noise texture.
Range2 Second UV offset range into the noise texture.
Sharpness : This is a floating point number between 0 and 1, with 0 being no fog and one being a full white out so to speak.
Atmosphere Fog
Fog Cap
Fog Intensity The intensity at the far plane.
Fog Max Color The color at maximum distance.
Tactical Fog Multiplier
Use Separate Water Fog
Vertical Fog Zenith
Water Fog Cap
Water Fog Intensity
Buffer Effect 1, 2 and 3
The properties available will depend on the specific buffer effect selected.
Layout Sunlight
Char. Sunlight Can Be Occluded
Character Color
Character Color Multiplier
Color This is the color of the sunlight for the layout.
Color Multiplier This is the strength of the sunlight.
Direction This is the direction of the sunlight. It can be typed in manually (a Vector in 3d space), or it can be specified by clicking on the “Set Sunlight” button on the right. Pressing this pops up an icon that shows both the direction of the sunlight and its color. Use the mouse to change it.
Enabled When this is set to true sunlight is enabled, false it is not.
Soft Shadow Light Angle
Soft Shadow Num Samples
Mini Map
Mini Map Position X
Mini Map Position Y
Mini Map Size X
Mini Map Size Y
Model Low-LOD Lightmap
Downsample Factor
Max Size After downsampling is applied, the texture size is checked against the maximum clamp size.
Pathfinding
Character Height This specifies the average height of a humanoid for the pathfinding info generation. It is specifically used to generate the bounding volume for a creature for the pathing tests.
Clearance This is currently not being used.
Grid Separation This is the separation between pathing test points, in the x and y direction. In the default case there would be a pathing point every 0.5 meters.
Terrain Setup
Border Cell Width This is the number of chunks that will appear in the boundary around the playable area. In order to specify the playable area, use the “define Area” button.
Cell Position X This is the coordinate of the lower left corner of the exportable area, the numbers are in relation to the chunks and not area or world coordinates.
Cell Position Y This is the coordinate of the lower left corner of the exportable area, the numbers are in relation to the chunks and not area or world coordinates.
Cell Position Z This is the coordinate of the lower left corner of the exportable area, the numbers are in relation to the chunks and not area or world coordinates.
Cell Size X This is the width of the exportable area, in chunks.
Cell Size Y This is the length of the exportable area, in chunks
Cell Size Z This is the height of the exportable area. Currently there is only 1 height possible, 1. This will not change for DA.
Lightmap Texture Size This is the size of the lightmap texture for the terrain chunks. In this case 64 means the texture will be 64x64, which for a chunk size of 64m x 64m will be one texel of lightmap per meter (which is pretty low).
Lightmap Texture Size (Vista) This is the size of the lightmap texture for a vista chunk, outside the playable area and the border. Again 16 means the texture will be 16x16.
Subdivide Chunks By
Vista Cell Width This is the number of chunks that will appear outside the border cells. Anything inside the vista area will not be exported at high LOD.

File name and associated 'Vegetation' images

See Vegetation.

Level Editor Models

See Level models for galleries of the various "tiles" and other components used in the level editor.

Water tools

The first thing to do in order to get water in the exterior level is to right click on the Terrain World, and insert a new water mesh.

After creating a water mesh you should see it in the area, it shows up as a flat mesh 256m x 256m by default. You can move it around just like you move around any other model. Move it up and down by holding down shift and then clicking on the water. If you select the water mesh in the hierarchy you can change the properties of the mesh.

It is a good idea to put a probe light directly over a small pond or lake. That way the reflections in the water will match up roughly with the shore. Don’t forget to render light maps before you render the probe lights, and you’ll need to turn on the Visualization on/off button to see the nice water color and reflections.

Textures: The textures (height and normal) make a huge difference, so playing around with these will make some really nice water.

Frequencies: It looks very nice if the frequencies are powers of 2 of each other, for instance if one is 2, then the other two can be 4 and 8 for instance.

Reflections: To get nice clear reflections the amplitude should be around 0.05 to 0.1.

Directions: For calm lakes it looks nice if the directions are opposite, but play around with these for some good results.

Depth: Play around with the Shallow Depth to move the waves closer to shore or farther away.

Water Seams: Play with the Max Tessellation level and the subdivide depth tolerance to create more mesh resolution and reduce the seams that you see. Once the mesh is in place and you are happy with it, you can also play with the terrain height around it to hide any that are left.

Water Mesh Size: Try to keep the water mesh only slightly bigger than the actual size of the lake or pond as it will get a much better resolution if it is smaller.

Play Button: Toggle the play button on so you can see the water continually animating.

During export, the water collision mesh is automatically generated based on the intersection of the water plane and the terrain.

Properties

General
Name
Selection Lock
Visible
Water Mesh ID
Location
Position X
Position Y
Position Z
Rotation X (degrees)
Rotation Y (degrees)
Rotation Z (degrees)
Location Relative
Relative Position X
Relative Position Y
Relative Position Z
Relative Rotation X (degrees)
Relative Rotation Y (degrees)
Relative Rotation Z (degrees)
Physics
Collision Wall Height
Walkable Depth
Water Mesh
Maximum Tessellation This is the splitting up the water mesh into finer level, much like terrain tessellation. In this case the choices are 1-6, anything higher does nothing extra.
Show Grid Set this to true to show the water mesh in red, false to hide it.
Size X This is the X,Y size of the water mesh in meters.
Size Y This is the X,Y size of the water mesh in meters.

Surface color

Specular settings
Enable Specular On Water
Specular falloff
Specular multiplier
Sunlight specular power
Use debug reflection
Transparency settings
Opacity falloff
Show transparency as color
Water clarity
Water surface
Deep Color This is the color for the deep water.
Shallow Color This is the color for the shallow water.
Waves Normal Map is the normal map to use for the waves.

Wave settings

Wave 1, 2 and 3
Wave Direction
Wave Height
Wave Speed (m/s)
Wave Tiling

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