Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Water not affected by fog
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#11
RE: Water not affected by fog

(09-29-2014, 12:47 PM)Acies Wrote:
(09-28-2014, 07:35 PM)FlawlessHappiness Wrote:
(09-28-2014, 06:12 PM)Acies Wrote: Okay, you'd have to change/rewrite some shaders in core/shaders to get it working properly, but there's possibly a way to make it look 'ok' as it is now. Could you provide some information on the fogarea: Color/Start/End etc.

And the water? Tile amount?

Otherwise you can try it out yourself: Have a black fog, set the end to "X". Go into the water material, set Reflection FadeEnd to "X".

Well. It doesn't have to be water.

I was thinking maybe, we could just create a workaround?

If we look at water it's very simple: A plane, with an animated texture.
The thing about water here is that this plane has a little more stuff to work with.

Can't we make the water into a simple floor, with the water texture and animation?

The thing about the water material.. Each plane is built up of repetitions of the texture right? So if I were to animate it into making 'a wavy pattern' I would have to save it as textures of 'each frame' of the animations (a lot of textures).. Much alike a gobo. You would see the animation repeat all over the water (because the large water plane is build up of smaller water textures.). A solid material cannot be translucent the way water is either so.. Tongue

Ok, well then it's not possible ^-^

Unless I play with the cubemap as you said.

Trying is the first step to success.
09-29-2014, 01:16 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#12
RE: Water not affected by fog

(09-29-2014, 01:16 PM)FlawlessHappiness Wrote:
(09-29-2014, 12:47 PM)Acies Wrote:
(09-28-2014, 07:35 PM)FlawlessHappiness Wrote:
(09-28-2014, 06:12 PM)Acies Wrote: Okay, you'd have to change/rewrite some shaders in core/shaders to get it working properly, but there's possibly a way to make it look 'ok' as it is now. Could you provide some information on the fogarea: Color/Start/End etc.

And the water? Tile amount?

Otherwise you can try it out yourself: Have a black fog, set the end to "X". Go into the water material, set Reflection FadeEnd to "X".

Well. It doesn't have to be water.

I was thinking maybe, we could just create a workaround?

If we look at water it's very simple: A plane, with an animated texture.
The thing about water here is that this plane has a little more stuff to work with.

Can't we make the water into a simple floor, with the water texture and animation?

The thing about the water material.. Each plane is built up of repetitions of the texture right? So if I were to animate it into making 'a wavy pattern' I would have to save it as textures of 'each frame' of the animations (a lot of textures).. Much alike a gobo. You would see the animation repeat all over the water (because the large water plane is build up of smaller water textures.). A solid material cannot be translucent the way water is either so.. Tongue

Ok, well then it's not possible ^-^

Unless I play with the cubemap as you said.

Yeah, sort of, best case scenario; someone who can write glsl shaders rewrites the fog/water ones in order to allow water/translucent materials to be affected by fog. I have tried replacing shaders from AMFP (they did update them), but I don't think it provided much help.

Other than that there might be ways to make it feel more alike being under water, while still somewhat solving the issues you have. I can try creating a solution with some 'extra stuff' for you. No guarantees though, haven't tried putting in the extra work required.. Smile

[Image: mZiYnxe.png]


09-29-2014, 04:09 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#13
RE: Water not affected by fog

'Extra stuff' sounds awesome.

Just remember what I'm trying to create is a 'knee-high' water level. So that if you crouch you're below it, but if you stand you're above it.

Trying is the first step to success.
09-29-2014, 04:27 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#14
RE: Water not affected by fog

The best way I have found to make the player seem like they're underwater is to use a boxlight underneath the water plane which corresponds to that water. Its hard to get it right, but basically the light below the water is related to the 'color' of the water.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
09-29-2014, 11:46 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#15
RE: Water not affected by fog

Currently looks something like this:
http://youtu.be/pPFq8QBitFc

1080p available


Should make some more edits to it, but will have to do that tomorrow..

[Image: mZiYnxe.png]


(This post was last modified: 09-30-2014, 12:41 AM by Acies.)
09-30-2014, 12:39 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#16
RE: Water not affected by fog

Epic. :0

09-30-2014, 04:30 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#17
RE: Water not affected by fog

(09-30-2014, 12:39 AM)Acies Wrote: Currently looks something like this:
http://youtu.be/pPFq8QBitFc

1080p available


Should make some more edits to it, but will have to do that tomorrow..

Exactly what I'm looking for. Much of it, is particle effects, but my problem, and concern, is how the water-plane looks in the distance. Is it shown all the way, or does it disappear in the fog?

Trying is the first step to success.
09-30-2014, 09:16 AM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#18
RE: Water not affected by fog

Basically the water effect is broken down into some pieces. It consists of a modified water layer, some fog, an image overlay (through insanity effects), some blur and a particle effect created at the position of the player (the bubbles). The rise out of water consists of an animated texture (billboard) bound to the player hands, which is then activated by lighting a pointlight and an overlay (insanity effects).

Since I can't rewrite shaders --> Make fog affect translucent materials (ergo water!) I had to do something else in order to better blend the translucent material and the background. This is where insanity effects come into play, as that is basically an image overlayed on top of the player screen (regardless of what the player is looking at!), so it can blend into translucent materials much alike fog!

Okay, time for comparison shots!
Click the images for a larger version
Spoiler below!

[Image: mraRlwQ.jpg]

This is how the game looks when you are slapping on the standard fog without an image overlay.

[Image: Wa1SE2Z.jpg]

This is how the game looks with a very dark (almost black) fog (no image overlay).


The following images have an image overlay

[Image: b7uzDmq.jpg]

This version has the brightest image overlay. It also has no fog at all. You can compare it to the look of the first image in order to see the difference in blending.


[Image: 42Xfx31.jpg]

This version has the brightest image overlay. Since we established earlier that having a very dark fog won't really interfere with blending we can include a very dark fog as well and it won't mess up our results badly.


These last images are two darker versions of the image overlay combined with a very dark fog:
Mid value overlay:
http://i.imgur.com/86LyXRh.jpg

Dark overlay:
http://i.imgur.com/Mt2KpAi.jpg


In summary:
By having a dark fog (pure black to very slightly colored) you can modify the 'vision distance' (changing the 'start' value of the fog. 'Vision distance' is also affected by the brightness of the image overlay). Combining that with the image overlay you can 'color' your underwater section to a tint you like. Using this method should provide better results than purely using a fog.

Other notes:
The 'coming out of water effect' is achieved by having a faint overlay image of some droplets fade away combined with an animated texture of drops (with refraction) going down across the screen. The animated drops need to be bound to the handmodel of the player, otherwise they wouldn't follow you as you move away after standing up.

In conclusion this means that
A. You need a full conversion mod to have the animated water drops when standing up
B. You need a full conversion mod to use the (insanity) image overlay effect
C. It is preferrable to have the AMFP patch to better control the insanity effects through scripting - but it can be done with the original patch; just some more lines of scripting
D. You need to include the custom assets I've made for this effect (credit to Traggey for the drops diffuse texture!)


Edit: I'll make this available for everyone in the developement resources section :]

[Image: mZiYnxe.png]


(This post was last modified: 09-30-2014, 01:49 PM by Acies.)
09-30-2014, 01:47 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#19
RE: Water not affected by fog

Amazing ^-^

Not something I'll throw myself in right away. I'm just building the skeletons right now.

But thank you very much! I will definitely look into it as soon as i'm ready!

Trying is the first step to success.
09-30-2014, 01:53 PM
Find




Users browsing this thread: 4 Guest(s)