Simulink 3D Animation
Visualize dynamic system behavior in a virtual reality environment
Simulink 3D Animation™ provides apps for linking Simulink® models and MATLAB® algorithms to 3D graphics objects. Objects can be represented in the standard 3D modeling languages X3D and VRML97. You can animate a 3D world by changing position, rotation, scale, and other object properties during desktop or real-time simulation. You can also sense collisions and other events in the virtual world and feed them back into your MATLAB and Simulink algorithms. Video from virtual cameras can be streamed to Simulink for processing.
Simulink 3D Animation includes editors and viewers for rendering and interacting with virtual scenes. With the 3D World Editor, you can import CAD and URDF file formats as well as author detailed scenes assembled from 3D objects. The 3D world can be viewed immersively using stereoscopic vision. You can incorporate multiple 3D scene views inside MATLAB figures, and interact with the virtual world using a force-feedback joystick, space mouse, or other hardware device.
Get Started:
Building 3D Worlds
The 3D World Editor offers a hierarchical, tree-style view of VRML objects that make up the virtual world. It contains object, texture, transform, and material libraries that are stored locally for easy access.
Importing 3D Content from the Web
You can build 3D worlds with several 3D authoring tools and export them to the X3D or VRML97 format for use with Simulink 3D Animation. In addition, you can download 3D content from the web and use it to assemble detailed 3D scenes.
Importing CAD Models
3D World Editor lets you manipulate 3D objects imported from most CAD packages for developing detailed 3D worlds that animate dynamic systems modeled in Simscape Multibody™, Robotics System Toolbox™, and Aerospace Blockset™. Simulink 3D Animation enables you to process VRML and X3D files created by CAD tools such as SolidWorks® and PTC CreoTM (Pro/ENGINEER®). You can also import CAD models from STL, DAE COLLADA, URDF, and SDF file formats into the 3D World Editor.
VRML Viewers
Simulink 3D Animation includes viewers that let you navigate the virtual world by zooming, panning, moving sideways, and rotating about points of interest known as viewpoints. In the virtual world, you can establish viewpoints that emphasize areas of interest, guide visitors, or observe an object in motion from different positions. During a simulation, you can switch between these viewpoints.
Building User Interfaces Containing 3D Worlds
The Simulink 3D Animation Viewer integrates with MATLAB figures so that you can combine virtual scenes with MATLAB Handle Graphics® and multiple views of one or more virtual worlds.
Remote Viewing of 3D Worlds in a Web Browser
The Simulink 3D Animation Web Viewer works with HTML5-enabled web browsers to display virtual worlds on computers, phones, and tablets. You can open a virtual world on your computer then view it remotely in a web browser on a mobile device or a computer that does not have Simulink 3D Animation installed.
MATLAB Interface to 3D Worlds
From MATLAB, you can read and change the positions and other properties of VRML objects, read signals from VRML sensors, create callbacks from graphical tools, record animations, and map data onto 3D objects. You can use MATLAB Compiler™ to generate standalone applications that include Simulink 3D Animation functionality.
Simulink Interface to 3D Worlds
You can control the position, rotation, and size of a virtual object in a scene to visualize its motion and deformation. During simulation, VRML object properties in the scene can also be read into Simulink. A set of vector and matrix utilities for axis transformations enables associations of Simulink signals with properties of objects in your virtual world. You can adjust views relative to objects and display Simulink signals as text in the virtual world. 2D outputs of synthetic cameras defined in the virtual world can be streamed into Simulink for further 2D video processing.
You can also trace the 3D trajectory of an object in the associated virtual scene. For example, you can perform flight-path visualization for the launch of a spacecraft.
3D Input Devices
Simulink 3D Animation provides Simulink blocks and MATLAB objects that allow you to use hardware input devices (3D mice and force-feedback joysticks) to manipulate objects in virtual worlds. The use of these devices, however, is not restricted to objects in virtual scenes. They can be used also in a more general sense to drive any Simulink block or control MATLAB based algorithms.
Simulink 3D Animation allows you to detect collisions of point clouds, ray fans, and primitive geometries with surrounding virtual reality objects. You can use the PointPickSensor, LinePickSensor, and PrimitivePickSensor nodes to model ultrasonic, LIDAR, and touch sensors.
Recording Scene Data
Simulink 3D Animation enables you to control frame snapshots (captures) of a virtual scene, or record animations into video files. You can save a frame snapshot of the current viewer scene as a TIFF or PNG file. You can schedule and configure recordings of animation data into AVI 2D video files and 3D animation X3D files for future playback. 3D Animation files allow you to inspect recorded animations with full virtual reality viewing experience—observe scenes from different viewpoints using stereoscopic vision.
You can use video and image processing techniques on frame snapshot and animation data. These approaches enable the development of control algorithms using a visual feedback loop through the link with a virtual reality environment instead of physical experimental setups.
Enabling Collaborative Environments
Simulink 3D Animation lets you view and interact with simulated virtual worlds on one machine that is running Simulink or on networked computers that are connected locally or via the Internet. In a collaborative work environment, you can view an animated virtual world on multiple client machines connected to a host server through TCP/IP protocol. When you work in an individual (non-networked) environment, your modeled system and the 3D visualization run on the same host.
Simulink 3D Animation contains functionality to visualize real-time simulations and connect with input hardware. You can use C code generated from Simulink models using Simulink Coder™ to drive animations. This approach enhances your hardware-in-the-loop simulations or rapid prototyping applications on Simulink Real-Time™ and Simulink Desktop Real-Time™ by providing a visual animation of your dynamic system model as it connects with real-time hardware.
Strings
VR Sink and VR Source blocks support string data types
PROTO editing
Work with PROTO definitions directly in the 3D World Editor
Mouse wheel navigation
Move the camera viewpoint in the 3D world using the mouse wheel
FBX file Import
Load FBX files as nodes in virtual reality worlds
Coordinate Transformation utilities
Convert between VR World and MATLAB coordinates
See release notes for details on any of these features and corresponding functions.