home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
dirs
/
sculpttools_430.lzh
/
SculptTools
/
Brush4D
/
brush_4d_docs
< prev
next >
Wrap
Text File
|
1991-01-11
|
19KB
|
604 lines
December 1990 BRUSH_4D v. 1.2
----------------
Files:
Brush_4D Program.
This doc file.
Help picture.
Copyright © 1990 by Bruce Thomson
S H A R E W A R E
Brush_4D is ShareWare. No guarantee is made, expressed or
implied as to Brush_4D's suitability for any application. No
responsibility will be taken by the author for any results of its
use or misuse.
This is Shareware. It is not the best version of this program
available. For most people this version will be more than
adequate. It coverts brushes with a maximum of 200 x 200 pixels
and will create objects with a maximum of 2000 faces. It has all
the features of the larger version except for this size
restriction. If you use this program then please send $US10 to the
address below. If you want the unrestricted version send $US30 to
register. If you think you might want the unrestricted version at
a later date send $10 now and $20 later. Registered users will be
sent updates.
1. What Does It Do?
Brush_4D converts IFF brushes (e.g. DPaint pictures) into
Sculpt objects. The program will convert standard brushes, Extra
Halfbrite brushes and HAM brushes in full colour. It is quite
fast.
In addition to converting your brush into a flat object,
pixel for pixel Brush_4D has some extra features.
- Optimise the brush so that areas of the same colour become
one large square as opposed to many small ones.
- Make any colours transparent.
- Wrap brush around a tube or part of tube.
- Wrap brush onto a sphere.
- Wrap brush with some special effects.
- Each colour of the brush can be of a different texture.
- With HAM images allow extra optimisation through a HAM
colour closeness setting.
2. How Do I Use It?
Brush_4D runs from CLI or Workbench and is easy to use. It needs
about 110K of free memory as well as the screen memory for your
picture.
When running respond to the requesters in turn and the object
file will be created to load into Sculpt 4D as an object or scene.
You will need a copy of 'req.library' in your LIBS: directory.
3. How Does It Work?
Brush_4D loads in the brush as a picture and displays it on its
own screen. Specify the type of conversion required and any extra
parameters. Based on your input any colours you have specified
to be transparent (and thus not converted as part of the object)
will be blocked out on the picture.
Brush_4D will then proceed to analyse the picture and convert the
pixels into pairs of sculpt faces making up squares with that
block's colour.
If the optimise option has been selected rectangular areas of the
same colour will be converted into one large block as opposed to
many individual pixels of the same colour. Depending on the brush,
optimisation of up to around 90% can be achieved, giving a great
saving in memory and object faces.
When the whole brush has been converted the points will be
wrapped around the selected shape if one has been chosen. The data
will be written out, ready to be loaded into Sculpt Animate/4D/3D
etc. as an object.
You will be told of the number of vertices, edges, faces and file
size of the object, along with the percentage of points made
transparent and the percentage of compression performed.
4. Wraps.
Apart from just converting your brush into a flat, 2D rectangular
plane Brush_4D can wrap your image onto certain 3D shapes. These
are a tube, a sphere and various sinusoidal waves. For example
you can wrap a picture of a face onto a sphere to get a reasonable
3D head.
The sphere and sine wave are based on the wrap to tube. With
wrap to tube you get an upright tube with the X values of the
pixels wrapped around a circle and the Y values making up the
height of the tube.
Spheres are made by adjusting the diameter of the tube at each
height level so that it is squashed in at the top and bottom and
stretched out in the middle.
Sine waves are made by modifying the diameter of the tube to
match a sine wave with several parameters (see below).
5. The Inputs.
A series of requesters will pop up which you will use to specify
the conversion type and specifications. For each click on the
preferred alternative or enter a value in the range offered.
First you must select the filename for the IFF brush.
"Wrap type Flat or Wrapped"
Flat - The picture will be converted to a flat, 2D
object.
Wrap - Choose one of the below wrap types.
"Wrap type Tube Sphere or Sine"
Tube - The picture will be wrapped around a tube.
You will be prompted for two responses at this point.
"Bend level for tube ..."
Enter a number in the range 0 to 1. This will be the
proportion of a circle that is turned through.
0 will make a flat object. 1 will wrap completely
around a tube. 0.5 will wrap to a half tube.
See help picture.
"Bend forwards or backwards..."
You should decide whether the picture will be curled around
the tube clockwise (backwards) or anticlockwise
(forwards). Forwards is normally used, to preserve
correct orientation.
See help picture.
Sphere - You will be prompted for the values as in the Tube
option. Wrap to sphere works by wrapping to a tube and
then altering the diameter of the tube at each point to
match a sphere. By doing this the picture will look a
little squashed towards the top and bottom of the sphere.
Sine - You need to enter the values for wrap to tube and
then you will be asked for start and end angles for the
sine wave. These values are in degrees.
Wrapping to sine works by running a wriggle down the side of
the points mapped to a tube so you can get effects like
the look of the old style Coke drink bottles. The start
and end angles give the range of values through which your
wriggle will run as it travels down the side of the tube.
You will then be asked for "radius offset".
This will control how pronounced the wriggle is.
Values range from 0 upwards. A value of 1 is equal to the
amplitude of the sine wave and higher values will increase
the diameter of the tube prior to adding the wave thereby
lessening the effect of the sine wave. A value of zero
will give shapes like an hour glass that converge in the
middle.
See help picture.
If you have chosen any of the wrap options you will be given
the option to select how the wrapping will be done. If
you select "Ignore transparent..." as YES then the wrap
will start at the top left corner and proceed to the
height and width values you will enter below.
If you say NO then the wrap will be based on only non-
transparent colours in the brush. With this option you
can choose a tight wrap or a loose wrap.
It can also be used to ensure equal curvature can be
given to brushes with unequal widths, and to avoid some of
the squashing and stretching of a wrap to sphere.
"Optimise x pixels..." and "Optimise y pixels..."
If you select optimised for either then rectangles
of one colour will be found and converted to one large
block.
This is fine for flat objects. However this could cause a
problem with the wraps, though, as very large areas being
optimized would cut across the middle of their shape.
This can be avoided by entering suitable values for the
maximum block size.
"X direction" and "Y direction" will specify the maximum
number of pixels that can be used in one block. You will
not be prompted for these when you are creating a flat
object as they would serve no purpose.
If you are going to wrap to a tube then it would be best to
set the maximum X optimisation, depending on total brush
width to perhaps 5 pixels.
In this way it retains a reasonably circular shape. If you
want a smoother circle then use a smaller maximum X
direction blocking.
The level by which you optimise Y depends on the wrap. With
a tube you should optimise completely by entering a value
in excess of the height of the brush.
If you are wrapping to a sphere or sine then the same
considerations as for X optimising apply.
e.g. To make a simple 3D globe you will want to wrap a
flat map onto a sphere.
If your brush was 100 * 60 pixels then you might use 4 and 3
for the maximum optimisation levels. In this way you
would benefit from optimising areas of one colour but not
to the extent that large areas such as USSR were flat and
no longer looked spherical. Your map would have at a
minimum 25 segments forming a circle around the equator.
You may not want to convert the whole of the brush. You
have the option of using only a portion of the brush
measured from the top left corner of the picture.
On "Width" and "Height" the default values are the
dimensions of the brush. If you want something smaller
enter that instead. In the restricted size version of
Brush_4D you will have a maximum area that can be
converted. If your entered values are less than the
maximum then a border will be drawn around the area you
have selected so you can see just what you have taken.
If you would like different colours to be different textures
in the object then respond "yes" to "Change Textures?"
All colours start off as being dull. Enter ranges of
colours for which you wish to change the texture. Click
on the texture of choice from the gadgets. All colours in
the range will become this texture. If you want to alter
only a single colour use a single number for start and end
of the range. "Cancel" the requester to finish entering
ranges. Note: This is for non-HAM pictures only. With
EHB the half-brite colours must be textured separately
from their corresponding bright colours.
You are now prompted for any colours that you would like to
make transparent. If you have a HAM screen you have only
the option of making palette colour 0 transparent. This
is usually the background colour.
If the picture is a non-HAM picture then you will be asked
for a list of colours you want to be made transparent.
These numbers correspond to the palette colour in the
picture. When you have finished entering colours to be
made transparent click on "Cancel."
The picture will then be scanned and pixels that are to be
transparent will be coloured in on non-HAM displays. On
HAM displays the background colour will be made
transparent but not shown on screen. You will be shown
what proportion of the pixels in the brush were made
transparent.
With HAM pictures you will be able to enter a value that
allows colours that are close to each other to be treated
as the same colour. This gives extra optimisation as you
get more large blocks of one colour rather than say two
different blocks of almost the same colour.
At the prompt "Enter HAM Threshhold..." enter a value of 0
to 15. Each pixel has a red, green and blue component and
your entry is the level that they are allowed to vary from
the surrounding pixels before they are considered to be a
different colour. A value of 0 means any difference at all
between pixel colours will be detected.
A value of 5 will allow for example any colours between dull
orange and medium orange to be treated as one colour.
A value of 15 will make the program think that all the
colours are the same.
Higher values result in less detailed colouring of the
object but fewer faces.
6. While it Runs.
Once you have entered these values sit back and depending on the
size of the brush up to a minute later the conversion will be done.
The graphic screen that Brush_4d works on is behind its selection
screen. You can drag down its screen to watch it in progress.
As the picture is processed, in non-HAM screens the points
converted
will be blocked out as it goes. In HAM screens because writing
to the screen would change the colours and mess it up you can get
an idea of where it is up to by choosing a new height value of a
couple of pixels less than the maximum and you will see a line run
across the bottom.
When all the processing is done you will be shown the exact
number of vertices, edges and faces used in the object and the file
size. You will also be told the level of compression of the non-
transparent colours if you had any optimisation on.
Now enter the filename that you would like the object saved
under. If you decide that you don't want this object after all
then click on 'Forget it' or the close gadget and then 'Abort'.
7. Tips.
Don't click the hidden forward/back gadgets on the graphic screen
as they leave an outline that may turn up in your object.
Fewer colours will result in higher compression levels but you
should balance the memory saving against the look of the object.
If you want smaller objects then reduce the brush before
conversion or reduce the number of colours on a program like Deluxe
Photolab.
Name your objects when they are loaded in as when you have
transparent colours the various parts may not be connected so you
will want an easy way of selecting the whole object.
When wrapping to a sphere you can get quite a bit of distortion
at the top and bottom. This can be controlled by using the "Ignore
Transparent for Bend" setting on NO. On your paint program cut
your brush, clear the screen, and stamp the brush in the middle of
the screen. Then cut the brush with a large border above and below
which can be made transparent.
The transparent colours will not show up as part of your object
but will be included in calculation for how much to bend the tube.
With this you will not get a sphere but more of a sphere with the
top and bottom cut off. This can be a good effect.
The same works for sine wave but there is not often the same
level of distortion with this.
Use the HAM threshhold setting around 2 or 3 for good looking
results with increased optimisation.
If you want more than the 64 colours in EHB and don't like the
fringing associated with HAM colours (which will be faithfully
converted over) then you can go to a little trouble and create your
objects in parts. These can be quite easy to assemble.
Using DPaint -
Draw your brush using all available colours. Use the coordinates
and cut it out and save it.
Change the palette and by using Stencil (in Dpaint) select the
background colour, invert the stencil then return to painting. Use
one colour to paint over the pixels in the old brush.
Then change the stencil so that colour is protected and the
background colour free. Draw around the old picture with your new
colours and when you have finished go back to stencil and protect
everything but the colour you used to write over the first pictures
pixels. Now rub over them with the background colour.
Turn off the stencil.
Now cut the new brush with exactly the same size and start point
and save.
Convert both into objects and layer one over the other (they
should start that way when you load them in as scenes).
As well as just converting everyday brushes into objects you can
use Brush_4D as a simple object creator. One use I find for it is
as a replacement for the checkered floor. Make your own checkered
floor with something like a pattern fill and then convert it. You
now have control over the size of your GROUND and can have more
than two colours and don't have to place it horizontally at level
0. It can also have a texture. Have more than one ground.
For stripey tubes make a row of colours with something like the
shaded fill in DPaint and wrap it to a tube.
Convert your favourite (colour) fonts over. Make them 3D by
wrapping them around part of a tube, both forwards and backwards
bent and put together - no longer flat and boring.
Do nice keyframe animations with pictures fading into one
another, sine waves squirming as you alter the start and end angles
etc. - just make sure you don't optimise and have no transparents
and have exactly the same size in your start and end brushes.
8. Errors.
You will be told throughout if anything goes wrong like not being
able to open the screen or files etc.
You might get the "Exceeded maximum vertices" or "Exceeded
maximum faces" message. If this happens you should send off the
cash for the version without limits. Alternatively reduce your
image (but lose detail).
If you run the programs but it returns immediately then you may
not have the "mathtrans.library" or "req.library" in your LIBS:
directory.
Check your stack size as well.
9. The Competition.
DigiWorks 3D ($US 130-160) - I see it as a complementary product
as it does only flat conversions (extrusions don't really count)
and doesn't handle colour at all. It is nice though in finding
edges etc. for you. With my program you will get "jaggies" on
diagonal edges, with DigiWorks you would get one diagonal line.
Living out of the way I haven't seen anything else which performs
similarly. Perhaps you would like to send me some :-)
10. The Address!
I am a poor student, and need your donations to buy 'Imagine'.
Future upgrades depend on your generosity. These will be sent free
of charge when any important changes are made, to all registered
users.
Send your money to:
Bruce Thomson
PO Box 33116
Takapuna
Auckland
NEW ZEALAND
Make that $US cash or international cheques or money orders etc.
If you're in a kindly mood send all you've got, copies of any other
shareware/PD ray tracing utilities, comments, suggestions etc $NZ
acceptable also. Use current exchange rate.
11. Other Important Stuff.
This program is to be distributed with these docs intact and
unaltered. The help picture is to accompany it.
Distribution of restricted version. (ie this package)
- This restricted version is freely uploadable to BBS's etc.
- Fred Fish can include it in his library.
- Other PD/Shareware libraries can distribute it if they are
not greedy, ie they charge no more than 150% of Fred
Fish's charges.
- Free User Group disk magazines, etc. may distribute it.
- Ask me if you want to distribute it packaged in any form
that is not covered above, that you will be charging any
money for - e.g. a disk that accompanies a magazine
The unrestricted version is for your private use only if you
decide to register. It is not to be copied.