kHED
Not enough ratings
kHED User Manual [Eng]
By .ιl viKey lι.
The main functions and features of the editor.
4
   
Award
Favorite
Favorited
Unfavorite
A bit of theory
This section is devoted primarily to those who have not worked previously in other three-dimensional modeling editors and are not familiar with the basic principles and terms of three-dimensional graphics. You can skip it if you already have experience with 3D-applications.

Any three-dimensional model of the object, that we see in computer games and other three-dimensional applications, is composed of triangles.



Each triangle is based on three points - vertices. So, moving the vertices, we can get absolutely any triangle. Different triangles may have shared vertices.

The triangle has the front and back face. The orientation of the front and back face depends on the order of vertices. Reversing of their order leads to reversing the triangle face in the opposite direction.

In most cases only the front face of the triangle is visible.

The triangle has also texture coordinates (UV coordinates) for each of its vertices. Texture coordinates are two-dimensional coordinates of pixels in the texture.

The texture is a two-dimensional image, and texture coordinates determine how the image will lay on three-dimensional objects. The combination of model texture coordinates is called an unwrap.

The figure below shows the textue unwrap and the triangle with the applied texture on it:



And here is what happens if you change the texture coordinates of one of the vertices:



The triangle has also normals for each of its vertices. Normals are used in the calculation of lighting models. Thus, if the neighbouring triangles will have equal normals for shared vertices, then the junction of the triangles will be less visible:



The normals in kHED are calculated automaticaly, by smoothing groups. If the neighboring triangles are attached to same smoothing group, their normals will be identical, and the edge between them will be invisible. Otherwise, each triangle normal are calculated separately and the edge becomes visible.
User interface
kHED has a classic 3D-editor interface. It consists of four viewports (display areas), and toolbars. Each toolbar can be moved or attached to any edge of the window by dragging it with mouse cursor. You can show or hide panels through the View menu.

The application main window is shown below:



Viewports 1, 2, 3, 4

Each viewport is an image of a model with certain settings. First of all it's a type of projection: orthogonal (2D) and perspective (3D). Orthogonal projection is similar to that used in technical drawing, and perspective is similar to human vision.

By default, 1, 2 and 3 are orthogonal and displaying the model from front, left and top respectively. Viewport 4 displays the model in the perspective projection. To find out what the projection is selected, place your mouse pointer on a viewport: the current projection will be shown in the status bar.

To customize viewport options you can click on it with the right mouse button.



First 4 lines are model view modes:



Wireframe Overlay - turns on drawing the wireframe over the model. This setting has no effect in Wireframe mode.

Draw Backfaces - turns on triangle backface drawing.

Front, Back, Left, Right, Top, Bottom - direction of the orthogonal projection.

3D Rotate - The rotation around the origin.

3D Look - "First person" view. In this mode you can navigate in the space with the arrow keys.

Options... - Open "Viewport options" window.

Reset View - Set view direction to the origin.

Maximize - Maximize viewport to all working area.

Background Image - Choose a background image for the viewport. This is useful when creating a model by a photo or sketch. To remove the background image, select Remove Background Image (available only if a background picture is set). If at least one background image is set, Edit Background Image function is available in View menu. It allows you to move, rotate and scale the background image.

The 3D window has also three additional control buttons. They allow you to switch between different viewing modes: rotation around origin, rotation around selection and "First Person", respectively

You can zoom the view with mouse wheel or with Shift and the left mouse button.

You can pan the view with middle mouse button or with Ctrl and the left mouse button.

You can also resize the splitter between viewports. Double-click on the splitter to restore it's original position.

Toolbar



This panel offers the following features (from left to right):

  • New - Create new file (also available through File->New or Ctrl+N)
  • Open - Open file (File->Open, Ctrl+O)
  • Save - Save file (File->Save, Ctrl+S)
  • Undo - Undo the last action (Edit->Undo, Ctrl+Z)
  • Redo - Redo the last cancelled action (Edit->Redo, Ctrl+Y)
  • Groups - Open/close groups panel (View->Groups, G)
  • Smoothing Groups - Open/close smoothing groups panel (View->Smoothing Groups, S)
  • Materials - Open/close materials panel (View->Materials, M)
  • Tools - Open/close tools panel (View->Tools)
  • Snap To Grid - Turn on/off snapping to grid (Click the right mouse button to select the step of snapping)
  • Mirror Horizontal - Mirror selected objects horizontally (Edit->Mirror->Horizontal)
  • Mirror Vertical - Mirror the selected objects vertically (Edit->Mirror->Vertical)
  • Mirror Clone Horizontal - Create a horizontally mirrored copy of selected objects (Edit->Mirror->Clone Horizontal)
  • Mirror Clone Vertical - Create a vertically mirrored copy of selected objects (Edit->Mirror->Clone Vertical)
  • Flatten X - Flatten selected vertices by X axis (Edit->Flatten->X)
  • Flatten Y - Flatten selected vertices by Y axis (Edit->Flatten->Y)
  • Flatten Z - Flatten selected vertices by Z axis (Edit->Flatten->Z)
  • New Smoothing Group - Assign selected triangles to new smoothing group
  • Remove Smoothing - Remove smoothing from selected triangles
  • Auto Smooth - Opens an automatic smoothing dialog box
  • UV Editor - Open the UV Editor

Status Bar

Displays the current action, its progress, the current coordinates and the projection.

Tools Panel

There are buttons for selecting tools on this panel. They include the selection, modification of the geometry of objects, creating objects and projecting texture coordinates. (see Tools for more information)

Tool Options

This area shows the options of the current tool. (see Tools for more information)

Counter

It displays the number of vertices and triangles of the model. In the program settings you can also configure how this counter will display selected or hidden objects.
Groups
In order to ease the work in the editor, triangles are assigned to separate groups. In fact, each triangle can have its own group, but it is more often when a group is a certain element of the model, built of some number of triangles.

Separate groups can have shared vertices. Each group is assigned to certain material (see. Materials)

You can view the list of model groups on the panel given below. You can open it with Groups button on a Toolbar, through the menu View->Groups or with G key.



When you choose a group in a list, it is marked in all viewports:



You can choose multiple groups in a list (use Ctrl and Shift keys). Choosed groups can be affected by following functions:

- Select group.
- Deselect group.
- Hide group. It could be useful when the model has a complex structure and it's parts are overlapped. You can also hide all groups with View->Hide All or unhide all groups with View->Unhide All.
- Unhide group.
- Create a new group out of selected triangles (Edit->Regroup Selected, Ctrl+R). Empty groups are removed automaticaly.
- Same as previous, but also makes copies of vertices, if they are used by other groups (Edit->Isolate Selected, Ctrl+T).
- Rename group.
- Delete group.
Smoothing Groups
Smoothing groups affect the calculation of triangle normals. If two adjacent triangles are attached to different smoothing groups, the edge between them becomes visible.

Proper use of smoothing groups can significantly improve the visual quality of the model without creating extra vertices or triangles.

All triangles of this sphere are attached to the same smoothing group:



And here you can see the part of triangles attached to separate smoothing group:



When creating primitives, their triangles are automatically attached to smoothing groups. But it's often necessary to do it manually.

There is a panel with a list of smoothing groups, same as for groups:



You can open it with Smoothing Groups button on a Toolbar, through the menu View->Smoothing Groups or with S key.

Triangles which are not tied to any smoothing group represented with [unassigned] string.

- Select all triangles, linked to a chosen smoothing group.
- Rename smoothing group.
- Delete smoothing group.

There's also a group of Toolbar buttons for handling smoothing groups:

- New Smoothing Group - assign selected triangles to new smoothing group. Empty smoothing groups are removed automaticaly.
- Remove Smoothing - Remove smoothing from selected triangles.
- Auto Smooth - Opens a dialog box of automatic smoothing. Choose maximum angle at which edges between triangles will be visible, and selected triangles will be assigned to appropriate smoothing groups.

Here are examples of Auto Smooth function work at different maximum angles:

Materials
By default, all groups of assigned [default] material. To choose another material, you must add it to your list of materials and choose a texture for it.



- Create new material.
- Delete the selected material from the list.
- Rename material.
- Reload the texture of the selected material. This is useful if the texture was changed after it was loaded into the editor.
- Assign the material to selected groups. Any group having at least one selected triangle is assumed selected.
- Select all groups that are assigned to selected material.
- Load texture file.
Tools
To select a tool, click on the appropriate button on the tools panel.

Select Tool

This tool allows you to select certain model objects. The four buttons correspond to the four modes of selection:
  • Vertex (1 key);
  • Triangle (2 key);
  • Polygon - group of coplanar triangles (3 key);
  • Group (4 key);
Depending on the selected mode additional options are available.

In the triangles, polygons and groups selection mode there is By Vertex option available, that tells that the objects will be selected only if their vertices are selected.

In the groups selection mode there is available Group/Smoothing Group option, with wich you can choose the type of the group you want to select.

The Grow function is available in all modes. It selects the triangles with vertices selected. Here's the example:



To select an object, click on it with the left mouse button in any viewport. To select a few objects, hold Shift and press the left mouse button on each one of them.

To deselect an object, click on it with the right mouse button while holding Shift.

It is also available to select objects using frame in the orthogonal (2D) viewports. Hold the left mouse button and drag the pointer to select multiple objects. Hold Shift and the right mouse button and drag the pointer to deselect multiple objects at once.
Move Tool (Q)

This tool moves the selected vertices.

To move the selected vertices, hold down the left mouse button in any 2D-projection, and drag the pointer. If you select this tool, all 2D-viewports display arrows showing what axes the movement will be applied on:



Active axis are marked in yellow. To move objects on one axis, hover your mouse pointer on the corresponding arrow, then move the pointer while holding the left mouse button.

It is also available to move objects in a certain distance, entered in the input fields. Enter the appropriate values and click Move or press Enter to move objects.

The Clone option allows you to create an arbitrary number of object copies at a specified distance. Enter the number of copies in the Number of clones field and select the mode of distance calculation Interpolate or Extrapolate. See Figure:

Rotate Tool (W)

This tool rotates the selected vertices around the specified axis (pivot). When selecting a tool, 2D-viewports show the axis of rotation:



To rotate objects, drag the left mouse button in any 2D-projection. To move the axis of rotation, hover your mouse pointer on the circle and move the axis holding the left mouse button.

It is also available to automatically set the axes of rotation with the buttons in the tool options:

  • Bounds Center - center of dimensions of the selected vertices;
  • Simple Average - a simple average of the selected vertices;
  • Origin - origin of the coordinates;

The current rotation angle is shown on the status bar.

You can choose the angle step with the Snap Angle option.

Clone option is identical to Move Tool clone option.
Scale Tool (E)

This tool allows you to scale the selected vertices. When this tool is active, all the 2D-viewports show the scale frame and the cross representing the scale pivot point.

You can scale objects in several ways:

  • In any area of any 2D-viewport (along two axes);
  • With one of the cross axes (along one axis);
  • With the scale frame (along one or two axes);
  • Uniformly with special fields (along two or three axes).

Active scaling axis is marked in yellow. Use this field to uniformly scale objects along two axes:



Use this field to uniformly scale objects along three axes:



You can move the pivot point by dragging the cross center or with the Set Pivots buttons in tool options:

  • Bounds Center - center of dimensions of the selected vertices;
  • Simple Average - a simple average of the selected vertices;
  • Origin - origin of the coordinates;

It is also available to scale objects by numerical values entered in the input fields of tool options. To do this, type the desired values and click Scale or press Enter. In this case scaling will be applied from the pivot point mentioned in Relative to.

You can also use Half and Double buttons to scale objects.
Extrude Tool (R)

This tool includes three "sub-tools":

  • Extrude;
  • Bevel;
  • Inset.



The following options are available in Extrude mode:

  • Leave Original - leave a copy of the original triangles (a copy is reversed in the opposite direction). This is useful for turning plane objects to three-dimensional;
  • Direction - direction of extrude. When it is By Normals, vertices are extruded along their triangles normals. When the direction is Linear, the vertices are moved as in Move Tool;
  • Auto Smooth - if checked, the side triangles are assigned to smoothing groups, chosen by maximum angle between them (By Angle). Or all the side triangles are assigned to single group (Single Group).

All three modes can work by the numerical values. To do this, type the desired value and click Extrude/Bevel/Inset (depending on mode selected) or press Enter.
Polygon Tool

This tool has three modes:

  • Triangle;
  • Polygon;
  • Complex Polygon - it can have holes and a specific topology.

To create a triangle in Triangle mode click in 2D-viewports where triangle vertices should be located. If you hover your mouse pointer on top of already created vertex, it starts flashing - it means that when you click on it, it will be used as triangle vertex instead of creating new one. This behavior can disabled by unchecking the Snap to vertices option.



The polygons are created in same way. Except for the fact that all vertices should be created in that viewport, where the first click had been made. Edges of the polygon should not intersect.
Click on the first vertex of the polygon to finish building a polygon. After this, the triangulation (subdividing a polygon to triangles) will be applied.



When in Complex Polygon mode, the polygons are created by steps: first you specify the polygon outline, just like in Polygon mode; then you create inside edges.
After the outline is finished, new options become available:

  • Fill - the inside polygon will be filled with triangles;
  • Hole - the inside polygon will be a hole;
  • End Line - with this button you can end line without closing it;
  • Triangulate - apply the triangulation.



New triangles are facing the projection, in which they were created. You can check Two-sided flag if you whant the triangles to be created in two copies with different orientation of the front side.

On Surface mode, you can add / divide into polygons in 3D Look viewport with the same manipulations as in Complex Polygon mode.
Very useful for extruding various shapes:


You can also make holes Hole.

Plane Tool

This tool creates a flat rectangle facing to the current projection.
Enter the number of segments in height and width to the input fields Rows and Columns respectively. Use the Turn Edge option to control the rotation of diagonal edge:

  • No;
  • Each Row;
  • Each Column;
  • Each Column And Row.

The Invert option inverts meaning of Turn Edge.

You can see the results in Preview field.

To create a plane, hold the left mouse button and drag the pointer in any of the 2D-viewports.
Box Tool

This tool creates a box or a cube.
Creating a box is carried out in several steps (depending on options). By default, this process consists of two steps. The first one sets the Width and Height with dragging the mouse pointer in one of 2D-viwports, the second step sets the Length.

When Fillet segs is greater than zero, there's also a step, at wich the Fillet value is set:

A box with a fillet (Fillet segs = 3):



Height Stacks, Width Stacks and Length Stacks options allow you to set the number of segments along height, width and length respectively.

When the Cube flag is checked, the width, height and length values will be equal.

The current width, height, length and fillet value are displayed on the status bar.
Sphere Tool

This tool creates a sphere.
Two algorithms for constructing sphere are available: Sphere and GeoSphere:



The Sphere mode needs the number of Sides and horizontal segments Stacks to build a sphere. The GeoSphere needs the number of Iterations: the greater this number is, the greater will be the number of sphere triangles.

To create a sphere, hold the left mouse button and drag the pointer in any of the 2D-viewports. Location of the sphere center depends on Creation Method option.
Cylinder Tool

This tool creates a cylinder.
The following parameters are available for the cylinder:

  • Stacks - height segments;
  • Sides;
  • Fillet Segs;
  • Cap Segs.

Examples of cylinders with different parameters:



The Cap Type option specifies the type of cap triangulation:



The cylinder position depends on Creation Method option.
Tube Tool

This tool creates a tube.
The tube can have following parameters:

  • In Stacks - height segments of inner radius;
  • In Sides - the number of sides of inner radius;
  • Out Stacks - height segments of outer radius;
  • Out Sides - the number of sides of outer radius;

The tube is created in three steps: two steps to define the inner and outer radius (less one assumed inner), and one step to define the length of the tube.

If the inner radius of the tube is much smaller than the outer, it is useful to reduce the number of sides on the inner radius to lower the total number of model triangles.

The tube position depends on Creation Method option.
Torus Tool

This tool creates a torus.
The torus can have following parameters:

  • Sides;
  • Segs;

An example of torus with Sides=12 and Segs=12:



The torus position depends on Creation Method option.
Lathe Tool

This tool creates a rotational body by a given outline:



The number of body sides is controled by Sides parameter.

The angle of rotation is set by Angle parameter and the default is 360 (complete turnover). If the angle is less than 360, the body will have a slice. Triangulation of the slice is controlled by Triangulate Slice option.



Two edit modes are available:

  • Outline - editing the outline;
  • Axis - moving the axis;

The Axis Orientation option allows you to choose the rotation axis orientation: Vertical and Horizontal.

The Smoothing Group option allows you to pre-assign segments of the outline to a certain smoothing group. The segments are colored accordingly.

The lathe is created when you close the outline, or by pressing buttons Create or Close & Create. The latter one closes the outline before creating a lathe.

If the outline is not closed, the body may be "turned inside out". To correct it, use the Edit -> Reverse Vertex Order function.
Loft Tool

This tool can be used for different purposes. It is similar to multiple Extrude by a given path (outline).

To create the loft you need to specify the outline and section. By default, the section is a circle, the sides number of which controled by the Sides parameter.

You can also modify the shape of the section. To do this, click the left mouse button on the section view field. This will lead to opening the Section Editor dialog box.



The tools of this dialog box allow you to move, rotate and scale the section relative to the center. You can also mirror the section horizontally and vertically. Use the Move Vertex tool to move separate section points with the mouse pointer.

The following modes are available when creating the outline:

  • Outline - editing the outline;
  • Fillet - editing the fillet value;
  • Section Scale - editing the section scale;
  • Section Rotate - rotate the section;

All the editing is done in 2D-viewports. The outline is created by clicking the left mouse button. Single points of the outline can be moved while holding the left mouse button on them. Scaling, rotating and smoothing the corners are done with dragging the left mouse button in the viewport.

The Fillet Segs parameter sets the number of smoothing segments at the corners of outline.

The Close Caps options turns the caps triangulation on.

The Close Outline button connects first and last outline points to create a closed shape.

See the examples of the Loft Tool use below:

Mapping Tool

This tool is designed for projection of texture coordinates, as well as automatic texture unwrapping.

You need to select some triangles, for wich the texture coordinates will be calculated, before you use this tool.

The following projection types are available:

  • Planar;
  • Cylindrical;
  • Spherical.

Orientation of the plane, cylinder or sphere is controlled by the Projection option (if you want to orient it in one of the orthogonal projections), or manually by dragging the mouse pointer in one the 2D-viewports.
It is also possible to orient by the normal of any model surface. To do this, hover the pointer on the desired surface in perspective (3D) viewport and click the left mouse button.



To apply the texture projection press Remap button.

There are also available two algorythms of texture automatic unwrapping:

  • Unfold - all the triangles are turned to the same plane, forming one continuous element;
  • Flatten - triangles are divided into different elements and the planar projection is applied to each of them;

After clicking on one of the buttons for automatic unwrap, the dialog box opens, which displays the current unwrap. Here's an example of unwrap for a cylinder:



Click Next to set the next triangle as the starting. In some cases it can help to make better unwrap.
Click Ok to apply the unwrap.

When unwrapping mode is Flatten, this dialog box has also the Max. Angle parameter, which determines the maximum angle at which the triangles may belong to one element.

Typically this tool is used in combination with manual editing of texture coordinates (see Below).
UV Editor
To manually edit the texture coordinates, select the triangles and then press UV Editor button on a Toolbar (also available through View->UV Editor... or T key).



UV Editor window consists of two views and a toolbar.

  • Map View;
  • Model View;

One vertex in Model View can have separate points (texture coordinates) in Map View.

You can select objects in any view (vertices, edges, triangles, and the elements).



Select mode can be changed with toolbar buttons or 1, 2, 3 and 4 keys.

When one or more objects are selected, the frame is shown around them. You can move, rotate and scale objects with this frame.

To move objects, place the pointer inside the frame and move it by dragging the left mouse button.



To rotate objects, place the pointer over one of the frame corner circles and rotate objects by dragging the left mouse button.



To scale the objects, place the pointer over one of the points of the frame and scale by dragging the left mouse button.



To move a single vertex, place the pointer over the vertex and move it while pressing the left mouse button.



You can also mirror the objects vertically and horizontally with the toolbar buttons or with Ctrl-I and Ctrl-L keys.



When objects are selected, shared objects are marked in blue:



To join two vertices (actually two texture coordinates of same vertex), select them an press Weld or Ctrl-W. If selected texture coordinates correspond to different verices of the model, the function will have no effect. Weld function is useful for creating a continuous unwrap out of the separate elements.



Unweld (Ctrl-U) has the opposite effect: after pressing it each triangle vertex will correspond to a separate vertex in Map View.

Regroup function allows you to isolate objects in a separate element:



In the drop-down list on the toolbar, you can choose the material for which you will perform editing. This list is active only if you have selected triangles with different materials before opening of the UV Editor.

You can undo the last action and repeat the last canceled action with Undo and Redo toolbar buttons, or with Ctrl-Z and Ctrl-Y

Tile Texture option turns texture tiling in Map View on.

Snap To Grid option turns on snapping to grid.

Show Wireframe option turns on the wireframe overlay in Model View.

Copy and Save buttons allow you to copy or save current texture mapping as image. This can help you to draw the texture from UV map.
2 Comments
IndEE 14 Jul @ 2:15am 
Isn't there an option in the UV map menu that if I grab the corner to scale the given object in all directions, does it do it proportionally on all sides? So there won't be any distortion on the surface? For example, if I just want to reduce the given part, but in equal proportions vertically and horizontally?
Alien8472 12 Mar, 2024 @ 10:10am 
Anywhere I can get this guide in pdf / epub?