VRML Editors

Editors for Virtual Worlds

There is more than one way to create a virtual world defined with VRML code. For example, you can use a text editor to write VRML code directly, or you can use a VRML editor to create a virtual world without knowing anything about the VRML language. However, you must understand the structure of a VRML scene to connect your virtual world to Simulink® blocks and signals.

For a description of the tools to view virtual worlds, see View Dynamic System Simulations.

As you create a virtual world, you can use different editors for different phases of the process. Choose the editor that best meets your needs.

Many people prefer to create simple virtual worlds using MATLAB® Editor or other text editor. For more information, see Text Editors.

The primary way to create a virtual world is with a 3-D editing tool. These tools allow you to create complex virtual worlds without a deep understanding of the VRML language. These 3-D editing tools offer the power and versatility for creating many types of practical and technical models. For example, you can import 3-D objects from some CAD packages to make the authoring process easier and more efficient.

The Simulink 3D Animation™ software includes the 3D World Editor, which you can use on all supported platforms for Simulink 3D Animation. The 3D World Editor is the default VRML editor for Simulink 3D Animation. For details about specifying a VRML editor, see Set the Default Editor.

For Windows® platforms, you can also use Ligos® V-Realm Builder software to create and edit VRML code. For information on using V-Realm Builder software with the Simulink 3D Animation product, see Ligos V-Realm Builder.

For a description of the benefits and limitations of different types of editors, see the next section.

Text Editors

A VRML file uses a standard text format that you can read with any text editor. Reading the VRML code in a text editor is useful for debugging and for directly changing VRML code, as well as for automated processing of the code. If you use the correct VRML syntax, you can use the MATLAB Editor or any common text editor to create virtual worlds.

Consider using a text editor to work on a VRML virtual world when you want to:

  • Create a very simple virtual world.

  • Debug syntax and formatting errors in a VRML file. Corrupted VRML files do not open in most 3-D tools.

  • Learn about VRML syntax by using VRML syntax highlighting in the MATLAB Editor. For details, see VRML Syntax Highlighting in the MATLAB Editor.

  • Perform global search VRML editing operations across one or more VRML files.

  • Combine several VRML models. Combining models can involve temporary model inconsistencies, which most 3-D tools cannot handle.

VRML Syntax Highlighting in the MATLAB Editor

You can display VRML syntax highlighting in the MATLAB Editor.

To change MATLAB Editor properties for VRML syntax highlighting (for example, the color for highlighting comments or not using the smart indentation feature):

  1. In MATLAB, select Preferences > Editor/Debugger > Language.

  2. In the Editor/Debugger Language Preferences dialog box, set the Language field to VRML.

  3. Change the highlighting properties that you want.

General 3-D Editors

General 3-D editors, such as 3D Studio, SolidWorks®, or Autodesk® Maya, do not use VRML as their native format. They export their formats to VRML. These tools have many features and are relatively easy to use.

General 3-D editing tools target specific types of work. For example, they can target visual art, animation, games, or technical applications. They offer different working environments depending on the application area for which they are designed. Some of these general 3-D editing tools are very powerful, expensive, and complex to learn, but others are relatively inexpensive and might satisfy your specific needs.

The graphical user interfaces for many of the commercial general 3-D editors use features typical of the native VRML editing tools. For example, in addition to displaying 3-D scenes in various graphical ways, they also offer hierarchical tree styles that provide an overview of the model structure and a shortcut to node definitions.

Native VRML Editors

Native VRML editors use VRML as their native format. All the features in the editor are compatible with VRML. Also, native VRML editors support features that are unique to the VRML format, such as interpolators and sensors.

The Simulink 3D Animation software includes two native VRML editors:

3D World Editor

The 3D World Editor is installed as part of the Simulink 3D Animation installation. It is the default VRML editor.

The 3D World Editor is a native VRML authoring tool that provides an interface to the VRML syntax. The editor supports all VRML97 types and language elements. Its primary file format is VRML97.

The 3D World Editor interface provides three panes.

  • Tree structure pane — View the hierarchy for the virtual world that you are editing. The 3D World Editor lists the nodes and their properties according to their respective VRML node types. You can change the nesting levels of certain nodes to modify the virtual world. In the tree viewer, give the nodes unique names.

  • Virtual world display pane — Observe the virtual world as you create it. The 3D World Editor renders inlined objects (grouped objects). It uses the same renderer as the Simulink 3D Animation viewer. Using the same renderer for the editor and the viewer provides consistent navigation and display throughout the development process.

  • Object property edit pane — Change values for node items.

For details, see Build and Connect a Virtual World and 3D World Editor.

Ligos V-Realm Builder

The Ligos V-Realm Builder interface is available only for Windows operating systems.

The V-Realm Builder application is a flexible, graphically oriented tool for 3-D editing. It provides similar functionality as the 3D World Editor.

The V-Realm Builder offers these features that the 3D World Editor does not:

  • Manipulators — for dragging objects in the 3–D world

  • Keyframe animation — animation involving interpolated linear movements

Compared to the 3D World Editor, the V-Realm Editor interface:

  • Provides dialog boxes for editing properties, which can be less streamlined than the 3D World Editor object properties edit pane

  • Does not always render virtual worlds the same way as the viewer

  • Does not support rendering inlined objects

For more information about the V-Realm Editor, see V-Realm Builder Help.

Was this topic helpful?