The following Simulink® 3D Animation™ components now support listening to sound in virtual worlds:
Simulink 3D Animation Viewer
3D Animation Player
vr.canvas on a figure window
To add sound to a virtual world, use a VRML Sound node. See Add Sound to a Virtual World.
To listen to sound for a virtual world, use a computer that supports sound. For details, see Listen to Sound in a Virtual World.
The Orbisnap standalone viewer shipped with Simulink 3D Animation also supports sound.
Stereoscopic vision support allows you to view a virtual world using 3D effects, so that elements in the virtual world appear to come forward or back from the plane of the monitor. You can use either of these stereoscopic vision approaches:
Anagylph — Use red/cyan 3D glasses. Viewing a virtual world in this mode causes the colors to appear as almost grayscale. This approach does not require any special computer hardware or software.
Active stereo — Use active shutter 3D glasses. This approach preserves color effects and produces more powerful 3D effects. Active stereo requires a specially configured computer and monitor setup.
The following Simulink 3D Animation components now support stereoscopic vision:
3D World Editor
Simulink 3D Animation Viewer
3D Animation Player
vr.canvas on a figure window
For details, see View a Virtual World in Stereoscopic Vision.
The Orbisnap standalone viewer shipped with Simulink 3D Animation also supports stereoscopic vision.
The interface of the Orbisnap standalone viewer shipped with Simulink 3D Animation has an improved look and feel.
For more information, see Orbisnap Standalone Viewer.
You can now use the vrfigure constructor with name-value pairs to set property values. For example:
fig = vrfigure(vrlights,'Antialiasing','on')
For a list of properties that you can set, see the documentation for vrfigure.get.
Screen captures of a virtual world in the Simulink 3D Animation Viewer omit the navigation panel, resulting in a cleaner image.
You can use the 3D World Editor to import STL and Physical Modeling XML files directly into a VRML scene. STL and Physical Modeling XML files usually originate from CAD models. You can integrate content from those files into a virtual world, converting the structure into VRML.
To import an STL or Physical Modeling XML file, in the 3D World Editor, right-click the Root or an MFNode node and from the Import From menu item, select either STL File or Physical Modeling XML File. For details, see Import STL and Physical Modeling XML Files Directly into a VRML Virtual World.
For a node that is, or includes, an IndexedFaceSet node, you can improve rendering speed by reducing the number of polygons in the IndexedFaceSet. Choose the polygon reduction factor that produces your desired balance of rendering performance and quality.
For details, see Reduce Number of Polygons for Shapes.
AVI file playback speed now corresponds to the original Simulink model simulation time. For details, see Record Files in the Audio Video Interleave (AVI) Format.
The vrfigure Record2DFPS property has a new default value of auto, to support this improved timing. Previously, the default was 15.
Use the Simulink 3D Animation Web Viewer to access virtual worlds with an HTML5-enabled Web browser. You can open a virtual world in Simulink 3D Animation on a host computer and then view it remotely in a Web browser on another computer. You do not need to install Simulink 3D Animation on the remote computer.
The Web Viewer supplements the Simulink 3D Animation Viewer. It also supplements the VRML plug-in Blaxxun Contact viewer and the Orbisnap viewer, which come with Simulink 3D Animation. Some benefits of the Web Viewer include:
Multiplatform remote viewing of Simulink 3D Animation virtual worlds
Support for HTML5-enabled browsers on Microsoft® Windows®, Macintosh, and Linux® platforms
No additional software installation required on client computers
Access to HTML5 browser features for creating customized pages with virtual reality visualization
For details, see Simulink 3D Animation Web Viewer.
You can set a pivot point interactively when you are in Examine mode in the 3D World Editor, Simulink 3D Animation Viewer, and the Simulink 3D Animation Web Viewer. You can use a pivot point for rotating a virtual world around, using a mouse.
For details, see Pivot Point.
You can view the virtual world in one pane, two horizontal panes, two vertical panes, or four panes. You can control the navigation of each pane independently. For example, you can set viewpoints, manipulate the triad, and specify some rendering techniques differently for each pane.
For example, you can select View Pane > Grid View and set viewing options independently:
For more information, see View Panes.
The navigation panel is blue in the active 3D World Editor view pane, Simulink 3D Animation viewer, and vrplay animation viewer and is gray in the inactive view panes or viewers.
You can minimize the navigation panel. Select View > Navigation Panel > Minimized. The minimized navigation panel appears as an icon in the lower right corner of the viewer. For more information, see Minimize the Navigation Panel.
Before R2013a, the red X control on the left side of the navigation panel was a toggle button to hide or display the navigation panel. Starting in R2013a, the red X control minimizes the navigation panel.
To hide the navigation panel, select View > Navigation Panel > None.
You can open VRML file (.wrl) in the 3D World Editor from the MATLAB Current Folder panel using the context menu.
You can specify whether the 3D World Editor starts up with the default layout of a virtual world or opens with the layout as it appeared when you exited the virtual world previously. The layout includes settings for the view, viewpoints, navigation, and rendering.
By default, virtual worlds open with the layout that was saved at exit. To have virtual worlds open using the default layout, clear the Preferences > Simulink 3D Animation > Editor > Preserve Layout per VRML File preference.
You can expand subtrees for a 3D World Editor VRML node by using the Expand Subtree context menu item.
When you open the 3D World Editor using a File menu item, if the existing editor window has a file open, then a separate instance of the editor opens. Having multiple instances of the 3D World Editor enables you to work on multiple virtual worlds at the same time and to copy and paste from one virtual world to another.
Before R2013a, if you already had the 3D World Editor open, then when you opened another virtual world, it replaced the initial virtual world.
Support for the Blaxxun Contact viewer will be removed in a future release. Consider using one of the other VRML viewers described in VRML Viewers.
The MATLAB Editor displays VRML syntax highlighting for .wrl files. For details, see VRML Syntax Highlighting in the MATLAB Editor.
You can use the Joystick Input block and the joystick objects (vrjoystick) on all supported platforms, including Mac OS platforms.
In the 3D World Editor, on the tree structure pane, you can select multiple nodes to:
Delete the nodes.
Wrap the nodes as children of another node.
In the edit panel for SFColor and MFColor nodes, you can interactively select the color using the palette of colors, as an alternative to specifying the RGB values explicitly.
When you enter a numeric field value in the 3D World Editor, you can use MATLAB expressions and MATLAB variables. For example, to convert an angle from degrees to radians, enter a MATLAB expression such as 25*pi/180.
The Components library includes some additional grids for more control of granularity.
You can use the new vredit function to open a virtual world in the 3D World Editor.
You can open the 3D World Editor or the Simulink 3D Animation animation player by using MATLAB Toolstrip buttons.
From the MATLAB Toolstrip, in the Apps tab, click the down arrow on the right side of the tab. Scroll down to the Simulation Graphics and Reporting area and click either the 3D World Editor or the 3D Animation Player button.
The VR Tracer block supports specification of a projection plane and projection point for better visualization of an object's trajectory. In the VR Tracer block parameters dialog box, you can access these enhancements with the new Marker Projections tab.
R2012a includes the following 3D World Editor enhancements:
Full editing of VRML PROTO and EXTERNPROTO definitions.
You can specify coordinate plane grid templates, which provide orientation information to improve navigation of a virtual world. To specify a grid template, select File > New From Template > Grid.
In previous releases, the stl2vrml function accepted only meters as the unit for the SimMechanics™ model to be converted to VRML. In R2012a, the SimMechanics model can include additional units, including a mixture of units.
Virtual world AVI animation recording now uses the MATLAB VideoWriter technology. The VideoWriter technology supports:
Creating animation recording files that exceed 2 GB
Platform-independent Motion JPEG compression
The new "Manipulator Moving a Load with Use of Global Coordinates" example (vrmanipul_globalvrmanipul_global) illustrates the use of global coordinates in Simulink 3D Animation models. You can use global coordinates in a model in many ways, including:
Object tracking and manipulation
Simple collision detection
Simulation of haptic effects
The VR Source block provides access to values from virtual world fields that you specify in the Block Parameters dialog box as inputs during simulation. This functionality supports activities such as using the VR Source block to register user interactions with the virtual world. You can pass to the model those values that can affect the simulation of a model.
To help you visualize changes in the orientation (coordinate axes) of nodes in a virtual world, the 3D World Editor virtual world display pane includes a triad of red, green, and blue arrows. These arrows are always parallel with global x, y, and z coordinate axes. The triad displays changes in orientation as you navigate in a virtual world.
Also, you can add a triad to the Simulink 3D Animation Viewer.
For details about using the triad in the 3D World Editor, see Coordinate Axes Triad.
For details about using the triad in the Simulink 3D Animation Viewer, see Display a Coordinate Axes Triad.
The Simulink 3D Animation viewer navigation panel now includes a full-screen mode toggle button ( ) to facilitate moving in and out of full-screen display mode.
You can also enable full-screen mode using the new View > Fullscreen Mode menu option.
When you read the positions and rotations of vrnode types such as Transform and Viewpoint, you can now use global coordinates. Global coordinates are very useful, for example, when you are tracking a robot end-effector using tracers that you create independently from the VRML hierarchy of the robot. For details, see the documentation for the vrnode function.
The 3D World Editor includes template VRML files that you can use as a starting point for creating virtual reality worlds. Some examples of templates are the Earth, roads, sea, and terrains virtual world templates. For details, see Template VRML Files.
In the Tree structure pane, you can add or paste nodes at the beginning or end of the node list, as well as at the end of a node. See Adding Objects and Copying and Pasting a Node for more information.
You can copy nodes between VRML files. For details, see Copying and Pasting Between Virtual Worlds.
The Components library now includes sensing objects. Some examples of sensing objects are:
2D setpoint area
For information, see Add VRML Sensors to Virtual Worlds.
The 3D World Editor includes enhancements to make VRML script editing easier. You can:
Add script interface elements by right-clicking a Script node.
Edit URL code in an edit box.
For more information, see Editing VRML Scripts.
You can now specify a default viewpoint at the command line, using the vrview function with a pound sign (#), followed by the name of a viewpoint. For example:
The new vrcrane_panel example uses an operator control panel to set the setpoint. The setpoint is the desired position of the load. The example uses the VR Source block.
The example previously named vrbuttons is now vrdemo_panel. The vrdemo_panel example uses sensing objects that are now available in the 3D World Editor Components library. You can place the example control panel in your virtual worlds. You can control a simulation or visualize certain virtual world properties by using signals from virtual world sensors in a simulation model.
The 3D World Editor library includes geometric objects, such as a Sphere object. Access the geometric objects from the Nodes > Insert From > Components Library > Shapes menu.
The 3D World Editor library also includes background objects, such as a two-tone blue background object. Access the background objects from the Nodes > Insert From > Components Library > Backgrounds menu.
You can switch between multiple Bindable nodes of the same type (Background, Fog, NavigationInfo or Viewpoint nodes) in the 3D Work Editor. By default, the first node of multiple instances of a Bindable node is active.
For Background, Fog, and NavigationInfo nodes, right-click the node that you want to make active and select the Bind menu item.
As you could in releases prior to R2011a, to make an instance of a Viewpoint node active, right-click the node that you want to be active and select the Go to viewpoint menu item.
You can open the 3D World Editor using the MATLAB Start button. Select Simulink > Simulink 3D Animation > 3D World Editor.
The Simulink 3D Animation Preferences pane includes the following two options for specifying the startup position of the 3D World Editor:
To specify the default location for the 3D World Editor, select 3D World Editor > Position, and specify the pixel location for the upper-left and the lower-right corners (for example, [96 120 862 960]).
To have the 3D World Editor open in the same location where the editor was last exited, select 3D World Editor > Save position on exit.
To simplify the tree view in the 3D World Editor, you can hide default VRML values. To hide default values, select the Tree > Hide Default Values menu item. To return to viewing default values, clear the Hide Default Values option.
Node fields appear at the top of the list of nodes in the tree structure pane of the 3D World Editor.
In the R2010b version of the 3D World Editor, node children appeared before the node's own fields. However, virtual worlds created in R2010b do not require any changes to work in R2011a.
You can use the current camera position to interactively specify a viewpoint in the 3D World Editor. Right-click a Viewpoint node in the tree structure pane and select the Copy values from current camera option.
Navigate to a position in the scene that you want.
In the tree structure pane, right-click a Viewpoint node .
Select Copy values from current camera.
Simulink 3D Animation renders textures more quickly than previously. The performance improvement is especially noticeable for 64-bit Windows platforms.
R2011a includes the following new examples:
Illustrates the capability of the VR Sink block to process a video stream on input. The example also creates the impression of a live reflection.
Illustrates multiple-object scenario visualizations.
R2010b introduces the 3D World Editor, which is a built-in VRML editor that works on all platforms supported for the Simulink 3D Animation product.
You can use the 3D World Editor instead of, or in addition to, the V-Realm Builder editor (which also is included with the Simulink 3D Animation product) or with another VRML virtual world editor.
The 3D World Editor includes three panes:
Tree structure pane, which shows the hierarchy for the virtual world you are editing
Virtual scene display pane, which reflects your edits
Edit pane, where you can change values for node items
For details about using the new editor, see Using the 3D World Editor.
When you install R2010b in a different location from where any previous MATLAB releases are installed, the 3D World Editor is the default editor. If you are upgrading from a previous release, then you need to change your preferences, please read this section.
The VRML Editor command line preference in R2010b is now *BUILTIN.
Also, in R2010b the Antialiasing preference check box is enabled. To access the Antialiasing preference,
If you are upgrading from a previous release to R2010b, we recommend that you reset your preferences. You can use one of these approaches:
Reset all your preferences to match the default preference settings for R2010b.
Explicitly reset the VRML Editor command line and Antialiasing preferences.
To reset your preferences to the R2010b default settings, at the MATLAB command line, enter:
To set the individual preferences explicitly:
In MATLAB, select File > Preferences > Simulink 3D Animation
In the Simulink 3D Animation Preferences dialog box, set the VRML Editor command line preference to *BUILTIN.
In the Simulink 3D Animation preferences tree view, select the Figure node and then open the Rendering tab.
Clear the Antialiasing check box.
You can use the new stl2vrml function to convert STL files to VRML format.
The vrnode/getfield function now provides access to the SFNode and MFNode field values. This access improves virtual scene node management. It enables you to access the entire virtual world structure and get the properties of all nodes present in the scene, including unnamed nodes. This capability is most useful for advanced scene manipulations. For example, adding nodes to unnamed nodes or setting properties for these nodes. See VRML Field Data Types in the Simulink 3D Animation User's Guide.
In previous releases, this capability was available only for nodes named using the DEF keyword.
The Camera Bound to Viewpoint shortcut is now Ctrl+F10. In previous releases, this shortcut was F10.
You can now select None for the Navigation > Method context menu. This option disables mouse navigation in the virtual scene viewer. The Shift+N keyboard command provides this option.
The vrphysmod function has been enhanced to automatically link multiple SimMechanics models imported through SimMechanics Link to a single virtual scene that contains these components. This means that if your model contains several VR Sink blocks that refer to the same VRML file, this function attempts to consolidate the animation signals of that virtual scene into one VR Sink block.
The VR Sink block now supports setting node eventIn events that do not have any field or exposeField associated with them. This improves the ability to control virtual scene, in particular using scripts and interpolators. For example, you can now define an object trajectory using a VRML PositionInterpolator. During simulation, you can define the current position of the object on the trajectory by setting the set_fraction eventIn event of that interpolator.
The vrmorph example has been updated to reflect support for Simulink variable-size signals.
The Capturing and Recording Parameters and Create new viewpoint dialog boxes are no longer modal dialog boxes. This means that you can access other windows while these dialog boxes are active. For example, you can now change recording parameters or create viewpoints while a simulation is running.
The alternate mode of virtual scene viewer introduced in Version 5.0 (R2009a) is now the default viewer for all supported platforms (except for Linux platforms). Using vrsetpref to set the DefaultViewer property to 'internal' enables this version of the virtual scene viewer.
To reactivate the legacy (former) viewer, use vrsetpref to set the DefaultViewer property to 'internalv4'.
Note: If you are running the Simulink 3D Animation software on a Linux platform, the default viewer continues to be the legacy viewer. The legacy viewer does not support MATLAB figures. If you have a Linux platform and want to access the MATLAB figure capability for the viewer, install the hardware-accelerated OpenGL® rendering engine first. Otherwise, the Simulink 3D Animation software cannot properly display the viewer window. You can then activate the new viewer by typing vrsetpref('DefaultViewer','internalv5') in the MATLAB Command Window.
The alternate mode of virtual scene viewer introduced in Version 5.0 (R2009a) is now the default viewer for all supported platforms (except for Linux platforms). At a minimum, this viewer provides the same functionality as the legacy viewer.
The Simulink 3D Animation software now supports the 64-bit Intel® Macintosh platform.
The MATLAB Current Folder browser now supports .wrl files. This support enables you to perform standard MATLAB file operations on the .wrl file in the Current Folder browser. For example, double-clicking a .wrl file in the Current Folder browser now starts the Simulink 3D Animation viewer for that .wrl file. In previous releases, double-clicking a .wrl file in the current folder browser started the MATLAB editor for that file.
Alternate mode of virtual scene viewer integrated with MATLAB figures, enables you to combine the following in the same figure:
Virtual scenes and Handle Graphics® objects
Multiple views of a virtual world
Views of different virtual worlds
This feature also allows for the docking of these figure windows, each of which can contain different worlds, into split screen MATLAB figure windows.
The vrplay function now contains virtual scene and player controls in a single MATLAB figure window.
The Simulink 3D Animation product has the following new functions:
Processes VRML files created by CAD tools for use with Simulink 3D Animation environment. In previous releases, you manually processed these files before using them in the Simulink 3D Animation environment.
Automatically adds a Simulink 3D Animation scene to SimMechanics models created from CAD tools. In previous releases, you manually processed these files before using them in the Simulink 3D Animation environment.
This release provides a new object, vr.canvas. This object allows for the placement of a virtual scene view into a MATLAB figure, with full control of its position and ability to be combined with other Handle Graphics objects into one GUI.
The associated virtual scene now opens automatically when you open the model. This behavior occurs even if the Simulink 3D Animation block associated with the virtual scene is in a subsystem of the model. In previous releases, the ability to automatically open virtual scenes did not work for VR Sink blocks in subsystems.
The Simulink 3D Animation files have moved from matlabroot\toolbox\vr to matlabroot\toolbox\sl3d.
Use the new SimState feature to save the complete simulation state. Unlike the final states stored in earlier versions of Simulink, the SimState contains the complete simulation state of the model (including block states that are logged). You can then restore the state at a later time and continue simulation from the exact instant at which you stopped the simulation. See Saving and Restoring the Simulation State as the SimState in the Simulink User's Guide.
New VR Tracer block enables visualization of trajectories in virtual scenes.
The vrnode method now reflects support for the VRML USE reference.
The Virtual Reality Toolbox™ product now supports matrix-type data input for the VR Sink block. Previously, only the MATLAB interface supported matrices (MFxx fields). The Simulink interface supported only vectors (SFxx fields). Now, both MATLAB and Simulink interfaces support matrices (MFxx fields).
The vrworld object has a new option, new. This option enables the creation of a new virtual world object, even if another vrworld object associated with the same VRML file already exists.
The vrplay function shortcut keys have changed as follows:
The Page Up and Page Down keys have the same functionality as the R (rewind) and F (forward) shortcut keys, respectively. These keys perform rewind and forward operations on the animation file you are playing.
The p shortcut key toggles between play and pause behavior.
New VR To Video block allows RGB video stream output for further 2D video processing.
Joystick and space mouse input support is added for both 32-bit and 64-bit Linux operating systems.
New axes transformation and math functions are added to the MATLAB toolbox interface. These are:
vrdir2ori to convert viewpoint direction to orientation.
vrori2dir to convert viewpoint orientation to direction.
vrrotmat2vec to convert rotation from matrix to axis-angle representation.
vrrotvec to calculate a rotation between two vectors.
vrrotvec2mat to convert rotation from axis-angle to matrix representation.
The Magellan Space Mouse block is renamed to Space Mouse Input.
The VR Text Output block allows Simulink signal values to be displayed as text in VRML scenes.
It is now possible to specify the frames per second displayed during the playback of AVI files.
SpacePilot and SpaceBall 5000 have been added to the list of devices supported by Magellan Space Mouse block.
The Joystick Input block joystick yaw and throttle controls have switched behaviors.
A new library Utilities is added to the Virtual Reality Toolbox block library vrlib. This library contains the blocks Rotation Matrix to VRML Rotation, Viewpoint Direction to VRML Orientation, Rotation between 2 Vectors, Normalize Vector, and Cross Product. See Block Reference for details.
The Virtual Reality Toolbox product now supports the MATLAB Compiler™ product. With this capability, you can use the MATLAB Compiler software to take MATLAB files as input and generate redistributable, stand-alone applications that include Virtual Reality Toolbox functionality, including the Virtual Reality Toolbox viewer. The Virtual Reality Toolbox product does not support the MATLAB Compiler product for the HP-UX platform.
The following changes were made to the viewer:
The Virtual Reality Toolbox viewer Recording menu has changed to support frame captures in addition to animation recording.
The Virtual Reality Toolbox toolbar now has a camera icon that you can click to capture a frame of the current virtual scene.
The Virtual Reality Toolbox preferences dialog, available through the MATLAB desktop File -> Preferences dialog, has been updated as follows:
The Virtual Reality Figure pane is now organized by tabs.
The Virtual Reality Toolbox preferences dialog now provides frame capture preferences. These are available through the Frame Capture tab of the Virtual Reality Figure pane.
The vrfigure set and get functions now include the following properties to support frame capturing:
The Magellan Space Mouse block now allows you to specify upper and lower position coordinate limits for the mouse. The following parameters were added:
Limit position — Determines whether you can limit the upper and lower positions of the mouse.
Lower position limit — Position coordinates for the lower limit of the mouse.
Upper position limit — Position coordinates for the upper limit of the mouse.
The Virtual Reality Toolbox product now includes Orbisnap. This is a free, optional, and multiplatform stand-alone VRML viewer that does not require you to have either MATLAB or Virtual Reality Toolbox products. You can use Orbisnap to
View prerecorded WRL animation files
Remotely view, from a client machine, a virtual world loaded in a current session of the Virtual Reality Toolbox software
View and navigate, but not simulate, a VRML world or scene
|Release||Features or Changes with Compatibility Considerations|
|R2014a||Improved Timing of 2D Animation Recording|
|R2013a||Current-view indication and navigation-panel minimization in 3D World Editor, Simulink 3D Animation viewer, and vrplay animation viewer|
|R2010b||3D World Editor|
|R2009b||Alternate Mode of Virtual Scene Viewer Now Default|
|R2006b||Joystick Input Block|