Dungeon Underwater Fog Change

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
Post Reply
User avatar
Interkarma
Posts: 6594
Joined: Sun Mar 22, 2015 1:51 am

Dungeon Underwater Fog Change

Post 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 445 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 445 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.

User avatar
Freak2121
Posts: 56
Joined: Fri Sep 08, 2017 6:14 am

Re: Dungeon Underwater Fog Change

Post by Freak2121 »

That looks great! :D

User avatar
Interkarma
Posts: 6594
Joined: Sun Mar 22, 2015 1:51 am

Re: Dungeon Underwater Fog Change

Post 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.

User avatar
King of Worms
Posts: 4315
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Dungeon Underwater Fog Change

Post 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:

User avatar
pango
Posts: 3059
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Dungeon Underwater Fog Change

Post 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...
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
King of Worms
Posts: 4315
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Dungeon Underwater Fog Change

Post 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 ;)

User avatar
Interkarma
Posts: 6594
Joined: Sun Mar 22, 2015 1:51 am

Re: Dungeon Underwater Fog Change

Post 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.

User avatar
Interkarma
Posts: 6594
Joined: Sun Mar 22, 2015 1:51 am

Re: Dungeon Underwater Fog Change

Post 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.

Post Reply