Jump to content


Photo

Fog light acts like black fog


7 replies to this topic

#1 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12361 posts

Posted 07 April 2011 - 08:35 AM

I noticed that when a fog light is turned off, it acts like black fog instead of just being off.

I cycled through the combinations of ambient rendering and interaction shader and the result was always the same.


Is this a known problem? Feature?


#2 Fidcal

Fidcal

    Master Mapper

  • Development Role
  • PipPipPipPipPip
  • 16675 posts

Posted 07 April 2011 - 09:10 AM

It's meant to be like that. Fog is fog and the _color setting just sets the color of the fog. All lights when they are off are really just 0,0,0 color which is no light at all. But a fog light is still a fog light and so you get black fog.

I think Tels and I discussed some new code to control fogginess. I can't recall if he did it. If not, the only way is to teleport foglights to/from an area.

#3 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12361 posts

Posted 07 April 2011 - 09:27 AM

Ok, thanks.

It makes for a nice effect, just not the one I wanted.

#4 OrbWeaver

OrbWeaver

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 7462 posts

Posted 07 April 2011 - 09:55 AM

There is a shaderParm to set the density of the fog (shaderParm5 perhaps?). I think if you set this to a really high value, the fog will not be visible, but I don't know if it can be changed dynamically during play.

#5 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12361 posts

Posted 07 April 2011 - 10:23 AM

I'm working with tunnels, and was using a light brick texture that worked well with fog. I switched to a darker brick and the fog looked crappy, very striated as you moved around. I turned the fog light off to see what it would look like w/o fog, and everything in the distance turned black. I thought it was a material problem with ambients for a while, then noticed that a torch in the distance was dimmed, like it was still in fog.

I deleted the fog light and the black went away.

I thought off was off was off, but I guess fog lights work differently.

Maybe some map version in the future will scream for fog once again, at which point I'll think about teleporting, shaderParm, etc.

I suppose an off fog light could be used for a nice magical "creeping darkness" effect, though.

#6 rebb

rebb

    Advanced Member

  • Active Developer
  • PipPipPip
  • 726 posts

Posted 07 April 2011 - 10:27 AM

Which material are you using on the fog-light ?

There are fog-materials that are actually additive and should behave like you expect them to if you set the color to 0 ( causing no fog to be drawn, and no blackness ).

#7 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12361 posts

Posted 07 April 2011 - 10:50 AM

Which material are you using on the fog-light ?


tdm_fogs/cloud_fog

#8 rebb

rebb

    Advanced Member

  • Active Developer
  • PipPipPip
  • 726 posts

Posted 07 April 2011 - 11:10 AM

fogs/real_fog is additive for example - altho on closer inspection it's actually a blendLight material, maybe not quite what you're looking for.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users