icon sPatch icon

Copyright 1996-1997 by Mike Clifton
clifton@rlspace.com
sPatch Home Page

Table of Contents

1. Introduction
2. System Requirements
3. Main Window
4. Modeling "Rules"
5. The Toolbar
6. View Toolbar
7. Point Manipulation Tools
8. Modeling Tools
9. Spline Modifiers
10. sPatch Menus
11. Quick Keys

1. Introduction

sPatch is a spline-based modeling tool for Windows95 and NT. It allows you to build complex, organic shapes using spline curves. Because these models are not built from polygons, the same model is equally suitable for use in VRML browsers as well as high quality renderers, such as POV-Ray.

Although it does create preview renderings, sPatch is purely a modeling tool. Rendering and animation features may be added in the future, but for now its main purpose is to create model files for other renderers.

2. System Requirements

To run sPatch, you need:

3. Main Window

Below is a screen shot of the main window of sPatch. There are five main features that will be described later: the menu bar, the tool bar, the view toolbar, the status bar, and the working region.

main sPatch window

The toolbar contains the most commonly used tools in sPatch, and a brief description of the currently selected tool is displayed in the status bar at the bottom of the window. The sPatch menus contain less common options. The view toolbar (below the toolbar) controls how the working region is displayed.

New working views can be opened using the "Split" command in the "View" menu.

4. Modeling "Rules"

Modeling an object in sPatch is accomplished by constructing 3D patches that represent curved surfaces. These patches are built up by drawing their outlines as a "spiderweb" of curves. Constructing these "webs" is decribed in Point Manipulation Tools. This section describes how the "web" is turned into patches.

When you create 3 or 4 points that are connected in a loop, the loop defines the outline of a patch, with one exception. If all the points lie on the same curve, no patch is created.

For an example, take a look at Fig. 1. On the left you see 2 circles. The one on the left is a loop of 4 points, but since all 4 points are connected with the same curve, no patch is created. This is verified in the preview rendering on the right. On the other hand, the circle on the right, because of the extra connection between the top and bottom points, has 2 loops of 3 points each. Since each loop uses 2 curves to connect the 3 points, they each generate a patch as seen in the preview rendering.

sample patch
Fig. 1

Notice that, in the circle on the right, multiple curves can pass through a single point. Both the circle and the diagonal line pass through the same points. The only way loops can be created is when multiple curves pass through one point.

That's it! No matter how complex the model, it all comes down to loops of 3 or 4 points. Keep an eye out for these loops in the sample files and as you build your own models.

If you want another example, take a look at Fig. 2. In this counter-clockwise spiral, we see 4 loops. The first loop, though, has 5 points in it, so it doesn't define a patch (notice the preview render on the right). The next two loops have 4 points each (both valid patches), and the loop at the tip of the spiral has 3 points (also valid).

sample patches
Fig. 2

Of course, we want interesting 3D shapes, not just 2D loops. Fig. 3 shows a slightly modified version of Fig. 2. Several more patches have been added, but they're all easy to find (look for loops or 3 or 4 points). Notice that the new points (in green) are not all in the same flat plane as the original points. Patches can be any shape, as long as they're made up of 3 or 4 points.

more complex patches
Fig. 3

*** IMPORTANT ***
The most important tools for creating patches are the Add Point Tool and the Translate Tool (along with the point welding feature). These tools are described in the section Point Manipulation Tools. If you don't read anything else, at least read the description of these two tools.

5. The Toolbar

The toolbar is movable and dockable, and can be hidden or revealed with the "View" menu. The toolbar consists of five groups (color-coded) as shown below:
sPatch toolbar
The tool categories are:
Point Tools (pink)
Modeling Tools (blue)
Spline Modifiers (gray)
View Tools (green)
The view tools are used to manipulate how a model is viewed in the working region. Just select the tool you need and drag it around in the working region. The tools allow you to zoom (magnifying glass), pan (hand), or pivot (circling arrows). Note that these tools do not actually modify the model, they just change how you view it.
Constraint Tools
The X, Y, and Z buttons in the toolbar allow you to constrain how points in a model are moved around. When one of these directions is unconstrained (colored button), then points may be freely moved in that direction. When a constraint button is gray, then points can not be moved in that direction. This applies to any operation that moves points (scaling and rotation included - use constraints to unevenly scale an object). To help keep you oriented, the X, Y, and Z constraint buttons are colored to match the X, Y, and Z axes displayed in the working region.

6. View Toolbar

A view tool palette is attached to every working view in sPatch, and consists of six buttons:
view toolbar
The first four buttons control which view of the model is displayed in the working region (front, side, top, or free view). The fifth button will zoom the view to fit model in the working view. The last button toggles between rendered preview and wireframe mode. No editing is possible when preview is turned on (although is multiple working views are open, you can still edit in a different view). sPatch supports either OpenGL or a built-in renderer to draw previews. You can choose which to use in the Preferences dialog box.

7. Point Manipulation Tools

The point manipulation tools are used by selecting the one you want, then dragging the mouse in one of the working regions. In no particular order, the point manipulation tools:

Add Point tool
Click and drag with the add point tool to add a curve segment. If you click close enough to an existing point, the segment will be added to that point, otherwise a new curve will be started. (You can add points to either the ends of existing curves or to any midpoint.)

Translate tool
This tool is used to move an existing point or group of selected points. Holding the shift key constrains motion to either horizontal or vertical.
Also use the Translate tool to select individual points. Hold the Control key while clicking the Translate tool to select or deselect an individual point.
*** This tool also performs welding. *** Welding in sPatch is the process of joining two existing points. You can weld the two ends of a single curve into a loop, or weld two points on different curves. To weld two points, drag one on top of the other with this tool, and before releasing the mouse, click the right mouse button. Welding is *very* important for creating valid patches - see Modeling Rules if you don't know what it takes to define a patch.

Scale tool
Only works when multiple points are selected. Makes the selection larger or smaller.

Rotate tool
Also works only with multiple points selected. This tool rotates the selection. The axis of rotation depends on which view the tool is used in. Holding the shift key will constrain the rotation to 45 degree increments.

Add Noise tool
Can only be used when multiple points are selected. This tool will move the points around semi-randomly. Useful for making objects look less computer-generated.

Group tool
The grouping tool lets you select multiple points to manipulate together. Drag an outline around the points you want to select. Outlining points that are already selected will cause them to be deselected. Other selection tools can be found in the "Select" menu.

Smooth tool
This tool modifies the curvature of a spline passing through the selected point(s). This tool can make four points in a loop look like anything between a square and a circle (or beyond).

8. Modeling Tools

The modeling tools are the blue buttons in the toolbar. Although you could build anything with the point manipulation tools, the modeling tools are useful for common modeling operations. Remember - you can always go back and use the point tools to modify the result of a modeling tool. These tools operate on the current selection, and only need to be clicked to activate.

Lathe tool
The lathe tool takes a 2D curve and generates a 3D lathed object like a vase. Draw a curve in the front view and make sure at least one of its points is selected. Click on the lathe tool and the object is generated. Fig. 4a and Fig. 4b show 2 curves and the lathe objects created by them.


Fig. 4a and Fig. 4b

Once the lathe object is created, it is just a set of curves like everything else and can be edited as much as you want. In Fig. 4c, the two lathe objects are positioned in preparation for combining into a new object. After a little welding and moving a few points around, we get Fig. 4d, a complex shape that was easy to put together by starting with the lathe tool.


Fig. 4c and Fig. 4d

Extrude tool
This tool takes a curve, duplicates it, and connects each of the points in the new curve back to the corresponding point in the old curve. The newly extruded curve will lie exactly on top of the existing curve, so you should immediately use the translate tool to pull the extrusion out to where you want it. A single curve must be selected (all of its points) before the Extrude tool is used. Fig. 5a shows a curve (note the Peak tool was used to make sharp corners) before extruding. Fig. 5b shows the curve after extruding.


Fig. 5a


Fig. 5b

Remember the rule about patches - loops of 3 or 4 points. Fig. 5b is not really complete. The extrude tool only created the edges of the letter. Fig. 5c fills in some missing details.


Fig. 5c

The extrude tool can also be used immediately again on the newly extruded curves. Fig. 5d shows repeated use of the extrude tool (with a little rotation thrown in).


Fig. 5d

Clone tool
This tool duplicates the current selection. Note that after the duplication, the new points lie exactly on top of the old ones. Just use the translate tool to move them to their new position.

9. Spline Modifiers

The spline modifiers are the gray buttons in the toolbar. They operate on the current selection, and only need to be clicked to activate.

Delete Edge tool
Click this tool to delete an edge of a curve. (To select an edge to delete, first select just a single point, then press 'Tab' until the desired edge is selected.) Use this tool to break a loop without deleting any actual points.

Peak tool
When this tool is clicked, the curves that pass through selected points will be turned into sharp corners. (If a point has multiple curves passing through it, you can peak just one curve by selecting the appropriate edge with the 'Tab' key.)

Round tool
This button is the opposite of the peak tool. It is used the same way, but it makes sharp corners round again.

10. sPatch Menus

File menu
New: Creates a new, empty model.
Open: Opens an existing model file.
Save: Saves the current model.
Save As: Saves the current model under a new name.
Export: Exports the model to one of various 3D formats. Note that only visible layers will be exported. This is useful if you want to break up a model and export different layers to separate files.

sPatch models, because they're spline-based, are appropriate for both real-time applications like VRML, and high quality raytracers like POV. The screenshots below are from files directly exported from sPatch - of course, some extra texturing applied afterwards couldn't hurt.

vrml screen shot
VRML (displayed in SGI's Cosmo Player)

pov rendering
Same model, rendered with POV

Edit menu
Undo: Reverses the previous operation on the model. (Up to 16 levels of Undo are supported.)
Redo: Re-does the previously undone operation.
Cut: Cuts the current selection to the clipboard.
Copy: Copies the current selection to the clipboard.
Paste: Pastes the contents of the clipboard into the current model.
Preferences: Allows the user to customize sPatch.

Select menu
All: Selects all the points in the model.
None: Deselects all the points in the model.
Inverse: Inverts the current selection.
Connected: Selects all points that are connected to the current selection.
Spline: If an edge is selected, this command selects all the points on the same curve as that edge.
Hide Selection: Hides the selected points - use to temporarily simplify a model while editing.
Show All: Shows all points that were previously hidden.

Model menu
Insert: Lists all the files in the "Clip Shapes" folder that was installed with sPatch. Add additional entries to this menu by placing sPatch model files in the "Clip Shapes" folder.
Append Model: Lets the user select another model file that will be merged with the current model.
Flip X: Flips selected points across the X axis.
Flip Y: Flips selected points across the Y axis.
Flip Z: Flips selected points across the Z axis.
Toggle Invisibility: Turns selected points invisible/visible. Invisible points will still be a part of the model, but they won't be used to build patches.
Lathe Settings: Sets the number of curves used to build a lathe object.

Layer menu
sPatch has support for up to 8 editing layers. These layers are useful for organizing a layer, because when one layer is active, the other layers are still visible, but can't be modified. Also, layers can be individually hidden, shown, and exported.
Current Layer: Choose the current working layer here. Other layers will be visible but not editable.
Show Layer: Hide or show individual layers by selecting them from this menu.

View menu
Toolbar: Hides/shows the sPatch toolbar.
Split: Splits the sPatch working region into four independent views.
Synchronize Views: When a model is edited in one view, the other views update only when the mouse button is released. When this option is checked, multiple views will be updated simultaneously.
Show Axes: Hides/shows the coordinate axes in the working region.
Grid: Turns on a grid that points get snapped to.
Grid Settings: Modifies the resolution of the grid.

Help menu
About sPatch: Displays program information.
sPatch Help: Displays this document.

11. Quick Keys

Many sPatch functions are available with a single key press (and some are only available this way). These key commands are:
C Select all points connected to the current selection.
Enter Deselect all points.
Tab Steps through the curves that pass through selected point.
Delete Delete selected points.
A Add point tool.
T Translate tool.
S Scale tool.
R Rotate tool.
G Group tool.
X Toggle X constraint on and off.
Y Toggle Y constraint on and off.
Z Toggle Z constraint on and off.