HBSurf v1.0 by Richard C. Davis - rcdavis@cs.berkeley.edu Yizhou Yu - yyz@cs.berkeley.edu ----------------------------------------------------------------- Contents -------- 1.0 Overview 2.0 Running HBSurf 3.0 Working with HBSurf 3.1 Navigating 3.2 Moving Points 3.3 Changing Levels 3.4 Other Commands 4.0 Further Info 1.0 Overview ------------ "HBSurf" is a Hierarchical B-Spline modeler very similar to the one described by David R. Forsey and Richard H. Bartels in their SIGGRAPH '88 paper, "Hierarchical B-Spline Refinement." It allows a user to create smooth patches of surface with fine details and export these patches to files that can be rendered by the public domain ray-tracer, POV-ray. This modeler is "hierarchical" because it allows points on the patches surface to be maipulated at many "levels." At a low level, moving points on the surface will create large bulges around those points. At a higher level, moving those same points will create smaller bulges. Thus, manipulating points creates "coarse" changes at low levels and "fine" changes at high levels. This modeler was created as a class project for a Computer Aided Geometric Modeling class. Its interface is rather clunky, but, with some patience, it can be used to create very detailed surface patches for use with POV-ray, or just for kicks! 2.0 Running HBSurf ------------------ To run HBSurf, just type "hbsurf" from a Windows95 or WindowsNT prompt or click on its icon. If you run HBSurf from a prompt, you have the option of entering the name of an "hbs" file saved earlier by HBSurf. 3.0 Working with HBSurf ----------------------- This section describes the basics of using HBSurf. 3.1 Navigating -------------- When HBSurf starts, the user is presented with four views. Three are orthographic views of the front, top, and side of the patch, and the fourth is a perspective view that can rotated to have any viewpoint. In all views, the patch can be scaled or translated to any desired size or position. All changes to the position, size, or orientation of the patch are done with the right mouse button. HBSurf uses the current "orientation mode" (shown at the bottom of the screen) to determine what kind of change is made by the right button. The user cycles through these modes by pressing the "o" key. In "Translate" mode, the patch can be moved in the plane of the projection by dragging it with the right mouse button. In "Zoom" mode, the patch can be scaled up and down by pressing the right button in the desired view, dragging up to scale up or down to scale down, and releasing the right button. In "Rotate" mode, the patch can be rotated as if it were inside a crystal ball by dragging with the right mouse button. This works only in the perspective view. In "Spin" mode, the patch can be rotated like a disk in the plane of the projection by dragging it with the right mouse button. This works only in the perspective view. 3.2 Moving Points ----------------- Contrary to what you might think, moving points is not as simple as clicking on them and dragging them with the left mouse button. Rather, each point must be *selected* first, and then it can be moved in any view until de-selected. We did this so that it would be possible to select a point in one view and move it in another. To select a point, click on it with the middle mouse button. Since some mice have only two buttons, this can also be done by holding the mouse cursor over the point and pressing the "p" key. This highlights the point in all views. To move the point, press the left button and drag to a new location. The point will move in the direction of your drag in the plane of whatever view you clicked in. Note that you don't actually have to touch the point for this to work! To de-select a point, click the middle button (or press "p") on another point or on no points. 3.3 Changing Levels ------------------- To increase the refinement level of the currently selected point, press the "+" key. This will "push" an area around the point to a new level of refinement, changing its color. Now that the point has been pushed to the new level, it can be manipulated at BOTH the old level (or levels) and the new level. Manipulating the point at a low level will create course changes around the point, while manipulating it at a high level will create fine changes. To change back and forth between these levels, use the "+" and "-" keys. The current level is indicated at the bottom of the screen. Observe now that pressing the "+" key does not automatically increase the level of refinement around a point, because that point may not be "pushed" to a new level. If the current level is 2, for example, and the currently selected point is at level 3, pressing "+" will make the current level 3, and not increase the refinement of the point. Pressing "+" AGAIN will make the current level 4, and will increase the refinement level around the point to 4. If color is turned on (as it is by default), then areas of patch at the same level of refinement will share the same color. Since patches at a higher level of refinement have more degrees of freedom, new control points may start to appear on the patch. A new point is added when two adjacent points are raised to a higher level. When points across from each other diagonally are refined, many new points are added between them. (Note a subtle point here: a point may be at one level while the patches on either side of it have been raised to a new level by other points. This means a point may be surrounded by green (level 2) when it is at level 1 (blue) itself. This can be confusing, especially when one is wondering why new control points haven't appeared. To correct the situation, simply increase the refinement of the offending point.) One final note: Once a point has been pushed to a higher level, it cannot be simplified. While it can still be manipulated at the lower level, the color change and whatever control points that get added are there for good. 3.4 Other Commands ------------------ Here we summarize the other key commands available to the user. "s" - Saves the current patch to the file "save.hbs". This file can be renamed if desired and loaded by running HBSurf with the file name as an argument. "e" - Exports a POV-Ray file with the current patch, lighting, and view of the perspective view. The file is called "save.pov". "r" - Resets the view that the mouse cursor is in to the original view. This is nice if you get lost. "i" - Increases the rendering detail of the patches. "d" - Decreases the rendering detail of the patches. "f" - Toggles the polygon fill model from shaded to wireframe in the perspective view. "m" - Toggles On/Off the use of multiple colors to represent different levels of patches. "c" - Turns On/Off the control points. "a" - Turns On/Off the coordinate axes. "1","2",- Makes the given view (1=Front, 2=Side, "3","4" 3=Top, 4=Perspective) fill the entire screen. "0" - Makes all views share the screen. "Esc" - Exits the program. 4.0 Further Info ---------------- To find out more about the algorithms we use and how to work with Hierarchical B-Spline Modelers, see David Forsey's web page on the subject: http://www.cs.ubc.ca/nest/imager/contributions/forsey/dragon/hbsplines.html For further information about us and what we do, or to make comments, suggestions, or bug reports, you may contact us as follows. Richard C. Davis rcdavis@cs.berkeley.edu http://www.cs.berkeley.edu/~rcdavis Yizhou Yu yyz@cs.berkeley.edu http://www.cs.berkeley.edu/~yyz