Geometry ExportingNetwork GeometryYou can now select any type of network geometry (track, lofts, roads) and export the geometry to Wavefront .obj format, a geometry format recognised by most 3D modelling software.
Terrain GeometryYou can export an area of terrain around the current camera position into Wavefront .obj format.
Combining Terrain with Network GeometryYou can import both network geometry and terrain into 3D modelling software and both will be positioned relative to the current “near origin”. The near origin is a coordinate in the Train Simulator world that updates at certain intervals when the camera moves. It is basically used to prevent inaccuracies in coordinates that would occur if you travelled too far from the origin - coordinates are only precise at 6 significant figures. Basically, what this means is that it’s possible that you could export some network geometry, move the camera somewhere else in the world, and export the terrain, but the network geometry and terrain would not match up because the “near origin” changed. If you wish to export both network geometry and terrain and have them both match up, the camera should remain stationary when the above steps for both are performed. In-Game Script ReloadingScripts can now be reloaded in-game, without having to first exit a scenario and re-enter. This allows incremental changes to scripts that can be observed immediately, reducing development time and improving the quality of scripts. Scripts can be reloaded by pressing Ctrl + End. This may change if an in-game debugging console is added at a later date. Notes:
Scenario ChainingScenario Chaining is a new feature that has been added to Train Simulator 2014 which allows scenarios to be linked together. On completion of one scenario, another one can automatically be loaded without requiring the player to go back and forth between menus. In order to use Scenario Chaining, you will first need to add a driver instruction; this can be anything you like, from a ‘stop at destination’ instruction to a ‘pick up passengers’ instruction, so long as it has a target destination. The target destination should be the pivot point at which the scenarios are linked (e.g. when linking an Edinburgh to Glasgow scenario with a GARL scenario you would use Glasgow Central as the target destination) although this is not a requirement (you can effectively link any scenario with any other). To add an instruction, go to the timetable view in the scenario editor by clicking the timetable icon in the toolbox. This will bring up the timetable view with a list of driver instructions on the right-hand side. As an example: choose a ‘Stop at Destinations’ instruction from the top toolbar. This will add a new instruction to the list. Click the hand icon on the list entry to bring up the target properties dialogue. You will now notice a new section at the bottom of the properties dialogue. This section is for chaining scenarios. By clicking the checkbox on the right-hand side you will notice the text field becomes activated, this indicates that when this target instruction is complete, a new scenario will be loaded. The text field on the left contains the GUID of the scenario that you wish to be loaded. Note: In order to find GUIDs for particular scenarios you can use the ‘NameMyRoute.exe’ executable located in the installation folder of Train Simulator. Right-clicking on a scenario in this application will give you the option to ‘Copy GUID Only’ after which you can simply paste the result straight into this text-field using Ctrl + V. When this instruction is satisfied, a flag will be set indicating to the game that a new scenario should be loaded when this one is complete. One condition is that the scenario must be completed successfully in order to progress to the next scenario. This means that a final destination is also required. A typical use case of this would be to place a stop at destination instruction where the destination is the same as the final destination. This means the player will wait at a platform for a small period of time and then a new scenario will be loaded. Screen Space DecalsTS2014 offers a new type of decal known as a “Screen Space Decal” that can be applied to any surface at any angle and will follow the shape of the underlying geometry. They are similar to terrain decals but will follow the geometry of any surface, not just terrain. It is less costly to use than the old terrain decals if used correctly. Normal maps and specular/reflective properties can also be applied to the decal. Two new blueprints have been added, these are: “Screen Space Decal Blueprint” and “Screen Space Decal Material Blueprint”. Both are required to set up a decal. Screen Space Decal Material BlueprintThe purpose of these blueprints is to create a single material with a texture atlas that can be reused for many types of decal. E.g. you may have a number of concrete surface irregularities that all share the same specular and reflective properties. It is recommended that these are all placed on a single diffuse texture, and the decals will use different UV coordinates to select the part of the texture. For this example, we will use the following texture (RGB and Alpha):
Screen Space Decal Blueprint
UsageOpen the route editor and place the decal in the world. Drag and rotate the decal and anywhere you like, e.g. a platform loft.
Decals can be rotated into any orientation so that they can be applied to horizontal and vertical surfaces. To prevent stretching of the decal, the box should be aligned perpendicular to the surface being projected on. ResultScreen space decals are a powerful tool for making plain surfaces appear more realistic without having to author many variations of the same asset. As with all assets, screen space decals should be used in moderation. They do not impact performance as much as terrain decals, but neither do they replace them in functionality. Terrain decals are still useful for cutting holes in the terrain for tunnels and having decals that only apply to the terrain and nothing else. For best performance with screen space decals, re-use the same material for a number of decals. For example, a single decal texture could have a number of decals used for platforms, roads, track or terrain. If it is clear that they are impacting performance (keep an eye on frame rate), then remove some. Google Maps OverlayTo use Google Maps Overlay in the editor simply press Ctrl + G to toggle it on and off. This will show an overlay on top of the terrain displaying an accurate mapping of Google map image data to its corresponding location in the world. After enabling the overlay, it may take a few seconds for the map data to stream in from the servers so some patience is required (depending on bandwidth and resolution settings), this also happens when you move to a new area of the map. The overlay data will be cached to within a few kilometres of the current camera position and only when the camera crosses an invisible boundary will new data be streamed in. You can freely move the camera about and use route markers to transport to new locations and the overlay will (eventually) catch up as long as it is activated. When you toggle the overlay, a new flyout dialog will appear at the bottom right-hand side of the screen. The slider at the top of this dialog controls the transparency of the overlay, adjusting this will essentially blend the overlay with the underlying terrain. The Slider just below the alpha slider controls how high the overlay is off the ground, adjusting this to its full height will allow you to go under the overlay. The pause and play buttons at the bottom of this dialog control the streaming process; pressing the pause button will stop any further tiles from being streamed in and leave the current tiles as they are, no matter where the camera is. Pressing the play button will simply resume the streaming process as normal. In order to use Google Maps Overlay, you will need to set up the Google Maps API key correctly. To do so:
Once you have the API key, go to the Settings menu in Train Simulator, select Tools and then click the Google Maps button. Paste your API key into the box provided and then click Save. The API key is required so that Google can identify who is downloading map data and limit the number of downloads per user or per application. Currently, the maximum amount of images that can be streamed from Google Maps per user on a daily basis is 25,000. If the Google map overlay stops appearing in the editor for unknown reasons it may be because you have exceeded this daily limit, in which case you could either borrow someone else's API key temporarily or set up a billing profile from the Google API console, see: https://code.google.com/apis/console/Billing. There are also some other options in this menu which are explained below: There are currently two options in the resolution slider:
Map Type The Map Type can either be one of the following:
These determine the type of image that will be displayed in the overlay. Editing is not affected at all by the overlay; placing assets, texturing and editing of terrain are done exactly the same way as before. Zoom Level The zoom level determines how much detail is in the overlay image, this value can be in the range 0-21 but is restricted in Train Simulator to 13-21 (going below 13 is simply impractical (but entirely possible)). Changing the zoom level to a higher value will give more detail whereas a lower value will give less. It also affects the size of the tiles that are displayed; this is due to the fact that at higher zoom levels the overall Google map consists of a higher resolution image and when we specify a fixed resolution type (either 640x640 or 1280x1280) per tile it inevitably means that the surface area per tile will be smaller the higher the zoom level.
Tiles Displayed This is the number of tiles that will surround the player when they enable the overlay. This was added because at high zoom levels, tiles become fairly small and we needed the overlay to cover a reasonably sized surface area. It is recommended that this value stays at either 3x3 or 5x5 for performance reasons. PalettisationPalletisation allows artists to reuse a single model for many variations. For example, a palletised character model will use the same geometry, UV mapping and luminosity texture, but can vary by different coloured clothing or skin. The implementation of palletisation in TS2014 allows for up to 3 different palettes per material. This means for a material with 2 palettes, you could have a palette for skin colour and a different palette for clothing colour. Models are set up in exactly the same way as before, but textures must be created differently to a standard diffuse texture. Gradient mapping is heavily used in Photoshop for creating palettes. A gradient map takes in a luminosity value and maps that to a specific colour. Using this method, specific ranges of luminosity values can map to specific shades of different colours. In 3ds Max, the shader for the material we will use is “SkinDiffusePallete2.fx”. This shader requires a luminosity map and 2 palette textures. Photoshop SetupIn this tutorial, we will use Photoshop CS2, instructions may vary in later versions. We need to work with RGB values directly in Photoshop, so it is important that Photoshop is set up in the correct colour space.
Texture Setup
Exporting as DDSCreate an alpha channel for the image if one does not already exist. Make sure all luminosity layers and adjustments are visible and copy and paste the image merged into the alpha channel.
Palette TexturesThe final step is to create the palette textures. A palette spans a single row of a 256x16 texture. This means you can have up to 16 palettes in one texture. For this example, this means we can have up to 256 variations of a single character, using 1 1024x512 texture for luminosity and 2 256x16 textures for palettes.
Check List
Blueprint SetupAll blueprint types that have a render component now have 4 additional properties related to palletisation. These are:
For a character to appear with a random palette for skin and clothing, all that needs to be changed is “Palettised” from false to true. Export the blueprint as you would normally for a character and additionally setup as a platform character. Result Placing the character as scenery will select a palette at random for each instance. Palettes are saved, so palletised scenery always looks the same once placed. The more palettes you use, the more variation. Considerations
Distant Terrain TexturingRe-included from TS 2012 the distant terrain generator has been re-enabled for TS 2014. Additionally the system now also generates pre-baked textures for terrain beyond the normal 4km square area textured by the original system. To generate terrain and textures:
Per-route Camera BlueprintsRoutes can now override the default camera blueprints for:
This allows you to adjust various properties such as max altitude or distance from target a camera move.
Additional Cab Camera ViewsIt is now possible to have any number of alternative views in a cab. These views can have their own direction, FOV and degrees of freedom. The degrees of freedom are around the initial rotation of the camera. The “cab camera” blueprint has additional fields:
A timeline entry has the following fields:
*If either of 2 camera positions in the timeline has a transition in or out to each other, then a transition will occur. The purpose of both fields is to allow the default and second camera positions to transition into a timeline position. The default and second camera positions will always transition between each other. UsageThe left and right keys will transition backwards and forwards respectively through each cab camera position. Alignment toolAdded in TS2014 is a new tool for aligning objects to each other, this is primarily for speeding up gantry placements when gantries are manually added but can be used to align any objects to each other.
Note: One of the major reason for this tool is to allow gantries placed with only hanger arms and no gantry object to be retrofitted with a custom gantry object using the Ctrl-shift to align and snap to the midpoint of children. Platform ToolsTo access the platform properties double-click on a platform loft. Time of day platform densityIndicated by the clock icon is a table for % density of passengers at different times of day:
Platform Area ToolYou can now edit the platform area to provide irregular areas, once a loft has been created and selected, the editor will show its outline in white.
Seasonal CharactersSeasonal/Weather character variations may now be marked by setting the "Use in" flags. Point of Interest MarkersA new variant of the platform gate is now available in the field Gate Direction as well as Entry, Exit and both there is now also ‘Point of Interest’. Points of interest are areas on platforms that a passenger might walk over to while waiting for a train, for example, near train time posters or coffee/food outlets. Placement is done by selection from the browser and dropping the marker on the platform and linking to the ribbon. Collision AreasWhile scenery can have collision areas defined, which are picked up by the platform characters, it may sometimes be necessary to add a manual collision box for an obstacle or group of obstacles, in particular where fence lofts are used. The new Platform Collision volume can be placed and resized to fit around obstacles that block platform areas, the volume is resizable by dragging the extent markers on the gizmo. MiscThe platform characters may now have multiple idle animations by naming these wait1, wait2 etc. These are chosen at random. In-Game Asset EditingIn-Game asset editing is a new feature in Train Simulator 2014 which allows users to easily reload blueprints, textures and models (i.e. assets) from within the editor and also from within the game. This feature will check all asset files in the ‘Assets’ directory (located in deployment) and reload those asset files which have been modified since the last reload time. This allows artists and content creators to modify resources, export them from the blueprint editor and then reload them in-game without having to restart the game or use the asset editor.
UsageTo use this new feature the user will simply press F9 in the editor/game. This will bring up a dialog showing those files which have been modified since the game started (or since the last reload time) and prompt the user to confirm that they want those files to be reloaded. After which all entities which reference those modified blueprint, texture and model files will automatically be updated to reflect the new changes. The initial reloading process counts the number of files in the Assets directory so that for any subsequent reloads an accurate progress bar will be displayed where the ‘Gathering for first time...’ text is. Any files that have been modified will be listed in the list box. Click Reload to reload the listed assets or Cancel to discard. This process may take a little while but will be significantly less time than closing and restarting the game. Headlight FlaresHeadlight ‘flares’ is a new graphical effect in TS-2014 which can be added to new rail vehicles and placed in routes, scenarios etc. in the same way as any typical spotlight can. It produces a lens flaring effect which is the result of light scattering through the lens of the virtual camera. The effect is generally implemented by drawing a billboarded sprite in front of each headlight and is usually combined with a lens flare technique for added dramatic effect. UsageYou will now notice a new blueprint type in the blueprint editor called “Head light blueprint”, this is essentially the same as a spotlight blueprint but contains one extra component called “Head light flare component”. This is the component in which most of the parameters for the flare effect will be specified (with the exception of the diffuse colour which is queried from the spotlight component). To create a new headlight simply: Right Click > Add Item > Blueprint > Head light blueprint. This will load the blueprint into the editor. Opening up the Head light flare component you will see a list of attributes associated with the effect, each attribute and its parameters are listed below with explanations for each: Blueprint ParametersPrimary Flare
Lens FlareThe lens flare effect is highly customizable and allows artists to specify each individual flare component (i.e. circular sprite) and it’s specific offset. Artists can place as many flares as they wish by simply adding new components to the Lens Flare tab in the blueprint editor. Each individual flare component has the following parameters:
Workshop Career ScenariosCareer scenarios can now be created by users and published to Steam Workshop. Each published career scenario will have a dynamically generated leaderboard which will hold the scores of users who have subscribed to this scenario and successfully completed it. You can now create a new Career scenario in the same way you would create a Standard scenario by going to the scenario editor menu and selecting New Scenario. Also in the Scenario Editor menu, you can now edit Career scenarios. Simply select the Career scenario you wish to edit and press the Edit Scenario button. When a Career scenario has been created it can be published to workshop exactly the same as a Standard scenario. Simply go to the Steam Workshop menu and select the Publish button; any Career scenarios that you have created should now appear in this list. When you complete a workshop career scenario that you have subscribed to you will notice a new button in the debriefing menu labelled Rate Scenario. This will take you to the rating menu where you can like or dislike the scenario. You can also select the Ranking button which will take you to the Scenario rankings menu for that career scenario where you can view the scores of all subscribed players who have successfully completed that scenario. Tutorial SupportNew Scenario Scripting functionality has been added to provide better support for creating tutorial scenarios in TS-2014. A list of newly added API functions is listed below. Playing VideosYou can now play videos in-game using the following three API calls: ScenarioManager:PlayVideoMessage( videoAddress, type, paused, controls, style )
ScenarioManager:StopVideoMessage ( videoAddress ) where:
This will also resume the game if the paused flag was set to true when PlayVideoMessage was called. ScenarioManager:IsVideoMessagePlaying( videoAddress ) : [ bool ] This determines whether the video is currently being played. Localisationwhen playing a video message from a script the videoAddress will be translated into it’s localised version by prefixing the language identifier followed by a forward slash, e.g. if you specify the movieName ‘movie.ogg’ and your language settings are English then the final address will be ‘en/movie.ogg’ meaning that you would need to place the movie file into an en directory within the scenario directory. If a movie file (or sound file) cannot be found for a specific language setting then it will revert to en by default.
Playing SoundsAudio files can now be played directly from scenario scripts by calling the function: ScenarioManager:PlayDialogueSound( filename ) where:
ScenarioManager:StopDialogueSound( filename ) where:
Multiple sounds can be played at once. ScenarioManager:IsDialogueSoundPlayinIsDialogueSoundPlaying( filename ) : [ bool ] determines whether the audio file is currently being played Highlighting UI ControlsControls can now be highlighted from within a scenario script via the new method: WindowsManager:HighlightControl( controlName, duration, style ) where:
If any of these controls become redundant in the future then they will simply not display a highlight when called from a scenario script. Likewise, new controls may be added in the future which cannot be highlighted in older scenarios. The highlight that will be displayed over the UI controls will not concern the scenario scripter but may be changed via the loosely defined style flags. You can also stop the highlight by calling this method: WindowsManager:StopHighlightControl( controlName ) where:
Looking At Cab ControlsCab controls can now be focused on via the new script function: ScenarioManager:LookAtControl( controlName, lerpTime , duration, dstFov ) where:
This method will disable all input control of the camera for lerp_time + duration amount of seconds while the camera focuses on the specified control and waits there for a specific amount of time. This method can be used with message dialogs to inform the player of what the cab controls do and how to use them. Another method will also be added to restore the camera to its default state: ScenarioManager:RestoreCameraToDefaulRestoreCameraToDefault( lerpTime ) where:
The default state is the camera’s initial orientation and field of view at the start of the scenario. Saved MessagesYou can now save certain message routines in scenario scripts by registering a callback method which will be invoked when the user switches back and forth between these saved messages: To register a message you call the following method: ScenarioManager:RegisterRecordedMessage( playCallback , stopCallback , playInstantly) where:
Ribbon Merge ToolPreviously there has been no way to merge 2 ribbons in the editor, the join tool connects 2 ribbons but this is not useful for platforms which need to be one continuous section. The Join tool will now merge rather than join 2 ribbons if the CTRL key is held during the operation (the ribbons must have the same direction I.e have been laid in the same direction and be of total length less than 500m for merging to be possible). This should allow platforms to be created as a single length using the offset tool even when the track work used for the offset contains a junction. |
Reference Manual > TS New Features >