Author Topic: Fog/sky depth  (Read 393 times)

Frozenempire

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • The Frozen Empire
Fog/sky depth
« on: November 03, 2018, 12:16:43 PM »
Hey, hope you are good.

In the pursuit of visual perfection, can I query the way fog is calculated with respect to depth.

In the attached fog debug snapshot, you can see that there is a foreground object to the right which is in fog. The fog being applied in front of the object seems consistent top to bottom, however the fog being applied around it seems more dense over the terrain than over the skybox.

Does this seem right? shouldn't the fog being applied above the terrain and skybox be similar, such that the object in the foreground is then darker than the fog surrounding it (as is the case in front of the terrain)

Would appreciate your thoughts. Thanks

Frozenempire

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • The Frozen Empire
Re: Fog/sky depth
« Reply #1 on: November 16, 2018, 12:02:13 PM »
Good evening,

Can I ask did you have any thoughts on this query?

Many thanks

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4413
    • View Profile
Re: Fog/sky depth
« Reply #2 on: November 17, 2018, 02:49:45 AM »
Sorry, I've not had time to dig into this - it has to do with the fact that the shader uses logarithmic distance to reduce sample count and provide a good performance for the effect. The fog is darker at bottom, so the more samples computed at bottom positions (either in front of objects or at the terrain), the darker the results. The rays over the sky are longer and due to the applied log they use less samples on lower positions hence the resulting fog is brighter. I'll introduce an option to compute samples in an alternate fashion so it produces more seamless results albeit it being less accurate for the medium/large distance.

Frozenempire

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • The Frozen Empire
Re: Fog/sky depth
« Reply #3 on: November 17, 2018, 03:09:42 AM »
Many thanks

Makes sense and sounds like an interesting solution.
Look forward to seeing the difference
No hurries 👍

Frozenempire

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • The Frozen Empire
Re: Fog/sky depth
« Reply #4 on: February 09, 2019, 03:24:00 AM »
Hey hope all is good in Kronnect land 😎

I just remembered this open question I raised... do you see any chance to take a look again in the near future?

Many thanks 🙏


Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4413
    • View Profile
Re: Fog/sky depth
« Reply #5 on: February 09, 2019, 09:54:30 AM »
Hi, everything good here - short of sleep perhaps :)
And yes, this issue is still something in the exploration area, not cancelled. I'll revisit it sometime in the future.
Cheers
 

Frozenempire

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • The Frozen Empire
Re: Fog/sky depth
« Reply #6 on: February 09, 2019, 09:59:38 AM »
Yeah I know that feeling 😀

Many thanks for checking it out when you can 👍

Frozenempire

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • The Frozen Empire
Re: Fog/sky depth
« Reply #7 on: April 17, 2019, 08:03:32 AM »
Hey, I noticed movement in the VFM shaders...

Great opportunity to explore sampling methods ? 😉

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4413
    • View Profile
Re: Fog/sky depth
« Reply #8 on: April 17, 2019, 08:59:30 AM »
Yes, probably version 10 will include some options to customize the way it traces the scene.
I'm moving this to Feature Requests for now.

Frozenempire

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • The Frozen Empire
Re: Fog/sky depth
« Reply #9 on: April 17, 2019, 09:04:20 AM »
Excellent 👍