[RELz] Improved water shader for MGE 3.8 v0.6

Post » Sun Aug 29, 2010 12:21 am

aha, found the setting I was looking for I think...
UnderwaterColorWeight=0.85
changes how much the UnderwaterColor is forced.
1.0 uses pure UnderwaterColor, 0.0 uses pure ambient light settings.
unfortunately setting it lower also increases the brightness during the day, which starts to look a bit weird, but it can get it really dark at night :D
bonus side effect, a low setting here can get some interesting colors I never knew existed when it is sunrise or sunset XD
User avatar
Rachel Hall
 
Posts: 3396
Joined: Thu Jun 22, 2006 3:41 pm

Post » Sat Aug 28, 2010 6:45 pm

From what I've noticed I can't get the fog to work. I increase my draw distance 4 times above my fog end. All that happens so I can see pretty much all of Morrowind now.
User avatar
Laura Ellaby
 
Posts: 3355
Joined: Sun Jul 02, 2006 9:59 am

Post » Sat Aug 28, 2010 7:06 pm

From what I've noticed I can't get the fog to work. I increase my draw distance 4 times above my fog end. All that happens so I can see pretty much all of Morrowind now.

I found the 4x draw distance thing a little... off. i actually have for end and draw distance both set to 8, and while I get a tiny bit of popping in clear weather, it overall looks great.
clear when it should be, very hazy in foggy areas like around Hla Oad.
User avatar
Gemma Flanagan
 
Posts: 3432
Joined: Sun Aug 13, 2006 6:34 pm

Post » Sat Aug 28, 2010 12:23 pm

I found the 4x draw distance thing a little... off. i actually have for end and draw distance both set to 8, and while I get a tiny bit of popping in clear weather, it overall looks great.
clear when it should be, very hazy in foggy areas like around Hla Oad.


I've fiddled with it a bit. It looks great, really - but my average FPS with this thing is like 10.
User avatar
A Lo RIkIton'ton
 
Posts: 3404
Joined: Tue Aug 21, 2007 7:22 pm

Post » Sun Aug 29, 2010 3:16 am

I've fiddled with it a bit. It looks great, really - but my average FPS with this thing is like 10.

hah yeah it definitely has a large FPS hit. that can be fixed a little bit by lowering draw dist 9and so also fog end dist) and also increasing static size and lowering distance. and of course fiddlign with shaders... SSAO in particular seems to get progressively worse fps hit as the in game shader gets better and better XD
User avatar
SUck MYdIck
 
Posts: 3378
Joined: Fri Nov 30, 2007 6:43 am

Post » Sat Aug 28, 2010 5:22 pm

hah yeah it definitely has a large FPS hit. that can be fixed a little bit by lowering draw dist 9and so also fog end dist) and also increasing static size and lowering distance. and of course fiddlign with shaders... SSAO in particular seems to get progressively worse fps hit as the in game shader gets better and better XD


I don't even use SSAO :(.

I use both Morrowind Comes Alive and Starfire's NPC additions. Do you think these are killing my FPS?
User avatar
Amiee Kent
 
Posts: 3447
Joined: Thu Jun 15, 2006 2:25 pm

Post » Sat Aug 28, 2010 11:20 am

Man you're on fire. :shocking: This (again) is pure awesomeness. :intergalactic:
All's working well and overall performance seems to be even better than before.

There's only one little point to criticize:

In shallows the waterline is almost unnoticeable now.
shallow http://img39.imageshack.us/img39/1769/mgescreenshot122.jpg http://img39.imageshack.us/img39/25/mgescreenshot121.jpg

It's even more obvious in (true) interiors with non reflective water.
interior http://img269.imageshack.us/img269/4782/mgescreenshot124.jpg http://img225.imageshack.us/img225/4967/mgescreenshot123.jpg | http://img199.imageshack.us/img199/6928/mgescreenshot120.jpg (notice the waterline being actually at the position of the crosshair)

But that's all criticism on a very high level. I really dare to say that this seven year old game now has the best looking ingame water of all RPGs that are currently on the market (i recently played a demo of Risen).
Thank you so much for this. :hugs:


Edit:
Just tested the underwater caustics. Works fine (and looks amazing) on days with nice clear weather but produces a black screen or graphical errors when used at night or rainy weather (whenever the sun isn't visible i suppose). Would it be possible to add this to interior water? This would add so much immersion to shallow cave ponds.

Edit2:
So now that this is done: up to the next few of http://www.gamesas.com/bgsforums/index.php?showtopic=973447&view=findpost&p=15092448 for perfect underwater immersion :D
User avatar
Veronica Martinez
 
Posts: 3498
Joined: Tue Jun 20, 2006 9:43 am

Post » Sat Aug 28, 2010 12:50 pm

Hmm definitely brings up an idea for a feature in the next version: realistic water clipping :D
waves like thiss outside, and somethign similar in caves like the screenshot: http://images.paraorkut.com/img/pics/glitters/b/beach-8844.jpg
and maybe some stronger caustics, slightly darker surface, and.... perhaps reflected caustics and bluish coloring on nearby statics? :D

edit: actually what may be needed (not sure if it is possible) is some underwater blur and fog that is visible from above water...
User avatar
A Dardzz
 
Posts: 3370
Joined: Sat Jan 27, 2007 6:26 pm

Post » Sat Aug 28, 2010 5:11 pm

Hmm definitely brings up an idea for a feature in the next version: realistic water clipping :D
waves like thiss outside, and somethign similar in caves like the screenshot: http://images.paraorkut.com/img/pics/glitters/b/beach-8844.jpg
and maybe some stronger caustics, slightly darker surface, and.... perhaps reflected caustics and bluish coloring on nearby statics? :D

edit: actually what may be needed (not sure if it is possible) is some underwater blur and fog that is visible from above water...


In our dreams maybe.
User avatar
Vera Maslar
 
Posts: 3468
Joined: Wed Sep 27, 2006 2:32 pm

Post » Sat Aug 28, 2010 11:20 am

After reading your comments, and especially after looking at the screens, I agree that the shoreline should be more pronounced. And the underwater shader could need a bit love as well, never really put too much effort into it. I will try and get these things to look better, and release a tweaked 0.6 eventually :)

Edit2:
So now that this is done: up to the next few of my other suggestions for perfect underwater immersion :D

Adding screen wobbling is no problem, going to add that as well :)


Edit:
Regarding the new fog formula:
I agree that this requires lots of tweaking to get it look right and reduce popping in to a minimum. The rest of MGE is optimized for linear fog, so changing just the shader file to use exponential fog will of course cause problems. I have uploaded http://img203.imageshack.us/img203/659/92800623.jpg, perhaps it can help you to find good looking settings.

Edit2:
I have updated the code changes you have to make in Knu's SSAO shader, to make it compatible with my exponential fog on the first page of this thread. It should now work much better :)
User avatar
Ice Fire
 
Posts: 3394
Joined: Fri Nov 16, 2007 3:27 am

Post » Sun Aug 29, 2010 12:00 am

Phal, is this what you used to create those hazy screenshots?
User avatar
D IV
 
Posts: 3406
Joined: Fri Nov 24, 2006 1:32 am

Post » Sun Aug 29, 2010 1:23 am

Phal, is this what you used to create those hazy screenshots?

In parts, yes. The formula to calculate fog intensity is the same. For those screenshots I additionally replaced MW's sky with a shader. But this was highly experimental and had many issues, so it's not really releasable.

EDIT:
What do you think about http://img225.imageshack.us/img225/2737/zscreenshot01.jpg for underwater?
User avatar
katie TWAVA
 
Posts: 3452
Joined: Tue Jul 04, 2006 3:32 am

Post » Sun Aug 29, 2010 3:30 am

EDIT:
What do you think about http://img225.imageshack.us/img225/2737/zscreenshot01.jpg for underwater?

Nice, but to be honest: i don't get what's new! Is it wobbling? :nod:
User avatar
Lexy Corpsey
 
Posts: 3448
Joined: Tue Jun 27, 2006 12:39 am

Post » Sat Aug 28, 2010 5:19 pm

What do you think about http://img225.imageshack.us/img225/2737/zscreenshot01.jpg for underwater?

Looks like you reduced the above water distortion? Looks good from that depth. The closer to the surface tho, the more distorted above water objects should be.

I'd suggest reducing the caustic effects that are deeper underwater - strongest at the surface, fading away as the depth increases. Similarly, as the player dives deeper the view of surface reflections and above water objects should begin to close in, i.e. a viewable circle directly above player that reduces in diameter as the depth increases, with peripheral view of surface increasingly opaque.

Is there a way to change the color of the caustics viewed from above water? I'd like to make them more yellow/golden.

Regarding above water surface transparency in true interiors... the water is a bit too clear, needs some turbidity.


The improvements are outstanding phal! Both this and the underwater caustics. Simply wonderful! :twirl:
User avatar
Yonah
 
Posts: 3462
Joined: Thu Aug 02, 2007 4:42 am

Post » Sat Aug 28, 2010 11:33 pm

Nice, but to be honest: i don't get what's new! Is it wobbling? :nod:

Ah no, this was meant to show the new underwater surface shader ;)
Here's a comparison shot:
http://img233.imageshack.us/img233/819/oldw.jpg http://img199.imageshack.us/img199/78/newyh.jpg

The new underwater postprocessing shader is done nevertheless (with wobbling!). It's avalable http://www.speedyshare.com/471674520.html. :)

EDIT:
Looks like you reduced the above water distortion? Looks good from that depth. The closer to the surface tho, the more distorted above water objects should be.

I'd suggest reducing the caustic effects that are deeper underwater - strongest at the surface, fading away as the depth increases. Similarly, as the player dives deeper the view of surface reflections and above water objects should begin to close in, i.e. a viewable circle directly above player that reduces in diameter as the depth increases, with peripheral view of surface increasingly opaque.
I could try that, but I doubt it will look too good without proper realistic refraction of above water objects. They would seem too cut-off I think.

Is there a way to change the color of the caustics viewed from above water? I'd like to make them more yellow/golden.
Currently the caustics simply increase the brightness of the ground, i.e. increasing all color channels' intensity proportional. You could try the following: In InGame.fx replace the following lines
	float caust = lerp(0.5,tex2D(s5,(uwpos-SunVec*sunraypath).xy/1472).b,						( (depth/500)*depthscale )*fog*cauststr);		Refract *= 0.5+caust;
with this:
	float caust = tex2D(s5,(uwpos-SunVec*sunraypath).xy/1472).b *((depth/500)*depthscale*fog*cauststr);		Refract += SunCol * caust;
SunCol then defines the color of the caustics.

Regarding above water surface transparency in true interiors... the water is a bit too clear, needs some turbidity.
Agreed ;)
User avatar
Claire Mclaughlin
 
Posts: 3361
Joined: Mon Jul 31, 2006 6:55 am

Post » Sat Aug 28, 2010 4:26 pm

Yeah? im also think that the turbidity of water its really needed. In interiors or at night the water simply disappears from above cause his absolute transparency. The reflexion trick dont help in this conditions. Perhaps an alpha layer for the textures? i dont know
User avatar
Len swann
 
Posts: 3466
Joined: Mon Jun 18, 2007 5:02 pm

Post » Sun Aug 29, 2010 12:40 am

#snip#
The new underwater postprocessing shader is done nevertheless (with wobbling!). It's avalable http://www.speedyshare.com/471674520.html. :)
#snap#

Works fine now and looks amazingly organic (default values for wobbling are perfect imho). :foodndrink:

However, the new shader seems to eat up a bit of performance even if camera is above the water surface. Iirc the old one didn't cause any fps hit being outside the water.
User avatar
Lizzie
 
Posts: 3476
Joined: Sun Nov 19, 2006 5:51 am

Post » Sat Aug 28, 2010 6:33 pm

However, the new shader seems to eat up a bit of performance even if camera is above the water surface. Iirc the old one didn't cause any fps hit being outside the water.

Hmm it shouldn't. But shaders are a bit strange when it comes to if conditions and such. Afaik, even when an if statement returns false, the graphics card still calculates everything, due to its architecture. Don't know how to fix that. However the performance hit should be very small, the shader is rather simple.
User avatar
Nienna garcia
 
Posts: 3407
Joined: Wed Apr 25, 2007 3:23 am

Post » Sun Aug 29, 2010 2:43 am

Morrowind's water looks prettier than real life's water. :P
User avatar
REVLUTIN
 
Posts: 3498
Joined: Tue Dec 26, 2006 8:44 pm

Post » Sat Aug 28, 2010 7:30 pm

Morrowind's water looks prettier than real life's water. :P


http://img18.imageshack.us/img18/6152/mgescreenshot1.png, just wow, not to mention the fog looks so much better now, if only we could rework how statics are drawn within the fog to eliminate the odd popup that occurs, though its really not that bad with your settings, its still ever so slightly noticable.

Still, this is phenomenal work Phal, very pleased with these results, now if only we could get you and Hrnchamd to work on making it possible to have waves in the ocean, while still having calmer waters in the rivers/lakes/caves and combine it all with caustics, win the lotto, buy the super computer needed to run the darn thing at decent framerates, and actually take time to play the game rather then fiddling with code(and or just installing code that fiddled with by you. :P).....................We'd be in heaven! :D

lol, anyways, I greatly look forward to your new wave models, and my frame rates remain somewhat steady in the 15-25 fps range, which isn't too bad considering the 200+ mods I have activated, and the shaders ect. Anyways.........Thank you for all of your hard work, it is most definitely appreciated.
User avatar
BlackaneseB
 
Posts: 3431
Joined: Sat Sep 23, 2006 1:21 am

Post » Sun Aug 29, 2010 1:32 am

Hmm it shouldn't. But shaders are a bit strange when it comes to if conditions and such. Afaik, even when an if statement returns false, the graphics card still calculates everything, due to its architecture. Don't know how to fix that. However the performance hit should be very small, the shader is rather simple.

Yeah. It's between 1 - 5 FPS on my rig.

BTW: thanks again for all your hard work, mate. :icecream:
User avatar
roxxii lenaghan
 
Posts: 3388
Joined: Wed Jul 05, 2006 11:53 am

Post » Sat Aug 28, 2010 3:06 pm

http://i18.photobucket.com/albums/b120/iamerik/MW%20and%20Oblivion/MGEScreenshot217.jpg
http://i18.photobucket.com/albums/b120/iamerik/MW%20and%20Oblivion/MGEScreenshot219.jpg
http://i18.photobucket.com/albums/b120/iamerik/MW%20and%20Oblivion/MGEScreenshot220.jpg
http://i18.photobucket.com/albums/b120/iamerik/MW%20and%20Oblivion/MGEScreenshot222.jpg
http://i18.photobucket.com/albums/b120/iamerik/MW%20and%20Oblivion/MGEScreenshot223.jpg
http://i18.photobucket.com/albums/b120/iamerik/MW%20and%20Oblivion/MGEScreenshot224.jpg
http://i18.photobucket.com/albums/b120/iamerik/MW%20and%20Oblivion/MGEScreenshot226.jpg
http://i18.photobucket.com/albums/b120/iamerik/MW%20and%20Oblivion/MGEScreenshot227.jpg
http://i18.photobucket.com/albums/b120/iamerik/MW%20and%20Oblivion/MGEScreenshot229.jpg
http://i18.photobucket.com/albums/b120/iamerik/MW%20and%20Oblivion/MGEScreenshot230.jpg
http://i18.photobucket.com/albums/b120/iamerik/MW%20and%20Oblivion/MGEScreenshot231.jpg
http://i18.photobucket.com/albums/b120/iamerik/MW%20and%20Oblivion/MGEScreenshot232.jpg
http://i18.photobucket.com/albums/b120/iamerik/MW%20and%20Oblivion/MGEScreenshot233.jpg
User avatar
SHAWNNA-KAY
 
Posts: 3444
Joined: Mon Dec 18, 2006 1:22 pm

Post » Sat Aug 28, 2010 4:53 pm

impressive seeing depth.now i'd be laughing my @$$ off if ya could make a mod to have males stand up and take a leak....perfect P reflection, splashing etc....just shake me head with a smile and think how funny yet strange...but still funny >;P
User avatar
Rhi Edwards
 
Posts: 3453
Joined: Fri Jul 28, 2006 1:42 am

Post » Sat Aug 28, 2010 5:51 pm

impressive seeing depth.now i'd be laughing my @$$ off if ya could make a mod to have males stand up and take a leak....perfect P reflection, splashing etc....just shake me head with a smile and think how funny yet strange...but still funny >;P


I smell a request :deal:


Edit:That would be disgusting though...
User avatar
ezra
 
Posts: 3510
Joined: Sun Aug 12, 2007 6:40 pm

Post » Sat Aug 28, 2010 1:21 pm

I smell a request :deal:

Will be included in the next version, with dynamic water coloring! :rolleyes: (No.)


I've just uploaded version 0.6a. It includes the fullscreen postprocessing underwater effects shader and should take care of the issues of 0.6. :)
User avatar
jess hughes
 
Posts: 3382
Joined: Tue Oct 24, 2006 8:10 pm

PreviousNext

Return to III - Morrowind