Skip to Main Content Skip to Search
Product Documentation

Set Simulink 3D Animation Preferences

Section Overview

The topics in this section describe how to set the Simulink 3D Animation preferences using the MATLAB File > Preferences dialog box. 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

Simulink 3D Animation Preferences

To access the Simulink 3D Animation preferences GUI:

  1. From the MATLAB desktop, select File > Preferences.

  2. In the Preferences dialog box left pane, select Simulink 3D Animation.

    The Simulink 3D Animation Preferences dialog box opens in the right pane.

  3. Set the preferences that you want. See the following table for the preferences that you can change. Click OK to save the settings.

    PreferenceValueDescription

    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 world. 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, 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.

    VRML Editor

    Built-in 3D World Editor | V-Realm Builder | MATLAB Editor | Custom

    Specifies which VRML editor to use. Path to the VRML editor. If this path is empty, the MATLAB editor is used.

    The path setting is active only if you select the Custom option.

    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.

3D World Editor Preferences

The Simulink 3D Animation preferences include the following preferences for the 3D World Editor.

PropertyValueDescription

Position

Two pairs of pixel locations, establishing the upper-left and lower-right corners for the 3D World Editor

Default: Depends on current screen resolution

Specifies the default location for the 3D World Editor. If you select Save position on exit, then the default position changes to the position of the 3D World Editor when you exited that editor.

Save position on exit

'off' | 'on'

Default: 'on'

Causes the 3D World Editor to open in the same location where the editor was when you exited that editor.

Triad

'none' | 'top left' | 'top right' | 'bottom left' | 'bottom right' | 'center'

Default: 'bottom left'

Specifies where in the Tree structure pane to display a triad of coordinate axes.

Canvas Preferences

The Simulink 3D Animation preferences include a Navigation panel preference.

PropertyValueDescription

Navigation panel

'none' | 'translucent' | 'opaque'

Default: 'none'

Controls the appearance of the navigation panel in the canvas.

Figure Preferences

The Simulink 3D Animation figure has a number of preferences:

Figure Appearance Preferences

To access the virtual figure appearance preferences:

  1. From the MATLAB software desktop, select File > Preferences.

  2. In the left pane of the Preferences dialog box, select Simulink 3D Animation.

  3. In the left pane under Simulink 3D Animation, select Figure.

    The Simulink 3D Animation Preferences dialog box opens in the right pane, with the Appearance tab selected.

  4. Set the preferences that you want. See the following table for the appearance preferences that you can change. Click OK to save the settings.

    PropertyValueDescription

    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 and 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.

    Triad

    'none' | 'top left' | 'top right' | 'bottom left' | 'bottom right' | 'center'

    Default: 'none'

    Specifies where to display a triad of coordinate axes.

Figure Rendering Preferences

To access the virtual figure rendering preferences:

  1. From the MATLAB desktop, select File > Preferences.

  2. In the left pane of the Preferences dialog box, select Simulink 3D Animation.

  3. In the left pane under Simulink 3D Animation, select Figure.

    The Simulink 3D Animation Figure Preferences dialog box opens in the right pane.

  4. Select the Rendering tab.

    The Simulink 3D Animation Figure Preferences dialog box opens in the right pane, with the Rendering tab selected.

  5. Set the preferences as desired. See the following table for the rendering preferences you can change. Click OK to save the settings.

    PropertyValueDescription

    Antialiasing

    'on' | 'off'

    Default: 'on'

    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.

Figure 2-D Recording Preferences

To access the virtual figure 2-D recording preferences:

  1. From the MATLAB desktop, select File > Preferences.

  2. In the left pane of the Preferences dialog box, select Simulink 3D Animation.

  3. In the left pane under Simulink 3D Animation, select Figure.

    The Simulink 3D Animation Preferences dialog box opens in the right pane.

  4. Select the 2-D Recording tab.

    The Simulink 3D Animation Figure Preferences dialog appears in the right pane, with the 2-D Recording tab selected.

  5. Set the preferences as desired. See the following table for the rendering preferences you can change. Click OK to save the settings.

    PropertyValueDescription
    2-D animated file name

    String.

    Default: '%f_anim_%n.avi'

    Specifies the 2-D offline animation file name. 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.

    Recording compression
    quality

    Integer 0 – 100.

    Default: 75

    Specifies the default quality of 2-D animation file compression for new vrfigure objects.

    Frames per
    second

    Default: 15

    Specifies the default frames per second playback speed.

Figure Frame Capture Preferences

To access the virtual figure frame capture preferences:

  1. From the MATLAB desktop, select File > Preferences.

  2. In the left pane of the Preferences dialog box, select Simulink 3D Animation.

  3. In the left pane under Simulink 3D Animation, select Figure.

    The Simulink 3D Animation Figure Preferences dialog box opens in the right pane.

  4. Select the Frame Capture tab.

    The Simulink 3D Animation Figure Preferences dialog appears in the right pane, with the Frame Capture tab selected.

  5. Set the preferences that you want. See the following table for the rendering preferences that you can change. Click OK to save the settings.

    PropertyValueDescription
    CaptureFileFormat

    'tif' | 'png'

    Default: 'tif'

    Specifies file format for a captured frame file.

    CaptureFileName

    String.

    Default: '%f_anim_%n.ext'

    Specifies the frame capture file name. The string can contain tokens that are replaced by the corresponding information when the animation recording takes place. For further details, see Define File Name Tokens.

Virtual World Preferences

To access the virtual world preferences:

  1. From the MATLAB desktop, select File > Preferences.

  2. In the left pane of the Preferences dialog box, select Simulink 3D Animation.

  3. In the left pane under Simulink 3D Animation, select World.

    The Simulink 3D Animation World Preferences dialog box opens in the right pane.

  4. Set the preferences as desired. See the following table for the rendering preferences you can change. Click OK to save the settings.

    PropertyValueDescription
    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 file name. 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.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS