home *** CD-ROM | disk | FTP | other *** search
/ Demon Gate Mega Collection / DemonGateMegaCollection.bin / text / sky.txt < prev    next >
Text File  |  1995-09-07  |  16KB  |  448 lines

  1.                              F_SKY Special Effects
  2.  
  3. There are a lot of nice things you can do with the F_SKY texture. In fact the
  4. DOOM engine treats a F_SKY differently from any other ceiling texture. This
  5. page covers the following things you can do with the F_SKY texture:
  6.  
  7. Contents
  8.  
  9.   1.  SKY Door
  10.   2.  SKY Windows
  11.   3.  SKY at Floor
  12.   4.  SKY Everywhere
  13.   5.  Low Buildings in Courtyard
  14.   6.  Non-repeating F_SKY
  15.  
  16.                                1. The F_SKY Door
  17.  
  18. A door that displays F_SKY should be quite familiar to all people who has tried
  19. to create a door, and by mistake applied the F_SKY ceiling texture. Normally
  20. this looks really odd, as the F_SKY texture repeats down the door, but you
  21. might put this effect to some use. For instance Greg Lewis (gregl@umich.edu)
  22. used this effect to cause different part of a WAD to "disappear". The WAD was
  23. named disappear.zip (I've changed it slightly - I hope Greg won't notice). The
  24. effect might look good in association with a "star" bitmap instead of the
  25. normal F_SKY.
  26.  
  27.                 Creation of the F_SKY Door
  28.  
  29. The F_SKY door is easy to create. Just make the following sectors:
  30.  
  31.     :        :
  32.     :    5    :
  33.     |        |
  34.     x...............x
  35.     |.           .|
  36.     | .          . |
  37.     |3 x    2    x 4|
  38.     | .          . |
  39.     |.           .|
  40.     x...............x
  41.     |        |
  42.     :    1    :
  43.     :        :
  44.  
  45.  
  46. All the sectors should have the F_SKY ceiling texture. Sectors 1, 3, 4 and 5
  47. should have the same (normal) floor and ceiling heights, while sector 2 has set
  48. the ceiling height to be equal to the floor height (and both equal to the floor
  49. height of the other sectors). Sector 2 is the door sector, and it can be
  50. triggered like any other door. Make sure that the sectors 3 and 4 are not large
  51. enough for the player to get caught in them!
  52.  
  53.                               2. The F_SKY Window
  54.  
  55. A variant of the F_SKY door is the F_SKY window. The only difference is
  56. basically, that the "door" in the F_SKY window isn't designed to be opened
  57. ever. Personally I think it's quite nice to place a few windows of this kind
  58. around in a WAD (No not in a dungeon WAD; only in a mainly outside WAD). They
  59. don't take up much room, but seeing F_SKY makes the player feel less trapped
  60. even if he is in reality in a small hallway/room.
  61.  
  62.             Construction of the F_SKY Window
  63.  
  64. The construction is easy. Just create the following sectors:
  65.  
  66.     (The numbers are sector numbers)
  67.     --------x    
  68.         |     x--x
  69.         |    /     |
  70.         |   /     |
  71.         |  x..x     |
  72.         |  |  :     |
  73.         x--x  :     |
  74.         :  :  :     |
  75.        1    :2 :3 :4 |
  76.         :  :  :     |
  77.         x--x  :  |
  78.         |  |  :  |
  79.         |  x..x  |
  80.         |   \     |
  81.         |    \     |
  82.         |     x--x
  83.     --------x
  84.  
  85.  
  86. Sector 1 is the room in which the player can walk around. Sector 2 is the
  87. window frame. Here the ceiling should be lower than the ceiling in sector 1.
  88. The floor of sector 2 will be the height of the window. To make sure that the
  89. F_SKY viewed through the window doesn't tile, you will have to set this quite
  90. high. Sector 3 is the "outside" part of the window. The ceiling texture here
  91. should be F_SKY, while the floor texture is still the same as in sector 2. Both
  92. ceiling and floor heights are the same in sector 2 and 3. Sector 4 on the other
  93. hand is the F_SKY door from before. Here both the ceiling and floor heights are
  94. set to be equal to the floor heights of the sectors 2 and 3. The ceiling
  95. texture of sector 4 should of course also be F_SKY.
  96.  
  97. Note that if sector 2 is so high that it's impossible to see the floor, you can
  98. create the window like this:
  99.  
  100.     (The numbers are sector numbers)
  101.     --------x    
  102.         |
  103.         |
  104.         |
  105.         |
  106.         |
  107.         x--x-----x
  108.         :  :\       |
  109.        1    :2 :3x 4 |
  110.         :  :/       |
  111.         x--x-----x
  112.         |
  113.         |
  114.         |
  115.         |
  116.         |
  117.     --------x
  118.  
  119.  
  120. The floor and ceiling heights/textures should of course be set just like in the
  121. first example.
  122.  
  123.                       3. The F_SKY at floor special effect
  124.  
  125. The F_SKY texture is used in almost all wads to create the illusion of being
  126. outside. The F_SKY texture is one of the FLATS textures, meaning that it can be
  127. applied to both the ceiling and the floor. There is however a limitation when
  128. the F_SKY texture should be applied to the floor: It has to be completely
  129. surrounded by a floor that uses texture different from the F_SKY texture. To
  130. see an example of a floor using the F_SKY texture, you can take a look at
  131. spcial1b.zip (73K). Open the SKY door in the north-east corner, and you are in
  132. a room where the F_SKY texture is assigned to the floor. The construction of
  133. this SKY hole in the floor is very easy:
  134.  
  135.     (The numbers are sector numbers)
  136.  
  137.     x-----------------------x
  138.     |            |
  139.     |    x.......x    |
  140.     |   1    :   2    :    |
  141.     |    x.......x    |
  142.     |            |
  143.     x-----------------------x
  144.  
  145.  
  146. Apply F_SKY to the floor of sector 2, and a "non-SKY" texture to the floor of
  147. sector 1. That should create the F_SKY at floor special effect.
  148.  
  149.                                4. SKY Everywhere
  150.  
  151. You just saw how to put the F_SKY texture on the floor. You also know that
  152. F_SKY can be applied to the walls by using a stuck SKY door. This means that
  153. it's possible to make a room that has F_SKY almost everywhere. The only problem
  154. is that the floor SKY has to be surrounded by a sector that doesn't have F_SKY
  155. on the floor. However you can of course make this sector quite thin. This
  156. demonstrated in spchaunt.zip (86K) created by Robert Fenske, Jr.
  157. (rfenske@swri.edu)
  158.  
  159. However it's possible to hide the thin sector completely simply by making it
  160. lower than the middle sector, so that it's out of sight. The effect is created
  161. like this:
  162.  
  163.     (The numbers are sector numbers)
  164.     
  165.     x-------------------------------x
  166.     |                |
  167.     |    x.................x    |
  168.     |    : x.............x :    |
  169.     |    : :        : :    |
  170.     |   3    :2:     1    : :    |
  171.     |    : :        : :    |
  172.     |    : x.............x :    |
  173.     |    x.................x    |
  174.     |                |
  175.     x-------------------------------x
  176.  
  177. All sectors should have ceiling texture F_SKY. Sector 1 should have floor
  178. texture F_SKY, and sector 2 and 3 can have any floor texture except F_SKY. Make
  179. sector 2 as thin as possible, and set the floor height of sector 1 to be 0. Now
  180. apply a floor height of -128 to the sectors 2 and 3. That should place them
  181. well out of sight, and set the ceiling height of sector 3 to be equal to the
  182. floor height, to create the F_SKY on the wall effect. Now you should have a
  183. room where you can see nothing but SKY!
  184.  
  185. This effect can be seen in spcial1b.zip (73K). You can find the SKY everywhere
  186. room by going through the two SKY doors to the north east. (I've put a small
  187. triangle of floor texture in front of the door, so that you can see where it is
  188. in case you need to get out again...).
  189.  
  190.                    5. Low buildings using the F_SKY texture
  191.  
  192. The low buildings inside a courtyard with F_SKY ceiling texture is not really a
  193. special effect, but a lot of WAD designers has found these outside sectors more
  194. difficult than the ordinary inside rooms. That's why I've decided to include it
  195. here. If you already know everything you ever wanted to know about SKY
  196. textures, I suggest you go back to the index
  197.  
  198. The general way of creating a building smaller than the walls in a courtyard,
  199. is to surround the building by a sector with F_SKY texture and a lower ceiling
  200. height. This should paint SKY above the building (above the ceiling height of
  201. the surrounding sector).
  202.  
  203. If the courtyard walls are so high that they should be visible over the
  204. building, there will of course be painted F_SKY over the small building. To
  205. avoid this you should make the smaller building inside the courtyard just big
  206. enough to avoid this, or make the surrounding courtyard walls smaller.
  207.  
  208. To learn more about area with F_SKY you might want to take a look at the
  209. following rules:
  210.  
  211. Rules that apply to SKY sectors
  212.  
  213. When a sector has SKY as ceiling texture some special rules apply to the way
  214. the textures are displayed. In the following I'll give some rules that show how
  215. you can create sectors, where the SKY textures will be painted, and where the
  216. normal wall textures will be used. In all the sectors the ceiling textures will
  217. be F_SKY, and the illustrations will use the side view to demonstrate the
  218. ceiling and floor heights that apply to each sector.
  219.  
  220. Rule 1
  221.  
  222. Lets start with a simple rule:
  223.  
  224.     (Side view)
  225.        
  226.         ----------------x       :
  227.                     |       :
  228.         ..SKY...........|......>:
  229.                         |       :
  230.                         |       :
  231.                         x-------x
  232.                                 |
  233.     ..WALL.texture.........>|
  234.         ------------------------x
  235.         1        2        (The numbers are sector numbers)
  236.  
  237.  
  238. The arrows going from left to right marked "SKY" and "Wall texture" are
  239. possible lines of sight, and the associated text explains what will be painted
  240. at the position where the arrow hit. In this case there is a one-sided line
  241. between sector 2 and the void space. On this line the normal texture is painted
  242. as wall texture up until the height of the ceiling in sector 2. This is
  243. normally used to lower the outer walls in an outside area. The upper texture on
  244. a sector with SKY ceiling will never be painted. instead what is painted
  245. depends on what is on the other side of the sector where the line of sight hit.
  246. In this case where the LOS hit void space, the F_SKY texture is painted.
  247.  
  248. If you want to have a more solid looking wall, where you can see the top of the
  249. wall, you can raise the floor height of sector 2 to be equal to the ceiling
  250. height, and you will have a wall, where the top of the wall is painted in the
  251. floor height of sector 2. (If the wall is low enough for you to see the top.
  252.  
  253. Rule 2
  254.  
  255. This is the rule that is used to create the SKY door special effect:
  256.  
  257.  
  258.     (Side view)
  259.  
  260.     ----------------x       x----------
  261.                     |       |
  262.         ..SKY..........>|    |
  263.                         |       |
  264.                         |       |
  265.         ----------------x-------x-----------
  266.         1        2        3    (The numbers are sector numbers)
  267.  
  268.  
  269.  
  270. Here the floor heights of all the sectors 1, 2 and 3 should be equal. (If you
  271. don't need it you can remove sector 3 and end up with a configuration that's
  272. almost equal to the one in rule 1, except that you can't see the floor of
  273. sector 2 when the floor heights of sector 1 and 2 are equal.
  274.  
  275. Rule 3
  276.  
  277.     (Side view)
  278.  
  279.         ----------------x       x------------
  280.                     |       |
  281.         ..Transparent...|.......|.......>
  282.                         |       |
  283.                         |       |
  284.                         x-------x
  285.                         |       |
  286.     ..WALL.texture.>|       |
  287.         ----------------x-------x-------------
  288.         1        2        3    (The numbers are sector numbers)
  289.  
  290.  
  291. This shows that normally the upper part of a SKY sector is simply transparent.
  292. Even though YOU can see through the upper part of a SKY sector it doesn't mean
  293. that the monsters can. It's also impossible for both players and monsters to
  294. walk or shoot through the upper part of a sector. This gives some interesting
  295. possibilities: how about putting a few of the really big monsters in sector 3.
  296. When the player enters sector 1 he will see these monsters, but they can't see
  297. the player. At the same time it's impossible for both the player and the
  298. monsters to shoot each other, but that doesn't mean that the player isn't going
  299. to try...
  300.  
  301. Rule 4
  302.  
  303. This is pretty much the same as rule 3.
  304.  
  305.  
  306.     (Side view)
  307.     
  308.         ----------------x       x------------
  309.                     |       |
  310.         ..Transparent...|.......|.......>
  311.                         |       |
  312.                         |       |
  313.                         x-------x
  314.  
  315.  
  316.         --------------------------------------
  317.         1        2        3    (The numbers are sector numbers)
  318.  
  319.  
  320. This shows that the upper part of a SKY sector is transparent independently of
  321. the height of sector 2. (Take care if the floor heights of sector 1 or three
  322. are higher - see illegal configuration 2). The main difference between this and
  323. rule 3 is that here the sound will propagate through the gap in sector 2, and
  324. if the ceiling is high enough it will be possible to pass from sector 1 to
  325. sector 3.
  326.  
  327. Illegal SKY sector configurations
  328.  
  329. If you're building an area using the F_SKY texture, and you suddenly get a HOM
  330. (Hall Of Mirror) error in your WAD, you should look for the following problems:
  331.  
  332.   1.  Missing textures.
  333.      This should be obvious, as the normal source of HOM is a missing texture
  334.      somewhere. You should be able to see in your wad where the HOM is located,
  335.      and check that the texture you wanted to be painted in this position has
  336.      been defined in the WAD.
  337.      If you wanted F_SKY to be painted in the position you get HOM this won't
  338.      help you.
  339.  
  340.   2.  Too many lines in view.
  341.      Before DOOM v1.4 you could only have 128 lines in view at a time. This has
  342.      now been increased to 256, but you might still get this problem in complex
  343.      outside areas.
  344.  
  345.   3.  A bug in the BSP builder.
  346.      Try a builder like BSP12X, WARM or IDBSP.
  347.  
  348.   4.  F_SKY related HOM errors.
  349.      If you think you have a HOM related to the way you have placed the SKY
  350.      sectors, you should read on and try to find one of the illegal
  351.      configurations in your WAD.
  352.  
  353. Illegal configuration 1
  354.  
  355. The first illegal configuration looks almost like rule 3. Note the difference
  356. in the floor height of sector 3.
  357.  
  358.  
  359.     (Side view)
  360.  
  361.         --------x       x-------
  362.                 |       |
  363.         ..HOM...|......>|
  364.                 |       |
  365.                 x-------x-------
  366.                 |
  367.                 |
  368.         --------x
  369.         1        2        3    (The numbers are sector numbers)
  370.  
  371.  
  372. This is one of the two exceptions to the general rule that the upper part of a
  373. SKY sector is transparent. If you see this configuration from sector 3 towards
  374. sector 1, you will see a normal SKY door, but seen from sector 1 the DOOM
  375. engine get confused because a line of sight isn't supposed to be able to pass
  376. through the linedef between sector 2 and sector 3.
  377.  
  378. This can be corrected by making the floor of sector 3 a little lower (Sector 2
  379. becomes transparent by rule 3), or by creating a small extra sector between
  380. sector 1 and 2, with the same floor height as sector 2 (F_SKY will be painted
  381. above sector 2 by rule 2).
  382.  
  383. Illegal configuration 2
  384.  
  385. This illegal configuration is actually much like the previous one:
  386.  
  387.     (Side view)
  388.     
  389.                         x----------
  390.         --------x       |
  391.                 |       |
  392.         ..HOM...|......>|
  393.                 |       x----------
  394.                 |       |
  395.                 x-------x
  396.                         |
  397.         ----------------x
  398.        1       2         3    (The numbers are sector numbers)
  399.  
  400.  
  401. Here the problem is the same as in the first illegal configuration. It should
  402. be impossible for a line of sight to pass from sector 2 to 3. This confuses the
  403. DOOM engine so much that it doesn't know what to paint, and the result is HOM.
  404.  
  405. I don't really know what you're trying to build if you have a configuration
  406. like this, so I really can't give you good instructions as to how to correct
  407. this. If you ever find that this is a source of a problem I suggest you mail
  408. me. (Be prepared that I will ask you to explain exactly what you are trying to
  409. achieve).
  410.  
  411.                             6. Non Repeating F_SKY
  412.  
  413. (by Robert Fenske Jr.)
  414.  
  415. The Non-repeating Sky is a way to provide a unique sky background throughout a
  416. 360 degree of view. The normal background sky, which is a single-patch 256x128
  417. texture, repeats every 90 degrees. By redefining the appropriate SKY texture
  418. with a multi-patch texture, the sky can repeat every 180 degrees, or simply not
  419. repeat at all. The following table details the requirements.
  420.  
  421.  
  422.  
  423.  
  424.  
  425.                Number of     Total texture
  426.                 patches          size                View
  427.  
  428.                    1           256 x 128    repeats every 90
  429.                                             degrees
  430.  
  431.                    2           512 x 128    repeats every 180
  432.                                             degrees
  433.  
  434.                    3           768 x 128    repeats every 270
  435.                                             degrees
  436.                    4          1024 x 128    does not repeat
  437.  
  438.  
  439.  
  440. This effect is used in trinity2.zip (310K) by Steve McCrea (sm@eng.cam.ac.uk),
  441. Simon Wall and Elias Papavassilopoulos. The non repeating F_SKY effect was
  442. originally an idea by Olivier Montanuy (Olivier.Montanuy@ens.fr).
  443.  
  444. -------------------------------------------------------------------------------
  445. DOOM is a trademark of id Software.
  446. -------------------------------------------------------------------------------
  447. Jens Hykkelbjerg / hykkelbj@daimi.aau.dk
  448.