Difference between revisions of "Level Editor Tutorial"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(Pathfinding and Obstructions)
Line 126: Line 126:
 
     ** Three-letter prefix that describes the region or plot the layout is for. For example, "ost" for Ostagar and environs.
 
     ** 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.
 
     ** 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).  
+
     ** 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).
  
 +
* Define your walkable area. Do this by clicking the Define Area button in the Area Properties window. The green box must include any areas that you want players to be able to walk. If you click in a corner of the level the green box will appear there. You can then expand it by dragging the corner.
  
 +
* Close the Area Properties window.
  
 +
* Click on Do All Local Posts. This can be found in the menu at Tools>Export>Do All Local Posts
  
 +
Now that you have your exportable area you can generate pathfinding data.
  
 +
* Place a Starting Point in your level. I found that pathfinding does not work if you place the Starting Point before you have an Exportable Area. To place a Starting Point click on Setup Start Point in the tool bar.
 +
 +
* Record the name of your Starting Point by clicking on it and looking at the name in the Object Inspector. Do not change the name - changing the name can prevent pathfinding from working.
 +
 +
* Click Exportable Area Properties in the tool bar to open the Area Properties window. Put the Start Point name in the appropriate  field and close the window.
 +
 +
You should now be ready to generate pathfinding data by clicking on the Generate Pathfinding for Active Area button in the tool bar.
  
 
==Converting Levels into Areas==
 
==Converting Levels into Areas==

Revision as of 21:32, 13 November 2009

Building your room (Interior Level)

How to create/lightmap a Level for use in an Interior Area: Objective: Following along with this tutorial, you should be able to create a simple room from scratch in 10 minutes or less

This was lifted from a posting by St4rdog http://social.bioware.com/forum/1/topic/8/index/150840
It needs some additional formatting love, but is as good starting place for people to create usable interior levels

File > New > Level > Room Level

  • Create a player start. Click flag icon next to lightmapping icons > click anywhere on ground. This is the starting location for the pathfinding algorithm. Make sure you place it somewhere where you expect to be able to walk.
  • Click on "New Area" in top-left list > Object Inspector in bottom-right > Layout Name > anything under 8 characters no spaces or strange characters.
  • Right-click in 3D view and select Insert > New Room.
  • Click Models (blue box) in the Palette in the top-right. These folders contain everything such as floor tiles/walls etc to build your rooms.
  • Enable Grid Snap with the magnet icon to make sure they line up.
  • The "prp" folder contains things like beds/barrels to clutter your Level.
Hint: Use DATool (3rd party tool downloadable at http://social.bioware.com/project/41/ )to browse through these quickly to find the floors/walls you want.
Note: If you get "Cannot spawn models into the selected parent object" when trying to place a model then you don't have "New Room" selected.


Adding lights

  • Right-click on "New Room" in top-left list > Insert > New Light
  • Move it up off the floor a little. In Object Inspector > "Color

Intensity" 2 or more > "Light Type" Point - Static (lc) > Choose any bright color.

  • Copy and paste. In Object Inspector >"Light Type" Ambient - Baked (this light stops your shadows being pitch

black) > Choose a dark blue colour and keep the Color Intensity under 2/3.

Note: I'm not sure what the mix of Baked/Static light is supposed to be. If you just put a Baked + Ambient it complains about not having Static, but if you put a Static + Ambient it seems to work fine, but the wiki says Static is the most expensive.


Rendering Lightmaps

  • Press the Render Lightmaps icon (you need ActivePython 2.5 installed to default location). When it's done click the Display

Lightmaps On/Off icon in the top-left to refresh the results.

  • Uncheck the "View Models Fully Lit" icon in the lop-left. You should see shadows from any objects you've dropped in.
note: Lightmap-atlas messages might appear the first time you render. That seems normal.
Sometimes re-rendering the lightmaps messes them up badly when Display Lightmaps On/Off is on. It doesn't seem to use the latest lightmaps. Try pressing Display Lightmaps On/Off a few times to update it. If they're still messed up sometimes one of these fixes it (don't know which)unloading/reloading your Area or Level/changing your Area's layout property/posting your Level to Local.


Exporting

  • Press the Do All Local Posts icon to the right of the lightmapping icons. It will export the name you typed into the "New Area" "Layout Name". If there's a complaint about walkable/player start then delete your old start then place a new one on a flat area.
  • Save your .lvl file. It's not used by the game and the name/location doesn't matter. Only the exported/posted files are used.


Using this in an Area

File > New > Area > Any Name

  • In the Object Inspector > Area Layout you should get a "..." box (make sure it's Checked Out) > click then select your "Layout Name" which should now be there.
  • Now you have a pretty level lightmapped level inside an area.


Building your terrain (Exterior Level)

How to create/lightmap a Level for use in an Exterior Area: Objective: Following along with this tutorial, you should be able to create a simple terrain from scratch

File>New>Level

  • Choose Terrain (Landscape) Level and then click Next
  • Accept the default values for the purpose of this tutorial and click Next and then click Finish. You can learn more about what the different terrain options do at the Level editor page.

You should now see a flat, dark piece of terrain. To move around you hold down the mouse wheel. If you want to rotate the view press the Alt key while holding down the mouse wheel. You will want some light so you can see what you're doing, so it's good to generate a light source next.


Lighting:

  • Right click on Terrain World to the upper left and choose Insert>New Light. This will spawn a light source in your area.

Now that the terrain is lit we can modify it.


Modifying Terrain

The Terrain mesh tools allow you to modify the terrain by changing elevations, smoothing edges, flatting terrain, or painting textures.


Water

Doesn't work yet so don't worry about it.


Placing Models

  • Click the blue box in the Palette Window to access the models that come with the game. The Model list shows pictures of many of the models available.
  • The Model page has more details on how to work with models.

Tip: I had to change the Snap Options to make the models go where I wanted them. The settings I use were 0.10 for Snap to Grid and Snap Z Size. I also had to turn off Enable Snap to Surface whenever I wanted to change the vertical position of something (like creating the second floor of a building). Enable Snap to Surface is not applied globally, so once you turn it off and position an object vertically, turning it back on will not move that object unless you select it (or have it selected when you turn it back on).


Adding Vegetation and Wind

The Vegetation page includes a list with pictures of the various plants available for placement. If you do not see the plants once you place them with the Scatter Object Tool then you may need to adjust your SpeedTree Rendering Distance Selector. This is a drop-down that you will see in the Tool Bar. It lists the distances at which plants will be visible. I set it to Very Far and left it there.

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.

Image:Level editor wind object.png

The Wind Object may be found by right clicking on Terrain World and selecting:

Insert>New Wind Object


Pathfinding and Obstructions

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.

You must create an Exportable Area before you can generate any pathfinding data.

  • Click on the purple + in the tool bar. This will open an Area Properties window. The Level Editor page has moire details on this process, so I will just keep these steps very basic.
  • Name your Exportable Area in the Layout Name field of the Area Properties window. 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).
  • Define your walkable area. Do this by clicking the Define Area button in the Area Properties window. The green box must include any areas that you want players to be able to walk. If you click in a corner of the level the green box will appear there. You can then expand it by dragging the corner.
  • Close the Area Properties window.
  • Click on Do All Local Posts. This can be found in the menu at Tools>Export>Do All Local Posts

Now that you have your exportable area you can generate pathfinding data.

  • Place a Starting Point in your level. I found that pathfinding does not work if you place the Starting Point before you have an Exportable Area. To place a Starting Point click on Setup Start Point in the tool bar.
  • Record the name of your Starting Point by clicking on it and looking at the name in the Object Inspector. Do not change the name - changing the name can prevent pathfinding from working.
  • Click Exportable Area Properties in the tool bar to open the Area Properties window. Put the Start Point name in the appropriate field and close the window.

You should now be ready to generate pathfinding data by clicking on the Generate Pathfinding for Active Area button in the tool bar.

Converting Levels into Areas