Maritime Tutorial 6 : Adding an Animated Buoy
This page contains information about our legacy OpenGL renderer. If you follow this tutorial while using our new Vulkan renderer, the graphics options and visualization won't be equivalent.
However, the configuration and behavior of the dynamics extensions remain the same.
In marine scenarios, you might want to add navigation buoys that follow the movements of the water's surface without using dynamics computations, in order to maintain an acceptable level of performance. To avoid these extra computations, make sure you do not add parts or collision geometries to the buoy.
To add an animated buoy:
- Create a new scene.
- Add an ocean by double-clicking Marine > Ocean in the Toolbox.
- This example requires a mechanism with a buoy graphical asset. Double-click Basics > Empty Mechanism.
- Rename the mechanism to "Buoy Mechanism" in its Properties panel.
- Right-click the mechanism and select Open Mechanism....
- In the resulting dialog box, you will be prompted to save changes. Click Save All.
- In the mechanism, double-click Graphics > Galleries From Files....
- In the resulting dialog box, use the Browse button to select the
buoy.vxgraphicgallery
file found in your Vortex Studio Sample folder.
- Switch back to the scene.
- Double-click Marine > Buoy in the Toolbox to add a buoy extension.
- Rename the Buoy to "Buoy Extension" in its Properties panel.
- Double-click Basic > Connection Container in the Toolbox.
- Click the buoy extension in the Explorer panel.
- From the buoy extension's properties, click and drag its World Transform into the Connection Editor window.
- Click the buoy mechanism in the Explorer panel.
- From the buoy mechanism's properties, click and drag its Parent Transform into the Connection Editor window.
- Connect the World Transform output to the Parent Transform input.
- Switch to the 3D View window and play the scene. The buoy will now follow the movement of the waves.
You can also add multiple buoys to a scene and have them all follow the ocean waves. To avoid having to create multiple connections for every mechanism in your scene, you should add the extension and connection directly in the buoy mechanism, then add instances of that mechanism directly to the scene.
To add multiple buoys:
- Open the buoy mechanism you created above.
- Double-click Marine > Buoy in the Toolbox to add a buoy extension.
- Double-click Basics > Connection Container in the Toolbox.
- Click the buoy extension in the Explorer panel.
- Rename the buoy to "Buoy Extension" in its Properties panel.
- From the buoy extension's Properties panel, click and drag its World Transform into the Connection Editor window.
- Click the buoy Graphics Gallery in the Explorer panel.
- From the buoy Graphics Gallery's Properties panel, click and drag its Parent Transform into the Connection Editor window.
- Connect the World Transform output to the Parent Transform input.
- Create a new scene.
- Add an ocean by double-clicking Marine > Ocean in the Toolbox.
- Double-click Basics > Mechanism From Files.
- In the resulting dialog box, use the Browse button to select your buoy mechanism file.
- Copy and paste the buoy and place the copies around the scene using the Transform Toolbar.
- Play the scene and all the buoys will follow the movements of the ocean waves.