World Editor

From Tombstone Engine Wiki
Jump to: navigation, search

The World Editor tool module is used to create every scene that the Tombstone Engine displays (however, scene data may be imported from other sources.) All of the data describing a world is stored in a world resource having the .wld extension, and world resources are stored in subfolders of the Data directory.

The World Editor is opened by selecting New World or Open World from the Tombstone Menu, or by typing world [name] in the Command Console. If the Open World menu item is selected (or name is omitted from the console command), then a dialog appears to let you select a world resource. You can also start the World Editor by using the shortcut Ctrl-O to open a world or the shortcut Ctrl-N to create a new world while any GUI window is open.

Editor Layout

The World Editor has the layout shown below. Most of the window is occupied by one to four viewports that display the world being edited. Across the top of the World Editor are a number of icon buttons that have various functions. Along the left side of the World Editor are a set of “tool pages” that hold various groups of related tools used for a large variety of tasks such as creating geometries and applying physics. The tool pages are organized into five groups corresponding to broad types of functionality. See World Editor Pages for more information about these tools.

Worldeditor.png

Tool Buttons

Icon

Shortcut

Function

Tool boxselect.png

0

Box Select Tool. Selects all nodes that intersect the rectangle that is dragged out.

Tool select.png

1

Select Tool. Selects the one node that is clicked on. The Shift key can be used to add to or subtract from the current selection. This tool can be used to safely select items without the possibility of accidentally moving them.

Tool move.png

2

Move Tool. Works just like the Select Nodes tool, except that dragging the cursor moves the selected nodes.

Tool rotate.png

3

Rotate Tool. Works just like the Select Nodes tool except that handles appear on selected nodes. Dragging a handle rotates the selected nodes. The Shift key can be used while rotating to enable angle snap.

Tool resize.png

4

Resize Tool. Works just like the Select Nodes tool except that handles appear on selected nodes. Dragging a handle resizes the selected nodes.

Tool connect.png

5

Connect Tool. Works just like the Select Nodes tool except that connectors appear on selected nodes (if they have any).

Tool surface.png

6

Select Surface Tool. Selects individual surfaces of geometry nodes.

Tool scroll.png

Alt key with any tool

Scroll Tool. Dragging with this tool pans the viewport.

Tool zoom.png

Mouse Wheel with any tool

Zoom Tool. Dragging vertically with this tool zooms in and out of a viewport.

Tool boxzoom.png


Box Zoom Tool. A viewport is zoomed to the rectangle dragged out by this tool.

Tool orbit.png

8 or Control key with any tool

Orbit Tool. (This tool can only be used in perspective viewports.) This tool orbits the camera about the selected node that currently has the gizmo. Hold in the Shift key to restrict the camera motion to a horizontal plane. If there is no selected, then the center of the orbit is the world-space origin.

Tool camera.png

9 or Right Mouse Button with any tool

Camera Tool. (This tool can only be used in perspective viewports.) When the mouse button is held down with this tool, the WSAD keys can be used to fly the camera around forward, backward, left, and right. The Space and C keys move up and down.

Toggle Buttons

The toggle buttons all have corresponding items in the Layout menu.

Icon

Function

Flag backfaces.png

Toggle Backfaces. Shows or hides backfaces for geometries in wireframe display.

Flag worlds.png

Toggle Referenced Worlds. Shows or hides worlds that are externally referenced by marker nodes.

Flag models.png

Toggle Models. Shows or hides nodes that are part of external model resources.

Tool light.png

Toggle Lighting. When active, full lighting is rendered in perspective viewports.

Flag center.png

Draw from Center. When active, many tools operate in relation to the center of a node instead of the opposite corner.

Flag cap.png

Cap Geometry. When active, new geometries include end caps. When inactive, only lateral surfaces are created (e.g., for a cylinder).

Viewports

The World Editor displays one to four viewports at a time, but manages eight separate viewports internally. The visual configuration of the viewports can be changed using the buttons in the Viewports Page. The eight viewports are the four quarter-size viewports and the four half-size viewports (two horizontal and two vertical) of which at most four are shown in any multi-viewport configuration. Any viewport can be shown by itself at full size by typing Ctrl-n (or Cmd-n on the Mac), where n is a number between 1 and 8, or by selecting it from the Layout menu. Typing Ctrl-n again when viewport n is shown at full size returns to the previous multi-viewport configuration.

There are three types of viewports: orthographic, perspective, and scene graph. Orthographic viewports can display the scene from one of six directions corresponding to the positive and negative x, y, and z axes. The type of each viewport can be changed by right-clicking in a viewport (or Ctrl-clicking on the Mac) and selecting a new viewport type from the popup menu that appears.

The scene graph viewport is a special viewport that displays the scene hierarchy. All of the nodes in the scene are displayed in a tree that represents the actual structure of the scene. Subtrees can be collapsed or expanded by clicking on the collapse boxes between the various levels of the hierarchy. In a scene graph viewport, the Select and Move tool provides the capability to reparent nodes. The currently selected nodes can be reparented by dragging them to another node that will serve as the new parent. (Nodes cannot be reparented to any of their descendants.)

Current Target Zone

Worlds are divided into sections called zones, and zones are connected by portals. Zones can be hierarchically organized, and the root node of every world is an InfiniteZone node. Zones are displayed in the World Editor with a black and yellow cross-hatched boundary.

It's important to understand that whenever a new node is placed in the world, it gets added to the current target zone. The target zone is set by selecting a zone and choosing Set Target Zone from the Node menu (or using the shortcut Ctrl-T). The current target zone is displayed with a green boundary instead of yellow. At any time, nodes can be moved into the current target zone by selecting them and choosing Move to Target Zone from the Node menu (or using the shortcut Ctrl-Shift-T) or by dragging them to the target zone in the scene graph viewport.

Most of the time, you want to place new nodes in the infinite zone. The infinite zone can be made the current target zone by choosing Set Infinite Target Zone from the Node menu, which has the shortcut Ctrl-Y.

Gizmo

The gizmo is a control that appears for one of the selected nodes. It shows the orientation of the node's local axes in red, green, and blue for the x, y, and z directions, respectively.

When the Select and Move tool is in use, the arrowheads on the axes can be dragged in any viewport to move the node along the corresponding direction. Boxes also appear where the gizmo axes cross, and dragging these causes the node to be moved in a plane.

When the Select and Rotate tool is in use, circular arcs appear between the gizmo's axes, and dragging along these causes the node to be rotated in a plane.

The gizmo assignment can be iterated through the nodes in the current selection by pressing the Tab key. Typing Shift-Tab iterates through the selected nodes in the reverse order.

Menu Commands

(For shortcuts on the Mac, replace the Ctrl key with the Cmd key.)

World Menu

Command

Shortcut

Description

Close

Ctrl-W

Closes the current editor window.

Save World

Ctrl-S

Saves the current world.

Save World As...

Ctrl-Shift-S

Saves the current world after prompting for a file name.

Save and Play World

Ctrl-P

Saves the current world, closes the World Editor, and loads the world in the game. You can return to the world you were editing by hitting escape (to bring up the main menu) or tilde (to open the command console) and then pressing Ctrl-Shift-P.

Import Scene...


Imports a scene from an external format such as OpenGEX or Collada. The stock engine includes importers that can read OpenGEX and Collada files.

Export Scene...


Exports the current world to an external format using an export plugin. There are no exporters in the stock engine, so this item is disabled by default.

Load from Model Resource...


Loads a model from the engine's MDL format and places it in the world. This should be used to import nodes from an MDL file so that they can be edited only when the original world from which the model was exported is no longer available. This command is not intended to be used as part of routine workflow.

To place models in a world as game objects, use the Models Page.

Save to Model Resource...


Saves the current world in the engine's MDL format. This is intended to be a one-way process, and all editor-specific information about the world will be stripped out in the process. If you expect to edit the model again, then you should also save a copy as an ordinary world (WLD) file.

Edit Menu

Command

Shortcut

Description

Undo

Ctrl-Z

Undoes the last action. (Supports multiple undo.)

Cut

Ctrl-X

Cuts the current selection to the clipboard.

Copy

Ctrl-C

Copies the current selection to the clipboard.

Paste

Ctrl-V

Pastes the contents of the clipboard to the world. Note that the clipboard is erased whenever all worlds are closed, so to copy from one world and paste into another, leave the source world open until you've pasted in the destination world.

Clear

Delete

Deletes the current selection.

Select All

Ctrl-A

Selects every node in the current world.

Unselect All

Ctrl-Shift-A

Unselects everything that is currently selected.

Select All in Zone


Selects every node that is visible in the currently selected zone.

Select Super Node

Ctrl-Up arrow

Selects the parents of the currently selected nodes.

Select Subtree

Ctrl-Down arrow

Selects all of the descendants for the currently selected nodes.

Lock Selection

Ctrl-K

Locks the current selection so that it cannot be changed. When the selection is locked, a small lock icon appears next to the cursor.

Unlock Selection

Ctrl-Shift-K

Unlocks the current selection.

Duplicate

Ctrl-D

Duplicates the current selection.

Clone

Ctrl-Shift-D

Duplicates the current selection, but creates references to their object data instead of duplicating it.

Node Menu

Command

Shortcut

Description

Get Info...

Ctrl-I

Opens the Get Info dialog for the selected nodes.

Edit Script or Panel

Ctrl-E

Opens the Script Editor if a single node is selected and has a Script Controller attached to it, or opens the Panel Editor if a single panel effect is selected.

Group Nodes

Ctrl-G

Creates a group node and makes it the parent of the current selection.

Reset Transform to Identity


Resets the transform for each of the selected nodes to the identity matrix.

Reset Rotation to Identity


Resets the rotation portion of the transform for each of the selected nodes to the identity matrix without affecting their positions.

Align Position to Grid


Moves each of the selected nodes so that it is aligned to the grid.

Set Target Zone

Ctrl-T

Makes the currently selected zone the target zone. (Only available if one zone is selected.)

Set Infinite Target Zone

Ctrl-Y

Makes the infinite root zone the target zone.

Move to Target Zone

Ctrl-Shift-T

Moves (reparents) the currently selected nodes into the target zone.

Connect Node

Ctrl-L

Connects the currently selected connector to the currently selected node.

Unconnect Node

Ctrl-U

Unconnects the currently selected connector.

Connect to Infinite Zone


Connects the current selected portals to the infinite root zone.

Select Connected Node


If any connectors are selected, this selects the nodes that they are connected to.

Select Incoming Connected Nodes


Selects all nodes that are connected to the currently selected nodes.

Move Viewport Camera to Node


Moves the cameras for all Perspective viewports to the position of the selected node and points them in the direction of the node's z axis.

Open Instanced World

Ctrl-Shift-O

If any instanced worlds are selected, this opens their world files in separate world editors.

Geometry Menu

Command

Shortcut

Description

Rebuild Geometry

Ctrl-R

Rebuilds each selected geometry.

Rebuild with New Path

Ctrl-Shift-R

Each selected path-based geometry or effect is rebuilt using the path that they are connected to.

Recalculate Normals


Recalculates normals and tangents for each selected geometry.

Bake Transform info Vertices

Ctrl-Shift-B

The transform of each selected geometry is baked into its vertices, and the transform is then set to the identity.

Reposition Mesh Origin


Moves the origin of the selected mesh geometries to the min, max, or center position along each axis, as specified in the dialog that appears.

Set Material

Ctrl-M

Changes the material for each of the selected nodes to the current material.

Remove Material


Removes the material from each of the selected nodes.

Combine Detail Levels


Combines multiple geometries into a single geometry with multiple detail levels.

Separate Detail Levels


Separates a geometry with multiple levels of detail into multiple geometries with a single level of detail.

Convert to Generic Geometry

Ctrl-Shift-C

Converts each of the selected geometries to generic mesh geometries.

Merge Geometry

Ctrl-Shift-M

Merges all of the selected geometries into a single mesh geometry.

Invert Geometry

Ctrl-Shift-I

Inverts the faces of each of the selected geometries.

Intersect Geometry

Ctrl-Shift-J

Performs a boolean intersection of the selected geometries and produces a new mesh geometry. (Only available when exactly two geometries are selected.)

Union Geometry

Ctrl-Shift-U

Performs a boolean union of the selected geometries and produces a new mesh geometry. (Only available when exactly two geometries are selected.)

Generate Ambient Occlusion Data


Generates per-vertex ambient occlusion data for each selected geometry. This data can be used by the geometries' materials.

Remove Ambient Occlusion Data


Removes any previously-generated ambient occlusion data from each selected geometry.

See Also