ZModeler2 Lesson#1: Editing Levels.

Editing Levels.

Objects (mesh models) consist of elements. They are, in general, a set of points in 3D space (called vertices) and a surface that resides on these vertices. Surface is made of triangles, or (more rarely) quads or polygons. Polygons are resided on vertices and alltogether make the 3D volume of the object - this is what you actually see in 3D games. Complex shapes are not made of scaled and rotated boxes - they made of properly allocated vertices in 3D space and a polygons stretched on these vertices. So, before diving into world of 3D modelling, you will need to learn how to work with these important elements of 3D meshes. Working with such an elements in ZModeler is called to work on sublevel. This can be vertices level, polygons level and more rarely edges level.

Take a look at Editing Levels toolbar in top of ZModeler window. It contains buttons for the following levels (left to right):

  • Manipulators sublevel - will be described later;
  • Vertices sublevel;
  • Edges sublevel;
  • Polygons sublevel;
  • Objects (or Nodes level).
    Until this point, you have always been working on objects level and edited objects as whole - the Objects button in this toolbar have been pressed all the time. Now, a turn of vertices.

    Vertices level.

    Reset the scene by selecting File/New in main menu. Then create a Sphere primitive (the same way you've created Box primitive earlier). To work with vertices, you need to switch object to vertices level. Press Vertices button in toolbar (hotkey: '1'), highlight Sphere object with mouse and click with left mouse button. It will turn to vertices level. When object is on vertices level, a red dots are drawn - these are vertices themselves:

    You can move mouse cursor over the vertex and it will be highlighted. When vertex is highlighted, it's neighbour polygons (polygons that reside on this vertex) are highlighted. Plus, a green line drawn. This line is a vertex normal vector or simply a normal.

    Vertex Normal specify how this vertex reflects the light and how neighbour polygons are shaded. In real world, light is reflected by surfaces - in each micro-point surface reflects the light depending on it's reflective properties, roughness, bumpness and other factors. Performing such a reflection of light in realtime applications is computativly expensive, so using Normals in vertices only is a simple solution.

    Currently, consider that each vertex has a normal and this normal needs to be directed somehow, so vertex can reflect the light and surface is shaded. You don't need to bother currently how to direct normals and how to achieve good shading - this will be discussed later.

    Once you are on a vertices level, select upper half of vertices with Select\Quadr tool:

    Notice that neighbour polygons are shaded red - just like an object was shaded when it was selected. Now, pick a Modify\Move tool and switch to selected mode. Selected vertices will display their normals (and an upper half of the sphere will look like a hedgehog). You are ready to Move selected vertices:

    Move vertices up (you can use axes contstraints to move perfectly), switch selected mode off, and switch to Objects level by pressing an Objects button in toolbar (hotkey: '4'). You have just made a capsule (or cystern) out of simple sphere:

    Polygons level.

    Press Polygons level button in toolbar (hotkey '3'), highlight capsule object and click on it. It will turn to polygons level. When object is on polygons level, red dots are drawen in the middle of each polygon. To highlight a polygon, move mouse inside polygon. If there are several polygons under cursor, the one whose red-dot most close to cursor will be highlighted. Of cause, you can still use "hit " technique to highlight the polygon you need.

    Using Select\Quadr tool, select bottom area polygons and some polygons in central area. Polygons will be selected if their red-dot is inside area of selection:

    Switch to selected mode (note, no visual changes occure on polygons level when you switch selected mode on/off). Since ZModeler does not move polygons, we shall simply delete selected polygons. Pick a Modify\Delete tool and click in the view. Selected polygons will be deleted.

    You can use 'Del' hotkey to perform delete operation without selecting a tool in commands bar. Using hotkeys save lots of time during modelling.


    Switch selected mode off and switch to objects level.

    Edges level.

    Press Edges level button in toolbar (hotkey '2'), highlight capsule object and click on it. It will turn to edges level. Object does not contain edges as elements - they are a bit 'abstract'. Edges are made of polygons boundary (or exterior) - triangle polygon has three edges. Edges level have been added to ZModeler since it has valueable modelling benefit, but it has nothing to do with final model - how it's handled and drawn by game engine. To highlight an edge, move mouse cursor over any line between tow vertices and according edge will highlight - these vertices will show their normals and polygons that use highlighted edge will be drawn with highlight color. Since an edge is just a pair of connected vertices, you can move it just like vertices. Note, that most of tools does not work with edges in selected mode - you work with single edge at a time only. Tools that bring edges benefit in modelling will be discussed later.

    You can switch frome one sub-levels (vertices/polygons/edges) to another sub-level by clicking an according button in toolbar (You do not need to switch to objects level). When an object is swtiched to sub-level, you can simply press required sublevel button or hit a hotkey ('1', '2' or '3'). If you are on sublevel in one object and need to switch to another object, you have to switch to objects level first.

    Multiple objects can be switched to sublevel at a time. To switch several objects to sublevel, you have to select these objects first, then switch to selected mode then switch to sublevel (all selected objects will switch to this sublevel). Then switch selected mode off and you can edit several objects at a time. When you are on sublevel, object that wasn't switched to sublevel will be shaded with gray lines (no vertices or polygon dots will be drawn it such an object).