Page 1 of 1

Dungeon Underwater Fog Change

Posted: Sun Oct 24, 2021 11:16 pm
by Interkarma
After listening to KoW's feedback around dungeon underwater fog (just a few times now :)), I've made two changes that I hope everyone can agree with.

First, I've opened up underwater fog colour to mods. Change using the following example:

Code: Select all

GameManager.Instance.PlayerEnterExit.UnderwaterFog.waterFogColor = new Color32(14, 25, 21, 255);
I've also changed the default fog colour to look darker and better match surface of water. The goal here is a kind of inky blue-green, invoking the look of murk and algae.

underwater-darker.jpg
underwater-darker.jpg (203.39 KiB) Viewed 3885 times

For reference, this is what the underwater fog looks like in DFU at present.

underwater-blue.jpg
underwater-blue.jpg (167.03 KiB) Viewed 3885 times

I'm going to make these changes live in 0.13.2. All feedback is welcome, although I hope most people view this as a positive change. If nothing else, mods can now tweak colour to user preference.

Re: Dungeon Underwater Fog Change

Posted: Mon Oct 25, 2021 1:11 am
by Freak2121
That looks great! :D

Re: Dungeon Underwater Fog Change

Posted: Mon Oct 25, 2021 4:02 am
by Interkarma
Cheers Freak. :) Hopefully most people will see the change as positive.

I'm not sure why anyone would prefer the neon blue tbh. I only kept it that way because it was fairly representative of classic. Let's take something different for a spin and see where it goes.

Re: Dungeon Underwater Fog Change

Posted: Mon Oct 25, 2021 9:54 am
by King of Worms
Im very very happy to see this change, thank you! I like the look of darker water & matching fog and surface colors.
Now if someone can create that QUAKE 1 underwater distortion effect :lol:

Re: Dungeon Underwater Fog Change

Posted: Tue Oct 26, 2021 12:10 pm
by pango
There's some water color in 3d map parameters, if I remember correctly.
I don't know if using the same color for both will give good results of not, but I mention its existence just in case...

Re: Dungeon Underwater Fog Change

Posted: Tue Oct 26, 2021 4:18 pm
by King of Worms
Btw the fog distance, is it the same in both screens? Is the percieved change in fog distance caused by the color change only? Id vote for the new fog to appear closer to the player, based on that screen. But seeing it in motion is what decides, one screen is not enough to judge ;)

Re: Dungeon Underwater Fog Change

Posted: Tue Oct 26, 2021 10:19 pm
by Interkarma
pango wrote: Tue Oct 26, 2021 12:10 pm There's some water color in 3d map parameters, if I remember correctly.
I don't know if using the same color for both will give good results of not, but I mention its existence just in case...
Thanks Pango. :) I've created a new field for water map colour, as I found the fog colour doesn't always translate well to automap. Now modders can tune either.

King of Worms wrote: Tue Oct 26, 2021 4:18 pm Btw the fog distance, is it the same in both screens? Is the percieved change in fog distance caused by the color change only? Id vote for the new fog to appear closer to the player, based on that screen. But seeing it in motion is what decides, one screen is not enough to judge ;)
It's the same fog volume and density as before, just the colour is different. I've now very slightly increased fog density (from 0.23 to 0.25) but I feel it looks OK when actually underwater. We'll see what people think after it goes live.

I've also opened the fogDensityMin and fogDensityMax fields to mods so this can be tuned as needed.

Re: Dungeon Underwater Fog Change

Posted: Tue Oct 26, 2021 10:44 pm
by Interkarma
Just to round things out, modders can change surface of dungeon water as well.

Change this by copying DungeonWater prefab into your mod and playing with DungeonWaterBasicMaterial. The "FX/DungeonWater (Basic)" shader on this material has a texture for reflective colour (RGB) and fresnel (A), and a waves normal texture. Or you can create your own prefab with a bespoke water plane and your own shader+materials.

To make the game use your water plane, set custom prefab to property DaggerfallUnity.Instance.Option_DungeonWaterPrefab. This object will be placed by RDBLayout when laying out dungeon and placing water plane.