How is deep water done in this example wad?

Well, the simple explanation is that linedefs referencing sectors they're not actually a part of are devil magic. I try to avoid messing around with them because I'm afraid they might eat my soul. But since "devil magic" is not really a satisfactory answer, a semi-complicated explanation follows.

The first thing about this effect is the "real" sectors (0, 1, and 2). These are the ones which the player physically interacts with and comprise what the area would look like if there was no water in it. The other 4 sectors (the isolated rooms outside the map) are the "appearance" sectors. 3 and 5 are the "above water" appearance with the water floor and sky, and 4 and 6 are the "underwater" appearance with the water ceiling.

Now, to connect the "real" sectors with the "appearance" sectors, 2-sided linedefs are traced in front of every 1-sided line of the "real" water sector (sector 0), connecting to the sector only at the vertices of the "real" cave sectors (use a map editor or IDDT and zoom in to see these lines and how they connect). These lines reference sectors 3 and 5, to create the above water appearance. As long as these lines are visible to the player and he is above the floor of sectors 3/5, the above water sector will be rendered instead of the "real" sector. IMPORTANT: you cannot have a single "above water" sector and reference both sides of the line to it; that would be a self-referencing linedef and would create no appearance at all (since self-referencing lines are invisible, which is useful for some types of deep water effects, but not this one).

Next, more 2-sided linedefs are traced in front of the 2-sided lines I was just talking about, and these lines reference sectors 4 and 6 to create the underwater appearance using the same principle (whenever you're below the ceiling of sectors 4/6, the underwater sector is rendered instead of the above water sector).

Finally, there is a square "hole" sector attached to the ledge (sector 1). All the lines of this sector except for the "ledge" line itself ARE self-referencing linedefs, referencing sector 0 (the "real" water sector). Since these lines are self-referencing, they do not affect the appearance of the effect in any way, and only serve to allow you to fall down into the underwater area, because otherwise the "underwater" sector would block you due to its low ceiling (do IDDT and run into the water while viewing the automap to see how you get blocked). There is a similar "hole" in front of the east cave, but it serves no purpose as far as I can tell.

Share this post


Link to post

I'm trying to make my own demo map now to see if I can replicate the effect. It seems that I'm close because when I look in doom builder 2 visual mode everything looks fine, but when I enter in game it gives me a terrible HOM. I must be missing something...

see for yourself: http://speedy.sh/a7uhG/deepwater.wad

Share this post


Link to post

D'oh, that HOM just made me realise: the SKY is an important part of the effect, too! With a sky ceiling, the non-existent upper textures on the "below water" lines become transparent; without a sky, you get a HOM instead. How did I miss that?

Though, that said, you've missed a few key steps, too:

Foxpup said:
Now, to connect the "real" sectors with the "appearance" sectors, 2-sided linedefs are traced in front of every 1-sided line of the "real" water sector (sector 0), connecting to the sector only at the vertices of the "real" cave sectors (use a map editor or IDDT and zoom in to see these lines and how they connect).

The part about the 1-sided lines is important, as you can't cross a 2-sided line if you're below the floor of the sector that line references. When I said the player doesn't physically interact with the "appearance" sectors, I meant "if you construct the lines properly". If there's an underwater cave that you want the player to be able to enter, there must not be an "above water" line in front of the cave.

Foxpup said:
Finally, there is a square "hole" sector attached to the ledge (sector 1). All the lines of this sector except for the "ledge" line itself ARE self-referencing linedefs, referencing sector 0 (the "real" water sector). Since these lines are self-referencing, they do not affect the appearance of the effect in any way, and only serve to allow you to fall down into the underwater area, because otherwise the "underwater" sector would block you due to its low ceiling (do IDDT and run into the water while viewing the automap to see how you get blocked).

Without the "hole" sector, there isn't any place where the player can actually enter the water (and note that the "below water" 2-sided lines must go AROUND the hole, not inside it).

With those points in mind, it should be obvious that the water sector cannot be completely surrounded by another sector (in fact, I'm not even sure if it can be made to work properly if the water sector has any 2-sided lines that can be viewed from the above water "ledge" - note that the example map has both the cave and the ledge on the sound side of the room, so that neither can be seen from the other).

Share this post


Link to post

This effect is a little bit too limited for me then... oh well. Is there a better way to draw a fake floor/ceiling in vanilla or will I just have to stick to other methods (like flat bleeding) of deep water?

Share this post


Link to post

Flat bleeding is very primitive, and I don't think there's any situation where it's more effective than self-referencing sectors (create a sector inside your water sector and lower the floor slightly, as you would for flat-bleeding, then change all the lines of this inner sector so that both sides reference the inner sector). Of course, with either technique, the player's view must not go below the water level (beware of bobbing), or HOM will result.

There is no way to create fake floors/ceilings in vanilla. All floors and ceilings are very real, and must be carefully positioned if the player is to avoid touching them (and getting blocked if the heights are incompatible). Doing this while still having them look right from any angle can only be done in very contrived situations. Like I said, it's devil magic.

Share this post


Link to post

I guess the effect you're talking about is the 'room over room' trick by Iikka Keranen. It's explained here, and used in eg. Requiem's secret level (a Quake level remake).

Share this post


Link to post

No, I was talking about the deep water effect (hence the title of this thread). I already saw how to do the room above room thing.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now