Building splines

  • A spline is any line-like object, which can be placed in the Map-Editor with any length, curve, or gradient. This article describes how new spline types can be created in the Content-Tool.

    In this article prior knowledge is assumed about how to create a normal scenery object. A manual for this is the article "Tutorial: Gebäude erstellen".

    1 Building the 3d Object

    The basis for a future spline is a normal 3D object. When placing the spline the Map-Editor will transform it: the spline can be bend, cut or extended by placing multiple.

    The 3D model is built from the 0/0 point into the positive y-axis. It can for example look like this:

    Note that the Map-Editor can add additional corner points to the spline to ensure a smooth curve. It is not necessary to add separations or extra points to the model.

    2 Importing the spline

    We can now start the Content-Tool and choose "Objects & Vehicles", next "Create new Object" and then one of the object category on the right. All categories on the right are for splines, whereas all categories on the left are for "normal" objects. The bottom categories each have special properties and these are not covered here. As we just want to import a simple bicycle path, we choose "Surface spline".

    As opposed to this category "Standard Spline" is something that "stands upright" and does not belong to and on the surface, like a fence. A "Marking Spline" is for example a traffic line marking. It is not part of the surface but it follows the surface and does match in a thematic sense.

    The object category for our bicycle path is "CAT 1". A fence would be better suited in "CAT 3".

    Further categories or genres are chosen as appropriate. Here, "Streets and traffic" and therein "Streets and pavement elements" are suitable choices.

    The Object & Vehicle Tool now starts as usual. We now import the mesh as seen before. The presentation has changed however:

    The tool has already interpreted the 3D Object and now shows a preview as to how the spline will look in the Map-Editor. In principle you can now save and export it as before, for instance with the "Go" button.

    3 Editing spline properties

    There are however a couple of peculiarities and special settings we like to introduce here:

    3.1 Meshes and Materials

    In principle the meshes and materials can be edited in the same way as with normal objects. The only exception to this is that choosing a mesh in the 3D window is not possible. The alternative, which is always available anyway, is selecting with the mesh list on the right of the screen.

    There are also several mesh settings that have no effect on splines. Examples are visibility constraints, VisibilityVariable, mouse interactions and Vertex-Ambient-Occlusion

    3.2 Spline preview

    On the bottom left there is a section called "Spline". Here you can find the "Preview spline prop." button. This leads to a dialog window where you can edit the proporties of the preview of the spline. These are the same as the properties when building a spline in the Map-Editor.

    As an example we can change the radius and the length of the spline: R = 10 m and L = 15 m:

    3.3 Specific spline properties

    There are a couple of special properties in the "Object Properties" in "General settings" on the left.

    Please note that at the moment, after changing the properties, you need to click the "Preview spline prop." button mentioned before and click OK to confirm.

    3.3.1 Length of a unit

    During import, the Content-Tool measure the length of the 3D object and stores that value here. In our example this is 5m. From this value LOTUS know how often to repeat the element and at what distance these copies should be places. For testing you can set this value to 6m:

    3.3.2 Allowed SplitCount

    To illustrate this we changed the texture on our spline:

    This parameter can be either -1, 0 or a positive integer. The corresponding effects are:

    -1: The original object will be stretch to cover the entire distance needed:

    0: The object will not be stretched or compressed, it will simply be cut off at the end of the distance, without taking into account where on the object that is:

    1: The object is stretched or compressed in such a way that the end is always exactly between two copies of segments.

    2: A cut can be made at either the end of a segment or exactly halfway:

    3, 4, 5...: Cuts can be made at 1/3, 2/3 or 1, respectively 1/4,2/4,3/4 or 1, respectively 1/5,2/5,3/5,4/5 or 1, etc.

    If we set this setting to 4, in our example cuts can only happen at the border between two colours:


    Translation provided by jjasloot - HUGE THANK YOU!