VPT WinFrame-3D-Viewer Operation


Invoking WF-3D

It is helpful to define a convenient alias or shortcut to where you have WF-3D installed on your computer.
For example, in Unix C-shell:   alias wf3d /home/bart/tools/wf3d.exe. Then invoke WF3D with your file(s) and/or socket(s) on the command-line.
For example,   wf3d geom.dat .


Basic Usage Instructions

Due to the rich variety of control operations supported, the WinFrame-3D (WF-3D) Viewer is modal - meaning that you must first select a control-mode by hitting a keyboard board key, and then future mouse and arrow commands are interpreted according to the selected mode - until a new mode is selected.

The primary modes are listed on your computer screen when you first invoke WF-3D. For example, mode (4) will interpret mouse (drag) movements to rotate the camera's view-point (camera's location) around the camera's last aim-point (often the origin (0,0,0)), much like walking around a museum display. Mode (6) will rotate the camera's aim-point, much like turning your head, up-down/left-right. Mode (7) will zoom the camera toward or away from whichever direction it is pointing.
Below is a brief menu of the command modes:


Modes:  (Change by pressing number/letter key.)
 1. Move camera into scene (zoom) (z and x).
 2. Move camera around scene (x and y).
 3. Translate camera over scene (xy+aim).
 4. Rotate camera about aim-point (constant radius).
 5. Move camera's aim-point. (xz).
 6. Rotate camera's aim. (y-x/z).
 7. Zoom camera to/from pointing direction.
 8. Move last-added object (xz).
 9. Rotate last-added object (y-axis).
 s. Start/stop AutoPan - Automatic camera rotation about origin.
 t. Start/stop AutoTour of outer loop..
 z. Start/stop AutoZoom - Automatic zoom toward origin.
 p. Snap Picture.
 c. Show Camera Coordinates.
 e. Show Frame Rate stats.
 f. Freeze object motions.
 m. Meta functions.
 h. Help.
 q. Quit.
Pressing the number or letter shown (with mouse focus in the WF3d window), either puts the viewer in the mode to control the specified attribute or carries out the intended function.

For example, pressing 1 causes left-right arrow presses (or mouse left-right movements) to move the camera position along the Z-axis toward or away from the origin. Pressing 2 causes the arrow keys (or mouse) to move the camera in the X-Y plane. With a little practice, you can become adroit at manipulating the camera's position and pointing direction, around and through a scene.

Other commands, such as p cause a picture to be snapped of the current scene, without altering the pointing mode. Pressing c causes the camera's coordinates to be displayed. This is handy when trying to find a good initial camera setting to place in a file.

The letters s, t, and z put the camera into preplanned trajectories of continuous motion. S Scans around a circular orbit of the origin at whatever radius you position it. You can even change the radius as it scans. T takes the camera on a Tour which follows a similar orbit, but looks ahead in the direction of motion, instead of toward the center. Z Zooms the camera toward the origin, where it begins a slow rotation looking out around the horizon. Pressing any of these letters a second time, stops the camera's motion. Pressing it again resumes it. You can switch smoothly between motions by simply switching between them directly.

Less frequently used commands are relegated to the second level Meta menu. Go into / or out-of the meta mode by pressing m.

Some other arcane commands are not listed, such as:


Selecting Objects by Mouse - Identify-Object Mode

You can select or identify objects in WinFrame-3D by clicking near them with your mouse. Go into "Identify-Object" mode, simply type "I" or "i" inside the viewer. Then clicking your mouse near any object will identify it. It will print to the screen the name of the object you clicked closest to (relative to the object's origin point).

If you are connected to a socket, it will send a tag of the following format to your connected program:

<SelectedObject name=??? x=?? y=?? z=?? />
... Where the question marks (?) represent the respective data, being the object's instance-name, and xyz-location.

You will want to go out-of "Identify-Object" mode to move around. Simply type "I" or "i" to toggle out-of, or back into, that mode.

Note - There could be some confusion if your objects were defined at an offset relative to the origin at definition time. For example, suppose an object-type was defined with all its vertices laying in the region 90-100 in X. Then you instantiate the object at 4500 in X. The object origin (original 0.0) will be at 4500, but the object vertices will appear at 4590-4600, due to the defined-in offset. Clicking near 4500 will select the object, because that is the object's assumed center. However, clicking out at 4600 may select another object and create some confusion. Two remedies follow:

  1. Define your objects with their centers at 0,0,0. IE. If your object is 20-wide, define the vertices to lie between -10 and +10, so the center is at 0.0. Instantiating objects in WF-3D merely translates the definition coordinates, relative to the defined origin, to the instantiated location. Likewise with movements. If you define objects origin-centered, they will also rotate nicely. Otherwise they will appear to orbit the reference origin while rotating.

  2. As a debugging aid, invoke the viewer with verbosity set to 1.
    Example:
                wf3d geom.dat -v 1

    This will then display the raw coordinates it thinks you are pointing to, the coordinates of the nearby object reference points, the difference (distance) in projected point error from the objects and your mouse, and it will show you visually with blue lines where the reference points on the near-by objects were, and with a yellow line it will point to the origin of the selected object.


See also: WF3d