Creating 3D bridges: Difference between revisions

From ZDoom Wiki
Jump to navigation Jump to search
m (on second thought, is that pic really necessary?)
(Updated with 3D midtexture info.)
Line 1: Line 1:
Due to Doom's (and thus ZDoom's) rendering engine limitations, true 3D cannot really be made... yet (who knows what the future will bring?!). However, you can make working bridges by using [[Classes:InvisibleBridge|InvisibleBridge]] and a few linedef tricks. And this article is supposed to tell you how.
Due to Doom's (and thus ZDoom's) rendering engine limitations, true 3D cannot really be made; unless you want to use [[Sector_Set3dFloor|3D floors]], which are an [[OpenGL]]-only feature.


However, you can make working bridges in ZDoom by using {{Class|InvisibleBridge}} and a few linedef tricks.
Start off by kick-starting your favorite map editor - I use [[SLADE]] 2.0 beta (for those curious). Make the two planes and the obstacle in between, I used a nukage pool here. My sectors have a ceiling height of 256, the planes have a floor of 0 and the nukage pool has a floor of -128. Also you'll obviously need a player start so you can play the map and I also put some [[Classes:Column|yellow lamps]] on the edges.

In your [[level editor]] of choice, make two platforms and an obstacle in between; in this example a nukage pool is used. The sectors have a ceiling height of 256, the platforms have a floor of 0 and the nukage pool has a floor of -128. You will obviously need a player start so you can play the map.


[[Image:BridgeExample1.png]]
[[Image:BridgeExample1.png]]


Now, assuming we want one of those bridges shaped like a row of X:es, put into the pool one segment of that bridge, an X. I myself did a 64x64 one, composed of four sectors.
Now, assuming we want one of those bridges shaped like a row of X:es, put into the pool one segment of that bridge, an X. Here we have a 64x64 one, composed of four sectors.


[[Image:BridgeExample2.png]]
[[Image:BridgeExample2.png]]
Line 11: Line 13:
Now, select all of the linedefs of the X and:
Now, select all of the linedefs of the X and:
:*give each a *middle* texture of STEP2 (any other STEP works fine as well), to both front and back sidedefs
:*give each a *middle* texture of STEP2 (any other STEP works fine as well), to both front and back sidedefs
:*set the Y offset, again of both front and back side, to the negative of the subtraction of the ceiling height of the sector the pit and the floor height of the planes, or ''yoffset = -(pitceilingheight-planefloorheight)''. So, my ceiling height is 256 in both planes and the pit and my plane floor is 0, so my sidedefs' Y-offsets must be -(256-0) = -256.
:*set the Y offset, again of both front and back side, to the negative of the subtraction of the ceiling height of the sector the pit and the floor height of the planes, or ''yoffset = -(pitceilingheight-planefloorheight)''. So, the ceiling height is 256 in both platforms and the pit and the platform's floor height is 0, so the sidedefs' Y-offsets must be -(256-0) = -256.


Next, copy the linedefs so that you'll get the complete bridge. It's a good idea to merge all pit sectors into one sector again.
Next, copy the linedefs so that you'll get the complete bridge. It is a good idea to merge all pit sectors into one sector again.


[[Image:BridgeExample3.png]]
[[Image:BridgeExample3.png]]


Now, you have a choice. You can either use {{Class|InvisibleBridge}} or {{Class|CustomBridge}} things, or you can set the [[linedefs]] as 3D mid-textures.
Now, add InvisibleBridges (DoomEd #9991) thing to the center of the segments and open their properties. The Z height of the CustomBridge should be the subtraction of the plane floor height and the pit floor height. In my case that is 128 - 0 = 128. Also, the arguments need to be set. The first argument is the radius of the segment, 64/2 = 32 in my case, and the second argument the thickness. STEP2 is 16x'''8''' in size, so the second argument should be 8 in my case.

* With bridge things, the Z height should be the subtraction of the plane floor height and the pit floor height. In the case here that is 128 - 0 = 128. Also, the arguments for a custom bridge need to be set. The first argument is the radius of the segment, 64/2 = 32 in my case, and the second argument the thickness. STEP2 is 16x'''8''' in size, so the second argument should be 8 in this example.

* With 3D mid textures, the method to use depends on the [[map format]]. In [[UDMF]], you simply set the linedef's <tt>midtex3d</tt> flag to true. In Hexen format, you need to use [[Line_SetIdentification]] with 32 as the value in "moreflags". In Doom format, you have to set a custom [[map translator]] in [[MAPINFO]], such as maybe the one used for [[Eternity Engine]] maps.


[[Image:BridgeExample4.png]]
[[Image:BridgeExample4.png]]


The bridge is now finished! You can download the WAD I made for this tutorial: [[File:bridgexample.zip]]
The bridge is now finished!


[[Image:BridgeExample6.png]]
[[Image:BridgeExample6.png]]

Revision as of 12:06, 14 February 2010

Due to Doom's (and thus ZDoom's) rendering engine limitations, true 3D cannot really be made; unless you want to use 3D floors, which are an OpenGL-only feature.

However, you can make working bridges in ZDoom by using InvisibleBridge and a few linedef tricks.

In your level editor of choice, make two platforms and an obstacle in between; in this example a nukage pool is used. The sectors have a ceiling height of 256, the platforms have a floor of 0 and the nukage pool has a floor of -128. You will obviously need a player start so you can play the map.

BridgeExample1.png

Now, assuming we want one of those bridges shaped like a row of X:es, put into the pool one segment of that bridge, an X. Here we have a 64x64 one, composed of four sectors.

BridgeExample2.png

Now, select all of the linedefs of the X and:

  • give each a *middle* texture of STEP2 (any other STEP works fine as well), to both front and back sidedefs
  • set the Y offset, again of both front and back side, to the negative of the subtraction of the ceiling height of the sector the pit and the floor height of the planes, or yoffset = -(pitceilingheight-planefloorheight). So, the ceiling height is 256 in both platforms and the pit and the platform's floor height is 0, so the sidedefs' Y-offsets must be -(256-0) = -256.

Next, copy the linedefs so that you'll get the complete bridge. It is a good idea to merge all pit sectors into one sector again.

BridgeExample3.png

Now, you have a choice. You can either use InvisibleBridge or CustomBridge things, or you can set the linedefs as 3D mid-textures.

  • With bridge things, the Z height should be the subtraction of the plane floor height and the pit floor height. In the case here that is 128 - 0 = 128. Also, the arguments for a custom bridge need to be set. The first argument is the radius of the segment, 64/2 = 32 in my case, and the second argument the thickness. STEP2 is 16x8 in size, so the second argument should be 8 in this example.

BridgeExample4.png

The bridge is now finished!

BridgeExample6.png