Colouring 3D floor water - how?

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Colouring 3D floor water - how?

Post by Enjay »

OK, I'm probably missing something obvious here - but how do I make it so that when you are inside a swimable 3D floor, the player's view can have an "underwater colour" applied to it like you can with fake 3D water? My 3D floor is set up nicely - it's translucent and I can swim around in it but when my eyes go below the water surface I can see as clearly as normal. I've tried using Sector_SetFade and Sector_SetColor on the control/model sector but my swimable water is still colourless. Any clues plus any suggestions as to good values to use?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Sector_Setcolor and Sector_SetFade on the control sector should do the job. If not, there's something wrong.
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Re: Colouring 3D floor water - how?

Post by Paul »

Enjay wrote: Any clues plus any suggestions as to good values to use?
Use flag 2. It'll restrict the lighting of the 3d floor to between the 3d structure's floor and ceiling, and not cast lighting below it. Check out my map I linked to in the screenshots discussion thread. Translucent 3d swimmable water + underwater haze.
User avatar
Syfo-Dyas
Posts: 182
Joined: Sun Oct 09, 2005 21:54
Location: Ohio
Contact:

Post by Syfo-Dyas »

Alright, when you guys say,"Sector_Setcolor and Sector_SetFade " on the control sector.

What does that mean. I know what the control sector is of course, but don't understand how those options are applied. I was able to do colored lighting under water in Legacy, but that was a whole nother story.
User avatar
Phobus
Posts: 227
Joined: Sat Sep 03, 2005 11:48
Location: Orpington, Kent, England
Contact:

Post by Phobus »

You set it through Open or Enter scripts (better being Open scripts). All you need to do is make a scripts lump, make a script that looks something like this:

Code: Select all

#include "zcommon.acs"

script 1 open
{
    Sector_SetColor(Tag,RRR,GGG,BBB);
}
Compile it, and you're done :P

Sector_SetFade takes the same arguments, but makes a fog instead of merely colouring the light.
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Re: Colouring 3D floor water - how?

Post by chopkinsca »

Paul wrote:
Enjay wrote: Any clues plus any suggestions as to good values to use?
Use flag 2.
I don't use any flags for most of my coloured water and it works fine. Unless you have floating water, or a room below it, I suppose it doesn't matter.

Now if only sector_setwind worked on 3d sectors, it would complete a river.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

OK, I think it may be a bug. Reported.

http://forum.drdteam.org/viewtopic.php?p=13743
Locked

Return to “GZDoom”