Tutorial: Create a building

  • Tutorial: Import and save a building into LOTUS.

    1 Prepare a folder

    Download the needed files for this tutorial here and extract it into a folder of your choice.

    The folder contains the following files:

    • UnterLinden_32.blend, the Blender-Modell. Has no real purpose since the mesh is also in this folder.
    • UnterLinden_32.x3d, the 3D-file, which was exported from Blender to import it into LOTUS.
    • UnterLinden_32.dds, the main textur of this building. The alpha-channel is for the refelction of the windows or other stuff. It has the value of 255 for reflection and 0 for no reflection.
    • UnterLinden_32_night.bmp, the night texture. This texture has the same name as the main texture, but with the prefix "_night" to get recognized by the LOTUS Content tool. It is possible to set this texture later on, if the prefix is not at the filenmane.
    • UnterLinden_32_night_alpha.bmp. This is the alpha channel for the night texture with the prefix "_alpha". However every bitmap can has an alpha channel by putting the prefix "_alpha" at the end of the filename. So a *.dds-file is no essential for a alpha channel.
    • dachZrot2.bmp, a generic roof texture
    • wand_w.bmp, a generic side wall texture

    Keep in mind to place the texture files in the same directory as the *.x3d-file.

    LOTUS creates some files in this folder to work with them. This folder concludes into one Container (*.lct-file) in the MyContent folder of LOTUS. For some reason a maximum amount of object with the same context should be stored in the same folder. So a project should have less Container, keep an eye on the Folder structure article.

    2 The export from Blender

    2.1 Delete Materials

    The materials of the object should be deleted before exporting the object. The example file has already no materials. Die following section is about the method to use when exporting own objects.

    Just follow these steps:

    • Click on the object
    • Go to the materials section in the properties window
    • Then go to the materials list. Normally there is only one material in this list, however delete all materials by clicking on the "minus symbol" next to the material list.

    2.2 Export settings

    Use the following settings to export an object from Blender to x3d:

    • Forward: Y Forward
    • Up: Z Up
    • Selection Only ON/OFF (helpful when exporting an extract of the whole object ;) )
    • Apply Modifiers ON
    • Triangulate OFF
    • Normals ON
    • Compress OFF
    • Hierarchy ON
    • Name Decorations ON
    • H3D Extensions OFF
    • Scale = 1 (Change this parameter when the Blender project file don't use the metric system (1 meter))
    • Path Mode: Auto

    3 Start the Content tool

    • "Objects & Vehicles" (up left)
    • "Create/import new object"
    • "Sceneryobject without script" (up left)
    • "CAT 1"
    • Choose a matching category for the object

    4 Import

    • Click on the button in the middle, choose the object and confirm the dialog
    • Answer the question "Should the object be explicity imported with flat shading?" with "Yes". The smoothing groups, which may be existed in Blender, getting removed in this case. This is the right choice, if the object has no round corners.
    • Answer the question "Should the imported objects centered on its object center?" with "No". The right answer is based on how the object was created in Blender.

    5 Configure and save

    5.1 Reflections on windows

    • Click on the front of the building. The correct material is shown on the left side.
    • Click on the Edit button below
    • Go to the "Floats" section and set the values of "Shininess factor" and "Brightness of the highlight" to 1.
    • Tick the box "Use alpha value for specular" in "Options and integers" section.
    • Close the window with the "OK" button up left.

    The building now has reflecting windows based on the alpha channel.

    5.2 Traffic Demand

    • The "Main" entry is set automatically in the "Traffic Demand" category with a characteristic for a residential building. The settings for this entry can be changed in the "Settings" window.
    • A second list to set doors, which has no entries, is shown below. Click on "Add" to create a new door.
    • An orange frame appears in the middle of the building.
    • Click on the door of this 3d-building. The orange frame gets calculated from LOTUS.
    • Click on "Set position..." to move the door again.

    5.3 Saving

    • Save and export automatically: Click on the button down right, the filename is set automatically, so is the container. The new file is instant available in LOTUS.
    • Save and export manually: Go to "File" and then either on "Save", "Save as" or "Save & Pack". The filename can be choosen (but has to be in the same folder) and based on the decision, the Container gets packed.
    • Choose one of the eight given preview perspectives.

    6 Try out

    Within the "Test Environment" section the visuals of the building can be tested.

    • To test the night texture set the first three sliders to the left and move the daytime slider to the wanted position.
    • Set the "Snow quantity" slider as you want to test the snow texture.

    7 Loading

    If you want to reset some settings, start the Content tool, go to "Objects & Vehicles", then click on "Load existing object" and choose the *.lob file LOTUS created earlier.