How to setup fog inside a 3-d water?
Moderator: Graf Zahl
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
How to setup fog inside a 3-d water?
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?
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?
- chopkinsca
- Posts: 183
- Joined: Thu Dec 29, 2005 8:09
- Eriance
- Posts: 150
- Joined: Wed Mar 29, 2006 19:36
- Location: Everywhere and nowhere
- Contact:
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Shinjanji
- Posts: 198
- Joined: Sun Nov 06, 2005 16:45
- Location: Pennsylvania, USA
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
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.
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.
- Zeg-Vok
- Posts: 233
- Joined: Wed Sep 21, 2005 18:04
- Location: Up the creek without a paddle
- Contact:
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
I want the same effect as attached file (which is a really old file made for software ZDoom).
- Attachments
-
- deepwater.zip
- (911 Bytes) Downloaded 88 times
- Shinjanji
- Posts: 198
- Joined: Sun Nov 06, 2005 16:45
- Location: Pennsylvania, USA
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Shinjanji
- Posts: 198
- Joined: Sun Nov 06, 2005 16:45
- Location: Pennsylvania, USA
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...
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...
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Zeg-Vok
- Posts: 233
- Joined: Wed Sep 21, 2005 18:04
- Location: Up the creek without a paddle
- Contact:
- Shinjanji
- Posts: 198
- Joined: Sun Nov 06, 2005 16:45
- Location: Pennsylvania, USA
...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)Nash wrote:I'm talking about gradual, distant fog...
- Phobus
- Posts: 227
- Joined: Sat Sep 03, 2005 11:48
- Location: Orpington, Kent, England
- Contact: