World Editor

From C4 Engine Wiki

(Redirected from World Editor Overview)
Jump to: navigation, search

The World Editor tool module is used to create every scene that the C4 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 C4 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 C4 window is open.


Contents

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 arrangeable “pages” that hold various groups of related tools.


Image:editor.png


Tool Buttons

Icon

Shortcut

Function

Image:tool_boxselect.png

0

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

Image:tool_select.png

1

Select Nodes. 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.

Image:tool_move.png

2

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

Image:tool_rotate.png

3

Rotate Nodes. 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.

Image:tool_resize.png

4

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

Image:tool_connect.png

5

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

Image:tool_surface.png

6

Select Surface. Selects individual surfaces of geometry nodes.

Image:tool_scroll.png

Alt key with any tool

Scroll Viewport. Dragging with this tool pans the viewport.

Image:tool_zoom.png

Mouse Wheel with any tool

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

Image:tool_boxzoom.png


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

Image:tool_camera.png

9 or Right Mouse Button with any tool

Free Camera Move. (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

Image:flag_backfaces.png

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

Image:flag_worlds.png

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

Image:flag_models.png

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

Image:tool_light.png

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

Image:flag_center.png

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

Image:flag_cap.png

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


Pages

A page is one of the palette-like subwindows shown on the left side of the World Editor. There are a large number of pages, and most of them are not visible by default when a new world is created. An invisible page can be shown by selecting it from the Page menu. The pages can be rearranged by dragging them upward and downward by their title bars, and they can be collapsed or expanded by clicking on the small box with a plus or minus symbol in it. A page can be hidden by clicking the close box at the left end of the title bar.

Each page contains a group of tools or settings that are somehow related. The following table describes the individual pages that are currently available in the World Editor, in alphabetical order.

Page

Description

Image:page_cameras.png

Cameras. The single tool in this page places a frustum camera in the scene.

Image:page_effects.png

Effects. The tools in this page are used to place various special effects in the scene.

Image:page_geometries.png

Geometries. The tools in this page are used to place primitive geometries in the scene.

Image:page_grid.png

Grid. This page contains controls for grid settings.

Image:page_impostors.png

Impostors. The single tool in this page places an impostor node in the scene. See Using Impostors for more information.

Image:page_info.png

Info. This page displays information about the node to which the gizmo is currently assigned.

Image:page_lights.png

Lights. The tools in this page are used to place light sources in the scene. See Lights and Shadows for an explanation of how different light types work.

Image:page_markers.png

Markers. The tools in this page are used to place marker nodes in the scene.

Image:page_material.png

Material. This page displays the current material that is applied to new geometries. The Material Manager is opened by double-clicking on the material shown in this page.

Image:page_models.png

Models. This page shows a list of registered model types. An model can be placed in the scene by selecting one from the list and then clicking in a viewport at the location where you want to place it.

Image:page_particles.png

Particle Systems. This page contains tools for placing emitters in the scene. It also shows a list of registered particle system types. A particle system can be placed in the scene by selecting one from the list and then clicking in a viewport at the location where you want to place it.

Image:page_paths.png

Paths. This page contains tools for drawing paths. Paths can be composed of linear, elliptical, and Bezier components.

Image:page_physics.png

Physics. This page contains tools for placing physics shapes and joints in the scene.

Image:page_placement.png

Placement. This page contains settings for placement modifiers.

Image:page_portals.png

Portals. This page contains tools for placing portals in the scene. It also contains tools for inserting and removing vertices from portals.

Image:page_selectionmask.png

Selection Mask. This page contains toggle buttons that determine what types of nodes can be selected. Turning any of these toggle buttons off prevents nodes of the corresponding type from being selected in any viewport except the scene graph viewport.

Image:page_skyboxes.png

Skyboxes. The single tool in this page places a skybox node in the scene. See Using Skyboxes for more information.

Image:page_sources.png

Sources. The tools in this page are used to place sound sources in the scene.

Image:page_spaces.png

Spaces. The tools in this page are used to place various types of spaces in the scene. See Fog Spaces and Shadow Spaces for more information.

Image:page_terrain.png

Terrain. This page contains all of the tools related to the creation and editing of terrain. See Editing Terrain for more information.

Image:page_texturemapping.png

Texture Mapping. This page contains tools for offsetting, rotating, and scaling texture coordinates. It also lets you change texcoord generation parameters for individual surfaces numerically.

Image:page_transform.png

Transform. This page lets you change the position, rotation, and size of a node numerically. The transform is shown for the node to which the gizmo is currently assigned.

Image:page_triggers.png

Triggers. The tools in this page are used to place trigger volumes in the scene.

Image:page_viewports.png

Viewports. This page contains buttons that change the viewport layout. (See the section about viewports below.) There is also a slider that controls the size of the icons that represent non-geometric nodes.

Image:page_visibility.png

Visibility. This page contains buttons for showing and hiding nodes by type.

Image:page_water.png

Water. This page contains tools related to creating dynamic water surfaces.

Image:page_worlds.png

Worlds. This page shows a list of referenced worlds used by the current world and contains commands for managing them.

Image:page_zones.png

Zones. The tools in this page are used to place zones in the scene. It also contains tools for inserting and removing vertices from polygon zones.


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 Layout 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 that can only be seen in the scene graph viewport. Other 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 from the Node menu (or using the shortcut Ctrl-T). The current target zone has a thicker boundary and pulsates. 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-Z) or by dragging them to the target zone in the scene graph viewport.


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.

The gizmo assignment can be iterated through the nodes in the current selection by pressing the Tab key.


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 Collada. In the stock engine, only the Collada importer is available.

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 C4'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. To place models in a world as game objects, use the Models page.

Save to Model Resource...


Saves the current world in the MDL format.


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.

Select All by Mask

Ctrl-Shift-A

Selects every node in the current world that isn't masked off in the Selection Mask page.

Select All with Material


Selects every geometry node having the current material.

Select Supernode

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.

Copy Transform


Copies the node transform of the node for which the gizmo is currently shown.

Paste Transform


Pastes the node transform of the node for which the gizmo is currently shown.


Node Menu

Command

Shortcut

Description

Get Info...

Ctrl-I

Opens the Get Info dialog for the selected nodes.

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.

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.)

Move to Target Zone

Ctrl-Shift-Z

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

Set Infinite Target Zone

Ctrl-Y

Makes the infinite root zone 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.

Auto-connect Portal

Ctrl-Shift-L

Connects each of the selected portals to the most likely destination zone.

Connect to Root 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.

Resize Terrain Block


Change the dimensions of the number of geometry chunks in a terrain block.


Geometry Menu

Command

Shortcut

Description

Rebuild Primitive

Ctrl-R

Rebuilds each selected primitive geometry.

Recalculate Normals


Recalculates normals and tangents for each selected geometry.

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 Mesh

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.)

Personal tools