home *** CD-ROM | disk | FTP | other *** search
- Picfield - Copyright (c) 1994, Loyd L Towe - All rights reserved.
-
- Picfield works along the same lines as a POV-RAY height_field, but goes
- further.
-
- Picfield takes as input a 320x200x256 color picture in either GIF or PCX
- format. It translates the pictures Y coordinates into POV-RAY Z coordinates,
- with the top of the screen being away from you (ie: in the positive Z). The
- pictures X coordinates are converted to POV-RAY X coordinates. The POV-RAY
- Y coordinates are derived from the pictures color index. Pixels with a
- color index of 0 are ignored and no object is created for the location.
-
- Included in the archive are test files. The PCX is set up to have 256 shades
- of gray of ascending value, which I find to be the most convenent way to work
- out surfaces.
-
- The utility has the following command line syntax:
-
- (note: parameter order is important)
-
- picfield <infile> <outfile> <data format> <scale> [object name]
-
- the infile is a 320x200x256 GIF or PCX picture file. Pixel 159,99 translates
- into X=0 and Z=0. Pixel 0,0 is X=-159 and Z=99. In otherwords, the center
- of the screen is the center of POV-RAY world space.
-
- the outfile can be named anything you desire. Using .inc as the suffix seems
- logical.
-
- the data formats are as follows:
-
- T = Generate the object array as triangles (standard height_field method)
- S = Generate output as unit sized spheres
- R = Generate output as RAW data for futher processing
- L = Make blob components (strength 1.0 radius 1.0)
- W = Generate cylindrical wire mesh
- B = Make box columns (from <x,0,y> to <x,index,y>
- X = Make unit sized boxes
- C = Generate cylinder columns
- I = Generate unit sized cylinders
- O = Use supplied object name
-
- The scale factor is a integer value of 1 or greater (default value is 1).
- The useable range is 1..255 although values larger are allowed and can
- sometimes be useful. The scaling is done by taking the color value and
- dividing it by 255, and the multiplying it by the scale factor. Example:
- pixel 100,100 has a color index value of 127, the height for a scale factor
- of 1 would be 0.5, for a scale factor of 2 it would be 1.0, etc..
-
- object name is the name of a declared object or an object from shapes.inc,
- and need only be added as a parameter if the 'O' option is used.
-
- A word about size. This program can generate data to choke a horse. Care
- should be taken when creating a Picfield object set. Create your pictures
- so that when the X size is multiplied by the Y size, the number is less than
- about 10,000 (or you'll be sorry :). I have yet to use more than say 30x30
- and found that plenty of room to work. Of course you make the picture
- larger if the pixels are sparse, and it contains lots of black.
-
- That's it. Have fun. Picfield is being released as donation-ware. You
- may use it freely to create object data to your hearts content. I reserve
- all rights to the program, and its functionality. If you would like to make
- a donation to the cause and support/encourage the development of additional
- toys and utilities, send whatever (cash, check, scenes you have made with
- Picfield, etc.) to:
-
- Loyd L Towe
- c/o Data Wave
- 13500 SW Pacific Hwy #457
- Portland, Oregon 97223
-
- I can be reached at:
-
- Compuserve: 70614,1721
- internet: towel@elcsci.com
-
-
- plans for improvement:
-
- add scaling for X and Z values
- add Y value offset factor
- auto palette generator
- built in drawing tools
-
- whatever anyone else comes up with.
-