Simulation Center—3D Animation
If the current experiment uses any components from the MultiBody library that have a visual representation, it is possible to view a 3D animation of the model as shown in the screenshot following. To view the animation, choose View ▶ Animation; this will open the Animation view in a separate window. Previously opened Animation views can be accessed from the Window menu.
To start the animation, click the play button in the toolbar within the Animation view. When the animation is running, it is possible to pause it by clicking the Pause button or stop it by clicking the Stop button. It is also possible to change the time scale of the animation by selecting the desired time scale from the time scale combo box or by entering a custom time scale and pressing the Return key. To show the Animation view in full screen, right-click and select Full Screen.
If the animation window is open while a real-time simulation is running, the toolbar will be disabled and the animation will run synchronized with the real-time simulation.
Animation view of Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic.
Navigation
It is possible to rotate, pan and zoom in/out of the 3D model by using the mouse. To rotate the 3D model, click and hold the left mouse button and drag the mouse in the desired rotation direction. To pan the 3D model, press and hold down the Ctrl key. Then click and hold the left mouse button and drag the mouse in the desired pan direction. To zoom in or out, rotate the mouse scroll wheel backward or forward. To reset the camera position and fit the 3D model to the window, double-click in the window or right-click and select Fit to Window.
It is possible to select objects in the Animation view by clicking them; the selected object will be indicated by making all other objects slightly transparent. At the same time, the corresponding component will be selected in the Plot view.
Attach Camera
It is possible to attach the camera to a specific object by right-clicking and selecting Attach Camera to. The camera will then maintain its relative position to that object when the object moves. How the camera maintains its position is determined by the Camera Follow Mode, which can be changed by right-clicking and selecting Camera Follow Mode. There are three different modes to choose from:
- Object Center and Azimuth: Camera will follow the position of the object center and its rotation around the gravity axis.
- Object Center and Rotation: Camera will follow the position of the object center and its complete rotation.
Trace Path
To trace the path of an animation object, right-click in the Animation view, select Trace Path and select the desired animation object. This will visualize the path of the selected animation object with a tracing line, as seen in the following screenshot.
Path trace of the two load objects in Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot.
Storing Animations and Cameras
To easily reproduce the same animation from a future simulation, the animation and camera configuration can be stored in the model. To store the current camera configuration, right-click the animation and choose Add Camera to Model; this will store the following:
In the resulting dialog, you choose in what model to store the camera and a name for it.
If you make changes to the camera configuration and want to reset to the stored configuration, right-click the animation and choose Select Camera ▶ Reset to 'Camera Name'. If you instead want to update the camera in the model, right-click the animation and choose Update 'Camera Name' Camera in Model.
To store the current animation configuration, right-click the animation and choose Add Animation to Model; this will store the following:
- Selected camera name, or if the current camera is not stored, it will store the current camera configuration with the name Default.
Note that animation and camera configuration are stored in the model, but the model is only saved to a file by going to Model Center and choosing File ▶ Save for the specific model.