Layers: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
No edit summary
Rewrote the article, explained new features and changed/resized the screenshots (wuxga is a bit heavy)
Line 1: Line 1:
:'''Brief Overview:'''
== Overview ==
::The idea of layers to organize and simplify the users experience in editing media is not a new one. Photoshop has it as well as several 3D programs, and now DarkRadiant joins the list of programs to feature this powerful tool.
[[Image:LayerInspector.jpg|thumb|368px|right|The layer inspector]]
The idea of layers to organize and simplify the users experience in editing media is not a new one. Most image editing software like Photoshop or The Gimp have this feature as well as several 3D modeling/mapping programs, including Dark Radiant, of course. If you are new to the concept of layers, just imagine them as a convenient way to hide elements that are currently in the way.
Please note that layers are only a tool to organize your map, they have no effect in the game.


:'''Usage:'''
::In 2D applications in which you edit images such as in photoshop, the layers are used to turn off/on certain parts of the image, and/or add special effects to that layer. Things work a bit differently in 3D applications as a layer can consist of anything you want in a 3D space, whether the parts of the layer are in front, below, above, behind it doesn't matter.
::To use the layers inspector, first we have to open it. This is done by using either the menu or the keyboard shortcut. The default shortcut is '''''Ctrl+L''''', otherwise use the menu to open it (View->Layers) as shown in the screenshot below. As you can see their is already a layer created for you called '''Default'''. When creating a map, everything will be created in this layer which is fine for a small test map, but as a map grows in complexity and size it is a good idea to try and segregate components of the map to make the mapping process easier.


::[[Image:Layers_01.jpg]]
[[Image:Layers_enabled.jpg|368px|thumb|right|Without layers, working in this cluttered space would be a nightmare...]]
== The Layer Inspector ==
To use Dark Radiant's layer feature, open the layer inspector with the default shortcut {{Key|Ctrl+L}} or via the View->Layers menu entry. If you haven't tinkered with layers yet you should see a list with exactly one entry called ''Default'' (unlike in the screenshot to the right). This is the layer that Dark Radiant automatically creates for you when you begin a new map and that every element belongs to unless you reassign it. It is in every map and can not be removed.


::For example in my current map, it is almost impossible to continue to map without layers. Here is a screenshot of how things look when I open my map.  
In the layer inspector window you can do the following things:
* By clicking on the checkbox to the left of the layer name you can show/hide a layer respectively it's elements
* Clicking the layer name itself will select/deselect all members of that layer.
* The two buttons to the right of the label name allow you to change the name and delete a layer (in that order). If you delete a layer, it's elements will not be removed from the map, but assigned to the Default layer instead.
* Click on ''New'' to create a new layer. You'll be prompted to give it a unique and - preferably - meaningful name.


::http://img57.imageshack.us/img57/1691/layer04kp0.jpg


::Now I can turn hide an entire group of objects/brushes/etc. by clicking on the checkmark of the appropriate layer.  
[[Image:Layers_disabled.jpg|368px|thumb|right|...but with most of the layers hidden from view everything becomes clear again.]]
::For example when I need to add to the bottom cave I turn off almost all the layers that I don't need. Right now the tower is in the Default layer, but will be moved to it's own layer called '''Tower''' later when it's finished.
== How to Assign Elements to Layers ==
Select one or more elements and then right click anywhere in the orthogonal view. At the bottom of the context menu you should see the following items:
* '''Create Layer...''': Same as ''New'' in the layer inspector.
* '''Add to Layer...''': If you add something to a layer, it will become a member of this layer but also remains in the layers it alrady belongs to.
* '''Move to Layer...''': Same as above, but the element will exclusively be a member of the newly assigned layer.
* '''Remove from Layer...''': Removes an element from a layer. Note that the shows all layers, not only those that the selected element is a member of.


::http://img267.imageshack.us/img267/6417/layer05vl2.jpg


::To use the layers, first open the layers manager by using either the shortcut or the menu. Click on the '''New''' button. This will then ask you what you want to call the layer. Call it whatever you want, for example I want to group all the trees in my level into one layer, so I'll call it '''Trees'''.
== Alternatives ==
 
There are no real alternatives to layers but two very convenient companions that you may use alongside:
::The next step is to select everything that you want to be on that layer either one at a time, several at a time or all at a time. Now with my trees selected, right click any ortho view and select the option '''Move to layer''' and you should see a list of layers listed. Move your mouse over top of the layer you want to add them to and left click the layer name. My trees are now on that layer. I can turn off that layer, by clicking on the check mark next to the layer, and everything in it will now be hidden.
* Select anything you don't want to see and press {{Key|H}} to hide it from view. Press {{Key|Shift+H}} to show it again. All the elements you have already hidden will remain invisible.
 
* With [[Defining custom Filters in DarkRadiant|filters]] you can hide specific kinds of entities or textures.
::If I want to add some more trees to the level, I can then select the new ones and do the same procedure to add to the new layer.

Revision as of 16:39, 19 December 2009

Overview

The layer inspector

The idea of layers to organize and simplify the users experience in editing media is not a new one. Most image editing software like Photoshop or The Gimp have this feature as well as several 3D modeling/mapping programs, including Dark Radiant, of course. If you are new to the concept of layers, just imagine them as a convenient way to hide elements that are currently in the way. Please note that layers are only a tool to organize your map, they have no effect in the game.


Without layers, working in this cluttered space would be a nightmare...

The Layer Inspector

To use Dark Radiant's layer feature, open the layer inspector with the default shortcut Ctrl+L or via the View->Layers menu entry. If you haven't tinkered with layers yet you should see a list with exactly one entry called Default (unlike in the screenshot to the right). This is the layer that Dark Radiant automatically creates for you when you begin a new map and that every element belongs to unless you reassign it. It is in every map and can not be removed.

In the layer inspector window you can do the following things:

  • By clicking on the checkbox to the left of the layer name you can show/hide a layer respectively it's elements
  • Clicking the layer name itself will select/deselect all members of that layer.
  • The two buttons to the right of the label name allow you to change the name and delete a layer (in that order). If you delete a layer, it's elements will not be removed from the map, but assigned to the Default layer instead.
  • Click on New to create a new layer. You'll be prompted to give it a unique and - preferably - meaningful name.


...but with most of the layers hidden from view everything becomes clear again.

How to Assign Elements to Layers

Select one or more elements and then right click anywhere in the orthogonal view. At the bottom of the context menu you should see the following items:

  • Create Layer...: Same as New in the layer inspector.
  • Add to Layer...: If you add something to a layer, it will become a member of this layer but also remains in the layers it alrady belongs to.
  • Move to Layer...: Same as above, but the element will exclusively be a member of the newly assigned layer.
  • Remove from Layer...: Removes an element from a layer. Note that the shows all layers, not only those that the selected element is a member of.


Alternatives

There are no real alternatives to layers but two very convenient companions that you may use alongside:

  • Select anything you don't want to see and press H to hide it from view. Press Shift+H to show it again. All the elements you have already hidden will remain invisible.
  • With filters you can hide specific kinds of entities or textures.