home *** CD-ROM | disk | FTP | other *** search
/ Shadow Warrior / SWARRIOR.bin / goodies / doc / SLABSPRI.TXT < prev    next >
Text File  |  1997-08-25  |  12KB  |  290 lines

  1. --------------------------------
  2. SLABSPRI Help Reference
  3. Original Docs By Ken Silverman
  4. Edited By Keith Schuler
  5. (c) 1997 3D Realms Entertainment
  6. --------------------------------
  7.  
  8. This is a very brief reference guide to help you use the SLABSPRI program,
  9. which you will find in the \GOODIES\TOOLS directory on your Shadow Warrior
  10. CD. Use SLABSPRI to create voxels (3D sprites) for Shadow Warrior.
  11.  
  12. Refer to these documents in the \GOODIES\DOC directory on your Shadow
  13. Warrior CD for other important information:
  14.  
  15. ADVANCED.TXT - Brief explanations of room-over-room, sector objects, and
  16. other advanced Shadow Warrior mapping topics.
  17. EDITART.TXT  - Instructions and reference for using the EDITART program.
  18. EXAMPLE.TXT  - Documentation to accompany EXAMPLE.MAP, which includes
  19. demonstrations of almost all of Shadow Warrior's map functionality.
  20. SLABSPRI.TXT - Instructions and reference for using the SLABSPRI program.
  21. SWSOUNDS.TXT - An index of the sound effects and ambient sounds.
  22. SPRITAGS.TXT - Sprite tagging reference. Your guide to all the special
  23. sprites in Shadow Warrior and how to use them.
  24. SWBUILD.TXT  - A tutorial and reference guide to using the BUILD editor.
  25. WALLTAGS.TXT - Wall and sector tagging reference. These are all the wall and
  26. sector tags used in Shadow Warrior.
  27. -----------------------------------------------------------------------------
  28.  
  29.  
  30. --------------------------------
  31. 1.      Command line parameters:
  32. --------------------------------
  33.  
  34. There are three different ways to access SLABSPRI on the command line:
  35.  
  36. 1. Build your own brand new voxel using the SLABSPRI.EXE editor.
  37. 2. Load an existing .KVX or .VOX file and edit it.
  38. 3. Convert from .ART & .PAL files containing 2-D rotations.
  39.  
  40. 1.1     SLABSPRI
  41.  
  42. If you type "SLABSPRI" on the command line with no arguments, this will start
  43. up SLABSPRI with the default voxel and palette.    My initials are "KJS" :)
  44.  
  45. 1.2     SLABSPRI [.KVX / .VOX filename]
  46.  
  47.         This loads a voxel file that is already in 3-D format. For instance,
  48.         type "SLABSPRI RAILGUN.KVX" to load the railgun voxel. The 2 types
  49.         of voxel files are:
  50.  
  51.         .KVX - compressed voxel object using vertical spans with 5 mip-maps
  52.                levels.  At the end of the KVX file is a 768 byte palette.
  53.                If you're really out to save space, you could strip this off
  54.                and the voxel will still look correct in the game. Of course,
  55.                you'd have to re-attach the palette if you ever want to view
  56.                the KVX in SLABSPRI again.
  57.  
  58.         .VOX - uncompressed voxel object
  59.  
  60.         For you programmers out there, SLABSPRI.EXE can load from an
  61.         uncompressed voxel file.  For example you could easily write
  62.         a program to generate some kind of a colorful sphere.  Or if
  63.         there's a true hacker out there, maybe you could even write
  64.         a program that converts objects from a 3D modeler program
  65.         to voxel files!  (I'd like a copy if anyone does this! -Ken)
  66.  
  67.         The .VOX format is so simple, I'll describe it right here:
  68.  
  69.         {
  70.                 //char voxel[xsiz][ysiz][zsiz];
  71.                 read(fil,&xsiz,4);        //Dimensions of 3-D array of voxels
  72.                 read(fil,&ysiz,4);
  73.                 read(fil,&zsiz,4);
  74.                 read(fil,voxel,xsiz*ysiz*zsiz); //The 3-D array itself!
  75.                 read(fil,palette,768);    //VGA palette (values are 0-63)
  76.         }
  77.  
  78.         Color 255 is treated as empty space.  It is best to keep the
  79.         inside of the object solid.  Otherwise, SLABSPRI will not be able
  80.         to take advantage of back-face culling.
  81.  
  82.         NOTE: A transluscent table is required to create the lower mip-map
  83.         levels. Since KVX / VOX files don't store the transluscent tables in
  84.         them, and it would be slow to re-create them every time a KVX is
  85.         loaded, SLABSPRI tries to load the transluscent table from
  86.         PALETTE.DAT.  It's okay if PALETTE.DAT doesn't exist, however the
  87.         voxels will go blank when switching to the lower mip levels. I
  88.         recommend keeping a copy of PALETTE.DAT with transluscent table
  89.         sitting in your directory.
  90.  
  91. 1.3     SLABSPRI.EXE [art&pal name][start tile][num tiles][total rotations]
  92.  
  93.         This is the easiest way to create a new voxel. You make rotations
  94.         of a sprite (perhaps by rendering it with some 3D package.) And
  95.         then create an .ART file using EDITART. Place the rotations in the
  96.         art file sequentially, turning clockwise. Then copy the .ART file
  97.         to your SLABSPRI directory, along with PALETTE.DAT.
  98.  
  99.         1.3.1 [art&pal name]
  100.  
  101.                 Prepare an .ART and .PAL file with same name, such as
  102.                 "KEN.ART" and "KEN.PAL". The filename (without extension)
  103.                 must be the same name. For the palette file, you can
  104.                 rename your PALETTE.DAT file. SLABSPRI uses a transluscent
  105.                 table for the painting stage of conversion.
  106.  
  107.         1.3.2 [start tile]
  108.  
  109.                 This is the tile index into the art file which is the first
  110.                 rotation of the object. For instance, if in EDITART you
  111.                 placed your object at tile #0, then that is the number you
  112.                 would use here.
  113.  
  114.         1.3.3 [num tiles]
  115.  
  116.                 The number of rotation images that will actually be processed
  117.                 from art file. This number is usually at least 5 for objects
  118.                 that were not specially designed for voxels.
  119.  
  120.         1.3.4 [total rotations]
  121.  
  122.                 This number is used to calculate the angle delta between
  123.                 successive rotation images in the art file. Use 8 for 45
  124.                 degree increments, 12 for 30 degree increments, etc.
  125.                 Increment = (360 degrees / #). If this number is negative,
  126.                 then the rotations will be treated as counter-clockwise
  127.                 instead of clockwise. Usually this number will be the same
  128.                 as [num tiles], unless for some reason the rotation images
  129.                 equal more or less than a single rotation.
  130.  
  131.  
  132. ----------------------------
  133. 2.      Keys Inside SLABSPRI
  134. ----------------------------
  135.  
  136. These are the keys everyone should know before using SLABSPRI.EXE.
  137.  
  138. 2.1     Main Screen Keys:
  139.  
  140. ESC - Quit to DOS (first asks if you're sure)
  141.  
  142. Arrows - Move
  143.  
  144. A/Z - Up/down
  145.  
  146. PGUP/PGDN - Look up/down
  147.  
  148. <> - Rotate voxel around its center (if mouse cursor is not in a window)
  149.  
  150. L - Load a .KVX file. Allows you to select files anywhere on the current
  151.     drive by simply using arrow keys, PGUP, PGDN, Home, End, and
  152.     L.Enter.  Press ESC to cancel.
  153.  
  154. 2.2     Editor Keys:
  155.  
  156. Keyp.Enter - Toggle edit windows.  If the mouse cursor is pointing on the
  157.              voxel when you press this key, the 2D cross sections will
  158.              be at the point where the mouse was over.
  159.  
  160. L.ALT-S - Save a .KVX file. If you specified a .KVX file on the command line
  161.           it will use that filename. Otherwise, it will save as a new
  162.           .KVX file as VOXEL###.KVX. It will automatically find the first
  163.           file with a number that doesn't exist.
  164.  
  165. R.ALT-S - Saves the voxel as VOXEL000.VOX
  166.  
  167. L.MouseButton - Plot a pixel.
  168.  
  169. R.MouseButton - Drag the 2D EDIT MODE window.
  170.  
  171. L.ENTER - Change the viewing mode. There are 3 viewing modes.
  172.  
  173.         0: Shows the current cross-section only
  174.         1: Shows the full non-perspective view starting from beginning of
  175.            axes
  176.         2: Shows the full non-perspective view starting from end of axes
  177.  
  178. Backspace - Changes the current drawing color to 255. Essentially this is
  179.             "erase" mode.
  180.             
  181. F - Flood fill the region using the current drawing color as the border.
  182.  
  183. C - Change all colors from what's under cursor to current drawing color.
  184.     If showthough is "0", changes are made only in cross section, otherwise
  185.     the entire voxel is changed.
  186.  
  187. J - Junking function. Randomly changes about every 16th pixel of color
  188.     under the mouse cursor to the current drawing color.
  189.  
  190. B - Press this key when the mouse is on the color bar to change the
  191.     background color.
  192.  
  193. T - Trail mode. The mouse cursor will leave a "trail" of the current color.
  194.  
  195. ~ - Toggle the pivot adjustment mode. Use the arrow keys to adjust.
  196.  
  197. / - Center the pivot in pivot adjustment mode
  198.  
  199. <> - Darken / brighten rectangle (mouse cursor must be in a window).
  200.      Select the first corner of the rectangle with the "1" key.
  201.  
  202. TAB - Choose the current drawing color
  203.  
  204. SPACE - Plot a pixel using the current drawing color
  205.  
  206. +,-   - (Both main keyboard & keypad) increment / decrement color
  207.  
  208. Shift + Arrows - Change current drawing color.
  209.  
  210. Shift + Mouse - Limit mouse movement to either X or Y axis, depending
  211.                 on which changes first.
  212.  
  213. [ ] - Change the current drawing color (left / right)
  214.  
  215. Keyp. /,* - Zoom window in / out.  There are 4 zoom levels (1,2,4,8)
  216.  
  217. PGUP/PGDN - Select cross-section
  218.  
  219. HOME/END - Push a rectangular region forward or backward.  Works in
  220.            viewing mode 0 only.  Select first corner with 1.  2nd corner is
  221.            where mouse cursor was when Home/End was pressed. (Not fully
  222.            programmed yet)
  223.  
  224. CTRL+PGUP/PGDN - Change the voxel dimensions
  225.  
  226. R - 2D Rotate - Press R to enter rotate mode.  Then use 4 arrow keys to
  227.     rotate the 2D cross section (viewing mode 0) or entire voxel (viewing
  228.     mode 1-2) by 1 pixel. Press ESC, ENTER, or R to get out of rotate mode.
  229.  
  230. ALT-R - 3D Rotate. Rotates an entire voxel CCW upon the axis of the
  231.         window the mouse cursor is over.
  232.  
  233. ALT-F - 3D Flip. Do top/bottom flip on the window the mouse cursor is
  234.         over.
  235.  
  236. ALT-C - Make a 2D cross section which has an almost circular shape look
  237.         perfectly circular.  This works great for those "octagony" voxels
  238.         that were chopped out using only 8 views.  If you press ALT-C when
  239.         viewing mode > 0, then all cross sections of that axis will be
  240.         circulized.
  241.  
  242. ALT-H - De-hollowize tool. This key fills in hollow parts of voxels
  243.         that can never be seen from outside.  Use it when the 2D edit mode
  244.         windows are off. This is useful for optimizing a voxel for
  245.         back-face culling. Note that this won't work if there is a leak
  246.         into the hollow part.
  247.  
  248. ALT-U - Undo change - copies compressed 3D voxel over 2D views.
  249.  
  250. Keyp.0 - Accept changes in 2D windows - copies to compressed 3D voxel.
  251.  
  252. 1 - Select first corner for copy&paste rectangular region
  253.  
  254. 2 - Select second corner for copy&paste rectangular region. Unlike EDITART,
  255.     it matters whether you select the top-left corner first or not. This is
  256.     how you can flip the tile more easily without having to use other
  257.     special keys to do it.
  258.  
  259. 3 - Paste rectangular region (from top left corner)
  260.  
  261. ALT-P - Re-maps current palette to the PALETTE.DAT file which you must put
  262.         in the current directory.
  263.  
  264. Keyp. 2,4,6,8 - Change xrepeat & yrepeat. These keys stretch and shrink
  265.         the voxel in the x and y directions.  This will not be saved
  266.                 and is only included for fun.
  267.  
  268. Keyp. 5 - Reset xrepeat & yrepeat
  269.  
  270. Ctrl + Keyp.5 - Reset voxel to center position facing forward
  271.  
  272. F1-F4,F9,F10 - Slow x,y,ang movement.
  273.  
  274. F12 - screen capture
  275.  
  276. U - Combine 2 voxels. First lets you select a .KVX file like the 'L' key.
  277.     Then you can center the object by using the 1-6 keys on the keypad
  278.     like this:
  279.              ┌───┬───┬───┐
  280.              │(7)│(8)│(9)│
  281.              ├───┼───┼───┤
  282.              │x--│y--│z--│
  283.              ├───┼───┼───┤
  284.              │x++│y++│z++│
  285.              └───┴───┴───┘
  286.  
  287.      I was nice enough to duplicate my movement code so you could move
  288.      around the voxel as you center it.  After centering, press L.Enter to
  289.      accept or ESC to cancel.
  290.