How to Use Layers

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m (Locking Individual Layers)
m (Layers in Driver Mode)
Line 497: Line 497:
 
<td>[[file:LayersDriveShow.JPG]][[file:LayersDriveHide.JPG]]</td>
 
<td>[[file:LayersDriveShow.JPG]][[file:LayersDriveHide.JPG]]</td>
 
<td>The two '''Driver Mode''' scenes shown on the left illustrate this feature.  
 
<td>The two '''Driver Mode''' scenes shown on the left illustrate this feature.  
*The image on the left has all layers visible
+
*The first image on the left has all layers visible
*The image on the right has layers hidden
+
*The second image on the left has layers hidden
  
 
The trigger for this change was the arrival of a train at the platform.</td>
 
The trigger for this change was the arrival of a train at the platform.</td>

Revision as of 13:51, 9 June 2018


DotPoint.JPG Layers are a Surveyor tool that allows you to better manage the objects that are placed in your Trainz World.
DotPoint.JPG Layers are a Driver tool that allows you to change what the players see as they drive around your Trainz World.

Contents

The Layers Tool

SurveyorToolMenuLayers.JPG












RightArrowRed.JPG
Click the Layers Tool to open up its properties.
LayersTools.JPG


The layers are organised into two groups:-

  • Route Layers in the top group, and
  • Session Layers in the lower group.

With the Layer Tools (Add, Delete, Merge and Lock) below them.

Each group can contain multiple layers - the scroll bars next to the layer names in the example above indicates that there are more layers in each group than can fit into the display window area.

Loading a Route and Loading a Session

The layers you see will depend on whether you have loaded a Route by itself (with no "child" Session) or a Session and its "parent" Route.

LayersToolsRoute.JPG LayersToolsSession.JPG
  • The first image on the left gives an example of the layers that can appear if a Route only is loaded into Surveyor. These are the layers that are saved with the Route. Note that a default "session-layer" is present.

DotPoint.JPG An empty default "session-layer" is always created in the Session Layers Group when only the Route is loaded into Surveyor.

  • The second image on the left gives an example of the layers that can appear if a Session based on that Route is loaded into Surveyor. It shows Route Layers and Session Layers.

In both cases, the Route Layers are identical because the same Route has been loaded. A Session contains its own layers, the Session Layers, that are loaded and saved with the Session but are not loaded or saved with the Route.


DotPoint.JPG Route Layers are saved with the Route. Session Layers are saved with the Session.

DotPoint.JPG If you edit a Session Layer and later load just the Route then those edits will not appear.

DotPoint.JPG If you load just the Route and edit its "session-layer" then those edits will not appear the next time you load just the Route because an empty "session-layer" is created each time a Route is loaded without a Session.



An important lesson here is:-

DotPoint.JPG If you load a ROUTE without a SESSION then only edit the Route Layers

DotPoint.JPG If you load a SESSION then you can edit the Route Layers AND the Session Layers

Creating a New Route

When a brand new route is created it will come with two layers, a single "route-layer" and a single "session-layer".

LayersNewRoute.JPG
  • Both layers will be empty (the baseboard with its grid is saved with the route but is not in any layer).
  • A layer can be renamed at anytime by double clicking on its name with the left mouse button and typing a new name.



DotPoint.JPG The Active Layer is the highlighted layer. You can change the Active Layer by clicking on the name of another layer.


The Active Layer is the "working layer" which is:-

  • where new objects will be added to the layout
  • the layer selected for merging and deleting

Adding a New Layer

LayersToolButtonsADD.JPG Click the Add Button

A New Layer dialogue window will appear.

LayersAddLayer.JPG
  • Enter a name for the new layer
  • Select the layer group, Route or Session, where it will be placed.
  • You can easily move the layer to the other layer group later if you change your mind.
  • A layer can be renamed at anytime by double clicking on its name in the layer list and typing a new name.

Click the Tick button to accept the changes.

Deleting a Layer

LayersToolButtonsDELETE.JPG Select the layer to be deleted and click the Delete Button

DotPoint.JPG Deleting a layer will delete ALL the objects placed in that layer except objects that are "Bound" to that layer.

If the layer being deleted is empty, then the following dialogue window will appear:-

LayerDeleteEmpty.JPG
  • Click Yes to delete the layer
  • Click No to cancel the delete operation

If the layer being deleted is NOT empty, then the following dialogue window will appear:-

LayerDeleteNotEmpty.JPG
  • Click Merge to merge this layer and its contents into another layer. See Merging Layers below for more information
  • Click Delete to delete the layer and its contents. This cannot be undone
  • Click Cancel to cancel the delete operation

Merging Layers

LayersToolButtonsMERGE.JPG Select the layer to be merged into another layer and click the Merge Button

DotPoint.JPG Merging a layer into another layer will move ALL the objects from the first layer into the second layer. The first layer, which is now empty, will then be deleted.
DotPoint.JPG Once layers have been merged they cannot be separated.

The program will assume that the currently selected Active Layer is the layer that will be merged into another layer.

The layer merge dialogue window will appear as shown below:-

LayersMergeInto.JPG
  • Select the destination layer for the merge and then click the Tick
  • The Merge into: list shows all the available layers with no distinction between Route Layers and Session Layers

Locking Layers


DotPoint.JPG It is good practice to LOCK ALL LAYERS that you are not currently editing. This will avoid the all too common problem of accidentally adding objects to the wrong layer.

Note that if you LOCK or UNLOCK a Route Layer while editing a Session then you will have made a change to the Route and will be asked to save both the Route and the Session when you exit Surveyor.

Locking Individual Layers

To LOCK an individual layer, click on the Open Padlock icon next to its name. The objects in a LOCKED layer cannot be moved or deleted.

LayersRouteTreesActive.JPG LayersRouteTreesActiveLocked.JPG
  • The first image on the left shows two Route Layers, both UNLOCKED with their Padlock icons Open. One layer, "Trees", is highlighted showing that it is the currently active layer.
  • The second image on the left shows the same two layers after the "Trees" layer has been LOCKED. It can be UNLOCKED by clicking its Closed Padlock icon.

If you attempt to add a scenery object to a locked layer you will receive the following message:-

LayersRouteTreesActiveLockedError.JPG
Clicking the Tick button will UNLOCK the layer

Locking ALL Route Layers

LayersToolButtonsLOCKALL.JPG Click the Lock Button

This will LOCK ALL the layers in the Route Layers Group. The Session Layers Group will not be affected.

The Route Layers Group can be UNLOCKED by clicking the Lock Button again.

Moving a Layer

To move a layer simply select it, hold the left mouse button down and drag the layer up or down to its new position.

In the example show below a layer created in the Route Layers Group is being moved into the Session Layers Group.

LayersMove1.JPG LayersMove3.JPG
  • The move can be between layer groups as shown left or within groups to move the layer to a higher or lower position in the group.
  • The only situation where layer order within a layer group makes any difference is when adding track objects (e.g. signals, track signs, etc) to a track.



DotPoint.JPG When adding track objects to a track, the track must be in the same layer or in a higher layer than the object that is being added. For more information, see The "route-layer" below.

Hiding Layers

To hide or show a layer click the Eye Icon next to its name.

LayersHideNone.JPG
  • In the image shown left the two trees are in different Route Layers
  • Both layers have their Eye Icons set to Show
LayersHideTree.JPG
  • In the image shown left the Trees layer has its Eye Icon set to Hide

Route Layers vs Session Layers

This topic has filled endless threads in the Trainz Forums with arguments raging on both sides.

There are no "cast iron" rules that dictate what should be placed in the Route Layers Group and what should be placed in the Session Layers Group. Each Route and Session will be different and different creators have different ways of working. The main question to be asked is how many different Sessions will be created using a particular Route?

  • For a Route with only a single Session - everything can safely go into the Route Layers Group
Many creators only ever build a single Session for each of their Routes so they do not use Session Layers at all.
  • For a Route with multiple (2 or more) Sessions - certain things will probably need to go into the Session Layers Group for each Session.
Many creators build multiple Sessions for each Route and rely on the Session Layers to provide the differences between their Sessions.

The Route Layers Group


DotPoint.JPG The Route Layer Group should be used for everything that will always appear in Driver Mode regardless of which Session is playing.

Some creators will place ALL the visible objects in the Route Layers Group. It comes down to the design philosophy and needs of individual creators.

There is nothing stopping you from placing everything in the "route-layer" and never having to worry about dealing with layers ever again - some creators prefer to work this way. However, layers do provide you with a way of organising your scenery objects to make them more manageable, particularly in more complicated layouts. Some examples:-

  • A Special Objects layer or layers that can be used to hold a certain type or types of scenery objects. For example all the trees. This can be very useful when you need to hide those objects to locate or place other objects. Trackside cameras in particular can be very difficult to find when placed in a forest.
  • A Platform Objects layer can be used to hold all platform items such as seats, luggage, luggage trolleys, people, lamp posts, etc. Because these items are placed on top of a platform object they can be very difficult to move or delete without first moving the platform. The layer containing the platform can be locked allowing these objects to be easily moved or deleted.
  • Hiding and Showing Objects in Driver Mode. There is a Session Rule that can hide and show layers during the running of a Session. For example: a rail worker can be shown standing next to a track lever while shunting operations are underway but can be removed by hiding that layer when shunting has been completed.
  • A Test Layer for experimenting. Not sure if a particular object is right for your layout? Place it in a temporary layer which you can hide and show to see any differences it makes. This is particularly useful if you are deciding between different types of grasses, for example, placed throughout the layout. If the objects prove to be unsuitable then they can all be deleted by deleting the layer. If they are suitable then the layer can be merged with another or left as a new layer.

The "route-layer"

While all layers are equal, the "route-layer" is special.

It is recommended that the following objects should be placed in the "route-layer":-

  • Track and interactive industries with track
  • Track infrastructure (turntables, bridges, tunnels)
  • Signals
  • Junctions and switches
  • Track signs (speed limits, warnings, etc)


..and that the "route-layer" be placed at the top of the Route Layers Group.


DotPoint.JPG To avoid any confusion over which layer is the original "route-layer", this is one layer that should not be renamed or moved from the top position.

The Session Layers Group


DotPoint.JPG The Session Layers Group should be used for everything that is not in the Route and will only be seen in the currently loaded Session.

If you are creating more than one Session based around a particular Route, then you will probably make use of the Session Layers.

Session Layers can contain:-

  • Scenery objects that will only appear in one or some of the Sessions.
For example: If you have placed human figures and equipment for a track work crew alongside the track and want them to be seen in a daylight Session but not in a night Session, then place them in one of the Session Layers of the daylight Session only. Likewise, station staff holding lamps would be placed in one of the Session Layers of the night Session only.
  • Consists used in a Session. It is a good idea to place ALL consists in the same Session Layer.



DotPoint.JPG It is a good idea to place all your consists into the same layer particularly if they are going to be coupled together during the running of a Session.

Adding Objects To Layers

When an object (such as a scenery item, consist, track or track object) is added to the layout it is automatically placed in the currently Active Layer. Unfortunately, TANE does not indicate which layer is the Active Layer unless you open the Layers Tool to look. This can lead to objects being placed into the wrong layers and while these objects can later be moved to another layer (see Moving Objects To Other Layers below) it would be better to correctly set the Active Layer first.


DotPoint.JPG It is good practice to LOCK ALL LAYERS that you are not currently editing. This will avoid the all too common problem of accidentally adding objects to the wrong layer.
DotPoint.JPG You cannot add objects to a layer that is LOCKED.

If you attempt to add a scenery object to a locked layer you will receive the following message:-

LayersRouteTreesActiveLockedError.JPG
Clicking the Tick button will UNLOCK the layer

There are many features of TANE Routes and Sessions that are NOT stored in layers. These include:-

  • landforms
  • textures
  • weather conditions
  • time of day
  • session rules and driver commands
  • signal and junctions settings
  • rolling stock loads
  • industry settings
  • portal settings
  • passenger station settings
  • interlocking tower settings

Deleting Objects From Layers


DotPoint.JPG It is good practice to LOCK ALL LAYERS that you are not currently editing. This will avoid the all too common problem of accidentally deleting objects from the wrong layer.
DotPoint.JPG You cannot delete objects from a layer that is LOCKED but you can delete objects from any unlocked layer even if that layer is not the Active Layer.

Unfortunately TANE does not give you a warning message when you attempt to delete an object from a locked layer, the object just refuses to be deleted.

If you cannot delete an object then check:-

  • that the objects layer and bound layer (if set) are unlocked
  • that you are using the correct delete tool (e.g. such as attempting to delete a tree with the spline, signal or rolling stock delete tool) - it happens!

Moving Objects To Other Layers

LayersObjectProperties.JPG To move individual objects from one layer to another:-
  • Open the Properties window (? button in the Object Tools) of the object to be moved
  • Click the Layer or one of the scroll buttons
LayersObjectPropertiesChangeLayer.JPG
  • Select the new layer

DotPoint.JPG You can move an object into and out of a locked layer

  • Then click the Tick button.

Multiple objects of the same type can be moved to another layer by using the Bulk Asset Update/Replacement tool from the Surveyor Main Menu.

The Bound Layer

This is a little used and probably little understood layer feature. It allows you to attach an object to two different layers so it can have the properties (locked/unlocked and show/hide) of both layers. Its main use is during the building of a layout.

Some applications:-

  • Temporarily locking an object by binding it to a locked layer while allowing other objects in the same unlocked layer to be moved or deleted.
  • Temporarily hiding an object by binding it to a hidden layer (this will require the hidden layer to be made visible so the object can be unbound).
LayersBoundLayer.JPG
In the Properties Window of an object:-
  • Click the Bound Layer box or one of its scroll buttons
  • Select the layer to be used as the Bound Layer for the object (an object cannot be bound to its own layer)


The effects of the binding can be reversed by setting the Bound Layer back to <none>.



DotPoint.JPG When a layer is deleted any objects bound to that layer will have their Bound Layer reset to <none>

Layers in Driver Mode

During the running of a Session in Driver Mode visible layers can be hidden and invisible layers revealled according to the events that occur during the Session.

LayersDriveShow.JPGLayersDriveHide.JPG The two Driver Mode scenes shown on the left illustrate this feature.
  • The first image on the left has all layers visible
  • The second image on the left has layers hidden
The trigger for this change was the arrival of a train at the platform.

This effect is created by using Session Rules in the Surveyor Session Editor. A section of the editor is shown below.

LayersDriveHideRules.JPG

In this example:-

  • The Trackside Check Rule is triggered when a specific train comes to a stop at a trackmark. This then executes the following rules:-
    • The Show/Hide Layer Rule is used to hide the layer named "People". Four passengers (three standing and one seated) are hidden.
    • The Show/Hide Layer Rule is used to hide the layer named "CNJCartsFull". The boxes and mail bags on the three platform trolleys are hidden.
    • A message is placed on the screen informing the player that the passengers and mail have been loaded.


Trainz Wiki

Session Creation Tutorials:

Personal tools