Chapter 4 Design View

Design View provides a set of visual commands and drag-and-drop methods, which allow users to create and edit X3D world scenes.

This chapter gives a general description on how to use the creation interface elements and editing commands in design contexts. Check Part 3, Part 4, Part 5, and Part 6 for how to use specific node creation commands and editing tools to build virtual scenes.

1. Enter Design View

The View Layout commands that include Code, Design, and Code+Design, control whether a Design View is active, or a Code View is active, or both of them are accessible. Figure 1 shows the View Layout menu items and figure 2 shows the toolbar buttons associated with the View Layout commands.

view layout items

Figure 1 The View Layout menu items

view layout toolbar buttons

Figure 2 The View Layout toolbar buttons

To switch to Design View, choose the Design item or press the Design View toolbar buttontoolbar button. When selected, the Design menu item has a check markcheck mark, and the Design View toolbar buttontoolbar button has a shadow.

To switch to Code View, choose the Code item or press the Design View toolbar buttontoolbar button. When selected, the Code menu item has a check markcheck mark , and the Design View toolbar buttontoolbar button has a shadow.

To make both Design View and Code View accessible, click the Code+Design menu item or the code+design toolbar button toolbar button. When selected, the Code+Design menu item has a check mark check mark, and the code+design toolbar button toolbar button has a shadow.

2. Selection in Design View

The Design View provides different tools to select geometry nodes and their properties, figure 3 shows the Selection menu items and figure 4 shows their toolbar buttons.

selection menu items

Figure 3 The Selection menu items

selection toolbar buttons

Figure 4 The Selection toolbar buttons

2.1. Select Geometry Nodes

The Node item on the Selection sub-menu and the selecting nodes toolbar button are associated with the Select Nodes command, which allows users to select geometry-based Shape nodes.

To select or clear a Shape node, do the steps below.

  1. Activate the command either by the menu item or the toolbar button.
  2. Double-click the Shape’s image in the Design View.

If the Ctrl key is down when operating, the last selection or un-selection is added to the previous set; otherwise, the previous selection set is cleared.

To select a set of Shape nodes, do the steps below.

  1. Activate the command either by the menu item or the toolbar button.
  2. Hold down the left mouse button, drag-and-drop the mouse button and draw a rectangle; any geometry whose image falls into the rectangle will be selected.

2.2. Select Facets

The Facet item on the Selection sub-menu and the select facetstoolbar button are associated with the Select Facets command, which allows users to select facets of a Shape node.

To select a set of facets, do the steps below.

  1. Activate the command either by the menu item or the toolbar button.
  2. Hold down the left mouse button, drag and draw a rectangle; any facet whose image falls into the rectangle will be selected.

2.3. Select Points

The Point item on the Selection sub-menu and the select pointstoolbar button are associated with the Select Points command, which provides a tool to select points.

To select points of a geometry, first select the geometry node, then activate the Select Points command.

Hold left mouse button down, drag and draw a rectangle; the points whose images fall into the rectangle will be selected.

2.4. Select Colors

This version still does not support this command. To edit colors, use Code View or Tree View.

2.5. Select Normal

This version still does not support this command. To edit normal, use Code View or Tree View.

3. Create an X3D Node

This Web3d Modeler has tens of toolbar buttons and menu items for creating X3D built-in nodes that X3D specs define. To create an X3D node, click a node creation menu item or a toolbar button. This Modeler inserts the node into Scene Graph using the general rules:

  1. If there is no node selected or more than one (1) node selected when a node creation command is being activated, the newly created node is inserted into the Scene Graph as a root node, even if the node is not a child node.
  2. If node A is selected when a node creation command that generates node B is being activated, then the modeler checks whether B can be attached to A. If A can host B, then B is set to be a child of A; otherwise, B is inserted into the Scene Graph as a root node.

For more detailed information on node creation commands, check part 3, part 4, part 5, and part 6.

4. Transformation

Transformation commands fall into four (4) classes: Translation, Rotation, Scale, and Alignment. Figure 5 shows the menu items and figure 6 shows the toolbar buttons associated with these commands.

Move

Figure 5(a) The Translation menu items

Rotation

Figure 5(b) The Rotation menu items

Scale

Figure 5(c) The Scale menu items

Alignment

Figure 5 (d) The Alignment menu items

transformation icons

Figure 6 The Transformation toolbar buttons

To escape from these commands, press the esc key.

If a geometry-based Shape node is a root one, or it is contained in a Grouping node but not a Transform, to be transformed, the Shape must be moved into a Transform node. The following shows the steps:

  1. Select the Shape node(s).
  2. Activate the Transform command either by Transform buttonstoolbar button, or by Transform menu item, or by Ctrl+T shortcut key.

Figure 7 shows an example; for more information about how to use the Transform command, check the Grouping chapter.

a <em>Shape</em> node a transform node

Figure 7 An image mapped Box node and the transformed Scene Graph

4.1. Arbitrary Rotation

This command is used to rotate selected nodes about a given center at arbitrary direction with the left mouse button. The rotation center is determined by the node’s transformation hierarchy. The Arbitrary Rotation item on the Rotation menu and the rotation about o toolbar button are associated with this command.

To rotate nodes, follow the below four (4) steps.

  1. Select Shape node(s), or Transform nodes, or other transformable nodes, such as TextureCoordinate nodes.
  2. If the selected Shape node does not belong to any Transform nodes, use the Transform command to build a Grouping node and move or put the Shape node into it.
  3. Activate the Arbitrary Rotation command either by menu item, or by the rotation about o toolbar button.
  4. Hold down the left mouse button and drag-and-drop the object(s) to a proper direction.

4.2. Rotation around X-axis

This command is used to rotate selected nodes about the x-axis with the left mouse button. The rotation center is determined by the node’s transformation hierarchy. The Rotation X menu item on the Rotation menu and the rotation xtoolbar button are associated with this command.

The operation of rotating objects around the x-axis is similar to that of Arbitrary Rotation except the rotation axis may be different.

4.3. Rotation around Y-axis

This command is used to rotate selected nodes about the y-axis with the mouse button. The rotation center is determined by the node’s transformation hierarchy. The Rotation Y item on the Rotation menu and the rotation ytoolbar button are associated with this command.

The operation of rotating objects around the y-axis is similar to that of Arbitrary Rotation except the rotation axis may be different.

4.4. Rotation around Z-axis

This command allows users to rotate selected nodes about the z-axis with the left mouse button. The rotation center is determined by the node’s transformation hierarchy. The Rotation Z item on the Rotation menu and the rotation ztoolbar button are associated with this command.

The operation of rotating objects around the z-axis is similar to that of Arbitrary Rotation except the rotation axis may be different.

4.5. Translation along X-axis

This command allows users to translate selected nodes along the x-axis with the left mouse button. The Move X item on the Translation menu and the move along xtoolbar button are associated with this command.

To translate nodes, follow the below four (4) steps.

  1. Select Shape node(s), or Transform nodes, or other transformable nodes, such as TextureCoordinate nodes.
  2. If the selected Shape node does not belong to any Transform nodes, use the Transform command to build a Grouping node and put or move the Shape node into it.
  3. Activate the Trans X command either by the menu item, or by the move along x toolbar button.
  4. Hold down the left mouse button and drag-and-drop the object(s) to proper position.

4.6. Translation along Y-axis

This command allows users to translate selected nodes along the y-axis with the left mouse button. The Trans Y item on the Translation menu and the move along y axistoolbar button are associated with this command.

This kind of operation is similar to that of Trans X except this translation happens in a different direction.

4.7. Translation along Z-axis

This command allows users to translate selected nodes along the z-axis with the left mouse button. The Trans Z menu item on the Translation menu and the move along with z toolbar button are associated with this command.

This kind of operation is similar to that of Trans X except this translation happens in a different direction.

4.8. Arbitrary Translation

This command allows users to translate selected nodes with the mouse button. The Trans item on the Translation menu and the move arbitrarilytoolbar button are associated with this command.

This kind of operation is similar to that of Trans X except this translation may be in a different direction.

4.9. Scale along X-axis

This command allows users to scale selected nodes along the x-axis with the left mouse button. The Scale X item on the Scale menu and the scale xtoolbar button are associated with this command.

To scale node(s), follow the below four (4) steps.

  1. Select Shape node(s), or Transform node(s), or other transformable nodes, such as TextureCoordinate nodes.
  2. If the selected Shape node does not belong to any Transform nodes, use the Transform command to build a Grouping node and put or move the Shape node into it.
  3. Activate the Scale X command either by the menu item, or by the scale x toolbar button.
  4. Hold down the left mouse button and drag-and-drop the object(s) to proper size.

4.10. Scale along Y-axis

This command allows users to scale selected nodes along the y-axis with the left mouse button. The Scale Y item on the Scale menu and the scale ytoolbar button are associated with this command.

This kind of operation is similar to that of Scale X, but the results are different.

4.11. Scale along Z-axis

This command allows users to scale selected nodes along the z-axis with the mouse button. The Scale Z item on the Scale menu and the scale ztoolbar button are associated with this command.

This kind of operation is similar to that of Scale X, but the results are different.

4.12. Scale Arbitrarily

This command allows users to scale selected nodes with the left mouse button. The Scale Arbitrarily item on the Scale menu and the scale arbitrarilytoolbar button are associated with this command.

This kind of operation is similar to that of Scale X, but the results may be different.

4.13. Parallel to X-axis

This command makes selected objects parallel to the x-axis. The Parallel X item on the Alignment menu and the parallel xtoolbar button are associated with this command.

To parallel Shape node(s), follow the below three (3) steps.

  1. Select the Shape node(s) or its parent Transform node(s).
  2. If the selected Shape node does not belong to any Transform nodes, use the Transform command to build a Grouping node and move or put the Shape into it.
  3. Activate the Parallel X command either by the menu item, or by the parallel x toolbar button.

4.14. Parallel to Y-axis

This command makes selected nodes parallel to the y-axis. The Parallel Y item on the Alignment menu and the parallel ytoolbar button are associated with this command.

This kind of operation is similar to that of Parallel X, but their results are different.

4.15. Parallel to Z-axis

This command makes the selected node(s) parallel to the z-axis. The Parallel Z item on the Alignment menu and the parallel ztoolbar button are associated with this command.

This kind of operation is similar to that of Parallel X, but their results are different.

4.16. Parallel Geometries

This command makes selected nodes parallel to each other. The Parallel Obis item on the Alignment menu and the parallel objstoolbar button are associated with this command.

This kind of operation is similar to that of Parallel X, but results may be different.

4.17. Coincident

This command makes selected nodes a coincidence. This command is only valid for Shape nodes whose parents are Transform nodes. The Coincident item on the Alignment menu and the parallel objstoolbar button are associated with this command.

To make the nodes coincide, follow the steps below.

  1. Select the Shape node(s) or its parent Transform node(s).
  2. If the selected Shape node does not belong to any Transform nodes, use the Transform command to build a Grouping node and move or put the Shape into it.
  3. Activate the Coincident command either by the menu item, or by the Coincident toolbar button.

4.18. Coincident X

This command makes selected nodes aligned to x=a plane. This command is only valid for Shape nodes whose parents are Transform nodes. The Coincident X item on the Alignment menu and the Coincident Xtoolbar button are associated with this command.

This kind of operation is similar to that of Coincident, but their results are different.

4.19. Coincident Y

This command makes selected nodes aligned to y=a plane. This command is only valid for Shape nodes whose parents are Transform nodes. The Coincident Y item on the Alignment menu and the Coincident Ytoolbar button are associated with this command.

The operation of this command is similar to that of Coincident, but their results are different.

4.20. Coincident Z

This command makes the selected nodes aligned to z=a plane. This command is only valid for Shape nodes whose parents are Transform nodes. The Coincident Z item on the Alignment menu and the Coincident Ztoolbar button are associated with this command.

The operation of this command is similar to that of Coincident, but their results are different.

5. Delete Nodes and other Elements

The Ctrl+X shortcut key executes the Delete command, which deletes selected node(s) or other elements, such as points.

See the Selection paragraph in this chapter and the Selection in the Tree View chapter for how to select nodes, points, and other elements.

6. Configure the Views

A set of options are available, which allow users to configure Design Views and viewing properties.

6.1. Configure Design View Number

A window can be divided into 1, 2, 3, or 4 partitions, each partition establishes a Design View. Figure 8 shows the View Layout menu items, which allow users to configure the view number. The left image shows mainframe menus when this Modeler starts, and the right part shows a different state when this Modeler is editing a virtual world.

view layout menu items view layout menu items

Figure 8 The View Layout menu items

Users can choose Design View number by the commands: 4 Design Views, 3 Design Views, 2 Design Views, and 1 Design View. Figure 9 shows a window divided into 4 Design Views. By default, each view has a coordinate system symbol, a thin frame, and background grid lines.

To hide or show the coordinate system symbol, press ALT+C. The Context Menu has the Enable/Disable Coordinate System Symbol item, which also provides hide and show commands.

To change the background grid line colors, follow the steps below.

  1. Start Options|Font, Color command by the menu item to bring up a font and color-selection dialog box. See Code View for the dialog's image.
  2. The Color list contains the Grid Light and Grid Strong, select one of them and press Select color button to bring up the color selection dialog box.
  3. Pick-up a color and press the OK button in that dialog window. Press the Cancel button or the Esc key to cancel the settings. See the Color dialog box paragraph in the Tree View chapter for more information.

To hide or show the background gridlines, press ALT+R. The Context Menu has the Enable/Disable Background Grid item, which also provides hide and show commands.

4 Design Views

Figure 9 A window is divided into four (4) Design Views

6.2. Viewing Types and Context Menu

Different viewpoints are available for displaying virtual worlds; a Design View can be set as: left side view, right side view, top view, bottom view, front view, rear view, or a camera view.

To choose a viewing type for a Design View, move the cursor onto the Design View, click with the right mouse button to bring up a context menu which includes viewing type items, see figure 10 as an example. Move the cursor over an item, click the left mouse button to set the viewing type or press the Esc key to cancel the setting.

choose view type

Figure 10 The context menu items for selecting a viewing type

6.3. Window Resize

The size of a Code View and a Design View can be changed. The Window Resize item on the View menu and the Resizetoolbar button are associated with this command.

To resize the windows, follow the steps below.

  1. Activate the command either by clicking the menu item or the toolbar button.
  2. Move the cursor over the window’s border and allow the cursor shape to change.
  3. Push down the left mouse button and drag-and-drop to resize the windows.

6.4. Background Color

This command sets the background color for Design View. The Background Color item on the Options|Font, Color menu, see figure 11, is associated with this command.

To change the background color, follow the steps below.

  1. Start Options|Font, Color command by the menu item to bring up a font and color-selection dialog box. See Code View for the dialog's image.
  2. The Color list contains the Graphic Background, select it and press Select color button to bring up the color selection dialog box.
  3. Pick-up a color and press the OK button in that dialog window. Press the Cancel button or the Esc key to cancel the setting. See the Color dialog box paragraph in the Tree View chapter for more information.

option menu

Figure 11 The Options menu

6.5. Selected Geometry Color

This command sets the color for rendering selected geometries. The Selection Color item on the Options|Font, Color menu is associated with this command.

The Color list contains the Selected Geometry item, select it and press Select color button to bring up the color selection dialog box.

To change the rendering color, pick up a color and press the OK button in this dialog window. Press the Cancel button or the Esc key to cancel the setting. See the Color dialog box paragraph in the Tree View chapter for more information.

6.6. Polygonal Mode

Four (4) options are available for rendering a geometry: Full (Ctrl+Shift+S), Line (Ctrl+Shift+L), Point (Ctrl+Shift+P), and Hide (Ctrl+Shift+H).

To set a rendering mode for selected Shape nodes, users can press the shortcut keys in Design View, or,

  1. On the Options menu, expand Polygonal Mode.
  2. Choose Full, Line, Point, or Hide.

The Full option lets the geometry be rendered as defined in X3D specs; the Line option lets the geometry be rendered as lines; the Point option lets the geometry be rendered as a set of points. The Hide option disables the geometry from rendering.

6.7. Key Frames and its Properties

A virtual world can have some frames, and the world may change from one frame to the next when an X3D Browser plays the world. The Frame Properties menu item on the View menu allows users to show or hide a key frame window by which the time-based sequence for playing the virtual world can be defined.

Figure 12 shows a Key frames window. The window is horizontally divided into some partitions, each partition has two rectangles occupying the up and down part. A colored slider is an indicator, which can be dragged with the left mouse button from one partition to another.

key frame 

Figure 12 Key frame dialog box

Frame Properties command provides a dialog box by which users can set partition size. Clicking the Frame Properties menu item on the Options menu brings up a window whose image is shown in figure 13. Input a floating-point number in the Start box, and the End box receives a floating-point value too. In the Partition box, input an integer value.

keyframe propeties

Figure 13 Keyframe properties dialog box

X3D interpolator nodes like ScalarInterpolator and PositionInterpolator have the key field that can inherit values from the Key frames window: the first value of the key equals to the Start in the Keyframe properties window, the last value equals to the End, and other values are calculated by its frame position. Check Normalization in the Events chapter for how to use the frame properties.

6.8. Parser Results

The Parser Results command lets users review the results of the last parsing. The results are displayed in the Output View.

6.9. Texturing Disabled

The Texturing Disabled command allows users to decide a texturing option for an active view: enable or disable. By this way, users can choose objects and set them rendered with or without textures in a given view.

6.10. Write Normal

The Write Normal option allows users to control whether Normal field values are printed or not in Code View.

7. Run

This command launches an external X3D browser to explore the current X3D content. To Run this function, it is necessary to install an X3D browser or an application.

8. Parser

This command calls the internal parser and parses the current X3D content. After the user edits the X3D content in Code View and wants to check the content, this command can be activated. However, in most cases, it is not necessary to click the menu item Parser, because this command is automatically activated and scans X3D code regularly. This command has a hotkey: Ctrl+B.

Parser Menu Item

Figure 14 The Parser menu item

9. View Commands

The following commands are available in Design Views, and they differ from Transformation commands: Transformation commands change virtual world nodes properties, such as size and position, when the View commands allow users to check the virtual world at different views but do not change any properties of the virtual world nodes.

9.1. Rotate the View

This Modeler provides four (4) commands to rotate the view: Track BallTrack Ball, Rotate XTrack X, Rotate YTrack Y, and Rotate ZTrack Z . See figure 15 for their menu items. Track Ball assumes that a ball encloses the virtual world, and the cursor touches the ball and rotates the view; Rotate X, Rotate Y, and Rotate Z commands allow users to rotate the view along x, y, and z-axis.

To rotate the view, first activate the command either by menu item or toolbar icon, then move the cursor into a Design View and drag-and-drop the view.

Rotate View Menu Item

Figure 15 The menu items for rotating the views

NSS Web3d Modeler provides two (2) kinds of centers for rotation: coordinate system origin and virtual world center. By default, this modeler uses coordinate system origin. When keyboard key Caps Lock is toggled on or the alt key is pressed down when rotation happens, the virtual world center, the window center, is used.

9.2. Move

The MoveMove icon command allows users to move the view.

To move the view, first activate the command either by menu item or toolbar icon, then move the cursor into a Design View and drag-and-drop the view.

9.3. Zoom

The ZoomZoom icon command allows users to scale the view.

To scale the view, first activate the command either by menu item or toolbar icon, then move the cursor into a Design View and drag-and-drop the view in up-down direction. Down pulls objects nearer. To speed up scaling, hold down the ALT key.

10. Validation

This command matches user programmed X3D-XML code with X3D specifications. After the user edits the X3D content in Code View and wants to validate the content, this command can be activated. This command has a in Design view hotkey: F4.

Parser Menu Item

Figure 16 The Validation menu item