This is a DOOM e1m1 level remade in VRML for "The Castle".
A lot of things were changed from the actual DOOM, but the
level geometry and textures are original.
This file contains some internal notes: how this is done.

First of all, this is *not* the best example how "The Castle"
levels should be done. If you want to educate yourself how to
create new levels, go see any other level (like ../../hello_world/).

This level needed some tricks to get things working.

- I already got this level in VRML 1.0 format from
  [http://www.ocnus.com/models/]

- The most important blocker was that Blender wasn't able to fully import
  this VRML 1.0 model: namely, only the object geometry is imported,
  the texture coordinates and filename is lost. This is unacceptable
  loss, since textures are the basis of DOOM levels --- everything
  is textured, and textures create the main look of most things.

- However, the level needed some corrections. Many unnecessary faces
  needed deletion and some faces (around the basin in the starting
  room) were missing. I was able to implement deletion in my view3dscene
  (see "Remove face" feature). But for adding new faces in proper places
  I needed some real 3D authoring tool.

- So I imported DOOM model into blender --- but not to export this model !
  I imported it and placed it on layer 0, and by default this layer
  will *not* be exported to VRML model. This geometry is used only to
  create new faces in blender and connect them to actual level geometry.

- Summary: e1m1 level geometry is the sum of two files:
  e1m1.wrl - this is the main file, heavily modified version of what I got
    from [http://www.ocnus.com/models/]
  e1m1_blender.wrl - this is the additional geometry for the model that
    was created in blender (blender source file is e1m1_blender.blend).

- Also the items and creatures positions are marked in blender,
  so it's on e1m1_blender.wrl.

----------------------------------------
Some history how this was done:

(Excuse HTML gibberish in text below. I initially prepared this text for WWW
page, and later decided that actually no normal user is probably
interested in reading this :)

- Textures: I extracted from <tt>doom.wad</tt> textures with the help of
  XWE (eXtendable WAD editor) and Waded.

  <p>Some of them were extracted using XWE, some using Waded.
  Reasons:
  <ol>
    <li><p>XWE simply saves extracted textures to bmp files
      (I just converted them to png later, because png is just better
      and my programs handle it in 100%). It seemed that waded can't
      save textures to files (it can only *show* them), so I preferred
      to use XWE.

      <p>Later, I developed a way to grab textured extracted
      by waded &mdash; I saved screenshots of Waded, and then processed
      them by my program that cut the texture from each screenshot,
      recognizing texture size by analyzing text at the bottom of the
      screenshot. Yeah, it was fun :)

    <li><p>The one advantage of using Waded over XWE was that Waded
      gave me the complete, "combined" textures. Some of the textures
      on DOOM walls are the result of combining a couple of
      "patches" &mdash; XWE extracted only the patches, while
      Waded was giving me already the correctly combined and named result.
  </ol>

  <p>Man, I did all of this back in 2004-08. It's quite possible
  that the hassle above was not really needed, and I could do it
  all much easier now, using different programs or just using XWE/Waded
  better.

- Some small fixes done to VRML files:
  <ul>
    <li>corrected their ShapeHints (were wrong),
    <li>processed to make texture filenames specified in VRML to be lowercase,
    <li>I wrapped <tt>e1m1.wrl</tt> inside <tt>e1m1_final.wrl</tt>
      where I added various nodes to make the level usable as level
      in my game (see the source for details),
    <li>added light nodes in <tt>e1m1_lights.wrl</tt>,
  </ul>

- The sky:

  <p>First I removed all ceiling using dummy
  generated ceiling texture <tt>f_sky1.png</tt> (inspected using
  view3dscene "Remove selected face" feature and then removed by hand).

  <p>My first try was to use the original DOOM sky
  extracted from WAD file by XWE. It was converted
  from single panoramic-style texture to VRML-Background style 6 textures
  by my panoramaToBackground. Unfortunately, this sky looked really
  bad (low resolution) and, since it was only panoramic in DOOM
  and in my game you have full freedom to look up, it looked bad
  when you looked straight up. So I decided to remove it.

  <p>And finally I used my own sky (generated by terragen long time
  ago).
  <!--; actually this is the same sky that is used in game ending sequence-->

  <p>If you really want to see DOOM sky, you can edit <tt>e1m1_final.wrl</tt>
  level file. Just comment out one <tt>Background</tt> node and uncomment
  the other one.

- There were many geometry places that needed correcting:
  <ul>
    <li>vertical walls that were supposed to be invisible
      (they are probably marked as such in the wad file, but I don't
      have this info in my VRMLs). They were deleted using
      view3dscene "Remove selected face" feature (that feature was actually
      implemented specifically for this purpose!).

    <li>Some important faces were simply missing from VRML file
      (like around the basin in the starting room), some were
      wrong (like over the pool in the middle outdoor room).
      They were fixed by adding appropriate replacements using
      Blender.

    <li>In many places I had to add "invisible barriers" for the player,
      to not allow you to jump through window or over some walls.
      In DOOM jumping was not possible and so some walls and some
      windows are placed very low. In my game you would be able
      to jump through them very easily. This would make some
      DOOM level arrangements very easy to break.

    <li>All doors needed remodelling, as the levels missed doors
      sides (i.e. wall sides visible when the door opens) and
      the bottom faces of doors (visible when the door slides up
      when it opens). Also I want to have doors expressed as simple
      animations of VRML models, so that the code to handle them
      is trivial and things are very configurable for level editor
      (i.e. without modifying the code and recompiling the game).
  </ul>

- I tried to preserve placement of most things
  (doors, elevators, explosive barrels, lava) and the way they work.

- Things that are not cloned from Doom:

  <p>I didn't try to model Doom creatures (e.g. basing on original
  Doom sprites) &mdash; this would take me a lot of time...
  So I just used available creatures developed for "regular" castle levels.
  Same thing for items. And same thing for weapons. So for the first time
  in your life you can play a Doom level, fighting with a sword and a bow...

  <p>If someone wants to continue this fun and contribute creature/item
  models that closely resemble original Doom sprites, it will
  be my pleasure to add them to the game. (Still, I think it's much more
  productive to concentrate on adding to the game more
  <i>new</i> levels/creatures/items, instead of trying to clone Doom
  using modern technology :) ).

- I tried to place analogous creatures/items in the same places as they
  were in Doom. Their number and positions was initially set to
  resemble those in DOOM's "ultra-violence" difficulty
  (the almost-hardest difficulty level).
  But later, since my creatures are anyway different, and fight differently,
  and the player also fights differently (more close-distance combat),
  many things changed.

  <p>Also note that the creatures
  on the "Doom" level have a little different life points than usual on our
  "normal" game levels, so don't become too accustomed to them.

- Yes, all E1M1 secrets are implemented. Watch out for those strange looking
  textures on walls, and other hints. <!-- (Unless of course you know the Doom
  E1M1 level by heart --> Although some secrets were deliberately made
  different, easier to spot/activate in my game.

Have fun!
Michalis