Products & Services Solutions Academia Support User Community Company

Learn more about Simulink 3D Animation   

Installing the VRML Editor on the Host Computer

Installing the VRML Editor (Windows)

When you install the Simulink 3D Animation product, files are copied to your hard drive for the Ligos V-Realm Builder software, but the installation is not complete.

Installing the VRML editor writes a key to the Microsoft Windows registry, making extra V-Realm Builder library files available for you to use, and it associates the Edit button in Simulink 3D Animation blocks with this editor:

  1. Start the MATLAB software.

  2. In the MATLAB Command Window, type

    vrinstall
    -install editor 

    or type

    vrinstall('-install','editor') 

    The MATLAB Command Window displays the following messages:

    Starting editor installation...
    Done. 
  3. Type

    vrinstall
    -check 

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

    VRML editor:    installed 

VRML Editor (UNIX/Linux)

The MATLAB editor is the default VRML editor for UNIX platforms and no installation is required. To create your virtual worlds using the MATLAB editor, you need to understand the virtual reality modeling language and the VRML data types that are relevant to MATLAB. For information about the modeling language, refer to an appropriate third-party VRML book. Also, see VRML Data Types for the data types to use with the MATLAB software.

Alternatively, you can use a general 3-D modeling tool with VRML97 export capabilities. Currently, no VRML editor with the functionality of those available for Windows platforms is commercially available for UNIX platforms. However, an open source VRML editor, white_dune, is under development for UNIX systems. See http://vrml.cip.ica.uni-stuttgart.de/dune/ for more information.

Setting the Default Editor of Virtual Scenes

You can edit virtual scenes with a VRML authoring tool, such as V-Realm Builder, or with any text editor, as the VRML language is written in text files. You determine the editor that is used to edit your scene by 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 demonstrates how to change your editor from V-Realm Builder to a text editor. It assumes that you are working on a PC platform.

  1. At the MATLAB command prompt, type

    vrinstall
    -check 

    to determine whether V-Realm Builder is installed.

    The MATLAB Command Window displays

    VRML viewer:    installed VRML editor:    installed 

    The viewer and editor are installed. If the editor is not installed, see Installing the VRML Editor (Windows).

  2. Determine your default editor by typing

    a = vrgetpref 

    The MATLAB Command Window displays

    a =                              
                                 DataTypeBool: 'logical'
                                DataTypeInt32: 'double'
                                DataTypeFloat: 'double'
                        DefaultCanvasNavPanel: 'none'
                           DefaultCanvasUnits: 'normalized'
                    DefaultFigureAntialiasing: 'off'
                       DefaultFigureDeleteFcn: ''
                        DefaultFigureLighting: 'on'
                  DefaultFigureMaxTextureSize: 'auto'
                        DefaultFigureNavPanel: 'halfbar'
                        DefaultFigureNavZones: 'off'
                        DefaultFigurePosition: [5 92 512 380]
          DefaultFigureRecord2DCompressMethod: 'auto'
         DefaultFigureRecord2DCompressQuality: 75
                DefaultFigureRecord2DFileName: '%f_anim_%n.avi'
                     DefaultFigureRecord2DFPS: 15
                       DefaultFigureStatusBar: '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
                                       VrPort: 8123 

    The variable a is a structure array. You need to index into it to determine the Editor property.

  3. To determine your default editor, type

    a.Editor 

    The MATLAB Command Window displays

    ans = "%matlabroot\toolbox\sl3d\vrealm\program\vrbuild2.exe"
    "%file" 

    This is the path to the V-Realm Builder executable file. V-Realm Builder is the current VRML editor.

  4. Verify that V-Realm Builder is your default editor. At the MATLAB command prompt, type

    vrpend 

    The Inverted Pendulum demo loads and the pendulum is visible in the viewer.

  5. In the Simulink 3D Animation viewer for vrpend, from the Simulation menu, select Block Parameters

    The Parameters: VR Sink dialog box opens.

  6. Click Edit.

    The vrpend model opens in the V-Realm Builder authoring tool.

  7. At the MATLAB window, change the default editor to the MATLAB editor by typing

    vrsetpref('Editor','%matlabroot\bin\win32\meditor.exe
    %file') 

    You can set your editor to any text editor you want to use by specifying the path to the executable of the text editor.

  8. In the Simulink 3D Animation viewer for vrpend, from the Simulation menu, select Block Parameters.

    The Parameters: VR Sink dialog box opens.

  9. Click Edit.

    The MATLAB editor opens and is now set as your default VRML editor.

  10. To reset the V-Realm Builder authoring tool as your default VRML editor, type

    vrsetpref('Editor','factory') 

    Clicking the Edit button now launches V-Realm Builder.

  


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