Train Simulator NEXT
In This Topic
    How to create grounds for the object editor
    In This Topic

    This topic describes how to create grounds for the object editor.

    Location

    Available grounds are located at [root]\Content\Assets\vfxNEXT\Grounds\.

    All grounds are listed in a Grounds.xml configuration file. This configuration file describes materials for grounds and how to build the terrain grid.

    All ground textures are located in the Textures\. This directory is not a season texture directory.

    The ground configuration

    The XML scheme file for the configuration is located in the same directory and is named Grounds.dtd.

    The configuration contains a Grounds root node.

    The Item node

    Each Ground node has at least one Item node. The Item node has these attributes:

    name

    Type: string

    The name of the ground to display to the user.

    uv_segments

    Type: uint

    The number of texture repeats on uv-axis per tile.

    edge_size

    Type: uint

    The size of one tile. The tile size must be tile-able by 8096 (e. g. 128, 256, 512, ...).

    The Property Node

    Each Item node may have one or multiple Property nodes. A property node sets a property for the used material. The Property node has these attributes:

    name

    Type: String

    The name of the material property. Use one of these material property names:

    Name Type Description
    DiffuseMap map The diffuse / albedo texture. The alpha channel is used for the opacity. Set matHasOpacity to true if the material is translucent.
    EmissiveMap map The emissive texture color.
    NormalMap map The sphere-map encoded bump texture.
    PBRMap map The texture with physical based material properties (rg float: roughness and metalness).
    SpecularMap map The specular texture with properties (rgb: power, exponent and specular metalness).
    ReflectionMap map The reflection texture with refractivity (r, float: refraction index).
    SubSurfaceMap map The sub-surface transparency (r, float: opacity).
    matDiffuseColor float4 The diffuse / albedo color scale.
    matEmissiveColor float4 The emissive color scale.
    matLuminousFluxEmissive float

    The light power of the emissive light.

    Calculate it with: lflux = √( lux / square meter  ). For example, √( 1500 ) is 38.72.

    matRefraction float The refraction index. It should be greater than one.
    matOpacity float The opacity of the material. Set matHasOpacity to true if not one.
    matAlphaMask bool True if alpha-masking is used with translucency.
    matAlphaMaskValue float The alpha mask value for the material. Set matAlphaMask to true to use alpha masking.
    matRoughness float The base roughness of the surface. 
    matMetalness float The base metalness of the surface.
    matSpecularMetalness float The specular metalness of the specular reflection.
    matSpecularPower float The specular power of the specular reflection.
    matSpecularExponent float The specular exponent of the specular reflection.
    matTranslucentSubSurface bool True if the sub-surface itself has a translucent appearance.

     

    type

    Type: String

    The type of the material property. Use one of these property types:

    Type Description Examples
    bool The material property is a boolean value. true, false, 0, 1, yes, no
    float The material property is a floating-point value. 3.1415, 0.18f, 1.5e-03
    float4 The material property is a 4D-vector.

    1.0 → 1.0, 1.0, 1.0, 1.0

    1.0, 1.0 → 1.0, 1.0, 0.0, 0.0

    1.0, 1.0, 1.0 → 1.0, 1.0, 1.0, 0.0

    1.0, 1.0, 1.0, 1.0  

    int The material property is a signed integer (32 bit). -5, 0, 10
    map The material property is a texture. Grid_2x2.map

     

    value

    Type: String

    The value of the property. Match the value with the type given with the type attribute.

    Remarks

    The grounds configuration file is read only once at initialization of the object editor.

    Grounds can be selected in the object editor using shift click on the grounds button in the base panel.

    Create texture using makeMap and package them with makeMaps.

    See Also

    Object Editor

    Base Panel

    Tools