Set Simulink 3D Animation Preferences
The Simulink® 3D Animation™ software opens with default preference settings. You can change these settings so that the next time you open a Simulink 3D Animation interface, such as the 3D World Editor, the associated preferences take effect. Use one of these approaches:
From the MATLAB® Toolstrip, in the Home tab, in the Environment section, select Preferences > Simulink 3D Animation.
At the MATLAB command line, use these functions:
For general Simulink 3D Animation preferences —
vrsetpref
andvrgetpref
functionsFor virtual world preferences —
vrworld/set
andvrworld/edit
functions
Tip
The preferences dialog box shows a subset of the preferences that you can set using MATLAB functions.
Simulink 3D Animation Preferences Dialog Box
The top dialog box is for general Simulink 3D Animation preferences.
Preference | Value | Description |
---|---|---|
Default Viewer |
Default: | Specifies which viewer is used to view a virtual world. The
default Simulink
3D Animation Viewer is used when the preference is set to
|
Default Editor |
| Specifies which virtual world editor to use. Path to the virtual world editor. If this path is empty, the MATLAB editor is used. If you set the
The path setting is active only if you
select the |
Bool |
Default:
| Specifies the handling of the virtual world
|
Int32 |
Default:
| Specifies handling of the virtual world
|
Float |
Default:
| Specifies the handling of the virtual world
|
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, restart the MATLAB software before the change takes effect. |
VR Port | Numeric Default: 8124 | IP port used for communication between the Simulink 3D Animation server and its clients. If you change this preference, 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, that 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. |
3D World Editor Preferences Dialog Box
The Simulink 3D Animation preferences include the following preferences for the 3D World Editor.
Property | Value | Description |
---|---|---|
Position | Specify the pixel location for the lower-left corner, the
width, and the height (for example, Default: Depends on current screen resolution | Specifies the default location for the 3D World Editor. If you select Save position on exit, the default position changes to the position of the 3D World Editor used when you last exited it. |
Triad |
Default:
| Specifies where in the virtual world display pane to locate a triad of coordinate axes. |
View pane mouse behavior |
Default:
| Specifies whether the mouse in the view pane is in navigation mode or selection mode (for highlighting corresponding nodes in the tree view pane). |
Save position on exit |
Default:
| Causes the 3D World Editor to open in the same location where the editor was when you last exited it. |
Preserve Layout per Virtual Reality 3D File |
Default:
| Specifies whether the 3D World Editor starts up either with the default virtual world display layout or with the layout as it was when you exited it previously. The saved layout includes settings for the view, viewpoints, navigation, and rendering. Simulink 3D Animation saves the layout in a separate virtual world 3D file for up to eight files. |
Highlight selected objects |
Default:
| Specifies whether to highlight virtual world objects selected in the view pane. |
Canvas Preferences Dialog Box
The Simulink 3D Animation preferences include a Navigation panel preference. The canvas preferences apply to the 3D World Editor, Simulink 3D Animation Viewer, and Simulink 3D Animation Web Viewer.
Property | Value | Description |
---|---|---|
Navigation panel |
Default:
| Controls the appearance of the navigation panel in the canvas. |
Figure Appearance Preferences Dialog Box
The figure appearance preferences apply to the 3D World Editor and Simulink 3D Animation Viewer. Some of these preferences also apply to Simulink 3D Animation Web Viewer.
Property | Value | Description |
---|---|---|
Toolbar |
Default:
| Specifies whether the toolbar is displayed. |
Tooltips |
Default:
| Specifies whether tooltips are displayed. |
Status bar |
Default:
| Specifies whether status bar is displayed. Also applies to the Simulink 3D Animation Web Viewer. |
Navigation zones |
Default:
| Specifies whether navigation zones are displayed. Also applies to the Simulink 3D Animation Web Viewer. |
Navigation panel |
Default:
| Controls the appearance of the navigation panel in the canvas. |
Triad |
Default:
| Specifies where in the virtual world display pane to locate a triad of coordinate axes. |
Position | Matrix with upper-right and lower-left corner position. Default: | Specifies the default location of the figure window. |
Figure Rendering Preferences Dialog Box
The figure rendering preferences specify how virtual worlds are displayed.
Property | Value | Description |
---|---|---|
Antialiasing |
Default:
| Determines whether antialiasing is used when rendering scene. Antialiasing smooths textures by interpolating values between texture points. |
Lighting |
Default:
| Specifies whether the lighting is considered when rendering. If it is off, all the objects are drawn as if uniformly lit. |
Sound |
Default:
| If a virtual world contains a |
Stereo 3D |
Default:
| Specifies whether to use stereoscopic 3-D vision. For anaglyph viewing, use red/cyan 3-D 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. For active stereo viewing, use active shutter 3-D glasses. This approach preserves color effects and produces more powerful 3-D effects. Active stereo requires a specially configured computer and monitor setup. |
Stereo 3D Camera Offset | Numeric Default:
| Specifies the distance between the two points of view (cameras) that produce the 3-D effect. The higher the offset, the further apart the cameras are, and thus the deeper the 3-D effect. |
Stereo 3D Horizontal Image Translation | Numeric value from 0 through 1, inclusive. The larger the value, the further back the background appears to be. Default: | The horizontal relationship of the two stereo images. By default, the background image is at zero and the foreground image appears to pop out from the monitor toward the person viewing the virtual world. |
Transparency |
Default:
| Specifies whether transparency information is considered when rendering. |
Wireframe |
Default:
| Specifies whether objects are drawn as solids or wireframes. |
Textures |
Default:
| Turns texture rendering on or off. |
Maximum texture size |
| Sets the maximum pixel size of a texture used in rendering
|
Figure 2-D Recording Preferences Dialog Box
Property | Value | Description |
---|---|---|
2-D animated file name | Character vector Default:
| Specifies the 2-D offline animation file name. The name can contain tokens that are replaced by the corresponding information when the animation recording takes place. For further details, see File Name Tokens. |
Recording compression method |
Default:
| Specifies the compression method for creating 2-D animation
files. The codec code must be registered in the system. See the
MATLAB documentation for
|
Recording compression quality | Integer 0–100. Default:
| Specifies the default quality of 2-D animation file
compression for new |
Frames per second | Numeric Default:
| Specifies the default frames per second playback speed. |
Figure Frame Capture Preferences
Property | Value | Description |
---|---|---|
CaptureFileFormat |
Default:
| Specifies file format for a captured frame file. |
CaptureFileName | Character vector Default:
| Specifies the frame capture file name. The name can contain tokens that are replaced by the corresponding information when the animation recording takes place. For further details, see Define File Name Tokens. |
World Preferences Dialog Box
Property | Value | Description |
---|---|---|
3-D animated file name | character vector Default:
| 3-D animation file name. The name can contain tokens that are replaced by the corresponding information when the animation recording takes place. For details, see Define File Name Tokens. |
Recording mode |
Default:
| Animation recording mode. |
Recording interval | Vector of two doubles Default: | Start and stop times for scheduled animation recording.
Corresponds to the virtual world object |
Time source |
Default:
| Source of the time for the virtual world. If set to
|
Allowing viewing from the Internet |
Default:
| Remote access flag. If the virtual world is enabled for
remote viewing, it is set to |
Create or update world thumbnail file when world is opened |
Default:
| Specify whether create world thumbnails when you open a virtual world. |