Page 1 of 3

2 questions regarding water and view distance

Posted: 06 Oct 2014, 00:44
by Lazaroth
1. I tried out some different water normal maps yesterday. How hard would it be to implement a change of used normal map depending on weather and/or if you are indoors (and/or water shader)? It was easy to get really cool results, but some normal maps are better suited for rain and other for a sunny day etc.

2. I also tried out different values using various viewing distances and distant land. How hard would it be to "bind" view distance to the current weather type? E.g. not long when it's foggy and very long when it's a sunny day.

Re: 2 questions regarding water and view distance

Posted: 06 Oct 2014, 02:20
by Chris
Lazaroth wrote:2. I also tried out different values using various viewing distances and distant land. How hard would it be to "bind" view distance to the current weather type? E.g. not long when it's foggy and very long when it's a sunny day.
The fog should be modified to work as exponential rather than linear, but our shaders currently only handle linear fog. Exponential fog has the fog defined as a density value, and is better suited to longer view distances, rather than start and stop points like linear. Incidentally, the ESM defines fog using a density value, but we calculate start and stop points from that for linear fog.

Re: 2 questions regarding water and view distance

Posted: 11 Oct 2014, 12:28
by dEnigma
@Lazaroth: Can you share some screenshots, pretty please?

Re: 2 questions regarding water and view distance

Posted: 13 Oct 2014, 01:29
by Lazaroth
@Chris
Interesting!

@dEnigma

Sure. Here are 2 quick ones:

Rainy day:
http://i.imgur.com/JNfv62K.jpg

Sunny day:
http://i.imgur.com/x2AZTHy.jpg

Re: 2 questions regarding water and view distance

Posted: 14 Oct 2014, 14:40
by dEnigma
Very nice, that would be a cool feature. Also different, or more pronounced, specular maps for ground textures in rainy weather would be awesome.

Re: 2 questions regarding water and view distance

Posted: 15 Oct 2014, 22:35
by scrawl
How hard would it be to implement a change of used normal map depending on weather and/or if you are indoors (and/or water shader)? It was easy to get really cool results, but some normal maps are better suited for rain and other for a sunny day etc.
It's not difficult to do, and we will offer much more options than just changing the normal map (basically changing any of the shader parameters). I also plan to add an in-game tweaking UI for these settings, so you can see the results of your changes immediately.
The question is where all this should go. We have the weather fallback settings from Morrowind.ini in openmw.cfg, but this is supposed to be phased out later when we move settings to the content files. @Zini: Would it be acceptable to add new, optional fallback settings that weren't in MW?

Re: 2 questions regarding water and view distance

Posted: 16 Oct 2014, 09:34
by Zini
Probably. Depends on what exactly needs to be added. Would like to review these proposed settings first before you start to implement them. btw. are we talking about pre- or post-1.0 here?

Re: 2 questions regarding water and view distance

Posted: 16 Oct 2014, 18:48
by Lazaroth
Since this was featured on the front page, I thought I'd add the water shaders here, if people want to check it out or improve it.

The (unrared) file goes into \resources\materials\
Sun is a bit more calm than standard and rain more busy.

One other notable change is that I changed the water color from green to blue.
The parameters start on line 137 called "tweakables".

Re: 2 questions regarding water and view distance

Posted: 16 Oct 2014, 19:40
by scrawl
sun.rar looks great. I'd like to make it the new default, but can we keep the sunlight scattering colour green as it was? We can make it a bit more subtle, but the colour should be green.
Probably. Depends on what exactly needs to be added. Would like to review these proposed settings first before you start to implement them.
Not completely sure about that yet. Easiest way would be just one setting "Weather_Water" giving a water material name, and defining that material would be handled in a resource file. I haven't thought about if / how we should handle water transitions when switching to a new weather.
btw. are we talking about pre- or post-1.0 here?
pre-1.0, that is with original ESM format.

Re: 2 questions regarding water and view distance

Posted: 16 Oct 2014, 20:16
by Lazaroth
scrawl wrote:sun.rar looks great. I'd like to make it the new default, but can we keep the sunlight scattering colour green as it was? We can make it a bit more subtle, but the colour should be green.
The main reason I changed it was for things like this, which I just think look too tropical:
http://i.imgur.com/OZWGkUD.jpg

My additional changes tones this "problem" down though.

Below is a toned downed green version (if you still want more green, just raise the middle value):