Page 1 of 1

How to setup fog inside a 3-d water?

Posted: Mon Jul 24, 2006 19:20
by Nash
I've got swimmable water setup using 3-d floors.

The problem is, using sector_setfade() on the model sector will fade the whole screen when I jump into the water.

I want that fullscreen fade, but I ALSO want an actual fog effect inside the water itself, so that the water appears to be murky. That's how the underwater areas look like in Half-Life (as an example).

How can I go about doing this?

Posted: Mon Jul 24, 2006 19:46
by chopkinsca
I've only been able to get this effect sort of from using setcolor and trying different light values and transparency levels for underwater. My guess is that the way setfade works, it can't be used for 3d floors.

Posted: Mon Jul 24, 2006 20:19
by Eriance
Thats what I do. My map09 and map10 in the Demon Eclipse Wad uses this. Set the fadeand fog for the control sector or your 3D swimmable floor.

Posted: Mon Jul 24, 2006 22:10
by Nash
Eriance - fade and fog ARE the same things. What are you talking about?

Posted: Tue Jul 25, 2006 0:36
by Shinjanji
Yah, it seems that the fade in a 3D floor will only change when you're inside of it.

My suggestion otherwise would be to just use a few semi-transparent layers near the surface to mimic the murky effect when seen from outside the water bounds.

Posted: Tue Jul 25, 2006 1:39
by Nash
No, that's not what I want.

I want the distant fog UNDER the water. That is, when I am submerged, the view fades into whatever colour I specified.

Currently, when fog is applied to the control sector, the whole screen is faded to that colour.

The effect works with Transfer_Heights, but I don't wanna use that anymore because it's so 1998. Plus I can't make the water translucent if I use Transfer_Heights.

Posted: Tue Jul 25, 2006 1:41
by Zeg-Vok
So . . . what you are looking for, is an effect other than Sector_SetFade?

Posted: Tue Jul 25, 2006 2:10
by Nash
I want the same effect as attached file (which is a really old file made for software ZDoom).

Posted: Tue Jul 25, 2006 2:21
by Shinjanji
Like this?

Posted: Tue Jul 25, 2006 2:27
by Nash
Shin, nope. Check out my file and see the difference.

The 3-d water special is fading the whole screen with Sector_SetFade instead of applying an actual fog underwater.

Posted: Tue Jul 25, 2006 2:29
by Shinjanji
The example I posted uses both Sector_SetColor and Sector_SetFade on the 3D model sector.

Taking a look the example in the editor, it's using the WATERMAP function. Provided my memory hasn't failed me, WATERMAP is just an automatic SetColor with a predefined set of RGB values. I believe Graf has mentioned those RGB values somewhere before...

Posted: Tue Jul 25, 2006 2:50
by Nash
*sigh*

I don't think you get it.

The gradual fog effect does NOT happen when using 3-d floors. They work with Transfer_Heights.

I'm not talking about screen fades. I'm talking about gradual, distant fog...

Posted: Tue Jul 25, 2006 3:13
by Zeg-Vok
WHat I would like to see is a transparent image overlayed on the screen when your under certain types of water or liquids, like burny stuff when your under lava, possibly some blue swirly stuff when your underwater . . .

Posted: Tue Jul 25, 2006 4:08
by Shinjanji
Nash wrote:I'm talking about gradual, distant fog...
...which is what the Sector_SetFade does. It defines the color that everything fades out to as it gets farther away. By default, it is black, but fog effects are made by setting it to lighter grays and white (see some maps in Hexen). To make a colorized fade seem thicker, lower the brightness of your target sector (be it model or normal sector)

Posted: Tue Jul 25, 2006 11:28
by Phobus
Make the control sector lighter, and set the argument that tells the 3D floor whether it should affect the light of the sector it appears in appropriately.