Layers: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Layers=
== Overview ==
[[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.


:'''Brief 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.


:'''Usage:'''
[[Image:Layers_enabled.jpg|368px|thumb|right|Without layers, working in this cluttered space would be a nightmare...]]
::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.
== The Layer Inspector ==
::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.
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.  


::[[Image:Layers_01.jpg]]
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 layer name allow you to change it's name and to 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.


:'''A Short Layers Tutorial'''
::In order to help you understand the flexibility of the layer system, I have written this short tutorial. So on to step 1;


::1. First we are going to create a small test room. So create a box that is 512x512x256 and texture it with caulk. Now click on the '''Make Room''' button to hollow out the room. Now add the player starting point and texture the inside surfaces however you like. Your room should resemble the screenshot below.  
[[Image:Layers_disabled.jpg|368px|thumb|right|...but with most of the layers hidden from view everything becomes clear again.]]
::http://img519.imageshack.us/img519/5081/layer02dw0.jpg
== How to Assign Elements to Layers ==
::2. Now we are going to add four rooms like in the screenshot below.
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:
::http://img235.imageshack.us/img235/6628/layer03en2.jpg
* '''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 already 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 list shows all layers, not only those that the selected element is a member of.


::3. Now we are going to populate the rooms with many objects to make the working space more cluttered. Add in whatever you want.
== 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 {{Key|H}} to hide it from view. Press {{Key|Shift+H}} to show it again. If you hide a selection then all the elements you hid previously will remain invisible.
* With [[Defining custom Filters in DarkRadiant|filters]] you can hide specific kinds of entities or textures by using [http://en.wikipedia.org/wiki/Regex regular expressions].
{{editing}}{{darkradiant}}

Latest revision as of 11:23, 27 May 2021

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 layer name allow you to change it's name and to 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 already 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 list 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. If you hide a selection then all the elements you hid previously will remain invisible.
  • With filters you can hide specific kinds of entities or textures by using regular expressions.