home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
GRAPHICS
/
PSAMPLE.ZIP
/
PICHELP.TXT
< prev
next >
Wrap
Text File
|
1994-01-07
|
13KB
|
266 lines
////////////////////////////////////////////////////////////////////////////
This software is freely distributable. copied or uploaded to communications
services so long as this notice remains at the top of this file. This
software may not be included in whole or in part into any commercial
package without the express written consent of Cyberdyne Systems, Inc.
It may, however, be included in the public domain software or freely
distributed software so long as the proper credit for the software is
given. This software is provided as is without any guarantees or warranty.
Although Cyberdyne Systems Inc. has attempted to find and correct any
bugs in this software, Cyberdyne Systems Inc. is not responsible for any
damage caused by the use of the software also. Cyberdyne Systems Inc. is
under no obligation to provide service, corrections, or upgrades to this
package.
Despite all the legal stuff above, if you do find bugs, I would like to
hear about them. Also, if you have any comments or questions, you may
contact me at the following Number: 1-800-594-5454 and ask for
Andy Dollins.
////////////////////////////////////////////////////////////////////////////
Picaso Version 1.0
for
Microsoft Windows 3.1
What is Picaso:
Picaso is a ray tracer, a ray tracer can generate photo
quality images. How does a ray tracer work you might ask? It
literally traces light rays from light source objects and follows
them to see what they hit in the 3-Dimensional universe. If it hits
a object it creates another light ray, and sees what that ray hits
and so on....
How to Install Picaso:
1: Create a directory for picaso (i.e. md c:\picaso).
2: If the files are compressed, uncompress them into the
directory you created for picaso.
3: Check to see if the following files are present.
*PSAMPLE.EXE Windows executable.
*BWCC.DLL Borland custom controls DLL.
COMCLR.SRF Common color surface file
PICASO.DLT Defaults file.
FILEHELP.TXT File dialog help file.
LHELP.TXT Light dialog help file.
OHELP.TXT Options dialog help file.
PHELP.TXT Plane dialog help file.
PICHELP.TXT Picaso help file.
SHELP.TXT Sphere dialog help file.
SRFHELP.TXT Surface dialog help file.
VHELP.TXT View port dialog help file.
ROMAN.DIS A sample of a picaso version
2.0 display file
NOTE: if the files with the astrics in front of them are
missing picaso will not run.
4: If your not in windows then run windows.
5: Run file manager goto the file|New select the program group
radio button, and press enter of click on the OK button.
6: In the discription type Picaso Sample then press the TAB key.
7: In the group file field type PICASO.GRP and press enter or
the OK button.
8: With the Picaso Sample group selected (The Title bar will be highlighted.)
goto file|new again.
9: This time select program item, and press enter or press the OK
button.
10: In the discription field type Picaso Sample, and press the
TAB key.
11: In the command line field type the path to psample.exe, then
press the TAB key.
12: If you would like a short cut key press the key combination.
13: If you would like to select a different icon press the
Change Icon button.
14: Press enter or the OK Button.
15: For those people out there that don't have there 256 color
windows video driver installed, you must install it now.
Please refer to your video card instructions to install the
driver. Install the maximum amount of colors you video card and
driver can provide. This program is a color hog. NOTE: You can
run picaso with 16 colors, The images will look terrible. Also
the programs splash screens and about boxes will look off
colored. also the icons will not look right to.
16: Picaso is ready to run.
The Main Window: The main window doesn't do very much it's only function is to open
all of the other windows of picaso. The menu commands are
listed below with a description of what they do.
File:
New Scene: This command creates a new scene edit window and a new
scene.
Exit: Exits the program.
View:
Image: Creates a new image viewer window. These windows are
used to view bitmaps and display files.
Help:
Picaso Help: Opens up this help file in notepad.
About: Shows the about picaso dialog (Must See this about dialog it
could qualify for the best about dialog box award if there
was one.)
Image Viewer: This window is where you can view images that have already
been traced, or any other Windows or OS2/2.0 presentation
manager bitmap files. The menu commands are listed below.
If the file has more colors (except 16 color windows users,
and those users with more than 256 colors) then windows
is capable of displaying at one time. It will automatically
quantinize the image if the Auto Quantinize option is enabled
(See the options Dialog box help file for more details).
File:
New Scene: Same as the main window's new scene command.
Open: Open a different image file for this window.
SaveAs: Save the image as a different name or type. The only types
supported now are BMP files. In 2.0 PCX, TGA, BMP, and
GIF file formats are supported.
Exit: Same as the main window's exit command.
Edit:
Copy: Copy the image to the clipboard.
View:
Image: Same as the main window's view image command.
Quantinize: This will quantinize the image if it has more than
256 colors. NOTE this command takes some time to
execute.
Window: You are probably already familiar with these menu command
therefore they are not explained here.
Help: Same as the main window's help menu.
Edit Window: This is where you will spend most of the time in picaso.
I will list the menu commands below.
File:
New Scene: The same command as the main window's new scene command.
Save Trace: Saves the trace in the bit map file format.
Save Trace as: Saves the trace with a different name.
Exit: Exits picaso.
Edit:
Copy: This command copies the traced image to the clipboard.
Edit Selected Object: This command will edit the highlighted
object.
Delete Selected Object: This command will delete the highlighted
object.
View Port: This will open up the view port dialog.
Options: This will open up the options dialog.
View:
Trace: This will start ray tracing the scene.
Image: This will open up a image viewer window.
Quantinized Image: This will quantinize the traced image. The
trace viewer must be open for this command to
work.
Add Object:
Sphere: Adds a sphere to the scene.
Plane: Adds a plane to the scene.
Light: Adds a light source to the scene.
Trace:
Pause Trace: Pauses the ray tracer if it is tracing.
Resume Trace: Resumes tracing if the ray tracer was paused.
Window: Self explanatory.
Help: Same as the rest of the windows help menu.
Program Operation: This section explains hoe to create a scene a trace it.
To create an image you must first open up a edit window. Now we are ready
to start adding objects. Let's create a scene with a silver sphere in the
middle. Goto the menu Add Object now highlight the Sphere menu item. Now you
will see a Sphere dialog this is how you describe to the ray tracer how big
of a sphere you want and where to put it. Lets make this sphere radius 30
units (Radius is the distance from the center of the sphere to the outer
edge of the sphere). The sphere is already in the center of the universe
by default. X location, Y location, and Z location all equal zero which is
the center of the universe. Now you can press the OK button or press enter.
Now the Surface Attributes dialog box will now appear. You will probably
be baffled by it at first, but I have provided a simple way of setting the
surface attributes. Find the surface list, this is a list of predefined
surfaces. Now find Silver in the list and double click on it. Now you have
a silver sphere press the OK or enter button. Now lets add a floor to the
scene. To do this add a plane we will put it right under the sphere so in
the distance from the center type 30. Now tab over to Y surface normal and
type -1. Press OK or enter. Now select the White surface, and press OK.
To light up the scene we will have to add a light. Goto the Add Object menu
and select the Light menu item. Now lets put the light above and in front
of the sphere. To do this tab over to the Y Location and type 100. Now tab
over to the Z Location and type -100, and press enter. Now the Surface
Attributes dialog will open. Lights don't have a surface but they emit
light of a certain color. Select white from the Surface list and press
enter. OK we are now ready to ray trace the scene. This operation can take
some time even on a fast machine. To trace the scene select the View menu,
and highlight the Trace menu item. (NOTE: If you have only 256 colors the
image on the screen will look pretty lame until the raytracer is finished
and quantinizes the image. If it doesn't auto quantinize in the View menu
select the Quantinize Image menu item. Quantinizing is a slow process the
quantinizer must select the most important colors of the image, there can
be up to 16,000,000 different colors in a scene. If you had to hand pick
the colors it would take you nearly an eternity.) Now that you have this
image what can you do with it. You can save it and show it off to all your
friends, and give them a copy of the software. Or you can copy it to the
clipboard and paste it into an image you made with your favorite drawing
program. Unfortunately there is no economical printer that can print an
image with this many colors. So I omitted the print functions in this
program. However you can copy it to the clipboard and paste it into a
program that can print to get a print out of the picture you have just
traced.
Common Questions and Answers:
Question: How come all I see is black?
Answer: There could be a couple of reasons for this. First there is a light
but it's in a location that will not illuminate anything in your
view. To remidy this you should put the light at -100 Z and 100 X
if you haven't modified the viewport. Second you have no objects
within your view.
Question: How do I get a different view of a scene?
Answer: To achieve a different view you must move the location of the view
port. Make sure you leave the Calculate LookAt check box checked
or you will get undesired results.
Question: How do I speed up tracing?
Answer: There are three ways of doing this. In the options dialog box you
can turn off certain calculations. The calculation that takes the
most time is Reflections, if you turn of that option the ray tracer
will operate up to 5x faster. The second way is to reduce the bitmap
size to 100 x 100 and get the scene exactly the way you
want it and then trace it at the size you like it. The third way is
to change the multi tasking times. Increase the Time spent tracing
and decrease the Rest Time this could really speed things up. NOTE:
it is posible to almost halt windows execution completly try to
always give windows a rest time of 10 milli seconds.
Question: Why doesn't Picaso auto quantinze my images?
Answer: There could be two reasons why. If you have more than 256 colors
picaso will not auto quantinze even if you have the option checked
in the options dialog. Second you have 256 colors and the auto
quantinize option is not checked in the Options dialog so check it.
Question: How come there are only two shapes in this program?
Answer: If put more shapes in then you wouldn't buy the commercial version.
Question: What language was this program written in?
Answer: C++, I used Borland's Turbo C++ visual for Windows. I've written
some Windows programs with Microsoft's SDK C/C++ 7.0, but it sucks
compared to borlands Visual products.
Question: I want to learn more about ray tracing what do you recommend?
Answer: Craig Lindley's Practical Ray Tracing in C is on the top of my
list, A GOOD READ!! This program has a lot of similarity's to
Craig's sample program he gives in the book but I ported it to
C++ (Much Much Cleaner Code), and written a Windows interface
for it.
Question: How many lines of code is this program?
Answer: About 5,500 lines with 89 files.
Question: How come there isn't more help.
Answer: I didn't want to take the fun out of experimenting with the program. Try anything,
and everything that comes to mind.
Question: How come I can't find the commercial version in any of the
software stores?
Answer: It will be awhile until I can get it distributed.
If you want call the number on the splash screen, and I will be
able to give you more information, about the commercial release.
Just ask for Andy.
Terminology:
Ray Tracer: A algorithm that traces rays of light through a scene to see
what it hits, and if any light is present at that point in
space.
Quantinize: To find the most important colors that make up an image.