Page 1 of 1

How do you change dungeon fog/cemetery sky fog colour?

Posted: Sat Jul 30, 2016 12:09 pm
by WaspUK1966
The script for the dungeon fog in log2 is below:

defineObject{
name = "swamp_dungeon_fog",
baseObject = "base_floor_decoration",
components = {
{
class = "FogParams",
fogMode = "dense",
fogColor = vec(0.3,0.5,0.15) * 0.3,
fogRange = {0,30},
},
{
class = "FogParticles",
texture = "assets/textures/particles/fog_particle.tga",
particleSize = 6.5,
color1 = vec(1,1,1)*3*0.55,
color2 = vec(1,1,1)*3*0.55,
color3 = vec(1,1,1)*3*0.55,
opacity = 0.4,
},
},
}

What elements do I amend to change its colour? And what are the colour ranges? I've been experimenting but cant get the colour I want quite right to use in my latest mod that I'm creating. Any help greatly appreciated as always.

George

Re: How do you change dungeon fog/cemetery sky fog colour?

Posted: Sat Jul 30, 2016 12:31 pm
by Isaac
Change the color 1, 2 & 3 values, and try spawning a "swamp_dungeon_fog" object via the console.


color1 = vec(1,1,91)*3*0.55,
color2 = vec(1,1,91)*3*0.55,
color3 = vec(1,1,91)*3*0.55,

Color2 seems to have the most prominent visual effect. The valid rage [afaik] is 0 to 255; with zero being invisible.

Re: How do you change dungeon fog/cemetery sky fog colour?

Posted: Sun Jul 31, 2016 9:16 am
by minmay
Isaac wrote:Color2 seems to have the most prominent visual effect.
No. The game transitions between fogColor1, fogColor2, and fogColor3 depending on the time of day. fogColor1 is for daytime, fogColor2 is for sunrise/sunset, fogColor3 is for night.
Isaac wrote:The valid rage [afaik] is 0 to 255; with zero being invisible.
No. Any number is "valid" and the equivalent of RGB 0,50,255 is vec(0,50/255,1), NOT vec(0,50,255).

If it helps, think of color vectors as multipliers. Take particle emitter definitions. A particle color of vec(0.5,1,2) means the texture's red values are multiplied by 0.5, its green values by 1, and its blue values by 2.

Re: How do you change dungeon fog/cemetery sky fog colour?

Posted: Sun Jul 31, 2016 9:47 am
by Isaac
Interesting, and useful. 8-)

(And not something one learns in four minutes of playing around with it. :mrgreen: )

So color2 had the most apparent effect simply for it being the right time in the game-day.
...and the equivalent of RGB 0,50,255 is vec(0,50/255,1)
So is the effective range 0-1?