Products & Services Solutions Academia Support User Community Company

Learn more about Simulink 3D Animation   

Installing the VRML Plug-In Viewer on the Host Computer

Section Overview

You can use the Simulink 3D Animation viewer or VRML-enabled Web browser to view virtual worlds.

The Simulink 3D Animation viewer is the only viewer that can be used on all supported platforms. The Blaxxun Contact plug-in is available for PC platforms only.

Simulink 3D Animation Viewer

The Simulink 3D Animation viewer is the preferred method of viewing a virtual scene. The viewer can be used on any supported operating system. It is installed and set as the default viewer when you install the software. You can view virtual scenes as soon as the software is installed on your machine.

Installing a VRML Plug-In (Windows)

When you install the Simulink 3D Animation software, the Simulink 3D Animation viewer is set as the default viewer. If you want to use a Web browser as a VRML viewer, use the following procedure to install the Blaxxun Contact plug-in. You can use this plug-in with either the Internet Explorer or Netscape Navigator browser. The Blaxxun Contact plug-in is the only supported VRML plug-in.

You must use Blaxxun Contact 4.4 with the Simulink 3D Animation product. This version of the Blaxxun Contact VRML plug-in is distributed with the software. The following procedure describes how to install the plug-in.

If you have the MATLAB Web Server installed on your machine, make sure that the Web Server is stopped before you install the Blaxxun Contact plug-in. Also, verify that you are connected to the Internet before starting this installation procedure:

  1. Start the MATLAB software.

  2. In the MATLAB Command Window, type

    vrinstall -install viewer 

    The MATLAB interface displays the message

    Do you want to use OpenGL or Direct3d
    acceleration? (o/d) 
  3. Check the graphics card manual to determine the acceleration method to select. If you are not sure, select Direct 3d by typing

    d 

    The blaxxun installer starts running and displays the following dialog box.

  4. Follow the instructions on the remaining screens.

  5. In the MATLAB Command Window, type

    vrinstall
    -check 

    If the viewer installation was successful, the MATLAB Command Window displays the following message:

    External VRML viewer:    installed 

    If the viewer installation was unsuccessful, the MATLAB Command Window displays the message

    VRML
    viewer:    not installed 

Known Issue with the Blaxxun Contact Plug-In

The Blaxxun Contact VRML plug-in can fail to update the virtual scene when used with the Simulink 3D Animation and Internet Explorer 5.5 and later products. Netscape Navigator users do not experience this problem.

If you are using Internet Explorer 5.5 or later, you must manually change a network security setting before you can use Blaxxun Contact 4.4 with Simulink 3D Animation Version 3.0 or later. Upgrading your version of the Blaxxun Contact plug-in does not resolve this problem.

Changing the Default Network Security Setting

You must change your default network security setting before using the Blaxxun Contact plug-in with Internet Explorer 5.5 and later to ensure that the virtual scene is updated appropriately. You can use this workaround for the following:

  1. Open Internet Explorer.

  2. From the Tools menu, choose Internet Options.

    The Internet Options dialog box opens.

  3. Select the Local Intranet icon.

  4. Click the Security tab.

  5. Click the Custom Level button.

    The Security Settings dialog box opens.

  6. Scroll down until you see Microsoft VM. The first subheading is Java permissions.

  7. Select Custom.

    The Java Custom Settings button appears in the lower left of the Security Settings dialog box.

  8. Click Java Custom Settings.

    The Local intranet dialog box opens.

  9. Click the Edit Permissions tab.

  10. Scan the main headings and subheadings (marked with a lock icon) until you see Run Unsigned Content.

  11. Under Run Unsigned Content, find Access to all Network Addresses.

  12. Under Access to all Network Addresses, select Enable.

  13. Click OK.

    The Local intranet dialog box closes.

  14. In the Security Settings dialog box, click OK.

    You are asked if you want to change the security settings for this zone.

  15. Select Yes.

  16. In the Internet Options dialog box, click OK.

Installing a VRML Plug-In (UNIX and Linux)

If you want to use a Web browser instead of the Simulink 3D Animation viewer to view virtual scenes, you need to install a VRML97 plug-in with External Authoring Interface (EAI) support. This requirement is met by the Blaxxun Contact plug-in for Microsoft Microsoft platforms. If you are using any other operating system, you need to use the Simulink 3D Animation viewer to view virtual worlds.

Setting the Default Viewer of Virtual Scenes

If you install a VRML plug-in in your Web browser, it is possible to view virtual scenes with either the Simulink 3D Animation viewer, legacy Simulink 3D Animation viewer, or your Web browser. You determine the viewer used to display your scene using the vrsetpref and vrgetpref commands. (Alternatively, if you want to use the MATLAB File menu Preferences dialog, see Changing Simulink 3D Animation Preferences with the MATLAB Preferences Dialog.)

The following procedure describes how to set the viewer to the Simulink 3D Animation viewer or the Web browser. It assumes that you are working on a PC platform. If you want to use the legacy Simulink 3D Animation viewer, see Viewing Virtual Worlds with the Legacy Simulink 3D Animation Viewer.

  1. At the MATLAB command prompt, type

    vrinstall -check 

    to determine whether the Blaxxun Contact software is installed.

    The MATLAB Command Window displays

    VRML
    viewer:    installed VRML editor:    installed 

    The viewer and editor are installed. If the viewer is not installed, see Installing a VRML Plug-In (Windows).

  2. Determine your default viewer by typing

    vrgetpref 

    The MATLAB Command Window displays

    ans =
    
                                 DataTypeBool: 'logical'
                                DataTypeInt32: 'double'
                                DataTypeFloat: 'double'
                        DefaultCanvasNavPanel: 'none'
                           DefaultCanvasUnits: 'normalized'
                    DefaultFigureAntialiasing: 'off'
               DefaultFigureCaptureFileFormat: 'tif'
                 DefaultFigureCaptureFileName: '%f_anim_%n.tif'
                       DefaultFigureDeleteFcn: ''         
                        DefaultFigureLighting: 'on'
                  DefaultFigureMaxTextureSize: 'auto'
                        DefaultFigureNavPanel: 'halfbar'
                        DefaultFigureNavZones: 'off'
                        DefaultFigurePosition: [5 92 576 380]
          DefaultFigureRecord2DCompressMethod: 'auto'
         DefaultFigureRecord2DCompressQuality: 75
                DefaultFigureRecord2DFileName: '%f_anim_%n.avi'
                     DefaultFigureRecord2DFPS: 15
                       DefaultFigureStatusBar: 'on'
                        DefaultFigureTextures: 'on'
                         DefaultFigureToolBar: 'on'
                    DefaultFigureTransparency: 'on'
                       DefaultFigureWireframe: 'off'
                                DefaultViewer: 'internal'
                 DefaultWorldRecord3DFileName: '%f_anim_%n.wrl'
                       DefaultWorldRecordMode: 'manual'
                   DefaultWorldRecordInterval: [0 0]
                       DefaultWorldRemoteView: 'off'
                       DefaultWorldTimeSource: 'external'
                                       Editor: [1x60 char]
                                     HttpPort: 8123
                              TransportBuffer: 5
                             TransportTimeout: 20
                                       VrPort: 8124 

The DefaultViewer property is set to 'internal'. The Simulink 3D Animation viewer is the default viewer for viewing virtual scenes. Any virtual scenes that you open are displayed in the viewer.

  1. For example, at the MATLAB command prompt, type

    vrplanets 

    The Planets demo is loaded and the virtual scene is displayed in the Simulink 3D Animation viewer.

  2. Change the default viewer to your Web browser by typing

    vrsetpref('DefaultViewer','web') 

    The default Windows system VRML plug-in is used. The Blaxxun Contact VRML plug-in sets itself as the default VRML plug-in during its installation.

  3. At the MATLAB command prompt, type

    vrplanets 

    The Planets demo is loaded and the virtual scene is displayed in your Web browser.

  4. Reset the Simulink 3D Animation viewer as your default viewer by typing

    vrsetpref('DefaultViewer','factory') 
  5. In the Simulink 3D Animation viewer for vrplanets, from the Simulation menu, select Block Parameters.

    A Parameters: VR Sink dialog box opens.

    The target of the View button is determined by the DefaultViewer property. If the DefaultViewer property is set to 'internal', clicking the View button opens the virtual world in the Simulink 3D Animation viewer. If the DefaultViewer property is set to 'web', clicking the View button opens the virtual world in your Web browser.

  


Related Products & Applications

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