Documentation Center

  • Trial Software
  • Product Updates

Set the Default Viewer

If you install a VRML plug-in in your Web browser, it is possible to view virtual worlds 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 box, see Set Simulink 3D Animation Preferences.)

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 with a PC platform. If you want to use the legacy Simulink 3D Animation Viewer, see 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 
  2. Determine your default viewer by typing

    vrgetpref 

    The MATLAB Command Window displays

    ans =
    
                                 DataTypeBool: 'logical'
                                DataTypeInt32: 'double'
                                DataTypeFloat: 'double'
                        DefaultCanvasNavPanel: 'none'
                           DefaultCanvasUnits: 'normalized'
                        DefaultEditorPosition: [325 216 763 901]
                           DefaultEditorTriad: 'bottomleft'
                    DefaultFigureAntialiasing: 'on'
               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'
                           DefaultFigureTriad: 'none'
                       DefaultFigureWireframe: 'off'
                                DefaultViewer: 'internal'
                 DefaultWorldRecord3DFileName: '%f_anim_%n.wrl'
                       DefaultWorldRecordMode: 'manual'
                   DefaultWorldRecordInterval: [0 0]
                       DefaultWorldRemoteView: 'off'
                       DefaultWorldTimeSource: 'external'
                                       Editor: '*BUILTIN'
                           EditorSavePosition: 'on'
                                     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 worlds. Any virtual worlds that you open are displayed in the viewer.

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

    vrplanets 

    The Planets example is loaded and the virtual world 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 example is loaded and the virtual world 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.

Was this topic helpful?