|MaxScript Release 0.51 Beta (6/28/1998)
Copyright (c) 1998 by Borislav
Petrov, Bobo's Rendert**ls.
ShapeScape is a Bitmap Tracing Utility.
It is used to convert bitmap images into MAX splines.
HOW DOES IT WORK?
ShapeScape scans any bitmap and creates a new black & white image with
just the countour lines between zones displaying different colors based
on a user-defined threshold.
After that the contour lines are traced and converted into splines.
WHAT IS NEW IN THE CURRENT RELEASE?
Up to 20 times faster than Beta 0.12
Closed Shapes are automatically welded.
3 tracing modes.
Improved tracing code.
Unique name for each shape.
Control over Spline Interpolation.
As of Beta 0.51 (6/28/98)
The Action Group contains two buttons. Press [Select Image] to pick a bitmap
for tracing. The [TRACE IMAGE!] button will become active
after you select a bitmap. It starts the process.
The tracing process itself consists of two parts:
In the first part, the colors of the image are compared to each-other
in order to find the borders between colors that have Luminosity difference
higher than the Threshold value. The Luminosity is calculated by adding
the Red, Green and Blue components and dividing by 3. Thus, [255,0,0] (Pure
Red) and [0,0,255] (Pure Blue) will have the same Luminosity and would
not be separated. A black&white image is drawn in the first part.
If you find the result ok, you can answer the prompt with yes and go to
the second part:
ShapeScape now converts the white border lines into splines.
The Separation group lets you set the threshold values, the threshold type,
and check the threshold with different color values from the bitmap to
The Absolute Threshold value divides the luminosity ramp into two areas.
When two colors lie in two different areas, they will be separated.
In the THRESHOLD CHECK display, this case will be reported by a RED
line between the two color lines. When the two colors are in
the same area, the THRESHOLD CHECK will display a GREEN line, and no border
will be detected durring scan.
The relative Threshold compares the difference of the luminosities of the
two colors one relatively to the other. If the two colors lie within the
defined value, no border will be drawn. If the second color lies outside
of the Relative threshold value, there will be a border.
Use this method ONLY when you want to separate multiple color fields
whose luminosities lie close to each-other (for example in a rainbow-colored
HOW TO USE THE THRESHOLD CHECK DISPLAY?
There are two color fields, and a horizontal gauge displaying a black&white
ramp. The two colors are displayed on the gauge according to their luminosity.
When you ope a bitmap for tracing, you can right-click on a color to get
it in the color field of the VFB. Using drag & drop, put two colors
from the VFB into the two color fields.
After that, you can watch the third line showing red or green depending
on the luminosity of the two colors. (see above). In case of Absolute Threshold,
there will be just a thin red or green line. In case of Relative Threshold,
there will be a red or green field starting at the first color. It will
be as wide as the Relative Threshold value and will be red as long as the
second color lies beyond the field.
The Shape Options group lets you set the properties of the generated splines:
The Prefix field lets you enter the name prefix for the generated splines.
A unique number will be added to the prefix.
The [Remove Stairs] button is unchecked by default. When unchecked, every
direction change of the traced line will be converted into a vertex, and the
resulting spline will look jagged.
When the Remove Stairs button is checked, the next button becomes available. It is checked by default and reads [Exact Trace]. This mode removes stairs only when at least one of the two lines building a corner is just one pixel long. If the corner is built of two lines longer than one pixel, the corner is not removed.
When the [Exact Trace] is unchecked, it reads [Smooth Trace] and the third button [Remove Even] becomes available. You can uncheck the [Remove Even] to get the [Remove Odd] option.
In this mode, ShapeScape counts the corners building stairs and removes every second vertex
(Even or Odd according to the third button). This mode is smoother, but quite unexact, especially for text shapes. It should be used with high-resolution organic shapes only.
The Optimize Steps value is used to set the Interpolsation steps of the Shapes.
A value of -1 activates the Adaprive mode, 0 is default, positive values up to 10 are allowed, but not really necessary, because ShapeScape still does not create bezier curves.
The close threshold defines the maximum distance between the first and the last vertex for a single spline to be closed.
The Render Thickness value sets the respective value of all created shapes.
To use the above value, the [Renderable Splines] button should be checked (default).
In this case, traced shapes get their Renderable property activated and can be rendered as lines immediately.
The Interface Options control the behaviour of ShapeScape's UI.
Use [Dynamic Dispay] to turn on/off the progress display of the bitmap scan.
NOTE: This control was used in earlier versions to control the "crawling"
display when tracing the splines. The current release uses a new internal
code which empoys an array instead of the scanned bitmap itself.
This method is about twice as fast as the old one, and the disabled
dynamic display makes it up to 20 times faster!
The value next to the button sets the number of lines to be displayed at
once while scanning the bitmap.
You can turn off the [Ask Before Tracing] button to avoid the prompt dialog
between the two passes. (This way, you can leave your computer alone tracing
a huge bitmap when you are sure about the result of the first pass.)
This example was created with the old Version 0.12
The test image was created in Photoshop. The black&white image
shows the scanned image after the first pass of ShapeScape.
After the second pass, the splines appear in MAX's viewport.
Their Renderable property will be checked by default - Image 4 shows
the rendered splines.
Unfortunately, the Beta 0.12 version of ShapeScape does not close and
weld all splines correctly, and it creates a multitude of single shapes.
I had to attach the splines together, weld them, and edit some incorrect
points before applying an Extrude Modifier. After some minutes I got these
renderings of a fully extruded shape representing the Photoshop bitmap
Beta 0.51 Encrypted