Basic concepts

Variations

Every 3D model consists of at least one file (glTF or X format), and thus of a variation. If a 3D model also has other characteristics, such as a further coat of paint, then these characteristics can be added as additional variations in the form of extra model files. The users of 3D Train Studio have the option of choosing a variation on the layout without having to drag another 3D model from the catalog onto the layout.

When are variations available?

Several model files should always be combined to form a 3D model with variations if the models do not differ in their function and have a strong visual similarity.

Examples:

  • A wagon has a variation for 1st and 2nd class
  • A vehicle is painted blue, red, and yellow
  • One track has a variation with bedding and one without

In case of doubt, the forum helps to make a decision as to whether certain models should be grouped into variations.

Things to consider

  • The name of the variation is derived from the file name. Since the name also appears in the selection list for the user, it makes sense to use meaningful file names.
  • Animated models must use the same animations, or if there are several variations, only the animations of the standard variation are taken into account.
  • A maximum of 50 variations per model are supported.

Variation lists

If a 3D model consists of a large number of variations, it is tedious to load all the variations individually into the 3D editor or to update them if the variation models have changed. Variation lists, simple text files with the file extension .varlist, which have the following format, are ideal for this purpose.

Name of the variation; file name of the model; texture name 1 = file name of texture 1, texture name 2 = file name of texture2 …

  • One line corresponds to one variation
  • The first variation is set as the standard variation
  • File names must be specified relative to the path of the variation list file
  • Specifying texture files is optional. If defined, the textures in the 3D model are not loaded, but the files specified in the variation list.

By specifying the model and texture files separately, it is possible to create different variations from just one basic model when importing into the studio.

Exchange textures

Exchange textures expand variations by the possibility of exchanging a texture of the 3D model with a texture created by the user, and thus to individualise the model to a certain extent according to one’s own ideas. Every texture that bears the name _Custom (the file extension does not matter) is recognised as an exchange texture and can be exchanged by the user.

When are exchange textures suitable?

While variations are defined by the model maker alone, swap textures offer the possibility of giving the user their own design tools. Exchange textures are not uploaded to the online catalog when a system is shared. Exchange textures are therefore suitable for individual adjustments that are not intended for the general public:

  • Individual names on station or town signs
  • Personal names on license plates

Here, too, the forum is suitable to help you decide on variation vs. exchange textures in case of doubt.

Materials and textures

3D-Train Studio uses PBR materials in the standardised metallic roughness workflow, whereby a material consists of different parameters / textures. “BaseColor”, “Metallic”, “Roughness” and “Emissive” are supported in the studio.

While metallic tends to be binary in practice (0 or 1), roughness controls the reflection of a material. The emissive property controls how much light an object emits on its own. The higher the value, the more the material is interpreted as a light source. This also has an influence on overexposure (blooming), for example.

By using textures for the individual parameters, different properties within a material can be assigned to an object. Different areas of a locomotive can be shiny, other areas worn and dull, with just one material.

Since not every file format supports PBR materials (e.g. the older X format), there is a special solution in the studio. If there is another texture in addition to the normal texture that contains the extension _Metallic, _Roughness and / or _Emissive , these textures are used accordingly when importing into the studio, regardless of the material setting in the file format.

Further remarks

  • Each material is processed separately by the 3D engine, so it is advisable to reduce the number of materials used to a minimum (ideally to one non-transparent and one transparent material).
  • The Studio supports different file formats for textures, the PNG format is recommended as it is lossless and allows post-processing. JPEG should be avoided as compression artefacts can easily become visible.
  • The width and height of all textures must be a power of two, e.g. 64, 128, 256 etc.
  • Textures with semi-transparencies (alpha values) should not be mixed with textures without transparencies. More precisely, the Studio ignores all transparencies of textures if they do not consist of at least 75% transparent pixels.
  • Regardless of the file format, the Studio automatically converts all textures into a file format (DXT) optimised for the graphics card and selects the optimal settings.

Community member maxwei has provided further information on the configuration of PBR materials (especially for Blender):

Brief instructions MBS-Material.pdf

570.14 kB · 604 downloads Brief instructions for MBS material (Emissive) .pdf

345.43 kB · 381 downloads

Details (LOD)

Graphics cards can only process a limited number of polygons per second (depending on the performance level), which is why it makes sense to equip every 3D model with as few polygons as possible. If optimisation is no longer possible, an additional level of detail should be built and added to the model. Levels of detail allow the 3D model railway studio to display a less complex model if it is so far away from the camera that details are no longer visible.

  • Levels of detail are loaded automatically when the model files end with the name _LOD1 or _LOD2
  • The switching of the levels of detail is done automatically by the Studio and depends on the model size (large models are switched later than small ones)
    • LOD1 is used for medium distances at which objects can still be seen well but are no longer in the focus of the observer
    • LOD2 is used for long distances where only the outlines of the object are visible
    • LOD1 is optional if there are too few differences between the main model and LOD1
  • Each level of detail should reduce the requirements (polygons or materials) by at least 30%

Tips for creating levels of detail

  • At low levels of detail, small details should first be removed that are hardly noticeable at a certain distance anyway (e.g. wiry pantograph, small objects, curves). As long as the contour of the model is roughly retained, small changes in details are hardly noticeable.
  • Levels of detail that are only displayed at a great distance can do without special objects such as wheel animations or moving bogies, since an animation or a rotation is barely perceptible at a great distance.
  • Avoidance of transparent objects and thus the inner workings with low levels of detail

Animations

3D Train Studio supports any number of predefined keyframe animations for each 3D model. Multiple animations can be defined in Blender, in 3D Studio Max, or in any other program that can export timeline-based keyframes. It should be noted that several animations that are to be addressed separately in the program must be created one after the other in the timeline. The reason is that most 3D programs do not have a clear definition of multi-animations and therefore only ever export the timeline as one overall animation, which the studio then has to separate into the individual animations.

The overall animation is separated into individual animations by means of an additional animation file that has the same name as the model, but uses the ending .anim and must be in the same directory as the model. The animation file is a simple text file and contains exactly one line for each individual animation, which is structured as follows:

Animationsname;Startframe;Endframe;AutoPlay;Loop

  • Animation name – name of the animation as it will appear in the 3D model railway studio. It is recommended to use meaningful identifiers. Important: The animation name must not change later, since actions in the event management, for example, reference the animations by name.
  • StartframeKeyframe to start the animation with.
  • End framekey frame with which the animation should end.
  • AutoPlay – Specifies that the animation should start automatically when it is pasted onto the system. Instead of AutoPlay, NoAutoPlay can also be selected to pause the animation at the beginning.
  • Loop – Indicates that the animation starts in an infinite loop by default. If you specify NoLoop, the animation is only played once by default.

An example for a line of the animation file would be: Door; 0; 15; AutoPlay; NoLoop – The animation “Door”, which runs from keyframe 0 to 15 inclusive, starts automatically, but is only played once, is defined.

Sounds

Each 3D model can be linked to a sound from the catalog. The following points must be observed:

  • Not every 3D model needs a sound. In order not to annoy the user with loud sounds, only selected models such as vehicles, barriers or larger railway objects should be assigned predefined noises. At the end of the day, the user still has the option of adding a sound source to add their own sounds to the system.
  • When adding sounds to the catalog, they should be in OGG format (compression level 6 is recommended) and normalised to the standard level (e.g. via the free Audacity , normalise to -1.0 dB). The sounds can also be saved in mono, as the 3D model railway studio positions the sounds independently in 3D and plays them accordingly on different speakers.

Special objects

To recognise special functions, 3D Train Studio uses certain naming schemes from 3D models and noises. If a sub-object of a 3D model or an animation has the following name, additional functions are activated:

Special objects

  • _Scale_1_100_mm – Indicates the scale and the unit in which the model was constructed in the 3D program. Instead of 1_100, any other scale can be selected (the first number indicates the numerator, the second number the denominator). Instead of mm, it is also possible to specify cm or m. A _Scale object is not displayed, only the name counts. Without a _Scale object, a query dialog appears when importing the 3D model in order to specify the scale.
  • _CP – If an object begins with this name, it is interpreted as a contact point. Contact points automatically connect to other contact points. The orientation of the object determines the direction in which an object is rotated when it is connected. Contact points are not drawn, so their geometry is irrelevant for the 3D model railway studio.
    • _CP_Source – As of V6. The contact point is automatically linked to other contact points that are marked as target ( _Target ). Example: A contact point of a load. If the load is placed on a wagon, it is linked to the wagon and automatically moves with it.
    • _CP_Target – As of V6. The contact point is automatically linked to other contact points that are marked as a source ( _Source ). Example: A contact point on a wagon. If a load is placed on the wagon, it is linked to the wagon and automatically moves with it.
    • _CP_Spline – If the contact point contains the extension _Spline, then the point does not snap into place at other contact points, but on the tracks of tracks and roads.
    • _CP_Track – From V5. Same behaviour as _CP_Spline, but applies to track contact, ie the contact point triggers a “Track contact is triggered” event when a vehicle touches the contact point.
    • _CP_Track_Dynamic – From V7. Corresponds to a track contact that can be moved dynamically by the user (e.g. to change the distance to the signal and / or to configure the parallel distance).
    • _Top – from V5. If a spline or track CP contains this extension, the point will snap into place on the upper edge of the track, where the rolling stock touches down.
  • _LS (up to V5) – An LS object is interpreted as a light source. All objects with this name are assigned a material that always lights up, even at night. Is no longer supported from V6, as the emissive property of the PBR materials can be used for this.
  • _LC – An LC object is interpreted as a light cone (light cone). These objects also always shine, and have the additional properties that their texture is drawn using the additive method, which enables brightness gradients. If an LC object does not have a texture, it is given a standard texture that resembles a cone of light. Vehicles automatically show or hide LC objects depending on the simulation time.
  • _ENV_X (up to V5) – Objects that contain the character string “_ENV_X” in their name reflect the environment with a strength of X (between 1 and 100). Is no longer supported from V6, as the roughness property of the PBR materials can be used for this.

Special objects that (should) not be drawn by the studio can be created in Blender, for example, with the help of “null objects (emptys)”.

Special animations

  • _Time – The animation time is synchronized with the simulation time of the system. The beginning of the animation corresponds to midnight, the end of the animation to midnight.