Doom Legacy Water Effect - Any Ideas?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Enjay
 
 
Posts: 26533
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Doom Legacy Water Effect - Any Ideas?

Post by Enjay »

Doom legacy used to have a really cool water effect. When I say "used to have" I'm talking early, early Legacy from 1999 or therabouts. The effect created almost transparent water, a slight darkening of the light level under the water, an animation on the surface and a cool warping effect of what you could see through the water. I've always really liked the effect and seen nothing quite like it in any other Doom port or mod.

I used to have a video of it on YouTube but it's so old, low-res and compressed that you can hardly see the effect so I just uploaded a new version:



What I'd really like are suggestions on how (or if) such a thing could be achieved in GZDoom. I'm pretty sure that you could get most of the way with a 3D floor and warping textures but, as you can see from the video (I hope), the water creates a visual distortion effect too. Could shaders of some sort be used?

If anyone wants to have a look at it on their own machine, I've zipped up a copy of a suitable version of Doom Legacy and the demo WAD that was distributed to show off the water effect. Much to my surprise, it worked on my Windows 10 64 bit machine so people should be able to run it.

http://www.aspectsweb.co.uk/enjay/doom/ ... terlab.zip

For information, if I recall correctly, the way you did it in an editor was really weird. I think you had to do something odd like give the affected sectors a negative tag of the value that you wanted the depth of the water to be.

[edit] Found an old Doomworld thread where I asked about it: https://www.doomworld.com/vb/post/707308 :lol: [/edit]
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Doom Legacy Water Effect - Any Ideas?

Post by Nash »

Looks like something modern shaders can do. dpJudas to the rescue? ;)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Doom Legacy Water Effect - Any Ideas?

Post by Graf Zahl »

Oh the memories. :mrgreen: Especially the last post with your horrible English translation of that bad French comment had me laughing again.
User avatar
Beed28
Posts: 598
Joined: Sun Feb 24, 2013 4:07 pm
Location: United Kingdom

Re: Doom Legacy Water Effect - Any Ideas?

Post by Beed28 »

Reminds me of how in the first Quake the level geometry itself warped around in underwater sections. The effect there was super trippy if anything.

And if dpJudas does do something about this, I'm going to update my wobbly shader muahahahaha
User avatar
Enjay
 
 
Posts: 26533
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Doom Legacy Water Effect - Any Ideas?

Post by Enjay »

:lol: Looks like I've been bleating on about this for ages and all over the place for years. :oops:
dpJudas
 
 
Posts: 3040
Joined: Sat May 28, 2016 1:01 pm

Re: Doom Legacy Water Effect - Any Ideas?

Post by dpJudas »

Ah, water effects! I suppose you could maybe create the effect using a hardware shader on a translucent floor.

The big problem are the items that are partially submerged. For those to work, I think GZDoom would have to write the depth of things into the zbuffer (maybe it already does? haven't checked) and then draw the translucent floors at the end.

To get even more fancy water effects we'd need an engine improvement where the water plane is drawn with access to the depth buffer. Basically the shader can figure out where where the fragment is by looking at its depth value and then calculate the distance it must travel in the water to reach the water plane. The further away it is, the more murky a color blend you apply.
Locked

Return to “Editing (Archive)”