Maritime Tutorial 3 : Building an Offshore Crane

In this training pack, we will go over key concepts and guidelines to get you started with nautical simulations in Vortex® Studio.

This module focuses on using Vortex Studio to create a working offshore crane, that can be attached to the vessel created in Module 2.


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 New Mechanism with Parts

  1. Go to the top-level Vortex Studio menu and create a new mechanism.
  2. Change the name of the new mechanism to "OffshoreCrane".
  3. Save the new mechanism in your course assets.
  4. Go to the Graphics section of the Toolbox and double-click on Galleries from files...
  5. Browse to the ...\Vortex Studio Content <VERSION>\Demo Scenes\Equipment\OffshoreCrane\Hydramarine\Graphic folder and select the Hydramarine_KnucleBoom_Heave_Comp_Hydramarine.vxgraphicgallery file.
  6. Create an empty Assembly.
  7. Rename the Assembly to "Crane".
  8. Create Parts in the new assembly from the following nodes in the crane graphic galleries, with the associated properties and collision geometries. You can use the button to automatically compute COM and inertia tensor for all parts, but only after you've created the collision geometries for parts that have them.

    Node NameMass (kg)Collision GeometryMaterial
    Hydramarine_Base_Geometry17000.0Two cylinders (Manual creation, not automatic with best-fit)Steel
    Hydramarine_Arm19500.0Box (Along top of geometry)Steel
    Hydramarine_Elbow14000.0Box (Along top of geometry)Steel
  9. Go to the Basics section of the Toolbox and add a Collision Rules object to the assembly.
  10. Click on Add Rule and select the Assembly in the first two columns of the Collision Rules object.
  11. Leave the Collide box unchecked.
  12. Save the mechanism.

Establishing Constraints Between Parts

  1. Select the Hydramarine_Base_Geometry part and set its Control property to Static under the Inputs tab.

    The Static dynamic property will allow us to easily test our offshore crane as we build it. Without this property, the crane would fall over in the mechanism editor and could only be tested properly by adding it to a scene and going back-and-forth between the mechanism editor and the scene editor. We just need to remember to set the Control back to Dynamic when we are satisfied with the functionality of our crane.

  2. While still at the assembly level, create Constraints between the following parts, with the following axes, limits and control methods. You should always select the two parts involved in each constraint in the order that they are listed, holding down the Ctrl key to select both, then clicking on the constraint type in the Toolbox. The next steps will show how to create the first constraint and can be repeated to create the remaining constraints.

    Constraint Specifications

    First PartSecond PartConstraint TypePrimary AxisSecondary AxisControlLimits

    Position Upper Limit : 4.8 m

    Hydramarine_Elbow_Inner_PistonHydramarine_Arm_Outer_PistonCylindricalX-Y+LockedPosition Upper Limit : 3.7 m
  3. In the Explorer window, select the Hydramarine_Turret.
  4. Hold down the Ctrl key and select the Hydramarine_Base_Geometry part.
  5. Go to the Basic Constraints section of the Toolbox and double-click on Hinge.
  6. Select the newly created constraint in the Explorer.

    The name that is automatically generated for new constraints contains the name of the two selected parts, separated by an abbreviation of the constraints type in square brackets.

  7. Go to the Part 1 Offset section of the Attachments tab of the Inputs tab and click on the axis button at the end of the Primary Axis field.
  8. Select the Z+ axis.
  9. Click on the axis button next to the Secondary Axis field and select the Y+ axis.
  10. In the Part 2 section, click on the Browse (...) button next to the Offset (Relative) heading.
  11. In the dialog that opens, click on the Apply button and close the dialog with the OK button.
  12. Click on the Controlled Axes tab of the Inputs tab and set the Control type as required.
  13. If any limits are required, check the box next to the Limits section, then expand it and set the limits as indicated.
  14. Repeat for all remaining constraints.

    As you build out your constraints, you can always run the simulation at any time to see how all parts are holding together, or not. You can also test the movement of constraints by either using the spring test tool in the editor, or by specifying values for the Lock Velocity property of any of the locked constraints.

  15. Save the crane assembly.

Adding Hook Assembly

  1. Go back to editing the crane mechanism and Insert the Graphic Gallery for the crane hook, which can be found under the TrainingAssets\OffshoreCrane directory, called Hydramarine_KnucleBoom_Heave_Comp_Platform_KnuckleBoom_Hook.vxgraphicgallery.
  2. Position the hook under the crane, above the mechanism editor grid.
  3. Create a new Empty Assembly in the mechanism and name it Hook.
  4. Create a Part in the Hook assembly from the hook using the top-level Platform_KnuckleBoom_Hook node from the newly imported gallery.
  5. Select the Part and add a cylinder collision geometry to it.
  6. Edit the Hook assembly.
  7. Set the Part Mass to 100.00 kg.
  8. Click the Compute Inertia and COM button.
  9. Set the cylinder collision geometry material to Steel.
  10. Right-click on the hook part and create a new Attachment Point.
  11. Move the point so that it is located towards the bottom of the hook.
  12. Name the point "Hook AP".
  13. Save all open files.

Creating the Cable System

  1. Back at the mechanism level, select the Cable Systems section of the Toolbox and double-click on the Generic Cable item.
  2. Leave all values under the Dynamic Properties sub-section of the Generic Cable to their default values, except for Cable Diameter which should be set to 0.05m.
  3. Select the Dynamics General Cable node, under Generic Cable.
  4. Expand the Definition section of Dynamics General Cable, found under the node Parameters in the Properties editor, then expand the Point Definitions section.
  5. Set the size of Point Definitions to 5.

    The size of the Point Definitions array is determined by the number of touch points where the cable interacts with the crane mechanism. In the case of this crane, the cable will start with the main drum at the back of the crane (1). It then touches three pullies (2 - 3 - 4) and eventually connects to the top of the hook block (5). it is not necessary to include the fourth pulley in the system as the cable will only rest on it.

  6. For the first Point Definition (0), set the Point Type to Winch.
  7. Click on the three vertical buttons at the end of the Part field, then on the button with three horizontal dots. Select the Hydramarine_Turret_Drum part, either in the list of parts in the Explorer window, or visually in the 3D editor view to assign it to this point definition.

    As you select a part for the point definition, Vortex Studio will analyze the part and extract data to complete the Offset, Radius and Angle fields of the Point Definition. Vortex Studio expects the part selected as the winch to be part of a hinge constraint.

  8. Change the Radius to 2.3m, since the cylinder that was automatically created for the drum part considers the edges of the drum as being part of it's radius.
  9. Expand the second Point Definition (1), set its Point Type to Pulley and select the Hydramarine_Elbow_Wheel_001 part.
  10. Configure the third and fourth Point Definitions (2 and 3) as Pulleys, using parts Hydramarine_Elbow_Wheel_002 and Hydramarine_Elbow_Wheel_003.
  11. Set the last Point Definition (4) Point Type to Attachment Point, and select the Platform_KnuckleBoom_Hook part created earlier as the Part.
  12. Set the Z Offset of the Point Definition (4) to 1.3m.
  13. Look at the thin green line in the mechanism editor, between the winch, pulleys and hook block. You will see that the cable does not always go on the correct side of the crane components.
  14. Check the Inverse Wrapping box for Point Definitions 0, 1 and 2 to correct the cable's path along the mechanism.
  15. Expand the Segment Definitions section, under the Definitions section of the Parameters.
  16. Select the last Segment Definition (7) and set the Collision Geometry Type to Capsule.
  17. Set the Attachment Type at End option to Fixed for the last segment definition.
  18. Still under the last segment definition (7), check the box for Flexible Definition.
  19. Expand the Flexible Definition section and set the Preferred Segment Length to 0.1m.
  20. Use the Toolbox to insert a graphic gallery for the cable graphic material, which can be found under the ...\CM Labs\Vortex Studio Content <VERSION>\Samples\Props\Gate - Chainlink\Graphics directory, called Gate - Chainlink.vxgraphicgallery.
  21. Select the Graphics Cable section of the Generic Cable.
  22. Set the Radius property to 0.025m to line up with the 0.05 cable diameter defined before.
  23. Click on the three vertical buttons at the end of the Graphics Material field, then on the button with three horizontal dots.
  24. Select the Frame - Material material under the Graphics Material folder in the newly imported graphics library.

    Assigning a graphic material to the cable will change its visual appearance in the 3D view, but only when the simulation is running. The cable is shown as a thin green line when editing your mechanism or any scene.

  25. Create a Collision Rule Container from the Basics section of the Toolbox.
  26. Create a rule to disable collisions between the Dynamics Generic Cable node of the cable system and the Hydramarine_Elbow_Wheel_004 part.
  27. Run your mechanism to see the crane in action and see the textured cable that you created.

Adding Joystick Control

  1. Go to the Input Devices section of the Toolbox and double-click on the Joystick object to add it to your crane mechanism.
  2. Move the gamepad sticks and buttons to see that their current values are reflected in the object's property sheet, even if the simulation is not running.
  3. Go to the Basics section of the Toolbox and double-click on Connection Container to add it to your mechanism.
  4. Drag-and-drop the AxisX, AxisZ, AxizZRot output properties, along with Button5 and Button6 to the Connections Editor.
  5. Go to the Simulation section of the Toolbox and double-click on Script.
  6. Set the name to ControlScript.
  7. Create five Input properties and four Output properties as shown in the following screenshot, then click on OK to close the dialog.

    You should be careful to use follow the proper spelling for each property and to select the correct data type as you create script inputs and outputs. Otherwise, you will run into issues when you copy / paste this tutorial's code into your script.

  8. Drag-and-drop the five input properties of your new script to the Connections Editor and connect them to the existing joystick properties.
  9. Add the following code to the Script section of the Script object. Make sure to click on the Apply button after adding it so that the code is validated and saved in the Script object.

    from VxSim import *
    def pre_step(self):
        self.outputs.Arm_Actuator_Velocity.value = self.inputs.Arm_Actuator.value * 0.2
        self.outputs.Elbow_Actuator_Velocity.value = self.inputs.Elbow_Actuator.value * 0.2
        if self.inputs.Hoist_Up.value:
            self.outputs.Drum_Velocity.value = -0.2
        elif self.inputs.Hoist_Down.value:
            self.outputs.Drum_Velocity.value = 0.2
            self.outputs.Drum_Velocity.value = 0.0
        self.outputs.Turret_Slew_Velocity.value = self.inputs.Turret_Slew.value * 0.2
  10. Drag-and-drop the script's four output properties to the Connections Editor.
  11. Drag-and-drop the Lock Velocity properties of the four locked constraints that were created earlier in this tutorial.
  12. Connect the script's outputs to each of the lock velocities.
  13. Save the crane mechanism.
  14. Run the simulation and move the assigned gamepad joysticks and buttons to see the crane move in the editor. You should also try to hoist the cable down and see how it interacts with the crane and with the grid of the mechanism editor.

Adding Hooking Logic

Add a Hook Group to your crane hook and assign the Hooking property to an unused toggle button of the Joystick. Please refer to Cables Module 2: Creating Hooks and Loops to learn how to do that.

Adding the Offshore Crane to the Vessel

  1. Edit your crane's assembly.
  2. Right-click on the Hydramarine_Base_Geometry part and create a new attachment point.
  3. Move the point to be at the base of the crane.
  4. Rename the new attachment point to Vessel AP.
  5. Select the Hydramarine_Base_Geometry part and set its Control back to Dynamic.
  6. Save the crane mechanism.
  7. Edit the vessel mechanism, then edit the vessel assembly.
  8. Select the Normand_Kraken part and create a new attachment point.
  9. Rename the new attachment point to "Crane AP".
  10. Move the attachment point so that it is right at the deck level, where you will want the crane to be positioned.
  11. Save the vessel assembly.
  12. Edit the marine scene.
  13. Go to the Basics section of the Toolbox and double-click on Mechanisms from File object to add your offshore crane to the scene.
  14. Expand the Vessel mechanism and its assembly to reveal the Crane AP attachment point.
  15. Expand the Crane mechanism and its crane assembly to reveal the Vessel AP attachment point.
  16. Press down the Ctrl key and select the Crane AP and Vessel AP attachment points.
  17. Right-click and select Create Attachment.
  18. Click on the Snap parameter to automatically align the two attachment points.
  19. Save the scene and run it to see that you will be able to control the crane that is now attached to the vessel.

Adding a Liftable Object to the Vessel Deck

  1. Go to the Basics section of the Toolbox and double-click on Mechanisms from File object to add a liftable object to the scene, found under ..\CM Labs\Vortex Studio Content <VERSION>\Demo Scenes\Equipment\SubseaModules\EDP\Dynamics\Design in the file EDP.vxmechanism.
  2. Place the EDP (Emergency Disconnect Package) mechanism on the deck of the ship.
  3. Create a Hook Group and a Loop Group, with the Hook being the attachment point at the end of the crane cable, and the loop being the top attachment point of the EDP cable.
  4. Using a Connection Container, assign controls to the gamepad to activate the hook group in order to lift the EDP mechanism.
  5. Save and Run the scene.
  6. Control the crane to make its cable approach the shackle at the top of the EDP. When the hook block is in range, green spheres should appear on the hook block and the EDP hook.
  7. Press the assigned Hook Button to engage the hooking mechanism.
  8. Once the green spheres disappear, lift the EDP off the ship desk.

Up Next: Maritime Tutorial 4 : Subsea Operations