Jump to content


Photo

Feature request: fog light "fog start" parameter

fog

3 replies to this topic

#1 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 658 posts

Posted 22 July 2017 - 04:49 AM

Right now, our fog uses light to define its area in the map, we also have "fog end" parameter (shaderparm3), so we can extend the fog range beyond the light area. This very useful, if yo want to use subtle fog to show depth in your map or simulate a little haze in the air, that is always present to some extent in the real world.

 

There are a few problems here though. You need a gradient image to simulate fog, and by limits of 8 bits per channel in images, we can only have 256 steps in any gradient, which causes banding. To simulate haze, you need to use high values for shaderparm, and that increases banding even more. It's less obvious when you have many objects in your scene, but you can easily see this with caulk:

 

do_2017-07-22_10.24.43.png

 

My question is: can we have additional "fog start" parameter, so the fog would start further away from the player? Is it possible to decrease banding this way, by having shorter distance between fog start and fog end?


  • Anderson likes this

#2 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 814 posts

Posted 22 July 2017 - 04:56 AM

Now that we have a glsl shader for fog we should probably switch from gradient image to on-the-fly calc?


  • Anderson likes this

#3 Spooks

Spooks

    Member

  • Member
  • PipPip
  • 380 posts

Posted 23 July 2017 - 02:01 AM

If there is to be some sort of fog overhaul, I remind everyone of the myriad of checks to be done so the fog interacts properly with all that we have in the game. Skybox, particle emitters, water shaders, blend add keywords on materials, I can go on. There is still an upstanding issue with the current fog lights where fogged up skybox brushes will render in front of particles. Not sure if that's just a sorting issue with the particle materials or what, however.


My FMs: The King of Diamonds (2016)

 

Visit my Mapbook thread sometimes!


#4 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 814 posts

Posted 24 July 2017 - 01:45 AM

Is there a record in the bug tracker for that?


  • Anderson likes this



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users