Pretty Poly Editor Documentation


[Previous] [Index] [Next]

I. PPE Manual - 3. Quickstart


Getting Started

To run PPE, you need to set the PPE_ROOT variable to wherever PPE's directories are installed. Under Linux, you'll need either:

   setenv PPE_ROOT  /usr/share/ppe

or

   PPE_ROOT=/usr/share/ppe
   export PPE_ROOT

Then you can start PPE just by launching it's binary:

   ppe

...or you may optionally pass the name of a 3D model and/or a Python script on the command line:

   ppe examples/data/models/dog.ac

First sight

Once PPE is started, you see the toolbox-window and one (empty) viewer-window should which should look something like:

The Toolbox Window
A Viewer Window

The blue and green grids that you see lie along the "current working plane" which defaults to the X/Y plane. The green section has a spacing of one model unit, the blue section is at a 10x10 model unit spacing. Notice that you can toggle these on and off using the check boxes in the 'Grid' section of the toolbox window. There is also a x100 grid which is drawn in magenta and disabled by default.

If you move the mouse around over the grid, you'll see a set of three white lines that intersect at the position of the "3D cursor". The cursor stays glued to the grid so if you move the mouse to point at the 'sky', the cursor will remain on the X/Y plane (probably out by the 'horizon').

The GUI controls in the 'viewer' window control only the contents of that window - the controls in the 'toolbox' window control all currently opened windows.

Key and Mouse Bindings.

PPE allows you to connect any keystroke and any combination of mouse buttons and shift/ctrl/alt to any command. This document describes the default set of bindings - but bear in mind that if there is anything you don't like - you can easily change it. We like to think that we chose carefully to produce a consistent scheme.

Loading and Saving models.

The menu bar is set out in a fairly conventional way. There is a menu bar for the Toolbox window, another for the Structure window andyet another for the viewer-window.

The Viewer 'File' menu includes 'New', 'Open', 'Merge', 'Save', 'Save As' and 'Quit' options. You can load and save models in any format that PLIB supports - which includes (at last count) 18 import and 8 export formats.

Because some formats are fundamentally lacking ways to represent some of the things that PPE can do - and not all loaders and writers are 100% perfect, you should always save a copy of your model in ".ssg" format. SSG is the underlying model representation scheme used by PrettyPoly and the ".ssg" format should capture everything.

The PrettyPoly main program has really no idea of what file formats it supports - that's handled down in the PLIB level - to the exact list of what file formats PPE supports will be found on the PLIB web site.

At time of writing, you can import:


  3DS AC    ASE ATG   DXF FLT
  IV  M     MD2 MDL   OBJ OFF
  SSG Strip TRI VRML1 X

...and you can export:

  3DS AC  ASE ATG DXF M
  OBJ OFF QHI TRI X

If you have problems with your models coming up with a red and white chequerboard texture, then PPE is having trouble locating the texture maps that go along with the models. You can override the default texture directory by using the "Edit/Preferences/Default Texture Path..." menu in the Toolbox window. You can also set a default model path in the same area. That's especially relevent for file formats that can pull in other 3D files (eg OpenFlight).

If you need a model to 'play' with, look in the PPE distribution under 'examples/data/models'.

Moving the Camera

PPE has several ways to move the 'camera' around - one is to use the numeric keypad:

The numeric keypad buttons drive the six degrees of freedom. The keys control VELOCITY. So press (say) '4' and you'll start to rotate to the left, press '4' again and you'll rotate faster. Press '6' once and you'll slow down again, press '6' again and you'll stop rotating. Use '5' or '0' to stop all rotation or stop absolutely all motion.

The Fast and Slow (/ and *) keys operate to make the motion more or less sensitive.

It takes a little practice to get good with the keypad. Another camera movement mechanism is to select the 'Move Camera' radio button on the toolbox window.

The advantage of using the keyboard is that it works in ALL PPE modes - where the mouse will at times be needed for other operations (selecting things, building things, etc). People who use their left hands for the mouse can operate PPE ambidexterously.

Many of the PPE editing modes also allow camera motion using the mouse.

Escape from Flatland.

The average computer mouse is a 2D pointing device - yet we are working in a 3D world. There has to be some means to arrange to point to any location in 3D space using only 2D motion. Mastering the many ways to deal with this is central to learning how to use any modeller.

PPE achieves this by means of the 'Current Working Plane' ('CWP' for short).

The Current Working Plane

Each viewer window can have it's own 'working plane'.

When you move your mouse around in the large 3D viewing area, PPE traces a ray from your eye, through your 2D mouse cursor and onto the CWP and that point is marked by the 3D cursor - which is drawn as three intersecting white lines.

That's a complicated way to say that the 3D cursor follows your mouse pointer. Being stuck on this surface is frustrating - but tap the spacebar and you'll find that you can move the mouse at right angles to the plane, hit space again and you'll be back on the plane.

You have a rich set of ways to position CWP to wherever you need it to be when creating objects. Since there is a separate CWP for each viewer window, all the controls for CWP positioning are in the viewer window in the box labelled "Current Plane".

The Current Line and Current Point

Similar to the 'Current Working Plane', there is also a 'Current Working Line' and 'Current Working Point'. These are used by various PPE operations to be described elsewhere.

The Current Line is not rendered by default, you have to click the 'Line' checkbox in the Render section of the Toolbox window - when it'll appear as a yellow line stretching off to the "horizon". As with the current working plane, you can make it lie along one of the axes by clicking the X, Y, or Z radio buttons in the 'Current Line' area of the Viewer window. You can also select two points and click 'Thru Points' to make it run through them both. Just as with 'Thru Points' in the current plane, you can select more points and the line will do the best it can to run close to all of them. Finally, you can offset the line so it runs through another selected point but remains parallel to its former direction.

The Current Point is marked by three blue lines (like the 3D cursor only larger). It starts off at the origin and can be repositioned to any selected point (and if you have multiple points selected and you pick 'Thru Points', it'll move to the centroid (average) of those points.

The Grid

The grid is the visual representation of the Current Working Plane in each viewer window. All the grid lines lie in that plane. Using the "Grid" controls in the Toolbox window, you can turn on or off a one-unit grid, a ten unit grid or a one hundred unit grid. You can also tell PPE to draw the grid in different ways: The Current Line, 3D cursor and Current Point always render in 'Ghost' mode.

The 3D Cursor

All of the cursor controls are in the ToolBox Window inside a box marked 'Cursor'.

Sometimes you'll need to position the 3D cursor somewhere and then use the mouse to click on a menu item or something. Typing 'f' (freeze) will freeze the 3D cursor in place while you do that. Just type 'f' again to un-freeze it.

As you've seen, the cursor generally moves around on the current working plane (or at right angles to it if you tap the spacebar). This is generally the most useful mode - but you can also make it stick to the current working line or stay glued to the current point by clicking on Plane, Line or Point radio buttons.

The 'Screen' button allows the cursor to be moved parallel to the plane of the screen. You'll generally want to position the cursor at the desired distance, then freeze it (hit 'f' - remember?) before selecting 'Screen' and un-freezing. Notice that when you move the camera, this also moves the plane that the cursor is moving in.

You can also select 'GridSnap' in which case the cursor will snap to the nearest integer coordinate (this should be adjustable...but it isn't...yet). Notice that this may move the cursor a little way off the current plane/line/point if necessary.

The Renderer.

You can choose to render the polygons in your scene with and without textures, in Wireframe, Filled (or both), with and without backface culling. If you have filled, but not wireframe, and set backface culling on (the default setting) then frontfaced polygons will be filled and backfaced polygons will be wireframed.

You can see some backfaces through the open bottom of this car model:

You can also turn off the display of the 3D cursor, the current line and the current point - this has generally little benefit - but if you are taking screenshots or something, it can be handy.

Field Of View

The rightmost box at the top of the viewer window allows you to set the field of view in degrees (i.e. zoom into and out of the display), or if you select 'Orthographic' mode (use the 'View' menu), you can control the scale of the window. Beneath that is an indication of the frame rate your model. This is clamped to 30Hz by default - but there is an option in the 'View' menu to remove this frame rate limiter and run at full speed. However, 30Hz is plenty fast enough for modelling (if your graphics hardware can go that fast!) and limiting the frame rate allows more CPU time for other programs that might be running.

The Current Mouse Mode

The mouse can be used for a variety of functions - and this is controlled by the 'Mouse Mode' radio buttons in the Toolbox Window.

There are keyboard shortcuts for changing modes:

The following do not have keybindings (by default at least): By default, you are in 'Select Vertex' mode - where the mouse is used in the 3D window to select vertices.

The functions of the mouse vary somewhat from one mode to another. The collection of functions for a particular mode is called a 'binding'. Here are the current mouse bindings for various modes:

Move Camera Mode

In this mode, the camera is moved according to the mouse motion. You can move the camera at any time using the keyboard - but for those who prefer moving the camera with the mouse...

Moving the mouse with the left button down spins the model in heading or pitch about the origin. Using the right button rolls the image. Hold down the shift key translates the image, left/right and up/down with the left button, in/out with the right. Those controls "move the model" - holding down the control key moves the camera instead.

In most other modes, you can spin the object around without changing modes using the middle button (or if you have only a two button mouse - perhaps both left and right buttons together may work - depending on your mouse, your Operating System and the settings of your Window Manager).

Select Vertex/Primitive/Object

This mode allows you to change which things are selected.

Left-click and drag causes a magenta box to appear - when you release the mouse button, anything inside it will be selected. When you select a vertex, the primitive that contains it and the object that contains that are also selected. If you select in 'Primitive' mode then you won't select any vertices - but you can click any part of a polygon to select it. Similarly in object model, clicking on any part of an object selects all of it.

Holding down the shift key allows you to add more things to the currently selected list.

Holding down the control key subtracts the things in the magenta box from the current selection.

In this screenshots, you see a Tux with the vertices and polygons at the top of his head selected. The selected vertices are highlighted by white crosses. The selected polygons are highlighted by yellow lines around them:

Move, Rotate and Scale Modes

In these modes, the currently selected vertices can be dragged around using the 3D cursor. Click anywhere on the screen and then drag the mouse - the selected vertices will follow.

Rotate mode does not appear to work in PPE 0.0.1. TexMove, TexRotate and TexScale Modes will ultimately allow you to position the texture on the selected vertices - but this too is non-functional in 0.0.1.

Build Mode

The build mode has an additional 'chooser' widget in the Toolbox window. Now you may position the 3D cursor and click to position a vertex. Depending on what kind of primitive you are building, different things will happen. You can click down and create the vertex - and then drag it around until you have it where you want it. Only when you release the mouse button will the primitive actually appear.

Notice that if you enter (say) a triangle strip in the 'wrong' order, it'll come out back-facing - so you'll only see the back faces. The general rule is to enter points in an ANTICLOCKWISE order.

If you get it wrong, just select the primitive you created and in the Viewer window's menu, hit the 'Surface' menu and select 'Reverse'. Some primitives don't reverse very well - and the triangulation of the primitive may change. (Try this with a triangle strip with an even number of triangles in it!)

Don't forget that even during vertex entry, you can move the current plane, current point or current line - and also turn cursor gridsnap on and off or switch the cursor from current plane to line to point. You can even enter some of the points in one window and some in another!

Once you have completed your primitive, you can start another either by:

Here are the sequences for entering various primitives:

Colour Selector

This pops up a colour selector. It changes the 'current colour' - which is displayed in the Toolbox window and applied to each newly created vertex.

You can change the colours of existing vertices by selecting them, picking a new colour and then going to the 'Selection' menu in the Viewer window. That menu allows you to copy the colour from the Toolbox to the Selected vertices - or you can extract the colour of the vertices and place them back in the Toolbox 'current colour' box.

You can also change the colours of the screen background, the grids, menu's, etc. Just select Edit/Preferences/SetColourOf.../ whichever thing you want to re-colour.

Material selector

In many cases, OpenGL programs use a combination of the colours stored at the vertices of the polygons and a complex set of other "material" properties. PPE extends that idea to include textures and other OpenGL "state" elements such as backface culling, blending, alpha testing and so on.

The (initially) white sphere in the Toolbox shows what the current material looks like when applied to a sphere of the current colour. Clicking on the sphere brings up the material browser. Materials can either come from the model itself (Select 'Scene' in the 'Source' box) or from a pre-built library of materials. This is useful for large scale production of models in a team where you want a consistant 'look' for a range of objects - or where you want to keep careful control of texture usage.

The browser window allows you to see what materials are present. You can 'Edit' an existing material, create a 'New' one, 'Copy' a material or 'Delete' one. Clicking on the thumbnail image (initially a sphere) with the current material applied to it also performs the 'Edit' function. When you find the material you want, click 'Apply' and it'll become the current material in the Toolbox window.

Materials are applied per-primitive rather than per vertex - but otherwise, they behave much like the current colour. Every new primitive takes the current material - and the 'Selection' menu in the viewer allows you to change the material of existing primitives or extract the material from a primitive into the 'current material' window - from which it can be edited.

When you Edit a material, you'll see a row of thumbnails that represent the last five materials you've used. Clicking on one of them makes it the one being edited. The editing controls are fairly obvious to anyone who does OpenGL modelling - so I won't go into details here.

Notice that in both the browser and the editor, you can select between displaying the material on a sphere, a cube or a cylinder and you can also select a chequerboard background so you have a better appreciation of the effect of translucent surfaces.

The Structure Viewer.

PPE is designed to allow multiple views of your model - and you can open more 3D viewer windows from the "Windows" menu in the viewer window you already have.

There is another way to view your model though - select the 'Open Structure Window' option in the Windows menu and you'll see a diagrammatic view of your model showing how it is structured. The heirarchy follows the PLIB/SSG library structure which is documented here

The Clipboard.

This includes the expected "Cut", "Copy" and "Paste" options and also a set of similar operations that operate on a "Global Clipboard". The global clipboard is actually a file "${HOME}/.ppe_clipboard.ssg". Since it's on disk, you can cut out (or copy) a part of one model, and paste it into a different model running in a second invocation of PPE. The global clipboard is NOT erased when PPE exits so you can cut out a part of a model, exit PPE completely and then start another PPE session and paste.

The clipboard is an absolutely standard ".ssg" file - so you can just rename it and use it like any other ".ssg" file if you like. For obvious reasons, I don't recommend that you edit the clipboard directly using PPE - people who do that are likely to vanish into a parallel universe in a puff of purple smoke.

The Edit Menu

You can also perform "Select All" and "Select None" operations from the Edit menu. As of version 0.0.1, the "Undo" and "Redo" options are non-functioning - this will be implemented *eventually*.

The View Menu

This contains Perspective and Orthographic options, camera positioning commands that attempt to get all of your model in view or the current selection in view. 'Center View' points the camera towards the 3D cursor.

You can also load and save camera positions to ".cam" files on disk.

The Windows Menu

This includes commands to open PPE windows of various kinds.

[Previous] [Index] [Next]