| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink 3D Animation |
| Contents | Index |
| Learn more about Simulink 3D Animation |
| On this page… |
|---|
Simulink 3D Animation Preferences |
The topics in this section describe how to set the Simulink 3D Animation preferences using the MATLAB File > Preferences dialog. The list of settable preferences is a subset of those available through the MATLAB interface functions.
The Simulink 3D Animation software installs with default preference settings. You can change these settings with
MATLAB File > Preferences dialog — This GUI has preference dialogs for the MATLAB product and its related products, including the Simulink 3D Animation product.
Simulink 3D Animation MATLAB interface functions
Virtual figures — vrfigure/set and vrfigure/get functions
Virtual worlds — vrworld/set and vrworld/get functions
To access the Simulink 3D Animation preferences GUI:
In the left pane of the Preferences dialog box, select Virtual Reality.
The Virtual Reality Preferences dialog appears in the right pane.

Set the preferences as desired. See the following table for the preferences you can change. Click OK to save the settings.
| Preference | Value | Description |
|---|---|---|
Bool | 'logical' | 'char' Default: 'logical' | Specifies the handling of the VRML Bool data type for vrnode/setfield and vrnode/getfield. If set to 'logical', the VRML Bool data type is returned as a logical value. If set to 'char', the Bool data type is returned 'on' or 'off'. |
Default VRML Viewer | 'internal' | 'internalv4' | 'internalv5' |'web' Default: 'internal' | Specifies which viewer is used to view a virtual scene. The default Simulink 3D Animation viewer is used when the preference is set to 'internal' or 'internalv5'. The legacy viewer is used when this preference is set to 'internalv4'. The Web browser is used when this preference is set to 'web'. |
Float | 'single' | 'double' Default: 'double' | Specifies the handling of the VRML float data type for vrnode/setfield and vrnode/getfield. If set to 'single', the VRML Float and Color data types are returned as 'single'. If set to 'double', the Float and Color data types are returned as 'double'. |
Int32 | 'int32' | 'double' Default: 'double' | Specifies handling of the VRML Int32 data type for vrnode/setfield and vrnode/getfield. If set to 'int32', the VRML Int32 data type is returned as int32. If set to 'double', the Int32 data type is returned as 'double'. |
HTTP Port | Numeric Default: 8123 | IP port number used to access the Simulink 3D Animation server over the Web via HTTP. If you change this preference, you must restart the MATLAB software before the change takes effect. |
Transport Buffer | Numeric Default: 5 | Length of the transport buffer (network packet overlay) for communication between the Simulink 3D Animation server and its clients. |
Transport Timeout | Numeric Default: 20 | Amount of time, in seconds, the Simulink 3D Animation server waits for a reply from the client. If there is no response from the client, the Simulink 3D Animation server disconnects from the client. |
VRML Editor command line | String | Path to the VRML editor. If this path is empty, the MATLAB editor is used. |
VR Port | Numeric Default: 8124 | IP port used for communication between the Simulink 3D Animation server and its clients. If you change this preference, you must restart the MATLAB software before the change takes effect. |
The Simulink 3D Animation figure has a number of preferences, presented in the following categories:
To access the virtual figure appearance preferences:
From the MATLAB software desktop, select File > Preferences.
In the left pane of the Preferences dialog box, select Virtual Reality.
In the left pane under Virtual Reality, select Figure.
The Virtual Reality Figure Preferences dialog appears in the right pane, with the Appearance tab selected.

Set the preferences as desired. See the following table for the appearance preferences you can change. Click OK to save the settings.
| Property | Value | Description |
|---|---|---|
Navigation panel | 'opaque' | 'translucent' | 'none' | 'halfbar' | 'bar' Default: 'halfbar' | Controls the appearance of the navigation panel in the Simulink 3D Animation viewer. |
Navigation zones | 'off' | 'on' Default: 'off' | Toggles navigation zones on/off. |
Position | Vector of four doubles | Specifies the screen coordinates of this vrfigure object. |
Status bar | 'off' | 'on' Default: 'on' | Toggles the status bar at the bottom of the Simulink 3D Animation viewer. |
Toolbar | 'off' | 'on' Default: 'on' | Toggles the toolbar on the Simulink 3D Animation viewer. |
To access the virtual figure rendering preferences:
In the left pane of the Preferences dialog box, select Virtual Reality.
In the left pane under Virtual Reality, select Figure.
The Virtual Reality Figure Preferences dialog appears in the right pane.
The Virtual Reality Figure Preferences dialog appears in the right pane, with the Rendering tab selected.

Set the preferences as desired. See the following table for the rendering preferences you can change. Click OK to save the settings.
| Property | Value | Description |
|---|---|---|
Antialiasing | 'off' | 'on' Default: 'off' | Determines whether antialiasing is used when rendering scene. Antialiasing smooths textures by interpolating values between texture points. |
Lighting | 'off' | 'on' Default: 'on' | Specifies whether the lighting is taken into account when rendering. If it is off, all the objects are drawn as if uniformly lit. |
Maximum texture size | 'auto' | 32 <= x <= video card limit, where x is a power of 2 (video card limit is typically 1024 or 2048) | Sets the maximum pixel size of a texture used in rendering vrfigure objects. The smaller the size, the faster the texture can render. Increasing this value improves image quality but decreases performance. A value of 'auto' sets the maximum possible pixel size. If the value you enter is unsuitable, a warning might trigger. The software then automatically adjusts the property to the next smaller suitable value. |
Textures | 'off' | 'on' Default: 'on' | Turns texture rendering on or off. |
Transparency | 'off' | 'on' Default: 'on' | Specifies whether or not transparency information is taken into account when rendering. |
Wireframe | 'off' | 'on' Default: 'off' | Specifies whether objects are drawn as solids or wireframes. |
To access the virtual figure 2-D recording preferences:
In the left pane of the Preferences dialog box, select Virtual Reality.
In the left pane under Virtual Reality, select Figure.
The Virtual Reality Figure Preferences dialog appears in the right pane.
The Virtual Reality Figure Preferences dialog appears in the right pane, with the 2-D Recording tab selected.

Set the preferences as desired. See the following table for the rendering preferences you can change. Click OK to save the settings.
| Property | Value | Description |
|---|---|---|
| 2-D animated file name | String. Default: '%f_anim_%n.avi' | Specifies the 2-D offline animation filename. The string can contain tokens that are replaced by the corresponding information when the animation recording takes place. For further details, see Animation Recording File Tokens. |
| Recording compression method | '' | 'auto' | 'lossless' | 'codec_code' Default: 'auto' | Specifies the compression method for creating 2-D animation files. The codec code must be registered in the system. See the MATLAB function documentation for avifile. Read/write. |
To access the virtual figure frame capture preferences:
In the left pane of the Preferences dialog box, select Virtual Reality.
In the left pane under Virtual Reality, select Figure.
The Virtual Reality Figure Preferences dialog appears in the right pane.
The Virtual Reality Figure Preferences dialog appears in the right pane, with the Frame Capture tab selected.

Set the preferences as desired. See the following table for the rendering preferences you can change. Click OK to save the settings.
| Property | Value | Description |
|---|---|---|
| CaptureFileFormat | 'tif' | 'png' Default: 'tif' | Specifies file format for a captured frame file. Read/write. |
| CaptureFileName | String. Default: '%f_anim_%n.ext' | Specifies the frame capture filename. The string can contain tokens that are replaced by the corresponding information when the animation recording takes place. For further details, see Frame Capture and Animation Recording File Tokens. Read/write. |
To access the virtual world preferences:
In the left pane of the Preferences dialog box, select Virtual Reality.
In the left pane under Virtual Reality, select World.
The Virtual Reality World Preferences dialog appears in the right pane.

Set the preferences as desired. See the following table for the rendering preferences you can change. Click OK to save the settings.
| Property | Value | Description |
|---|---|---|
| Allowing viewing from the Internet | 'off' | 'on' Default: 'off' | Remote access flag. If the virtual world is enabled for remote viewing, it is set to 'on'; otherwise, it is set to 'off'. |
| 3-D animated file name | String. Default: '%f_anim_%n.wrl' | 3-D animation filename. The string can contain tokens that are replaced by the corresponding information when the animation recording takes place. For details, see Animation Recording File Tokens. |
| Recording mode | 'manual' | 'scheduled' Default: 'manual' | Animation recording mode. |
| Recording interval | Vector of two doubles Default: [0 0] | Start and stop times for scheduled animation recording. Corresponds to the virtual world object Time property. |
| Time source | 'external' | 'freerun' Default: 'external' | Source of the time for the virtual world. If set to 'external', time in the scene is controlled from the MATLAB software (by setting the Time property) or the Simulink software (simulation time). If set to 'freerun', time in the scene advances independently based on the system timer. |
![]() | Installing the VRML Editor on the Host Computer | Removing Components (Windows) | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |