Doom Legacy Water Effect - Any Ideas?

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Doom Legacy Water Effect - Any Ideas?

Postby Enjay » Sun Jan 22, 2017 10:29 am

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Doom Legacy Water Effect - Any Ideas?

Postby Nash » Sun Jan 22, 2017 10:49 am

Looks like something modern shaders can do. dpJudas to the rescue? ;)
User avatar
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia


Re: Doom Legacy Water Effect - Any Ideas?

Postby Graf Zahl » Sun Jan 22, 2017 11:07 am

Oh the memories. :mrgreen: Especially the last post with your horrible English translation of that bad French comment had me laughing again.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Doom Legacy Water Effect - Any Ideas?

Postby Beed28 » Sun Jan 22, 2017 11:18 am

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
Beed28
Making entire worlds bounce up and down.
 
Joined: 24 Feb 2013
Location: United Kingdom

Re: Doom Legacy Water Effect - Any Ideas?

Postby Enjay » Sun Jan 22, 2017 4:26 pm

Gez wrote:http://forum.drdteam.org/viewtopic.php?f=40&t=4407 ;)


:lol: Looks like I've been bleating on about this for ages and all over the place for years. :oops:
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Doom Legacy Water Effect - Any Ideas?

Postby dpJudas » Mon Jan 23, 2017 4:30 pm

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.
dpJudas
 
 
 
Joined: 28 May 2016


Return to Editing (Archive)

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests