Getting Started Tutorial 2 : Creating your First Scene

This module focuses on the basics of using Vortex Studio to create a scene and launch a first simulation, as well as inserting mechanisms and interacting with them.

Prerequisites

You need to have Vortex® Studio and the Vortex Studio Demo Scenes installed to be able to follow all steps in this tutorial.

Creating a Scene

  1. Start the Vortex Studio Editor.

  2. Click on the Scene document type in the New Document section of the welcome screen to create a new scene.

    This will open the scene editor. By default, a new scene does not have any contents. This is why it displays messages indicating that you can drag Toolbox objects in the scene or right-click the workspace to configure scene options.


  3. In the Environment section of the Toolbox, double-click on Terrain From File....

  4. Click on the Browse of the Terrain File and find the Warehouse ground from your Demo Scenes folder (...\Vortex Studio Content <version>\Demo Scenes\Environment\Warehouse\Graphic\Warehouse_Ground.vxgraphicgallery).

  5. Change the Default Material to Ground. Click OK.

  6. In the Environment section of the Toolbox, double-click on SkyDome.

  7. In the Graphics section of the Toolbox, double-click on Adaptive Feature.

  8. In the Basics section of the Toolbox, double-click on Mechanisms From Files. Click on Browse and find the Warehouse mechanism (...\Environment\Warehouse\Dynamic\Warehouse.vxmechanism).

    By default, the ground and the warehouse should be aligned. If they are not, make sure that their Local Transform under Properties is set to the origin of the scene (0, 0, 0).

  9. In the Basics section of the Toolbox, drag-and-drop a Mechanisms From Files on the ground. Click on Browse and find the Shelving_Units mechanism (...\Environment\Warehouse\Dynamic\Shelving_Units.vxmechanism).

  10. Use the Move (Ctrl + 2) tool to position the shelves inside the warehouse.

  11. Repeat steps 9 and 10 for the Movable_Crate mechanism (...\Environment\Warehouse\Dynamic\Movable_Crate.vxmechanism).

  12. Right-click on the Movable_Crate, Duplicate (Ctrl + D) it, and Move (Ctrl + 2) it side-to-side with the existing one. Repeat in order to have 3 crates side-to-side.

  13. Repeat steps 9 and 10 for the Medium Forklift mechanism (...\Training\Forklift_Medium\Dynamic\Design\Forklift.vxmechanism).

  14. Save (Ctrl + S) the scene in your working directory.

Set a Material Table

  1. Click on the three horizontal lines in the top left corner of the screen, and select Options. Then navigate to the Setup tab.
  2. Observe the material table set by default. This is a system-wide default and might not be appropriate for each specific project. Instead, the table should be defined in the assets.
  3. Close the Options and go back to the Scene.
  4. In the Simulation section of the Toolbox, add a Material Table to the scene.
  5. Click on Browse in the Material Table's Properties.
  6. Select the material table for the warehouse scene (...\Scenario\Forklift Scene\Forklift_in_warehouse_material.vxmaterials).
  7. The Material Table panel opens. This shows all defined material names, and the contact properties for each pair. Click on each combination of materials in the Material Table panel and observe the differences in the Properties panel.

Connect a Gamepad

  1. Make sure a Gamepad is plugged in. It can be tested in Windows from the "Set up USB Game Controllers" control panel.
  2. In the Input Devices section of the Toolbox, add a Joystick to the scene.

    The Joystick is not a graphical or mechanical object represented in the scene. It can only be found in the explorer and contains a set of inputs and outputs that communicate with the physical game controller.

  3. Observe which outputs of the Joystick object change when pressing buttons and moving the axes.
  4. In the Basics section of the Toolbox, add a Connection Container.
  5. Select the forklift's Control Interface VHL. Select all the input fields and drag-and-drop them into the Connections Workspace.
  6. Select the Joystick object. Select relevant output fields and drag-and-drop them into the Connection Workspace.
  7. Connect the inputs and outputs as shown in the image below.
  8. Close the connection container (or change tabs) to return to the 3D View.
  9. Test (F7) the simulation and drive the forklift with the gamepad.

Adding a Head-Up-Display

  1. In the HUD section of the Toolbox, add three (3) Text objects.
  2. Open the Connection Container (double click, or change tabs if it's still open).
  3. Select the Text objects and drag-and-drop the "Text" input field from their Properties into the Connections Workspace.
  4. Select the forklift's Text Outputs interface. Drag-and-drop the output fields into the Connections Workspace. 

    The color of the connection ports are different depending on the data type. In this case, purple represents strings (text) and green represents doubles. The data types colors are documented here.

  5. Connect each Text object to an output from the Text Outputs interface.
  6. Adjust the Anchor Position of each Text object to these values:

    Text ValueAnchor Position
    Lever Position[0.7, -0.90, 0]
    Engine RPM[0.7, -0.82, 0]
    Vehicle Speed[0.7, -0.74, 0]

    The Anchor Position is relative to the size of the screen and has a range of [-1:1] on the X and Y axis. The Screen Offset is a position relative to the Anchor and is measured by a number of pixels. For instance, an object with an Anchor Position of [-1, -1, 0] and an Screen Offset of [100, 80, 0] will be located on the bottom left of the screen with an offset of 100 pixels to the right, and an offset of 80 pixels to the top.

  7. Test (F7) the simulation. Adjust the properties of the Text objects, like color and font size.

  8. Save (Ctrl + S) the scene in your working directory.

Up Next: Getting Started Tutorial 3 : Creating a Mechanism