Weird impy thing
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > How is deep water done in this example wad?
 
Author
All times are GMT. The time now is 09:51. Post New Thread    Post A Reply
odysseyofnoises
Member


Posts: 445
Registered: 09-10


Was searching around for the best method to make deep water in vanilla and I came across this, specifically the UNDERWTR.wad: http://ftp.mancubus.net/pub/idgames...ng/ikspcial.zip

It looks really cool but I can't figure out how that works. Can someone explain it in a simple manner?

__________________
Your rifle is only a tool. Your brain is your primary weapon. Use it first, then your rifle.

Old Post 01-05-14 04:21 #
odysseyofnoises is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Foxpup
Member


Posts: 288
Registered: 09-05


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.

Old Post 01-05-14 09:41 #
Foxpup is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
odysseyofnoises
Member


Posts: 445
Registered: 09-10


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

__________________
Your rifle is only a tool. Your brain is your primary weapon. Use it first, then your rifle.

Old Post 01-05-14 13:00 #
odysseyofnoises is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Foxpup
Member


Posts: 288
Registered: 09-05


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).

Old Post 01-05-14 14:53 #
Foxpup is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
odysseyofnoises
Member


Posts: 445
Registered: 09-10


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?

__________________
Your rifle is only a tool. Your brain is your primary weapon. Use it first, then your rifle.

Old Post 01-05-14 17:54 #
odysseyofnoises is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Foxpup
Member


Posts: 288
Registered: 09-05


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.

Old Post 01-05-14 23:38 #
Foxpup is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Mordeth
Administrator


Posts: 1993
Registered: 05-00


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).

Old Post 01-08-14 20:43 #
Mordeth is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
odysseyofnoises
Member


Posts: 445
Registered: 09-10


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.

__________________
Your rifle is only a tool. Your brain is your primary weapon. Use it first, then your rifle.

Old Post 01-10-14 13:28 #
odysseyofnoises is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 09:51. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > How is deep water done in this example wad?

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.