home *** CD-ROM | disk | FTP | other *** search
/ Qu-ake / Qu-ake.iso / qu_ke / editor / 015 / README.TXT < prev   
Encoding:
Text File  |  1996-08-05  |  16.9 KB  |  435 lines

  1. **************************************************
  2. *                 Makebrush v0.6                 *
  3. **************************************************
  4. *              (c) by Lars Bensmann              *
  5. **************************************************
  6. * http://localhost.ruhr.de/~b-man/makebrush.html *
  7. **************************************************
  8.  
  9. Introduction
  10. ------------
  11. This utility is for everyone who wants to try making a Quake MAP-file.
  12. It will make the most difficult part way easier. You don't have to care
  13. about those numbers in the brushes anymore. It will also create rooms and
  14. stairs automatically.
  15.  
  16.  
  17. How does it work?
  18. -----------------
  19. Well, it's really easy.
  20. Just type:
  21.  
  22.     makebrush [option]      (Linux version)
  23.     makeb [option]          (DOS version)
  24.  
  25. First of all you will be asked what kind of object you want to define.
  26. You can choose between a regular object, cube, plane, room, funny room,
  27. and stairs. Solid staircases are not implemented yet.
  28.  
  29.  
  30. Defining cubes
  31. --------------
  32. Enter 'c' to the first question to define a cube. You need to know one point
  33. of your cube with all 3 neighboring points.
  34.  
  35.           P5
  36.     +---------+   So if you enter P1 as you first point, the next points
  37.        /|        /|   need to be P2, P3, and P4 (order is not important for
  38.    P4 / |       / |   the last three points).
  39.      +--+------+  +
  40.      | / P3    | /    Actually, you can define cubes in the plane mode pretty
  41.      |/        |/     simple as well. So have a look which mode you like
  42.      +---------+      better.
  43.     P1         P2
  44.  
  45.  
  46. Defining cubes aligned to the x, y, and z-axis
  47. ----------------------------------------------
  48. This is really easy. You just have to enter two opposite corners, that's it
  49. (e.g. P1 and P5). Of course, you can rotate the cube afterwards with the
  50. '-r' option.
  51.  
  52.  
  53. Defining planes
  54. ---------------
  55. Now let's get to the plane mode. Typing 'p' at the beginning will put makebrush
  56. into the plane enter mode.
  57.  
  58. In plane mode you can define any shapes that have the same thickness at every
  59. point (including cubes). First of all you have to tell makebrush how many
  60. corners the 2D plane has and then you have to enter a vector for the thickness.
  61. Because it is a vector, you are not restricted to horizontal planes.
  62.  
  63. After this, you just have enter all the corner points of the 2D plane.
  64.  
  65.  
  66. Rooms
  67. -----
  68. Now the fun begins. You always had this level in mind with the 50 sided room?
  69. Well, no problem anymore, just use 'makebrush'.
  70. 'Makebrush' knows two different room modes. The regular 'room mode' and the 
  71. 'funny room mode'. The funny mode was my first try, but didn't generate the
  72. results I wanted, but I left it in anyway, because the objects looked kind
  73. of funny. (Well, now you know, why I called it this way :-)
  74. Making a room is as simple as a regular object. Just enter the thickness of
  75. the walls, and then enter the inner corner points of the room. You can also
  76. specify a negativ thickness and the walls will go inside, so you have to
  77. enter the outer corners.
  78. Let me give you a brief descrition, of what the 'funny room mode' is.
  79. Let's say you have two planes A and B:
  80.  
  81.      
  82.      |\
  83.      | \
  84.      |  \
  85.      |   \
  86.     A    B
  87.  
  88. That's what it should look like (regular 'room mode'):
  89.  
  90.  positive walls:
  91.  
  92.     |\           negative walls:
  93.     | \
  94.     ||\\           |\
  95.     || \\          | \
  96.     ||  \\         ||\\
  97.     ||   \\        || \\
  98.     A    B         A    B
  99.  
  100. That's what the 'funny room mode' looks like:
  101.  
  102.  positive walls:
  103.  
  104.          negative walls:
  105.      |\
  106.     ||\\            Sorry, I can't draw this :-)
  107.     || \\
  108.     ||  \\
  109.     ||   \\
  110.     A    B
  111.  
  112. Oh, I hate ASCII graphics, but I hope you get the idea anyway. If didn't
  113. just try the following:
  114.  
  115. 'makebrush -o test -i 20sides'.
  116.  
  117. This will generate twenty brushes for a 20 sided room in the files test1.
  118. Now change '//#room' in the file '20sides' to '//#froom'.
  119. Just compile them with QBSP and look what the difference is.
  120. If you want to see the effect of negative walls, change the number after
  121. the keyword 'thickness' in the file '20sides' from '50' to '-50', and do
  122. the whole thing all over again.
  123.  
  124.  
  125. Staircases
  126. ----------
  127. There are two types of staircases implemeted yet. The first type creates
  128. the given number of steps objects between the bottom and the top step.
  129. The shapes of the two steps do not have to be the same (but they have to have
  130. the same number of corner points)
  131. The second type of staircases lets the single steps (which are all the same)
  132. rotate around a given point.
  133.  
  134. Simple staircases
  135. -----------------
  136. At first you have to enter how many points you want to define. Read on first,
  137. so you know how many you need to define the staircase you want.
  138. Now you should enter the corner points of hte lowest and the highest step in
  139. a sensible order. The first half of the points define the lowest step and the
  140. last half the highest. If you enter the back left corner as point 1, you should
  141. also enter the back left corner of the upper step as point 1 of the second half.
  142. Thsi may seem a little bit complicated, but it's not that bad, once you get the
  143. plan behind this. And then you can create some weird looking staircases by
  144. messing up the order liberatly. Makebrush will calculate a line between the
  145. first point on the lower step to the first point of the upper step. (From the
  146. second to the second and so on.) So if you swap the order, your steps will
  147. look something like this:
  148.  
  149.  
  150.        7-------------8       7--------------8
  151. Upper step |             |       |              |
  152.        5-------------6       6--------------5
  153.        |             |        \            /
  154.        |             |           \      /
  155.        |several steps|              \/
  156.        |             |              /\
  157.        |             |           /      \
  158.        |             |        /            \
  159.        3-------------4       3--------------4
  160. Lower step |             |       |              |
  161.        1-------------2       1--------------2
  162.  
  163. If you swap points 5 and 6 as well, the stairs will look like the
  164. left picture again.
  165.  
  166. Play around a bit with the staircase mode. You can create several interesting
  167. objects. The only restriction is that you have to have the same number of
  168. points for the first and the last step.
  169.  
  170. For one interesting example type:
  171.  
  172. 'makebrush -o test -i platform'
  173.  
  174. This will give you an impression of what is possible. If you create interesting
  175. objects, don't hesitate to mail me (lars@b-man.ruhr.de) the coordinates in a
  176. file of the same format as 'platform' or '20sides'. I'd like to include several
  177. more examples with makebrush. (Or look at the 'filemode'-section for a more
  178. elegant solution).
  179.  
  180. Spiral staircases
  181. -----------------
  182. The input mode is similar to the plane mode. You just have to define one step
  183. here, because all steps will be the same (just rotated around the center of
  184. your spiral staircase).
  185. First of all you have to enter the number of steps (including the first and
  186. the last one). Now type in the vector for the thickness of the steps, followed
  187. by the amount of rotation of the last step in degrees (e.g. if you want a two
  188. story staircase enter 720.)
  189. Now you have to enter the center point of your staircase. The z-value is
  190. actually irrelevant, bu you have to enter it anyway :-)
  191. Now enter the points just as in the plane mode.
  192.  
  193.  
  194. Rotation
  195. --------
  196. Yes, you can also rotate your object around any point you like. You can even
  197. rotate the object several times around different points. This might be useful
  198. to move the object to a specific position as long as I don't have any kind of
  199. translation included.
  200. You have to specify '-r' on the command line (or '-r#' for several roatations).
  201. Makebrush let's you enter the fixed point for the first rotation followed by
  202. the rotation around the x-, y-, and z-axis. YOu have to repeat this as many
  203. times as you entered at the command line.
  204. Makebrush will rotate around the x-axis first, then around the y-axis and last
  205. around the z-axis. So if you want to have a different order use multiple
  206. rotations.
  207.  
  208.  
  209. And what happens now?
  210. ---------------------
  211. About 0.1 sec after entering the last value you will see your brush on
  212. the screen (if you entered points that make sense, e.g. if all points
  213. were on the same plane you had a pretty flat 3D-object or entering
  214. the same point more than once is also a pretty stupid thing to do.)
  215.  
  216. If you specified 'texture' on the command line your brush will have the
  217. right texture already. If you didn't specify it, the field will default
  218. to 'BRICKA2_2'.
  219.  
  220. If you specified the -o option, your brush(s) will be written to the
  221. specified file. Just import it in your MAP file, et voila.
  222.  
  223.  
  224. Filemode ('-i' option)
  225. ----------------------
  226. The filemode is really neat. You can just edit your MAP file, decide to
  227. add a object. Write a line with the syntax below and Makebrush will
  228. expand it to the brush format. Of course, you can also add several
  229. lines at once, and convert them with one invocation.
  230. If you entered the '-i' option at the command line, Makebrush will
  231. process the specified file and won't require any user input.
  232. It will copy everything to the output (screen or to the file you
  233. defined with the '-o' option.) until it reaches a line that starts
  234. with the characters "//#".
  235. You can use all modes described above (and one extra one). The
  236. appropriate commands are:
  237.  
  238. //#object # (x1/y1/z1) (x1/y2/z3) ... (xn/yn/zn)
  239.        <- number of points to follow
  240.  
  241. //#cube (x1/y1/z1) (x2/y2/z2) (x3/y3/z3) (x4/y4/z4)
  242.  
  243. //#acube (x1/y1/z1) (x2/y2/z2)
  244. (the cube modes are the only ones where you don't have to specify the
  245. number of points (always four or two!))
  246.  
  247. //#plane # (x1/y1/z1) ... (xn/yn/zn) thickness (x/y/z)
  248.  
  249. //#room # (x1/y1/z1) ... (xn/yn/zn) thickness #
  250.  
  251. //#froom # (x1/y1/z1) ... (xn/yn/zn) thickness #
  252.  
  253. //#stairs # (x1/y1/z1) ... (xn/yn/zn) steps # height #
  254.  
  255. //#istairs # (x1/y1/z1) ... (xn/yn/zn) steps # thickness (x/y/z) degree # center (x/y/z)
  256.  
  257.  
  258. This should be pretty straight forward, if you've read the other
  259. sections. You can add the keywords 'rotate (x/y/z) x y z' and/or
  260. 'texture TEXNAME' at the end of each line. (rotate can be specified
  261. several times). Every keyword can be abbreviated by the first letter,
  262. e.g. '//#o' or 's' (for steps). Order is really important for the
  263. options other than 'rotate' and 'texture'. And you should seperate
  264. each number, point definition and keyword by exactly one space.
  265. (You can have spaces in the paranthesis, but don't have to).
  266. For an example look at the file 'filemode' included with Makebrush.
  267. There you will get a general idea of how it works.
  268.  
  269. And here is a pretty handy option that is just available in the
  270. filemode yet:
  271.  
  272. //#template TEMPLATEFILE
  273.  
  274. Where TEMPLATEFILE specifies the file you want to import into
  275. your MAP. It should look something like this:
  276.  
  277. {
  278.  "classname" "brush_template"  //optional (ignored)
  279.  "center" "x y z"              //center point used for rotation,
  280.                    //scaling and translating
  281.                    //(default: "0 0 0")
  282.  "rotate" "x y z"              //rotate around the axis (in degree)
  283.                    //(default: "0 0 0")
  284.  "scale" "x y z"               //scale the object
  285.                    //(default: "1 1 1")
  286.  "origin" "x y z"              //translate the object, so the center
  287.                    //point is at the origin
  288.                    //(not used by default)
  289.  {
  290.   ( x y z ) ( x y z ) ( x y z ) ...
  291.   ...
  292.  }
  293.  (More brushes)...
  294. }
  295.  
  296. All the options 'center', 'rotate', 'scale', and 'origin' can also be
  297. given after TEMPLATEFILE. Don't enclose them in quotation marks, just
  298. ...center (x/y/z) rotate (x/y/z) scale (x/y/z) origin (x/y/z)
  299. You can just specify some of them and in any order, but they have to
  300. be seperated by exactly one space.
  301.  
  302.  
  303. Options
  304. -------
  305. Makebrush knows a few options entered from the command line:
  306.  
  307. Makebrush v0.6
  308. (c) by Lars Bensmann
  309.  
  310. Usage:   makebrush [options]
  311.  
  312. Options:
  313.      -h           this Help screen
  314.      -m[ocaprfsi] specify Mode:
  315.            a Aligned cube mode     o regular Object mode
  316.            c Cube mode             p Plane mode
  317.            f Funny room mode       r Room mode
  318.            i spIral staircase mode s Staircase mode
  319.      -r[#]        Rotate object or room # times (default: 1)
  320.      -c           add Comments to output
  321.      -q           Quiet mode (no output besides the actual brush)
  322.      -v#          set Verbose mode: 0  quiet mode (same as -q)
  323.                     1  normal mode
  324.                     2  some debugging information
  325.                     3  lots of debugging information
  326.      -t TEXNAME   change default Texture to TEXNAME
  327.      -i INPUT     process file INPUT (enter filemode)
  328.      -o OUTPUT    write brush (and comments) to file OUTPUT
  329.      -e ERROR     write prompt/debuging/error messages to file ERROR
  330.  
  331.  
  332. It's very advisable to use the -o option. This will write everything that
  333. belongs in a MAP file into the specified file. Major improvment over 0.45,
  334. so you don't have to search for every brush (or use the quiet mode and
  335. don't be prompted for the input).
  336. The '-c' option is pretty useful for more complex levels or rooms. It will
  337. add a short description to each brush consisting of the corner points of
  338. the object. This will allow you to identify every wall pretty easily, so
  339. you can remove it, change it by hand or whatever. Unfortunately this doesn't
  340. work for the 'funnyroom'-mode and when importing a template (although the
  341. comments from the template-file are copied, so there might be a description in
  342. there.)
  343.  
  344.  
  345. Future
  346. ------
  347. - Add template import to interactive mode.
  348. - Add a 'solid stairs mode'.
  349. - Add 'escalators'.
  350. - Add a couple of new input modes
  351. - Let rooms be defined in plane and cube mode as well.
  352. - If I still have to much time after finishing all the above, I might
  353.   write a GUI for it. But don't count on it.
  354. - ??? Any idea from YOU?
  355.  
  356.  
  357. Feedback
  358. --------
  359. I could use some constructive critisism. So please tell me what you think
  360. about 'makebrush' and what you would like to see improved or added.
  361. I'm also looking for somebody who could proof read this documentation.
  362. My English isn't the best (don't talk about my typing :-), so I sometimes
  363. have problems expressing things correctly so everone can understand it.
  364.  
  365.  
  366. Thanks
  367. ------
  368. This whole thing was just made possible by the great Quake MAP Specs from
  369. Nicholas Dwarkanath. If you're interested in making a MAP-file get
  370. the latest version from http://www.infi.net/~nichd/qmapspec.html.
  371. Thanks for the template idea go to: Mark D. Ratzburg 
  372. (ratzburg@omnifest.uwm.edu).
  373.  
  374.  
  375. Bugs
  376. ----
  377. Well, this program isn't too user-friendly, but it should do it's work.
  378. So please don't tell me that you cannot get back to correct your last entry
  379. or whatever, but if you find anything that produces wrong results, please
  380. tell me (lars@b-man.ruhr.de).
  381. When trying to generate larger brushes, I sometimes got an errors from
  382. 'QBSP' (AddBrushPlane: numbrushfaces == MAX_FACES). Well, I thought maybe
  383. the object has to many faces, but I got this error even on an object with
  384. just seven planes. And my object with the most faces that compiled correctly
  385. had 9 planes. Sometimes, if you rotate the object QBSP can't handle it anymore.
  386. It's really weird. If anybody has an idea if this is a limitation of the
  387. Quake engine or QBSP or a bug in makebrush, please tell me.
  388. And if anybody knows how to estimate if QBSP can compile the brush or not.
  389. This would be really useful, because I don't know when to split a larger
  390. object into several smaller ones.
  391. As long as I haven't got around to look into this, the easiest solution is
  392. to use the room mode (or funnyroom mode if possible). This will generate
  393. several but less complex brushes. If you already tried to create a room,
  394. try not to generate a room with a large 10 sided polygon as the bottom.
  395. If you really want to do something like this, just add a point in the
  396. middle of the complex plane, just outside, so there will be several
  397. triangles generated instead of the too complex brush.
  398. By far the worst bug is in the 'room'-mode. If you get a really strange
  399. QBSP error. I really don't know why QBSP won't compile some of the
  400. rooms anymore. It works putting every brush in a single MAP-file, but
  401. they won't compile together :-(. If anybody has an idea what the
  402. problem might be, please tell me. (I know I still got a (rounding?)
  403. error in the calculation for the rooms, but...)
  404. I did rewrite the room-mode completely. Maybe this bug is gone, although
  405. the mode is far from perfect (too many planes in the brushes :-(
  406.  
  407.  
  408. History
  409. -------
  410.  
  411. 0.1     First release
  412.  
  413. 0.2     Added command line switches
  414.  
  415. 0.3     Added cube and plane mode
  416.  
  417. 0.4     Added room and funny room mode
  418.  
  419. 0.45    Added rotation and stairs mode.
  420.     Also fixed the broken quiet mode again.
  421.  
  422. 0.5     Added file parser and support for a seperate brush-output file.
  423.     Included import of brush templates.
  424.  
  425. 0.6     Added spiral staircase mode and aligned cube mode.
  426.     Rewrote room mode completely, but it still isn't as it is supposed
  427.     to be.
  428.  
  429.  
  430. Legal stuff
  431. -----------
  432.  
  433. I don't promise this program will do anything useful. It may work for you or
  434. it may not. It works for me that's all I can tell you.
  435.