How to Use Layers
m |
m |
||
Line 127: | Line 127: | ||
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.<br> | 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.<br> | ||
− | <table bgcolor=#000000 | + | <table bgcolor=#000000> <!-- BEGIN 2nd level Black Border --> |
<tr valign="top"> | <tr valign="top"> | ||
<td> | <td> | ||
− | <table bgcolor=# | + | <table bgcolor=#ffffe0> <!-- BEGIN 2nd level Tip --> |
<tr valign="top"> | <tr valign="top"> | ||
<td>[[file:PencilTips.PNG|link=]]</td> | <td>[[file:PencilTips.PNG|link=]]</td> | ||
Line 195: | Line 195: | ||
</td> | </td> | ||
</tr> | </tr> | ||
− | < | + | <tr valign="top"> |
− | <table width=600 bgcolor=# | + | <td colspan=2> |
+ | <table width=600 bgcolor=#ffffe0> | ||
<tr valign="top"> | <tr valign="top"> | ||
<td>[[file:PencilTips.PNG|link=]]</td> | <td>[[file:PencilTips.PNG|link=]]</td> | ||
− | <td>'''A layer can be renamed at anytime by double clicking on its name with the left mouse button and typing a new name'''</td> | + | <td>'''A layer can be renamed at anytime by double clicking on its name with the left mouse button and typing a new name''' |
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
Line 306: | Line 311: | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | <table bgcolor=#000000 | + | <table bgcolor=#000000> |
<tr valign="top"> | <tr valign="top"> | ||
<td> | <td> | ||
− | <table bgcolor=# | + | <table bgcolor=#ffffe0> |
<tr valign="top"> | <tr valign="top"> | ||
<td>[[file:PencilTips.PNG|link=]]</td> | <td>[[file:PencilTips.PNG|link=]]</td> | ||
Line 490: | Line 495: | ||
==Locking Layers== | ==Locking Layers== | ||
− | <table bgcolor=#000000 | + | <table bgcolor=#000000> |
<tr valign="top"> | <tr valign="top"> | ||
<td> | <td> | ||
− | <table bgcolor=# | + | <table bgcolor=#ffffe0> |
<tr valign="top"> | <tr valign="top"> | ||
<td>[[file:PencilTips.PNG|link=]]</td> | <td>[[file:PencilTips.PNG|link=]]</td> | ||
Line 724: | Line 729: | ||
*A '''Ruler Layer''' if you are using rulers. Although rulers obey layer behavior (lock and hide) just like all other objects and splines, they have no properties window to show their layer or allow you to change that layer. Consider placing all rulers in a dedicated layer to make their management easier. <span style="background-color: red; color: white; font-weight: 700;"> NOTE: </span> Due to a bug in TANE/TRS19, deleting a dedicated '''Ruler Layer''' will not delete the rulers but will '''temporarily''' hide them from view. Rulers will still have to be deleted individually. | *A '''Ruler Layer''' if you are using rulers. Although rulers obey layer behavior (lock and hide) just like all other objects and splines, they have no properties window to show their layer or allow you to change that layer. Consider placing all rulers in a dedicated layer to make their management easier. <span style="background-color: red; color: white; font-weight: 700;"> NOTE: </span> Due to a bug in TANE/TRS19, deleting a dedicated '''Ruler Layer''' will not delete the rulers but will '''temporarily''' hide them from view. Rulers will still have to be deleted individually. | ||
− | <table bgcolor=#000000 | + | <table bgcolor=#000000> |
<tr valign="top"> | <tr valign="top"> | ||
<td> | <td> | ||
− | <table bgcolor=# | + | <table bgcolor=#ffffe0> |
<tr valign="top"> | <tr valign="top"> | ||
<td>[[file:PencilTips.PNG|link=]]</td> | <td>[[file:PencilTips.PNG|link=]]</td> | ||
Line 768: | Line 773: | ||
<tr valign="top"> | <tr valign="top"> | ||
<td> | <td> | ||
− | <table bgcolor=# | + | <table bgcolor=#ffffe0> |
<tr valign="top"> | <tr valign="top"> | ||
<td>[[file:PencilTips.PNG|link=]]</td> | <td>[[file:PencilTips.PNG|link=]]</td> | ||
Line 806: | Line 811: | ||
</td> | </td> | ||
</tr> | </tr> | ||
− | < | + | <tr valign="top"> |
− | <table | + | <td colspan=2> |
+ | <table bgcolor=#000000> | ||
+ | <tr valign="top"> | ||
+ | <td> | ||
+ | <table bgcolor=#ffffe0> | ||
<tr valign="top"> | <tr valign="top"> | ||
<td>[[file:PencilTips.PNG|link=]]</td> | <td>[[file:PencilTips.PNG|link=]]</td> | ||
<td> | <td> | ||
− | *'''It is a good idea to place ALL the consists in the same Session Layer''' and using a Session Layer for '''ALL''' consists is the '''recommended''' method for '''Trainz Plus'''. Particularly if they are going to be coupled together during the running of a Session | + | *'''It is a good idea to place ALL the consists in the same Session Layer''' and using a Session Layer for '''ALL''' consists is the '''recommended''' method for '''Trainz Plus'''. Particularly if they are going to be coupled together during the running of a Session |
− | *'''When you first save a Session, give it a distinctive and informative name.''' Avoid the temptation to use '''Default''' as the name of your Session as you can easily end up with several Sessions under the same Route all called '''Default''' | + | *'''When you first save a Session, give it a distinctive and informative name.''' Avoid the temptation to use '''Default''' as the name of your Session as you can easily end up with several Sessions under the same Route all called '''Default''' |
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
Line 830: | Line 846: | ||
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, '''Trainz''' 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 the section [[file:PageLink.PNG|link=]] '''[[#Moving Objects To Other Layers|Moving Objects To Other Layers]]''' below) it would be better to correctly set the '''Active Layer''' first. | 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, '''Trainz''' 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 the section [[file:PageLink.PNG|link=]] '''[[#Moving Objects To Other Layers|Moving Objects To Other Layers]]''' below) it would be better to correctly set the '''Active Layer''' first. | ||
<br><br> | <br><br> | ||
− | <table bgcolor=#000000 | + | <table bgcolor=#000000> |
<tr valign="top"> | <tr valign="top"> | ||
<td> | <td> | ||
− | <table bgcolor=# | + | <table bgcolor=#ffffe0> |
<tr valign="top"> | <tr valign="top"> | ||
<td>[[file:PencilTips.PNG|link=]]</td> | <td>[[file:PencilTips.PNG|link=]]</td> | ||
Line 926: | Line 942: | ||
<tr valign="top"> | <tr valign="top"> | ||
<td> | <td> | ||
− | <table bgcolor=# | + | <table bgcolor=#ffffe0> |
<tr valign="top"> | <tr valign="top"> | ||
<td>[[file:PencilTips.PNG|link=]]</td> | <td>[[file:PencilTips.PNG|link=]]</td> | ||
Line 948: | Line 964: | ||
Unfortunately '''Trainz''' 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. | Unfortunately '''Trainz''' 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. | ||
<br> | <br> | ||
− | <table bgcolor=#000000 | + | <table bgcolor=#000000> |
<tr valign="top"> | <tr valign="top"> | ||
<td> | <td> | ||
− | <table bgcolor=# | + | <table bgcolor=#ffffe0> |
<tr valign="top"> | <tr valign="top"> | ||
<td>[[file:PencilTips.PNG|link=]]</td> | <td>[[file:PencilTips.PNG|link=]]</td> | ||
Line 1,083: | Line 1,099: | ||
<br> | <br> | ||
− | <table bgcolor=#000000 | + | <table bgcolor=#000000> |
<tr valign="top"> | <tr valign="top"> | ||
<td> | <td> | ||
− | <table bgcolor=# | + | <table bgcolor=#ffffe0> |
<tr valign="top"> | <tr valign="top"> | ||
<td>[[file:PencilTips.PNG|link=]]</td> | <td>[[file:PencilTips.PNG|link=]]</td> | ||
Line 1,101: | Line 1,117: | ||
<br> | <br> | ||
− | <table bgcolor=#000000 | + | <table bgcolor=#000000> |
<tr valign="top"> | <tr valign="top"> | ||
<td> | <td> | ||
− | <table bgcolor=# | + | <table bgcolor=#ffffe0> |
<tr valign="top"> | <tr valign="top"> | ||
<td>[[file:PencilTips.PNG|link=]]</td> | <td>[[file:PencilTips.PNG|link=]]</td> |
Revision as of 10:03, 23 March 2022
The information in this Wiki Page applies to TANE, TRS19, Trainz Plus and TRS22.
Contents |
What Are Layers?
In Summary: | ||
Layers are a Surveyor tool that allows you to better manage the objects that are placed in your Trainz World. | ||
Layers are a Driver tool that allows you to change what the players see as they drive around your Trainz World. |
Layers can contain any objects, visible and invisible, that can be placed into a layout using the Surveyor Object, Track and Train tools. The layers and their contents can be hidden from view or locked against alteration whenever required. Their main use is in the development of a Route and a Session but they can also be used as a way of providing some additional novelty during a Driver session.
Effect Layers Notes: The special ground effects layers, Clutter and TurfFX, that are available in the Topology Tools (press the F1 key) are not discussed here. They are more like Textures than Layers but some aspects of their use and operations are similar to the layers covered here. These special ground effects layers are saved as part of a Route but are not associated with any Route Layer. |
The Layers Tool
Loading a Route and Loading a Session
In Summary: | ||
Route Layers are saved with the Route. Session Layers are saved with the Session. | ||
If you edit a Session Layer and later load just the Route then those edits will not appear. |
More information on creating, loading and saving Routes and Sessions can be found on the Trainz Wiki Page at Route and Session Basics |
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.
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.
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.
|
Creating a New Route
|
The "Active Layer"
In Summary: | |
The Active Layer is the selected (highlighted) layer. | |
When you load the Route only into Surveyor, the first Route layer will be the Active Layer | |
When you load a Session into Surveyor, the first Session layer will be the Active Layer |
In the image above, the route-layer is the Active Layer. You can change the Active Layer at any time by clicking on the name of another layer.
|
|
Adding a New Layer
Click the Add Button |
An Add layer dialogue window will appear.
|
Deleting a Layer
Select the layer to be deleted and click the Delete Button. If you don't select a layer to delete then Trainz will select the current Active Layer. |
|
If the layer being deleted is empty, then the following dialogue window will appear:-
|
If the layer being deleted is NOT empty, then the following dialogue window will appear:-
| ||||||||||
|
Merging Layers
Select the layer to be merged into another layer and click the Merge Button. If you don't select a layer to merge then Trainz will select the current Active Layer. |
In Summary: | |
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. | |
Once layers have been merged they cannot be separated. |
The layer merge dialogue window will appear as shown below:-
|
Locking Layers
|
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 layer being locked does not have to be the current Active Layer.
The objects in a LOCKED layer cannot be moved (around the layout) or deleted but they can be moved to other layers. |
|
If you attempt to add a scenery object to a locked layer you will receive the following message:-
|
Locking ALL Route Layers
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
Main Points: | |
Layers can be moved up or down
|
|
A layer containing track objects (e.g. signals, switches, etc) CANNOT be placed above the layer containing the track |
|
In the example shown below a layer created in the Route Layers Group is being moved into the Session Layers Group.
|
Hiding Layers
To hide or show a layer click the Eye Icon next to its name.
|
||||||
|
Route Layers vs Session Layers
This topic has filled endless threads in the Trainz Forums with arguments raging on both sides.
In Summary: | |
In general, 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 (for an exception see TRS19 Platinum Edition, Trainz Plus, TRS22 Notes below). 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? |
Notes:
|
TRS19 Platinum Edition, Trainz Plus, TRS22 Notes:
|
The Route Layers Group
The Route Layer Group should be used for everything that will always appear in Driver Mode regardless of which Session is playing. |
There is nothing stopping you from placing everything in the "route-layer" of the Route Layers Group 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 certain scenery objects. For example all the trees or a particular building. 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 and a Driver Command that can hide and show layers during the running of a Session. For example: a rail worker can be placed in a separate layer and positioned next to a track lever while shunting operations are underway but can be removed from the scene 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.
- A Ruler Layer if you are using rulers. Although rulers obey layer behavior (lock and hide) just like all other objects and splines, they have no properties window to show their layer or allow you to change that layer. Consider placing all rulers in a dedicated layer to make their management easier. NOTE: Due to a bug in TANE/TRS19, deleting a dedicated Ruler Layer will not delete the rulers but will temporarily hide them from view. Rulers will still have to be deleted individually.
|
The "route-layer"
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. |
While all layers are equal, the "route-layer" is special.
|
|
The Session Layers Group
The Session Layers Group should be used for everything that 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.
Notes: Session Layers can contain:-
|
||||
|
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, Trainz 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 the section Moving Objects To Other Layers below) it would be better to correctly set the Active Layer first.
|
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:-
|
When adding track objects (signals, speed signs, etc) to a track, the objects being added must be in the same layer as the track or in a layer below the track layer. For more information, see the section The "route-layer" above. |
|
Deleting Objects From Layers
|
You cannot delete objects from a layer that is LOCKED. |
Unfortunately Trainz 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.
|
Moving Objects To Other Layers
|
|||||||||||
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. The bound layer was introduced as a development tool, its sole use is as a tool in the building of routes and sessions.
An object will be LOCKED and cannot be deleted or moved if its layer OR its bound layer is locked. | |
An object will be HIDDEN if its layer OR its bound layer is hidden. | |
Rulers cannot be bound to another layer. |
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. A simple but very effective development technique is to create a Route layer called "Locked" and then lock it. If you need to temporarily stop an object from being deleted or moved then it can be bound to the "Locked" layer.
- 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).
|
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.
The two Driver Mode scenes shown on the left illustrate this feature.
|
This effect could be achieved in two different ways:-
- A Driver Command - specific to a particular driver, or
- A Session Rule - specific to a particular driver, consist, or any driver/consist
Using a Driver Command
The driver command Layer Control hides and shows named layers.
Using Session Rules
Rules Used: |
- Trackside Check Rule - to trigger the event
- Show/Hide Layer Rule - to hide layers
- Message Popup Rule - to open a browser window with a message
Session Editor Screenshot: |
Description: |
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 in order:-
- 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.
- The Message Popup Rule is used to place a message on the screen informing the player that the passengers and mail have been loaded.
Trainz Wiki
More Tutorials and Guides to Using Trainz |
This page was created by Trainz user pware in June 2018 and was last updated as shown below.