PDA

View Full Version : Fake 3D Bridge


XDelusion
December 9th, 2004, 01:05 AM
I'm having troubles making this, is there s simple prefab of it around somewhere that I can look at and compre to so I can find the bugs in my own?

http://www.doomworld.com/tutorials/fx7.shtml

Boingo the Clown
December 9th, 2004, 06:43 AM
Yes. I used that trick for a while, before Legacy got 3D floors.

In fact, It was long meant to a major effect in DeiM for a while.

The trick only works in software mode (vanilla DooM). That is why I eventually abandoned it, even though it is a very good trick.

I very important part of the trick is to prevent to player from seeing the bridge as he is moving from the lower level to the higher level. When the surface of the bridge falls below eye level, the entire bridge will be flooded with the floor flat, thereby spoiling the effect.

Because of this, you may have the bridge visible when the player is at the lower level, but not while he is moving up, the player may then see the bridge as he actually crosses it.

XDelusion
December 9th, 2004, 11:27 AM
I'm confused, run that by me again?

Or better yet, think you could wip me up a quick example?

DoomedAce
December 10th, 2004, 04:16 PM
Hmm... Been experimenting with this myself. I managed to get the genreral set-up of a 3D bridge which the player can walk both over and under right, however I fail to make the bridge look "solid". The STEPTOP textures I used as "crossbeams" for the player to walk on don't show up.

EDIT: I got it. The textures in my set up simply required a different offset than the ones used in the example.

EDIT EDIT: Here are some shots of the bridge I took in Zdoom. Notice I still need to tweak the texture offsets a bit.

The bridge in side-view:
http://img33.exs.cx/img33/5254/doom00081lr.th.png (http://img33.exs.cx/my.php?loc=img33&image=doom00081lr.png)

Standing on it.....
http://img33.exs.cx/img33/5223/doom00095ls.th.png (http://img33.exs.cx/my.php?loc=img33&image=doom00095ls.png)

.....and under it! Yay!
http://img33.exs.cx/img33/8650/doom00123oo.th.png (http://img33.exs.cx/my.php?loc=img33&image=doom00123oo.png)

And here's an editor shot:
http://img77.exs.cx/img77/4120/bridge5hk.png

Have fun! :D

XDelusion
December 10th, 2004, 10:23 PM
The bridge I was working on actually had a floor, rather than those skinny beams...

...I may just settle with a skinny beam bridge though if I can't figure this out, been trying for hours, getting NO WHERE, could really really use an example wad hint hint. ;)

hawkwind2
December 11th, 2004, 04:15 AM
Requiem wad map 13 sector 19 ( near the start ) may be an example of what you are looking for.

Boingo the Clown
December 11th, 2004, 11:44 AM
The fake bridge mentioned in the beginning post, which I have made examples of myself, does not allow the player to walk under neath, but look correct for most purposes. The bridge looks completely solid from above and below.

I even experimented with this technique for doing false ROR.

XDelusion
December 11th, 2004, 12:03 PM
Boingo, that's what I'm going for. Cosmetics.

DoomedAce
December 11th, 2004, 02:25 PM
Oh, that sort of bridge.

BTW, you can make a 3D bridge look solid, too. Just place the crossbeams *really* close together. Of course, a fake bridge's floor still looks more solid , but meh.

EDIT: Here's two pretty solid-looking, two-level passable bridges (really just showing off my work, heh)

http://img92.exs.cx/img92/4995/doom00140ew.th.png (http://img92.exs.cx/my.php?loc=img92&image=doom00140ew.png) http://img92.exs.cx/img92/5920/doom00156tw.th.png (http://img92.exs.cx/my.php?loc=img92&image=doom00156tw.png) http://img92.exs.cx/img92/6456/doom00179ux.th.png (http://img92.exs.cx/my.php?loc=img92&image=doom00179ux.png)

Boingo the Clown
December 11th, 2004, 02:47 PM
Please let me know if you want the bridge to be free standing, or if it is going to be along a wall.

There are slight differences in what you do in these two cases.

XDelusion
December 12th, 2004, 12:45 AM
My bridge will be out in the middle of no where, surrounded by lava, etc.

DoomedAce: Yes thos bridges are great for calssic DOOM, though in ZDOOM I cringe because you can look down and well...

...see where your feet should be falling through, and the DOOM guy tears the crap outta his nut sack. :)

Boingo the Clown
December 12th, 2004, 06:32 AM
Okay. Since the effect is no longer being used for DeiM, I guess I can reveal it.

The effect works by exploiting a couple of DooM bugs.

First bug: If you have a raised sector and that sector has no lower textures, you can see through it when your eye line is below the level of its floor. If you can see its floor however, then the floor flat will not only be visible on the floor itself, but will flood into the lowers of the sector, while still maintaining the same perspective as the floor.

Second bug: A transparent texture, when its Y offset puts it below the level of the floor, will actually appear down below the floor.

Since these two bugs are specific to the DooM engine, they will not work for source ports in opengl mode, because the rendering is handled a different way.

For your free standing bridge:

1.) Create a sector at the same height as the lava (or whatever) you want the bridge to cross, and use the same flats.

2.) Within that sector, create another sector at the height of the top of your bridge. Put whatever flat on it that you want, BUT DO NOT APPLY ANY LOWER TEXTURES TO IT! Also, place the lindefs of this sector so that they are only one pixel inside the boundries of the first sector.

This will give you a sector that appears invisible when seen from below floor level, and is visible when seen from above floor level, but it does not give the bridge any aparent vertical dimention, so ...

3.) Create a pair of transparent textures. The first texture is what you want to sides of the bridge to look like. The second texture is identical to the first, but is entirely black.

4.) Add these two textures to the NORMAL (NOT the lower) of the outer lindefs of your raised sector. The regular version faces outward, and the black version faces inward. Set the sidefs to "lower unpegged". This will ensure that the textures are rendered from the bottom of the normal, rather than the top.

5.) Adjust the Y offsets of the sidefs such that the tops of the textures are now at the same level as the floor of the raised sector.

Here are the results, as seen in an early experimental level for DeiM:

http://www.doomlegends.com/deim/screenshots/bridge1.gif

From below, the raised sector is not visible. The thickness of the bridge is simulated by the transparent texture that appears on the outside. The black version of the texture can be seen through from the other side of the sector. Because it is black, the viewer can not see that the texture is actually oriented vertically, and interprets the black as the flat underside of the bridge instead.

http://www.doomlegends.com/deim/screenshots/bridge2.gif

From on top of the bridge the sector becomes visible, thereby completing the effect.

WARNING: The player must NOT be able to see the bridge as he moves upward from the lower perspective to the higher perspective. The reason for this is the fact that the flat on top of the bridge will appear in the lowers of the sector as soon as the floor of the sector becomes visible. This will spoil the effect. THE PLAYER MUST BE PREVENTED FROM SEEING THE BRIDGE FROM THE SIDE ONCE HIS EYE LEVEL IS HIGHER THAN THE FLOOR OF THE BRIDGE. Choose your views of the bridge carefully.

BTW: It would please me if you would give me some credit for telling you this in you readme file. After all, it was originally meant to be a kick ass effect for DeiM several years ago, before it was superceded by Legacy's 3D floors. :)

FATAL
December 12th, 2004, 02:08 PM
Now that's cool. Too bad that I'll stop mapping right after I finish this NDCP thingy. It'll be my second and last map. It just doesn't fit for me.

Boingo the Clown
December 12th, 2004, 06:28 PM
If the bridge is a platform along the side of a wall, it is possible to simulate a texture along its underside, which is even more impresive.

DoomedAce
December 20th, 2004, 02:07 PM
Can anyone help me with this?

The bridges I posted before have a problem. I made them almost exactly the same as the example here: http://www.doomworld.com/tutorials/fx8.shtml

The "c" linedefs (see example in the link) are supposed to be railings in my case, as you can see above. These should block the player, which they do, but I noticed my railings also block shots, which they shouldn't according to the example. Another problem with the same linedefs is that they show up as HOMs/Tutti-Frutti in Doom2.exe, which also isn't the case in the example.

Boingo the Clown
December 20th, 2004, 02:15 PM
Blocks shots going over the bridge and shows HOM from the lower level?

Is that what you mean?

DoomedAce
December 20th, 2004, 05:33 PM
Yeah, the railing blocks shots fired over it, as if you're shooting an invisible wall.

The sides of the bridge show HOMs no matter what angle you look at the them, except when you're actually ON the bridge. However the HOMs only appear in doom2.exe and JDoom. Not in ZDoom or Legacy (the screens above were taken in ZDoom, btw)

Boingo the Clown
December 21st, 2004, 05:58 AM
The sides of the bridge show HOMs no matter what angle you look at the them, except when you're actually ON the bridge. However the HOMs only appear in doom2.exe and JDoom. Not in ZDoom or Legacy.
I thought so.

What I think you did was have a sector with a low ceiling on either side of the bridge, and left the uppers off. Your problem stems from the fact that you are basically using the same trick as the fake 3D bridge I described earlier, except that you are applying the trick to a ceiling instead of a floor.

Leaving the uppers off a sector with a low ceiling makes the upper section of the sector invisible when you are on the bridge, because you can't see the ceiling. When you are down below, you able to see the ceiling of the sector, so DooM not only displays the ceiling flat on the ceiling itself, but in the uppers as well. (Most people describe it as HOM, but it is not HOM. The strange look of the flat in the uppers is caused by the fact that the flat continues to be displayed using the perspective of the ceiling.)

The reason you don't see the problem in Legacy or ZDooM is probably that you were running these programs in openGL mode, which uses a different rendering technique than the regular DooM engine. If you try your level in software mode, you should see the same problems as in vanilla DooM.

Yeah, the railing blocks shots fired over it, as if you're shooting an invisible wall.
That is because you ARE shooting an invisible wall! What you are shooting is that same sector with the low ceiling. It has a low ceiling in order to keep the player from falling off the bridge without having to set the lindefs around the bridge to impassable.

Here is the solution to your problems:

First, change the ceiling flat of that low sector to F_SKY. The sky flat is used in a different way than normal flats, so it will render the sector as completely invisible.

<<Try this out without doing the next step first, because it creates an amusing special effect in itself. The DooM engine is designed to keep projectiles from impacting on the sky, which would look silly. When projectiles hit the sky, they are removed, rather than going to their exploding sequence. Since your low sector now has sky on its ceiling, the entire upper is now considered sky by the game, so now when you shoot it, all of your shots will simply disappear, without so much as a belch!>>

Now, in order to allow the player to be able to shoot from the top of the bridge, you must raise the ceiling level of that low sector. To keep the player from falling off the bridge, which is the purpose of the low sector in the first place, you need to set its ceiling height to just one pixel lower than the height of the top of the player's head when he is standing on top of the bridge. The player's height is 56 pixels, so you would have to set the height of the ceiling to the bridge's floor height plus 55. This will keep the player on the bridge, but allow him to shoot at monsters in other areas.

<<It should be noted that shots that go over the player's head height will still hit the sky of the low sector and be gobbled up, but there is not much one can do about that.>>

DoomedAce
December 21st, 2004, 06:24 AM
Thanks :)

First, change the ceiling flat of that low sector to F_SKY. The sky flat is used in a different way than normal flats, so it will render the sector as completely invisible.

That already explains a lot. The bridges are placed inside a building, with a ceiling instead of sky. So I used the ceiling flat for all the sectors in that area, including the dummies.

Now, in order to allow the player to be able to shoot from the top of the bridge, you must raise the ceiling level of that low sector. To keep the player from falling off the bridge, which is the purpose of the low sector in the first place, you need to set its ceiling height to just one pixel lower than the height of the top of the player's head when he is standing on top of the bridge. The player's height is 56 pixels, so you would have to set the height of the ceiling to the bridge's floor height plus 55. This will keep the player on the bridge, but allow him to shoot at monsters in other areas.

That's going to be a difficult one: I placed a few Revenants at the other side of one bridge and their rockets will most likely be blocked by the "lowered sky".

I think I'll just simply remove the railing all together. That might not look as detailed as leaving it in, but it will at least allow the player and monsters to shoot in all directions.

Jive
December 23rd, 2004, 05:18 AM
http://groups.msn.com/JivYan/shoebox.msnw?action=ShowPhoto&PhotoID=56

emotionlesskiller77
December 23rd, 2004, 10:07 AM
Download the Doom Builder FAQ from the Code Imp site. It will tell you how to build a bridge.