Main Content

Choose a Virtual World Editor

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 or X3D 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.

There is more than one way to create a virtual world defined with VRML or X3D code. You can use a virtual world editor to create a virtual world without knowing anything about the VRML or X3D language. Or you can use a text editor to write code directly.

The金宝app®3D Animation™product includes the 3D World Editor for editing virtual worlds. You can use the 3D World Editor on all supported platforms forSimulink 3D Animation. The 3D World Editor is the default editor. For a comparison of editors, see编辑ors for Virtual Worlds.

编辑ors for Virtual Worlds

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.

Some people prefer to create simple virtual worlds using MATLAB®编辑or or other text editor.

For Windows®platforms, you can also use Ligos®V-Realm Builder software to create and edit code. For information on using V-Realm Builder software with theSimulink 3D Animationproduct, seeLigos V-Realm Builder.

For details about specifying an editor, seeSet the Default Editor.

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

Text Editors

A virtual world 3D file uses a standard text format that you can read with any text editor. Reading the code in a text editor is useful for debugging and for directly changing the code, and for automated processing of the code. If you use the correct 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 virtual world when you want to:

  • Create a simple virtual world.

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

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

  • Perform global search editing operations across one or more virtual world 3D files.

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

VRML and X3D Syntax Highlighting

You can display VRML, X3DV, and X3D syntax highlighting in the MATLAB Editor.

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

  1. In MATLAB, selectPreferences>编辑or/Debugger>Language.

  2. In the Editor/Debugger Language Preferences dialog box, set theLanguagefield toVRML/X3DV.

  3. Change the highlighting properties that you want.

For X3D syntax highlighting, setLanguagetoXML/HTML.

General 3-D Editors

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

一般三维目标特定类型的编辑工具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 powerful, expensive, and complex to learn, but others are relatively inexpensive and can satisfy your specific needs.

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

Native VRML and X3D Editors

Native VRML and X3D editors use those languages as their native format. Native VRML editors support features that are unique to the VRML and X3D format, such as interpolators and sensors.

TheSimulink 3D Animationsoftware includes two native VRML and X3D editors:

3D World Editor

The 3D World Editor is installed as part of theSimulink 3D Animationinstallation. It is the default virtual world editor.

The 3D World Editor is a native VRML and X3D authoring tool that provides an interface to the syntax of those languages. The editor supports VRML97 types and language elements. For details on limitations, seeVRML SupportandX3D Support.

The 3D World Editor interface provides three panes.

  • Tree structurepane — 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 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 displaypane — 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 editpane — Change values for node items.

For details, seeBuild and Connect a Virtual Worldand3D World Editor.

LigosV-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:

  • Supports only VRML, not X3D

  • Provides dialog boxes for editing properties, which can be less streamlined than the 3D World Editorobject properties editpane

  • 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, seeV-Realm Builder Help.

Set the Default Editor

Tip

TheSimulink 3D Animationproduct includes the 3D World Editor for editing virtual worlds. You can use the 3D World Editor on all supported platforms forSimulink 3D Animation. The 3D World Editor is the default editor. For a comparison of editors, seeChoose a Virtual World Editor.

You can change your environment to use another editor. You can use the MATLAB Preferences menu or the MATLAB command line.

Use Preferences to Set the Default Editor

To determine which virtual world editor is set up as the editor in your environment:

  1. From the MATLAB Toolstrip, in theHometab, in theEnvironmentsection, selectPreferences > Simulink 3D Animation.

  2. In the Simulink 3D Animation Preferences dialog box, examine the3D World Editorpreference.

You can use the3D Word Editorpreference to select another editor: the V-Realm Builder, the MATLAB editor, or a third-party virtual world editor or text editor. To use a third-party editor, select theCustomoption. In the text box that appears, enter the path to the editor.

UseMATLAB命令设置Default Editor

  1. To determine which editor is installed, at the MATLAB command prompt, type:

    vrgetpref('Editor')
  2. The default is the 3D World Editor (*BUILTIN). To change the editor, use thevrsetprefcommand, specifying the editor that you want. For example, to change to the V-Realm editor, type:

    vrsetpref('Editor','*VREALM')
  3. To open a file in the V-Realm editor, in MATLAB navigate to a virtual world file, right-click, and select编辑.

    Note

    Thevreditcommand opens the 3D World Editor, regardless of the default editor preference setting.

See Also

Functions

Related Topics