3DMidTex tutorial

From Eternity Wiki
Jump to navigationJump to search

Eternity provides the possibility of using the middle textures of linedefs as solid objects that can be walked over or under, and can block map object passage. Monsters can walk across them, and they can even be moved (with the assistance of some linedef specials) to create lifts, doors, anything you like. They are quite useful and easy to implement.

This feature is called 3DMidTex, and this tutorial covers the basics of how to use it. Once you are finished with here, you may want to read 3DMidTex advanced topics to learn about the use of 3DMidTex lines with switches, doors, and lifts.

Your first 3D bridge

For the purposes of this tutorial, I'll assume you are familiar with Doom editing and your level editor, and with the use of middle textures. You will need to use an editor that either A. has support for Eternity features (IE. DoomBuilder) or an editor that allows you to manually change the flags value for linedefs. I use DoomBuilder, you should too ;)

First, open up a new Doom2 level for editing, create a simple room with a pit running through it.

3dmidtex tut1.jpg

(I added cool, ultra-hurty lava to mine)

Now you need to create the structure the player will eventually be able to cross to get to safety. Again, I assume you know how to create two sided lines and put middle textures in them.

3dmidtex tut2.jpg

So if you run this map, the player obviously falls down through your middletexture bridge. So we perform the final step: setting the lindef flag. Now the flag is 1024 (0x400 in HEX) so if you are editing the flags yourself just add 1024 to your flag value, if you are using Doombuilder, and you don't see the lindef flag called "3dMidTex", press F2 and make sure you are editing your map as an Eternity map. Once your flags are set for your linedefs, run the map and the player should now be able to cross the bridge as if the middle textures were solid objects.

Some things to watch out for

Holes in your structures

Each structure needs to be closed enough to support the objects running over it. That is to say, the lines need to be close enough together so that an object can't slip through the gaps.

3dmidtex tut3.jpg


It is important to note that clipping is determined by the front side offset and texture height, so if both sides of the 3DMidTex aren't aligned to be in the same spot or the textures are different heights, the solid part of the line will be where the front side texture is.

Also please note that the entire height of the texture is considered solid regardless of the transparency of the texture. So the player can't pass through a 64x32 unit hole in a texture. This would have required too much processor power to accomplish.

Monsters crossing

Because of the way monster AI in doom works, it can be VERY tricky to get monsters to cross a 3d bridge. When a monster contacts a line in a map with a drop that's too far for it, the monster will not cross that line because the engine assumes there is nothing on the other side for the monster to step onto. Here are some tips to help you overcome this.

When a monster comes in contact with a 3DMidTex line that it can stand on (ie, is not under or high above) the monster will ignore all lines with big drop-offs that it would otherwise not cross. The easiest way is to make sure that the monster will not cross any big dropoff lines before stepping on a 3DMidTex line. One way to do this is to create stair steps on either side of your bridge that drop 16 units down, and place a 3dMidTex line inside the nitch you just created.

3dmidtex tut4.jpg

Now monsters are much more likely to cross your bridge. Another thing to note is that monsters have no idea which line is the edge of the 3d bridge, and will hang off the edges. They won't fall down, so don't worry, but this just looks bad. One remedy is to make the outer edges monster impassible. When the 3DMidTex flag and this are used in conjunction, monsters will be blocked when they try to cross on top of that 3DMidTex, however, they won't be blocked by going under it.

Now that you've mastered the art of the 3D bridge, you should give 3DMidTex advanced topics a try.