How to use kludge3d

Three-dimensional models used in games are composed of three things: vertices, polygons, and (optionally) textures. The job of a modelling application is to allow the user to manipulate those vertices and polygons into the desired arrangement. The purpose of this little tutorial is to help you, the users, understand how to do that using kludge3d.

When kludge3d starts up, there are 4 views visible. All 4 are labeled. The orthographic views are projected in such a way that the positive directions for the two axes are pointing up or to the right (just like in math class). This can be a bit confusing if you are doing engineering work and are acustomed to working in first- or third-angle projections. Future versions of kludge3d will likely allow the view projections to be changed.

In kludge3d, only one model can be worked with at a time. To begin messing around with kludge3d, load a model using the "load" button, or create a new one with the "new" button. Once you're ready to go, take a look at the row of buttons near the top of the window, to the right of the new/load/save buttons. These buttons each represent an interactive tool that can be used on your model. Read the tooltips; their functions should be self-explanatory. To the right of these buttons is a row of 3 icons. These 3 icons indicate the function that each of your 3 mouse buttons is currently bound to. To change the action that one of your mouse buttons will do, use that mouse button to click on the desired tool button. The indicator for that mouse button will change. What follows is a table explaining the function of each interactive tool, with additional entries explaining the tool's function when the Control or Shift keys are held down.

Icon Name Normal Function With Shift Key With Control Key
Object Select When clicked, will unselect all objects, and select a single object under the cursor. When clicked and dragged, will select all objects within the selection box. Same as before, but will not unselect previously-selected objects. Use this to expand a selection. When clicked, will unselect the object under the cursor. When clicked and dragged, will unselect all objects within the selection box. Use this to make a selection smaller.
Object Move When clicked and dragged, will move all selected objects. This tool is ignored when used in the 3d preview. No change in behavior. No change in behavior.
Object Add When in Vertex Mode: when clicked, will create a new vertex under the cursor. This new vertex will be added to the Current Mesh. Ignored in 3d preview.

When in Polygon Mode: when clicked on a vertex, will start a new polygon. This new polygon, when completed, will be added to the Current Mesh. To finish the new polygon, click in an empty space.

No change in behavior. No change in behavior.
Object Delete When in Vertex Mode: when clicked, will delete the vertex under the cursor.

When in Polygon Mode: when clicked, will delete the polygon under the cursor.

No change in behavior. No change in behavior.
View Zoom When clicked and dragged, will change the magnification for the view. No change in behavior. No change in behavior.
View Pan In Orthographic views: when clicked and dragged, will move the camera.

In 3d preview: when clicked and dragged, will rotate the camera.

In 3d preview: when clicked and dragged, will move the camera. No change in behavior.

Some important things to remember, that may not be obvious:
  • When doing things like adding a vertex or polygon, or applying textures, remember to set the current mesh, via the Groups notebook tab. The current mesh is where the newly-created polygons will be placed.
  • When adding polygons, remember that OpenGL likes polygons with counter-clockwise winding.
I won't cover the basics of modelling here. Here's a quick explanation of how to create a model from scratch:
  1. start up kludge3d and (optionally) click on the "new" button
  2. in the Groups notebook tab, highlight the World object and create a new group
  3. click on the new group
  4. make sure you're in Vertex mode, select the Add Object tool, and start placing vertices
  5. when you're ready to start creating polygons, switch to Polygon mode. Click on three vertices (or four, or five...) with the Add Object tool, and a polygon will be created with those three vertices as corners. Once you've selected the vertices you want include in the polygon, click on an "empty space" (where there are no vertices) and the polygon will be completed, and will then be added to your model.
  6. when you're ready to texture your model, check out the "Texturing" tutorial below.

  Tool Palettes

This is somewhat of an advanced topic. If you're new to kludge3d, you can safely ignore this section (for now).

Mice and trackballs typically have, at most, only 3 buttons. This limits the number of tools that the user can immediately access, in kludge3d, to just 3. If you are working on a model and you need to frequently switch between, say, the object-add and object-move tools, it can be frustrating to have to constantly move the cursor to the toolbar and then move it back to your work.

I thought to myself "There must be some easy way to make more than 3 tools immediately available to the user. Perhaps by organizing the tools into groups of 3, and allowing the user to quickly switch between those groups, I can make the system easier to use." The solution is simple enough, and works very well.

A group of 3 tools in kludge3d is called a "tool palette". The tools in a palette are set by clicking on the toolbar buttons (as always... see the above section). There are currently 4 tool palettes in kludge3d (an arbitrary choice; 4 seems like a good number... although this number may increase in the future). The user can switch between tool palettes by using their mouse's scroll wheel. As always, the user can place any tools they want in their tool palettes; the contents of the palettes are retained until kludge3d is exited. This allows the user to rapidly switch between several sets of tools, without having to move their cursor at all.


When you're ready to (re)texture your model, start by loading a texture. Textures are loaded using the Textures notebook tab. The only image format that is (currently) recognized is the SGI format (aka the .rgb format). Just click on the load button, select an SGI image file, and it will appear in the list.

An aside:
You maight be aware that opengl has some strict rules about the dimensions of textures. Textures used with opengl must have dimensions that are an even power of 2 (ie 32, 64, 128, 256, etc...). When a texture is loaded into kludge3d, is is automatically scaled to several predefined resolutions, so you don't really need to worry about your image dimensions just yet. Note that the texture resolutions used when rendering, previewing, and mapping textures are all different. The "rendering" resolution, in particular, is rather small, and as a consequence your textures might look pixelated when rendered in kludge3d. This was done to improve performance. Don't Worry! When your model is loaded into whatever game or program you intend to use it with, your textures will appear at their full resolution.

Once you have a texture loaded, you can proceed to apply it to a mesh. First, select a group from the Groups tab. Switch to the Textures tab, and click on "Apply Texture". The "current texture" will be applied to the "current group/mesh". You will note that the textures don't look quite right at this point. That's where the next tool comes in:

The Texture Application dialog:
This dialog is, in my obviously-biased opinion, a rather impressive bit of code. To use it, first set the current group/mesh, and then select some polygons within it. (Polygon mode, Object-Select tool). Then select the Textures tab and click on "Edit Texture Coords". The texture application dialog will pop up. From here, you can remap the texture coordinates using the remap buttons, or by hand by selecting the vertices (mouse button 1) and dragging them around (mouse button 2).

I've provided some convenient keyboard shortcuts:
  • use the arrow keys to move all the vertices at once
  • hold down shift and use the arrow keys to scale the vertices

That's it!

SourceForge Logo