POVCAD(c) 2.0c by Alfonso Hermida Pi Square BBS (301)725-9080 CompuServe 72114,2060 10/24/93 NOTE: POVCAD is written in Visual Basic 3.0 for Windows (Microsoft Corp). To run it you'll need the runtime module VBRUN300.DLL. POVCAD USERS: The book "Adventures in Raytracing" published by QUE has a whole chapter on POVCAD for Windows. The chapter is divided into tutorials and the figures help understand how to use it. The book should be out by Nov/Dec 1993. The book was written by "yours truly" . ------------------------------------------------------------------------- Copyright (c) 1993 by Alfonso Hermida. All rights reserved. The program POVCAD.EXE is distributed "As is". The author assumes no responsibility for damages resulting from the use of this program. The program has been tested but no software is "bug-free" so...use at your own risk! ------------------------------------------------------------------------- Distribution: Feel free to distribute POVCAD.EXE and it's companion file POVCAD.DOC for non comercial purposes. Distributors may charge up to $5 for this program. If you wish to distribute this program with a comercial software or book please contact the author at the BBS number given above or by mail: Alfonso Hermida, 9346 Kings Grant Rd, Laurel, MD 20723. This program is distibuted as Shareware. You may use this program for a period of 30 days at which you must either register this software or stop using it. Registration entitles you to support thru the BBS. Registration cost is only $15 and helps continuing work to improve this software. To register send your check or money order to the above address with your name, address, phone number and a password(for BBS access). Check at the end of this document for registration form. -------------------------------------------------------------------------- THANKS! I want to take the opportunity and thank a lot of people and BBS that have helped POVCAD become such a success. I would like to thank Albert Waltner, Peter Jack, Curtis Olson for Beta testing and all the helpful comments. Dan Farmer was kind enough to upload the file to COMPUSERVE. Steve Anger gave me some help with the smooth triangle problem I was having (it turns out that the POVRAY version I was running had a bug!). Alexander Enzmann, author of the Polyray raytracer (thanks!) was enthusiastic about adding support for Polyray users...(support is limited but it should improve with time.) Phil Long, Jerry Thomaston, Amanda Osborne and James P. Hawkins helped a lot. There were also some great BBS such as: * You Can Call Me Ray BBS (Illinois) Bill Minus/Aaron Collins (SysOps) (708)358-5611 * The Graphics Alternative BBS (California) Adam Shiffman (SysOp) (510)524-2780 * Trace of Reality BBS (Virginia) Joe Liccel (SysOp) [system is down at this time] * Monsoon BBS (Maryland) Sunil Gupta (SysOp) (410)235-2365 In Europe: Raytech BBS - "The UK's only Raytracing BBS" Paul Smith (SysOp) +44 862 88340 * Digital Imagery BBS Philip Harris +44 295 272881 V32 MNP 5 support available for POVCAD, message and file areas also * CIX (UK equivalent of CompuServe) ECS conference, POVCAD topic +44 081 390 1255 who helped me distribute my programs and overall support. And for other specific thanks, check the BUG LIST at the end of this document. Finally, all of you who were so kind to register their copies. This proves that Shareware is alive and well. ---------------------------------------------------------------------------- What's POVCAD? POVCAD is a small solid object modeling tool to create scene files for raytracers. It's based primarily on the POV(Persistence of Vision) raytracer written by the Persistence of Vision Group. POV is a copyrighted freeware raytracer. If you would like to get in contact with them, contact Compuserve (800)848-8990, Graphdev forum or call YCCMR BBS (708)358-5611, which is a raytracer specific BBS. POVCAD also supports the Polyray raytracer by Alexander Enzmann. The support is not complete at this point but a lot can be done. With POVCAD you're able to create visually the scene file and have a pretty good idea (geometry-wise) of how the objects are positioned in 3D space. There is no support for textures and color visualization since POVCAD is a wire frame-based program. Nor, you'll see the results of any constructive solid geometry operation (boolean operation..for short). POVCAD supports the following objects and features: * planes * cylinder * cone * sphere * ellipsoid * torus * box * height_field * Raw data files (loading) * Sweep (solid of revolution) * Extrude (operation on curves) * Bezier patches * B-Spline and Catmull-Rom Spline curve smoothing * light_source/spotlight * camera(POV) and viewpoint(Polyray) and operations such as union, difference,intersection and composite objects. Textures can be selected from a list without need of typing. The scene view can be changed between isometric,YX,YZ and ZX. A session list shows the steps you took to create any image and you may select any of the objects from the list by clicking on it. An interesting feature is the ability to create or read data files with path information for animation software. You can create linear interpolated data, circular motion, parabolic, helix or just freehand mode, where you sketch the path with the mouse. POVCAD does not do animation but it plots the path files so you can see how things look on the screen. The data can be transformed like any object in POVCAD. In the File menu, there is an option to save the session file and to Export to POV (that is to create the POV session file). ***** PRINTOUT ********************************************************** You may select the FILE menu, then the PRINT command to get a hardcopy of the image on the screen. You must have a printer configured to do so. ************************************************************************* AN IMPORTANT NOTE: All rotations and translations are absolute(measured from the origin). Therefore, if an object has been translated to (1,1,1) and you change the x to 1.5, it will be (1.5,1,1) and not (2.5,1,1). My best suggestion is that you play with it for a while to get a better understanding of the program. What's NEW on version 2.0c ************************************************ 1) Catmull-Rom Curve fitting The PATH menu has Catmull-Rom Spline selections. Use this to smooth out a curve created with the POINTS command or from a data file. 2) POV 2.0 support 3) Convert RAW data files to DXF files (found in the FILE menu) ********************************************************************************** Creating an Object To create an object is easy. Here are the steps: 1) Click on the Object menu and click again on the object you would like to create. All objects start at the origin, except the sphere which asks for the center coordinates. 2) To rotate/translate or scale the object, click on Xform and select the appropiate transformations. The way this program was developed, rotations are ALWAYS applied first THEN the translations. Keep that in mind. 3) If you need to edit/delete an object, click on Session and click on the object to be modified. On the bottom right part, the current object is shown, with it's texture. If the object is already there, you can operate on it without having to click on Session. NOTE:The LAST object created is ALWAYS the current object. If you wish to transform it, just go directly to Xform or Texture (if you want to put a texture to it). To delete an object, either select it (thru the Session menu) or just go to Edit if it's the last object drawn and click on Del. You may use the mouse to select an object too...read the section below titled "Selecting objects with a mouse..." TEXTURES AND COLORS To attach a texture or color, select an object (if you do not select an object, the current selected object will be used). Click on TEXTURE or COLOR and select the color or texture. You may edit the text box that appears. Press the OK icon. To change the texture, simply reselect the object and click on a new texture or color. ****************** NEW ******************** Adding more TEXTURE and COLOR definitions POVCAD uses 2 files per ray tracer to read the color and texture definitions: For POV : colors.pv and textures.pv (version 1.0) colors.pv2 and textures.pv2 (version 2.0) For POLYRAY : colors.def and textures.def You may edit them and include the names of any new colors or textures you come up with. All of the files have the same format: 1 name per line, the name being 1 word, i.e, it must not have any spaces. The name my_texture is acceptable while my texture is not. ***** To attach textures and colors to CSG objects check the ************* "Creating Constructive Solid Geometry" section Creating Solids of Revolution (Sweep command) WITH POINTS: 1) Click on the PointOff button (to enable point creation) 2) Select a View different than Iso (i.e. YX,ZX or YZ) 3) Click on the window and draw a contour (up to 50 points) 4) Select the Sweep command from the Objects menu 5) give a filename.ext (the data will be saved in RAW format) 6) indicate sweep angle and number of segments * If you wish to erase the points and start all over use the Del Points command in the Edit menu. * SnapOn forces the points to fall in the intersections of the grid lines, while GridOff let's you select any place on the screen. ****************** NEW ******************** WITH DATA FILE: POVCAD can now SWEEP a data file that have been created with the path command or with any other program. The data files must consist of a list of X,Y and Z coordinates that define a curve or contour. Select the SWEEP/DATA FILE command and select the file to be swept, and follow steps 5) and 6) from the previous command (WITH POINTS). NOTE: The format of RAW and SWEEP data files is: x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 x5 y5 z5 ....... ...... ect .............. where each line represents a triangle. Usually I use Steve Anger's RAW2POV program to create objects with RAW data files. RAW2POV will optimize A LOT the image, while POVCAD will just convert the data to triangles and that's it! Creating an EXTRUDEd object (saves data in RAW format) The EXTRUDE command (under the OBJECT menu) works in the same way the SWEEP command does. SWEEP rotates and copies a curve while EXTRUDE displaces and copies the curve. As an example, if you create a line and extrude it, it will look like a plate. The EXTRUDEd object will be diplaced in an orientation perpendicular to the computer screen and in the direction going into the monitor. In other words, if you are currently in the YX view, the cuve will be EXTRUDEd in the +Z direction(into the screen). To create an EXTRUDEd curve do the following: 1) select a view different from ISOmetric (YX,YZ or ZX) 2) click on the PointsOFF icon to enable point creation 3) create a curve by clicking on the drawing window 4) click on the OBJECT menu, then on EXTRUDE 5) give a name for the file to be created (RAW format) 6) enter the extrusion length * The file will be saved in a RAW data format. * Click on ISO to view the final object. Try this with EXTRUDE: You can create letters with the EXTRUDE command that will look like sheets of metal that were bent to form letters. As an example create a series of points to form the letter "S". Use the EXTRUDE command and save it to a file. Since that file is in RAW format, use Steve Anger's RAW2POV and make smooth surfaces. The final product shows a nice "S" letter that looks like it was "rolled" instead of "bent" to form the letter "S". You can have both effects. POVCAD will generate a "bent" effect while RAW2POV can create both effects. ****************** NEW ********************* Extruding Data Files: POVCAD can Extrude a data File. After selecting this command, click on the data file to be Extruded (it can be any data file - PATH or Curves). Creating Bezier Patches This was a new feature added to POVCAD 2.0b. To generate a Bezier patch, select the objects menu and click on Bezier. When you select one of the following objects you will be asked for a name. Use any name, but use the extension *.BEZ. The "Read A File" command only checks for *.BEZ patches. The selections available are the following: 1) Read A File Once you create patches with POVCAD you can load them at anytime using this function. You'll be asked for the name of the file and the patch(es) will be integrated in you scene file. When you create a Bezier patch use the extension *.BEZ. This extension is recognized by POVCAD when reading Bezier patches later. NOTE: A Bezier object can have a maximum of 4 patches (64 nodes or control points) 2) Flat This is a flat patch with 16 nodes. 3) Cylinder - 2 Patches This is a collection of 2 patches (16 * 2 = 32 control points) that form a cylindical surface. 4) Cylinder - 4 Patches Same as in 3) but with 16 * 4 = 64 control nodes. 5) Cone 6) Ellipsoid 7) Torus (Top) This is only 1/2 of a torus After creating a Bezier patch, you may deform it in the following way: 1) Click the icon on the lower right corner named "Bezier Edit OFF". This will toggle the icon and enable editing. 2) The screen will be erased and only the patch will be drawn. 3) To rotate the patch, click on the icon "Bezier XFORM" and perform whatever operation you need (it's similar to the XFORM function used with the other objects). NOTE: The XFORM operations will be saved to the original file. If you need the original data, use a copy. 4) To move an individual node, click on the node to be displaced. It is suggested that you use the ISO view to select nodes. 5) On the selected node will appear a red circle. 6) Now, switch to a different view such as YX, YZ or ZX. You may now click on the new position, where the node should be. POVCAD does not use a "click and drag" method but a "click to select" and a "click to move". 7) If you choose to stay in the ISO view, the node will move in X and Y only and it's not a reliable view if you need precision. 8) Once the node has moved, in order to move that node or another one, you must click on the node to be modified. POVCAD doesn't "remember" the last moved node. In the [MISC]ellaneous menu, there is a command named "Bezier Setup". This option lets you select if you wish to see the control grid, the Bezier surface patch or both (or none!). There is also the option of selecting the number of lines in the Bezier patch. The number goes from 3 to 13 lines per side. The higher the number, the better it will look on the screen (but the slower it gets). To exit the editing area, click on the icon "Bezier Edit ON" to toggle it to OFF. BEZIER PATCH FILE FORMAT (*.BEZ) If you have a program that creates the control points for Bezier patches, POVCAD can read it. The data file can have data for up to 4 patches in this format, (i.e., where cp31.x is patch #3, control point #1, X value): cp11.x cp11.y cp11.z cp12.x cp12.y cp12.z cp13.x cp13.y cp13.z ....ect..... cp21.x cp21.y cp21.z cp22.x cp22.y cp22.z ....ect .... The file is straight ASCII with 1 control point per line. CREATING CONSTRUCTIVE SOLID GEOMETRY Let's use an example to explain this topic: We'll assume we want to create a cylinder with a hole in the middle. Since the operation is a difference: 1) click on CSG and then select "difference". 2) create the cylinder and position it. 3) create a sphere (the hole) and position it. 4) Click on CSG and then "Close". Close is the command to tell the program that the current CSG operation has ended. The Session list would look like this: DIFFR CYL ........ SPH ........ ENDF Where: DIFFR = difference operation CYL ... = cylinder definition and transformations SPH ... = sphere definition and transformations ENDF = tells the program that this is where the difference operation ends Now let's assume that you want to create a union of 2 cylinders each one with a hole in it: This is how the Session list would look like: comments: UNION 1) union operation starts here DIFFR 2) difference operation starts here CYL .... 3) cylinder #1 SPH .... 4) sphere #1 END 5) clicked on CSG then on Close DIFFR 6) Start another difference CYL .... 7) cylinder #2 SPH .... 8) sphere #2 END 9) clicked on CSG then Close ENDF 10)clicked on CSG then Close (click on TEXTURE now to add one to the object) As you can see, the software uses END and ENDF to distinguish between intermediate CSG operations and the final CSG operation...in this case the UNION was the final and the DIFFR were the intermediate. The same idea applies to all CSG operations. Composite is not a CSG but it was the best place to put it. (Polyray users) The example given would be the same as: (POVCAD) (Polyray output will look _something_ like this) UNION object { DIFFR object{ CYL .... CYL ... SPH .... - SPH ... END } DIFFR + object{ CYL .... CYL ... SPH .... - SPH ... END } ENDF } Polyray users must follow PoV's CSG format (...sorry!) * TEXTURES ON CSG OBJECTS * To put a texture on a CSG object click on ENDF(using the Session command) to make it the current object (you'll see ENDF at the bottom right part of the screen) then click on TEXTURE to add the one that you want. * TEXTURES ON CSG OBJECT - POV 2.0 * Since POV 2.0 does not support composite objects you can attach textures to individual objects inside a CSG definition or as explained in the previous paragraph. Transforming CSG /Composite objects At this point it is NOT possible to transform (XFORM) the whole set of objects. You may XFORM any of the individual objects that compose a CSG object. Quick Comment If you want to clip an object with 2 planes do the following: 1) Click on "intersection" 2) create the object to be clipped 3) create plane #1 4) create plane #2 5) rotate plane #2 so that the normal is facing oposite to plane #1's normal. (When a plane is created, the normal is ALWAYS in the + direction of the axis.) Also you must translate plane #2 so they're not in the same place. Example: plane#1: PLANE_Y,Translate_Y = .5 plane#2: PLANE_Y,Translate_Y = -.5,Rotate_Z = 180 Plane #1's normal is pointing in the +Y direction, while plane #2's normal is in the -Y direction (due to rotation about Z of 180 degrees) Any object placed in the origin will be clipped at Y=0.5 and Y=-0.5 . Try it and see! Selecting objects with the mouse/ rotations and translations There are different methods for selecting objects so that you may modify them. 1) Clicking on SESSION You may click on the SESSION command in the main menu. This will show a list of all objects that are currently in the database. To select any of them, simply click on the line where it appears, then click on OK. Observe that on the lower right corner, the object selected will be displayed(with it's texture). Now you may use XFORM or click on EDIT or use any of the next methods. The current object always will appear on the lower right corner of the screen. If you wish to reselect a new one, you may either, click on the SESSION command, or click on the scroll bar on the lower right corner to move thru the objects. The one being shown is the current one. Any editing command will apply to the current selected object. 2) Use of the left button(mouse) To select an object, check that the PointsOn/OFF icon is OFF. Now, move the mouse cursor to a point near the center of the object that you want to select. Press, the left button. The object selected will be redrawn in a light color. If the computer selected the wrong one, simply move the mouse to another position near the center point of the object and click. If still the computer selects the wrong one, you may change the current view (Iso,YX,YZ,ZX) to find a better viewpoint. This command may select the incorrect object when various objects share a common center point, or the object you want to select is behind another one. In those cases, change the VIEW and retry. In the worst case, use the SESSION command to select the object. * SWEEP and RAW objects can't be selected with the mouse! use the methods explained on step 1) * * CONEs are selected by clicking on the apex or near it * Once you click on an object and select it, the object will be drawn in a light color. If you click on REDRAW, all the objects will be drawn in black, but the current object will stay current. 3) Use of the right button(mouse) Once an object has been selected, you may wish to Move,Copy,Copy and Rotate or Copy and Translate. To do this, select and object. The next step depends on the command: a) Move To move the current selected object, move the mouse to the position where you want the object. Press the right button and select MOVE. b) Copy To copy the current selected object, move the mouse to the position where you want the new object. Press the right button and select COPY. The texture of the new object will be the same as the old object's. c) Copy/Rotate This command is used to make multiple copies of an object, all of them rotated by a certain amount of degrees. To use this command, select an object, then move the mouse to the a point that will become the center of rotation. Click the right button. Select Copy/Rotate. Enter the angle between objects (in degrees). Enter the number of copies to make, NOT including the original one. d) Copy/Translate This command is used to make multiple copies of an object, each one at a certain X,Y,Z distance from the other. Select an object. Press the right button. Enter the number of copies and the displacements of the new objects. The displacement is a cumulative effect, for example: if a sphere is at (0,0,0) and you enter x=.2,y=.1,z=.5 and enter 3 copies then, object #1 will be at (.2,.1,.5) the next one at (.4,.2,1.0) and the last at (.6,.3,1.5). You may enter a value of zero for any of the coordinates. If you put all zeroes, you'll get multiple copies in the same place!!! ****************** NEW ********************* Creating Polygons POVCAD now supports polygon decomposition. This commands takes a curve generated on the screen with the POINTS menu ("as is" or B-Splined or Catmull-Rom Splined), or with the PATH command and assumes it is a polygon. The polygon will be subdivided into smaller triangles. IMPORTANT !!!!!! NOTE: You should try to create path data and curves in the XY plane (view). This increases the chance of the decomposition algorithm working. It might work in other views but I can't guarantee it. The choices are: 1) Freehand Use the POINTS command to create a curve or contour of the polygon. The polygon must not be closed, i.e. the first and last points should be different. The final polygon will match exactly with the curve. The data is saved as a RAW data file. 2) B-Spline Use the POINTS command to create a curve or contour of the polygon. The data will be processed with a B-Spline curve fitter and smoothed. Then the polygon created will be subdivided into triangles. The data is saved as RAW. The polygon will not match exactly the contour since B-Spline approximates it but it will be smooth compared to the original. 3) Path Data Select a data file to decompose. Use this command if you already created a data file with the PATH menu or with other programs. 4) Perforated This command creates a polygon with a hole in it. It requires 2 names: 1) the file that has the outer curve data and 2) the name of the file with the inner curve (hole). Finally it asks for the name of the RAW data file to be created. A surface will be generated between the outer contour and the inner contour (hole). If you need to create more holes, use the MERGE OUTER/INNER command in the PATH menu. An example: Let's assume that you have a 3 curves to create the letter "B"..the outer curve of the letter, the top hole and the bottom hole. Let's also assume that the name of the files are B.DAT, TOPHOLE.DAT and BOTMHOLE.DAT. First use the MERGE command in the PATH menu and MERGE B.DAT and TOPHOLE.DAT into 1 PATH file called BTEMP.DAT. Now you have 2 choices: You can either MERGE BTEMP.DAT and BOTMHOLE.DAT and then use the PATH DATA command in the POLY menu OR you can use the PERFORATED command in the POLY menu with BTEMP.DAT and BOTMHOLE.DAT. IMPORTANT BACKGROUND: 1) When creating a curve to be used as a polygon, the first and last point may be different. (not necessary to be closed). 2) If you draw an imaginary line from the last point to the first on a curve, it must NOT intersect any other line in the same curve. 3) You may use any orientation when defining the curve,i.e it can be clockwise or counterclockwise. The algorithm will re-orient the data efficiently. The object can be convex or concave. 4) If the routine doesn't work properly, delete the RAW object created and try again. The curve will still be there. 5) Even though you must create the curves originally in the XY plane, the Z values of each curve can be different. As an example, let's say that you want to create a surface which will not be flat, but roughly looking like a cone (truncated cone). Create the outer contour first, then the inner contour. Now, use the XFORM command to translate the inner curve in the +Z direction. If you now look at the curves in the YZ plane, you will see 2 lines...the leftmost line is the outer curve and the rightmost curve is the inner contour. Click on the PATH command to SAVE the inner curve new data. The save will be SAVEd as a *.pth data file. Now, using the PERFORATED command in the POLY menu, select the outer curve and the *.pth file that you just created (the inner curve that has been displaced in the +Z axis). The surface will end up looking like a cone aligned with the Z axis. This is pretty handy when creating beveled fonts. Creating PATH data files for your animations This feature allows you to create data files of paths that may be used in animations programs. Simply select the Path menu and select which curve to create. These data files can be XFORMed in the same fashion as any of the objects supported by POVCAD. To create a curve, select the corresponding curve and you'll be asked for a filename to save the data. This is done to reduce memory requirements on your system. The following is a brief description: 0) Load and SAVE Load read any 3D point ASCII file and converts it into a path, i.e. lines will be drawn to connect the points sequentially. Your data file SHOULD NOT have an extension *.PTH since this is used by POVCAD to save the final path files. SAVE converts your data file, i.e. filename.ext into filename.PTH. Initially, filename.ext was a set of 3D points that you created yourself or thru POVCAD. Since you may want to rotate, scale or translate the data, POVCAD takes those operations and changes your data. In order to keep the original data intact, POVCAD saves the new data with the PTH extension. The EXPORT to POV function in the FILE menu also creates the *.PTH files. If you haven't created any 3D objects and you don't need to create a POV file, simply use the SAVE function in the PATH menu, to save your animation files. To merge 2 or more data files, drop to DOS or load a texteditor and simply append one file to the other to create more complicated path data files. It's that simple! (gasp!...I hope it works) 1) Freehand Converts a set of points created on the screen to a path. Maximum number of points is 50. 2) Linear Click 2 points (more than that will be discarded) on the screen. The routine will subdivide the line segment into a set of points. 3) Circular Creates a circular path. No points have to be created with the mouse. 4) Parabolic Follows the curve Y = aX^2 where a is the parabola coefficient and the value of Y is the height. The value of Z is zero but you may create this curve from any view. The routines will swap the axis to reflect the view you're in. 5) Helix Creates a "spring". The curve follows : x = a cos(2*pi*t) y = a sin(2*pi*t) z = t Therefore Z is the "height" of the function. This depends on the current view setting. 6) B-Spline Smooths a set of points created on the screen with the POINTS command. You will be asked for the amount of subdivisions of the final curve. You may accept the default or modify the number. The final amount of subdivision is dependent on the amount of data and may be slightly to what you specify. The original curve is not erased from memory. Use the "DEL PNTS" command inside the "EDIT" menu. ****************** NEW ********************* 7) Catmull-Rom { Same instructions as 6) B-Spline } Catmull-Rom splines pass thru the control points as opposed to B-Splines that simply approach the control points. Also, you will be asked for a tension value when using Catmull-Rom Splines. You may wish to use the default value 0.5 or a different one. Values approaching 0 seem to create linear interpolation while numbers larger than 0.5 may not follow the data contour correctly. Experimentation is a must on this one. 8) Merge Outer/Inner Use this command to join an outer contour and an inner contour in one data file. This becomes handy when creating polygons with more than one hole. If you have one outer contour with various holes, you may want to consider MERGEing the outer curve and the first inner into a temporary file. Then take the temporary file and MERGE it with the next hole and create a new temporary. Do this for all the holes. 9) Flip Data File This commands flips a data file, i.e., the last point becomes the first point and viceversa. This command can be used before calling the Join 2 Curves command. You may need to invert the data so that lines don't cross. Example: a ------------o <- curve #1 starting point | | ---------o <- curve #2 starting point | | b | | | | | | c | ----------o ----------o d if you use the JOIN command the point "d" will connect to point "b". POVCAD takes the last point from curve #1 and connects it to the starting point of #2. Clearly, the line connecting d to c will cross over curve #2. To eliminate this you may wish to FLIP curve #2 first then JOIN it to curve #1: a ------------o <- curve #1 starting point | | ----------o | | c | | | | | | b | --------o <- curve #2 starting point ----------o d This will make a smooth transition from curve #1 to curve #2, which is required if you need to create a polygon with the POLY menu later. 10) B-Spline Data File Works the same as the B-Spline {command 6) mentioned above} but it reads a data or path file. 11) Catmull-Rom Data File {similar to 10) } After creating the curves you may use them to animate your raytraced images. POVCAD simply creates the curves and shows them with the geometry so you have a better understanding of how things might look. Remember, you can scale, rotate and translate the data like any other object! You may also use them in combination with the POLY menu to create flat surfaces. Creating LightSources To create a light_source object, click on the MISC command in the main menu, then LIGHT. Enter the origin coordinates of the light_source (x,y,z). To add a color to the light_source, select it (Session) then click on the Color command in the main menu. You may select any color or edit the string "red # green # blue #" by replacing the "#" with appropiate numbers. If you wish to move the light_source, click on XFORM and modify the translate parameters. The rotation angles do not apply to light_sources. The scale factors will only affect the size of the light_source symbol (resembles a 3D axis) in POVCAD, POV does not require a scaling factor. When the scene file is EXPORTed to POV, the definition of the light_source will also include the spotlight keywords commented out. If you need to use your light as a SPOTLIGHT, simply erase the "//" characters and replace the question marks "?" after each keyword with a proper value. Look at this example: ***** part of a scene created with POVCAD ****** // LIGHT_SOURCE object { light_source{< .1 .2 .3 > color Blue // If you need a spotlight, use the statements below // replace ? with proper values //spotlight //point_at < ? ? ? > //radius ? //falloff ? //tightness ? } } Grid Spacing command The Grid helps you determine relative distances between points or objects. To show the Grid, click on the GridOff icon to enable the Grid. Initially, the World area will be divided into 20 columns and 20 rows (always equal in number). If you wish to modify this number, click on the VIEW menu and select the GRID SPACING command. Enter an integer number. This number will indicate the amount of rows AND columns, i.e. 10 indicates 10 rows and 10 columns. The higher the number the more precision you'll get. Use the SnapOFF/ON to select only points which are in the grid. Turning SnapOFF let's you select any place in the screen. Experiment with it. How does POVCAD save the objects? POVCAD saves 3 files for every session: {(4) is optional } 1) *.CAD This is the object definitions file 2) *.TEX file with the textures of each object 3) *.WRL world definition of the session 4) *.PTH data files to be used in your animation programs *.CAD file structure: This is the format that POVCAD uses for those of you that want to create external programs to deal with them. The file is an ASCII file with double quotes at the begining and end of each statement: rx,ry,rz = rotations about each axis (absolute) tx,ty,tz = translations on each axis sx,sy,sz = scale factors for x,y and z **** IMPORTANT: Each parameter is separated by 1 space. This is important if you're writing utilities for POVCAD. This space is REQUIRED. 1) Plane: "PLN axis rx ry rz tx ty tz sx sy sz" Example: "PLN X 0.0 0.0 0.0 0.0 0.0 0.0 1 1 1" 2) Cylinder "CYL radius height rx ry rz tx ty tz sx sy sz" Example: "CYL .2 1 0.0 0.0 0.0 0.0 0.0 0.0 1 1 1" 3) Cone: "CON radius height rx ry rz tx ty tz sx sy sz" Example: "CON .2 1 0.0 0.0 0.0 0.0 0.0 0.0 1 1 1" 4) Sphere: "SPH radius rx ry rz tx ty tz sx sy sz" (tx ty and tz are the center of the sphere) (sx sy sz must have the same value) Example: "SPH .5 0.0 0.0 0.0 0.0 0.0 0.0 1 1 1" 5) Ellipsoid: "ELI xradius yradius zradius rx ry rz tx ty tz sx sy sz" Example: "ELI .5 .2 .3 0.0 0.0 0.0 0.0 0.0 0.0 1 1 1" 6) Torus: "TOR radius_major radius_minor rx ry rz tx ty tz sx sy sz" Example: "TOR .7 .2 0.0 0.0 0.0 0.0 0.0 0.0 1 1 1" 7) Box: "BOX rx ry rz tx ty tz sizex sizey sizez" (the Box is a unit cube that has been scaled to size) Example: "BOX 0.0 0.0 0.0 0.0 0.0 0.0 1 2 .1" 8) HeightField "HFL filename.ext rx ry rz tx ty tz sx sy sz" (POVCAD draws a pyramid to represent it, with dimensions x=1 y=1 z=1, so it must be scaled properly. Check POV's docs on height_field.) Example "HFL mountain.gif 0.0 0.0 0.0 0.0 0.0 0.0 1000 1000 3245" 9) RAW: "RAW filename.ext rx ry rz tx ty tz sx sy sz" (Consider using Steve Anger's RAW2POV, it's more efficient. Don't say I didn't tell you about it!) Example: "RAW sweep.dat 0.0 0.0 0.0 0.5 1.3 0.0 1 1 1" 10) Sweep (same as RAW only that the SWP keyword appears instead of RAW) 11) Extrude (same as RAW) 12) Path "PTH filename.ext 0.0 0.0 0.0 0.0 0.0 0.0 1 1 1" This command points to a file with the format: p1.x p1.y p1.z p2.x p2.y p2.z ....ect ..... which was created with POVCAD or that you made up yourself. 13) Light Source "LTS 0.0 0.0 0.0 X Y Z .25 .25 .25" Comments: * The first three numbers are not used at all. * X Y Z refer to the light source position * the three .25 values are scaling factors that only affect the drawing on POVCAD. You may change those numbers to suit your needs by using the XFORM command (scale x,y,z). * The light_source color is in the *.TEX file. 14) Bezier "BEZ filename.ext 0.0 0.0 0.0 0.0 0.0 0.0 1 1 1" Comments: * The only parameter used is the filename. Bezier parameters are XFORMed and their data file is modified accordingly (using the Bezier XFORM icon). The *.TEX file structure: The *.tex file has a line for every item in the *.cad file. Some places may be empty but the file length is the same as the *.cad file. If you created light_sources, the colors will appear here also. The *.WRL file structure: This file has 4 values (if it's not found in your directory, POVCAD assumes a world definition of (-1,-1)-(1,1) ): WXleft WYbottom WXright WYtop These values correspond to the YX plane view. The *.PTH file structure This is a straight ASCII file with a list of 3D points: p1.x p1.y p1.z p2.x p2.y p2.z ... ect... The data has already been transformed by any operations you might have done inside POVCAD. TEXTURES.DEF,COLORS.DEF,TEXTURES.PV,COLORS.PV,TEXTURES.PV2,COLORS.PV2 files These files consist of texture and color names that POVCAD will read. All files follow the same format: 1 name per line. POVCAD will automatically load them if present in POVCAD's directory. Files are in ASCII format. Other Stuff -------------------------------------------------------------------- Limits At this point up to 100 objects may be created. You may do complicated objects by MERGEing files. This will change on future versions. Bezier objects can have up to 4 patches. CSG/COMPOSITE Objects You can not XFORM the whole CSG/COMPOSITE object...you may XFORM any of the components. World Coordinates Definition: POVCAD starts with (-1,-1)-(1,1) => (lowerleftcorner)-(upperleftcorner). Click on View and then World to change that or use the ZoomIn/Out icons to scale up or down. When you ZoomIn the world = world/scalefactor and when you ZoomOut the world = world * scalefactor. Pan You can Pan(scroll) in all direction by clicking on the arrows. You may change the Pan Step Size to move faster or slower. Experiment with it. Copy (from the Edit menu) The Copy function will create an exact copy of the current object. That means that it will be also in the SAME place as the original. Then XFORM will be shown and select the transformation necessary to put the new object where it should be. Click on redraw to refresh the screen if necessary. Files The Export to POV creates a POV format file of the current scene. The default name is POVCAD.OUT...the name can be changed. It also creates any path files (*.PTH) that are in memory. AutoRedraw ON/OFF There's an icon to turn on/off the autoredraw feature. With the option on ON the drawing is sent to a buffer first and then appears on the screen. With the option on OFF the screen will be redraw everytime that you select the TEXTURE, SESSION or XFORM windows. Experiment which one works best for you. The important point is that in ON you pay a price with memory. Check with your system, you decide. Suggestions Create a standard view file with lightsources and camera and put somewhere the statement #include "myscene.pov" to include your scene. That's what I do and works OK for me. Your Suggestions I do welcome your comments and suggestions! Registered users have a better chance of seeing their comments incorporated in the program. If you like it or not let me know! BUG LIST (ugh!) [Check Pi Square BBS for the latest updates!] --------------- Ver 1.0a 2/8/93 (thanks to Bill Martin!) - (fixed) error in height_field definition (was totally wrong!) - added "object { }" and "color" keywords to light_source object - error on cone definition (not sure what the problem is :( ) Ver 1.0b 3/27/93 - (fixed) You may press [OK] on the SESSION windows without having done a selection. (the program used to crash) - Cone_Y was changed to QCone_Y since Cone_Y was used in an old version of the SHAPES.INC include file. If you have the old version, replace QCone_Y with Cone_Y. - (fixed)The 3D axis was not appearing at the beginning of the program. - The name of the file now appears at the top of the Window (caption). If no file is present, the caption "POVCAD version#" will appear. - When a POV file is created with the EXPORT function, the name of the file, date and time of creation will appear on the top. (thanks to Phil Long!) - (fixed) The copy function was not copying the texture to the new object. - (fixed) When opening the texture window and color window, you may click on the texture or color word to accept it...no need to click on [OK]. (thanks to Bill Martin!) - I added a scroll bar at the bottom right area of the screen, near the current object and texture info box. Once an object is created, it will appear in the info box. If you have more than one, simply scroll thru each one...no need to use the SESSION dialog box anymore unless you want to see more than one object at a time. The object that appears in the box is the current object and may be XFORMed at any time. (thanks to Peter Jack!) - (fixed) Light source was not accepting negative numbers Ver 1.0c 4/2/93 (thanks to Neil Clark and Kevin Luck!) - (fixed) The "SAVE AS.." command was not working properly. Ver 2.0 4/10/93 (thanks to Phil Long!) - Modified RAW data output (format). Sometimes only "." would appear! The new format is "#.###E##". - (fixed) Bug in the SWEEP command. The command worked ok only on the YX view...the others would give incorrect swept images. (thanks to Amanda Osborne!) - If you create a RAW data file with any other program, be sure to check that the first line doesn't have text or an empty line. If it does, POVCAD chokes. I'll try to check for it on a future minor release. Ver 2.0a 4/24/93 - (fixed) bug on Open command. POVCAD would choke if texture (*.tex) file was not available. - added support for the Polyray raytracer. EXPORT works for PoV and Polyray. - added a viewpoint definition window (similar to PoV's camera). It can be found in the MISC menu. - CSG operations DO NOT work for Polyray at this point. - modified Export to POV routine to eliminate all rotate <0 0 0>, scale <1 1 1>, or translate<0 0 0>...they are not needed. - more experimentation with the CONE_Y definition...hope it works. Ver 2.0a 5/4/93 - added support for CSG in Polyray (user must follow PoV's CSG format) It _seems_ to work OK. Ver 2.0a 5/8/93 - Increase point buffer from 25 to 50 Ver 2.0b 7/9/93 - Added Bezier patch features and objects Ver 2.0b 7/14/93 - Added polygon decomposition and B-Spline features. The decomposition needs some work. :( Ver 2.0b 7/18/93 - Fixed most bugs in Decomposition and added Join 2 Curves, B-Spline and Flip commands to data files. Ver 2.0b 7/19/93 - Fixed bug in decomposition algorithm - Added Extrude Data files option Ver 2.0b 7/22/93 - Fixed obscure bug in decomposition algorithm Ver 2.0b 7/24/93 - Fixed bug RE: the "colors" keyword missing on the texture definition. Ver 2.0b 7/31/93 (thanks to Peter Jack!) - Fixed bug in the File Box. Was showing incorrect titles. - Added the "SWEEP DATA FILE" command. Now POVCAD SWEEPs points or data files with points. Ver 2.0b 8/15/93 - Worked a bug on the decomposition algorithm - needs more checking though. Ver 2.0b 8/25/93 (thanks to Morten Hjerde!) - Found a bug in the exiting routine....POVCAD would stay in memory if ALT-F4 or the CLOSE icon was selected. Ver 2.0c 9/25/93 - Switched to Visual Basic 3.0 and added Catmull-Rom Spline support. Ver 2.0c 10/20/93 - Supports POV 2.0 now. Ver 2.0c 10/24/93 - Converts RAW data to DXF files ------------------------------------------------------------------------ REGISTRATION FORM FOR POVCAD 2.0c (c) Alfonso Hermida 1993 Windows Version COMPLETE THE REQUIRED INFORMATION Send check or money order to Alfonso Hermida 9346 Kings Grant Rd Laurel MD 20723 Name :_________________________________ Date:_________ Address:________________________________________________________ ________________________________________________________ ________________________________________________________ Phone :__________________________________ Your registration entitles you to support thru Pi Square BBS. Write a temporary password to add your account to the BBS: BBS password: _________________________ Registered users of a given version do not have to register for minor revisions. For example, if you registered version 1.0, then 1a,1b,1c are minor revisions, and version 2.0 will be a major revision. Registration fee: Upgrade from version 1.x ....... $ 5.00 (USA). New user........................ $15.00 (USA). Would you be interested in the source code? Yes[ ] No[ ] (written in Visual Basic 3.0) Comments:__________________________________________________________ ___________________________________________________________________ ___________________________________________________________________ ----------------------------------------------------------------------