*************************************************************** XOBJ - An "ObjectWare" program. (c) Copyright 1988, 1989. Phil Camp. This program may be freely redistributed under the following conditions; 1) This file is included with the program. 2) The program is not described as Public Domain. 3) No profit is directly made from its sale. ************************************************************* Version history: 1.10a : Added Sculpt 3D file conversion Changed Videoscape scaling factor 1.01a : Fixed bug causing small objects to be distorted. Added CLI support. 1.00a : Initial version. ************************************************************* XObj?: What is it?..... XObj is a handy utility to convert 3D objects from VideoScape 3D file format or Sculpt 3D file format into Turbo Silver object files. Why is it?...... If you are, like me, not skilled in the art of designing and producing 3D objects for your Turbo Silver pictures, you will find there are a lot of cheaply or even freely available objects for use with VideoScape 3D or Sculpt 3D. I wrote this program to enable me to tap this supply of objects and use them in Turbo Silver. How much is it?...... Its FREE (well it costs no money!). I have devised a new support scheme for XObj. XObj is not Public Domain, its not ShareWare (its not even BeerWare), its........... OBJECTWARE!!!. To become a offical owner of XObj all you have to do is provide me with any objects you might have. Objects can be donated in two ways; 1) An object that I can release into the Public Domain. I hope to build a library of PD objects that will be of use to all Turbo Silver users. 2) A private object that you do not want to see redistributed, but you would not mind me playing with. In return for these objects you will be registered as an offical owner of XObj. If there is enough support I will continue to develop programs and utilities for use with the various 3D packages. In addition you can obtain the source of XObj for a minimal fee. How does it work.... XObj can be run from either the CLI or workbench. Please note; the program requires the ARP library to be in your 'libs' directory as it uses this library for the file requester. XObj is very simple to use, it can be run in two basic ways; 1) From the CLI with two filename arguments. The first filename is the object file to read, the second is the filename to write the Turbo Silver object onto (eg. "XObj MyObject.geo MyObject.obj" reads from MyObject.geo and writes to MyObject.obj). XOBJ automatically detects which file type the input file is. 2) From the workbench or CLI with no arguments. XObj will use the file requestor to determine the filenames. A file requester should appear asking for the input object's file name. Enter or select the required file. Next XObj will put up another file requester that will ask for the Turbo Silver file you want it to write. Either select an existing file or type in a new filename. XObj will then convert the file. Whats all this stuff on the screen?..... XObj gives you some status and stats on the object being converted. These include stats on the size of the object and the size of the resultant Turbo Silver object. When reading data XObj puts a '.' on the screen every 10 points or polygons. This can help you locate errors in the input file. How do I use the resultant file?..... When in Turbo Silver, simple select the 'LOAD' menu item from the Settings menu. This will load the object. You can then rotate/scale/manipulate the object using the obejct editors commands. Sounds good. What cant it do?....... XObj does have limitations (dont all free programs!). 1) Limits on the complexity of the object. Currently (1.10a) XObj can only convert objects within the following constraints; a) The input object cannot contain more than 2700 points. b) The V3D object cannot contain more than 5300 polygons. c) The resultant TS object file cannot contain more than 8000 edges. d) The resultant TS object file cannot contain more than 5000 edges. These are limitations, but you will find that not many objects are that big!. Because the V3D files are stored in text form it is simple to split objects should you need to. 2) Complex polygons. V3D is a polygon based 3D package while all the ray tracing packages are based on Triangles. XObj can only handle polygons that have 3 or 4 vertices. You will find that 95% of all polygons out there fit into this system, those few complex polygons can be simply converted by hand. If you have Modeler 3D you can simply use the 'Statistics' window to select polygons with more than 4 vertices, then use the 'Polygon Split' command on them until they are comprised of a number of simple polygons. Or you can just remove them from the object then use Turbo Silver's editor to redo them on the converted objects. 3) XObj will not handle the new binary format V3D files. Dont worry all the commercial object disks give you them in text format. What about errors?...... XOBJ trys to detect any errors while processing the files and will issue informative messages. Below is a list of error messages and their meanings, many indicate a bad input object format: ** Bad input number. An integer number in the V3D file is illegal. ** Bad input FRACT high. The whole portion of a real number is illegal. ** Bad input FRACT low. The fractional part of a real number is illegal. ** Warning: missing edge. The Sculpt 3D object contains a face that has an edge missing. Too many points/edges/faces. The input object is too complex. Object has no points!. The input object has no points. ** Polygon has no vertices?!. A V3D polygon has no vertices. ** Two point poly skipped. A V3D 2 point polgon (a line) has been skipped. Turbo Silver can only draw faces not lines. polygon has too many vertices. A V3D polygon has more than 4 vertices. ** EOF hit skipping details. End of file reached reading V3D details section. surface details skipped. Turbo Silver cannot fraw V3D surface details. object contains no data?!. No polygons or faces found in object. File is not correct format. Input file is not Videoscape or Sculpt 3D format. ** Cannot open file. Input file not available for reading. ** Cannot create file. Output file nor available for writing. Any other tips?...... Some objects can be a bit small when imported into TS. Use the TS object editor to enlarge them. NB. I have noticed that some objects are VERY small!. Colors. XObj sets each face of the TS object to the correct color as defined in the V3D file. DONT change the color of the object using the TS attribute requester or you will modify ALL the faces on the object. When converting Sculpt objects XOBJ converts the entire scene file into one Turbo Silver object. I got the minimum info on the Sculpt file format from a transactor article but have been unable to get a full file spec. Until I can get the full spec, XOBJ only converts the points and faces. XOBJ discards the Sculpt edges as its faster to recreate them rather than perform the translation. *********************************************************************** ObjectWare registration; 1) Place any objects you wish to donate on a standard Amiga 3.5 inch disk. Please do not send commercial objects, this would be a violation of their copyright. 2) Indicate which objects are PRIVATE (for my use only) and which are PUBLIC DOMAIN. 3) If you wish to obtain the source to XObj (its in M2S M2Sprint Modula-2) enclose $5 (or a rough conversion) in funds to cover postage etc. Please do not send personal cheques in anything other than pounds sterling, they cost more than $5 to get cashed in the UK. 4) Enclose you name and address. 5) Send either Air or Surface mail to; Phil Camp ObjectWare 48 Alma Vale Road Clifton Bristol BS8 2HS United Kingdom. ************************************************************************* Credits; My thanks to Stan and Impulse people for releasing the Turbo Silver file format into the public domain, and for the wonderful Turbo Silver product. Turbo Silver is a trademark of Impulse Inc. Sculpt 3D is a trademark of Byte by Byte. VideoScape 3D and Modeler 3D are trademarks of Aegis. Phil Camp, 08-Mar-89. BIX: philc CIS: 76004,2054