Receipe: Preparing a rails vehicle

  • After the Blender model has reached a certain state, you want to import the vehicle into LOTUS for the first time. You can find out how to do this here.

    Start the ContentTool. If you have not yet installed it, you can find out how here.


    In the main menu of the ContentTool, select "Objects and vehicles", then "Create/import new object":


    Then rails vehicle:


    In the now empty ContentTool, the X3D file created in Blender is imported by pressing the Mesh Import button:


    Two questions are then asked:


    The answer to the first question depends on whether you have already taken care of the corners and curves in Blender. You can find more information here. For tests, the question is usually answered with "Yes".


    The second question is usually answered with "No" for vehicles, because the vehicle should be imported exactly as it is in Blender.


    Now your model is visible in the ContentTool. First, the vehicle should be able to drive and for this LOTUS must know where the bogies are and what they look like. On the left side, under the tab "Rail vehicles", two bogies are added for a standard test vehicle and each bogie is provided with two axles:


    Double-click to open the corresponding settings:


    The coordinates of the bogie's pivot point can be found in Blender. This is the point where the body and the bogie are connected.


    The positions of the axles (an axle is a wheelset, so to speak) can also be read in Blender, but they must be specified relative to the bogie's centre of rotation. This can be done, for example, by calculating the Y-coordinate of the axle minus the Y-coordinate of the bogie's centre of rotation. Of course, there are also ways to let Blender calculate this value.


    The frequency information can be taken over as given here.


    Afterwards, animations have to be defined. A total of two bogies and two axles each are defined:


    To do this, press "Add" under animations. Select "Bogie" as the type for the bogies and "Axle" for the axles:


    Note that the tree structure is created as shown. The axes are each subordinate to a bogie!


    Select all animations one after the other and click "Edit". For the animation "main" it is important to enter a realistic vehicle mass and some standard properties:


    The bogie animations are given the property which is the associated bogie index:


    And the axle animations need to know which bogie index they belong to and which axle index they are. These are the indices from the bogie and axle configuration at the top, under "Rail vehicles".


    Once the properties have been edited correctly, they can be closed. Now click on the bogie animation listed first and activate the "Add/Remove Meshes" button. The mesh associated with this bogie is selected (clicked) in the ContentTool together with its attachments but WITHOUT its axles. Once everything is selected, the action is finished by clicking the "Add/Remove Meshes" button again. This step is repeated for the second bogie with the associated mesh WITHOUT its axles.


    Then the process is repeated for the axis animations as well. So, select axle animation, activate "Add/Remove Meshes", click the mesh of the associated wheelset, deactivate "Add/Remove Meshes". Repeat for all four axles in succession.


    Done!




    Everything that has been configured here should now be checked again before completion, because incorrect configurations have a decisive effect on the first test trials.


    The next step is to make the vehicle move with exactly two bogies, each with exactly two axles: Receipe: Move a rails vehicle - minimum script