Author Topic: Multiple fog of war layers  (Read 270 times)

Frozenempire

  • Full Member
  • ***
  • Posts: 200
    • View Profile
    • The Frozen Empire
Multiple fog of war layers
« on: July 13, 2019, 05:44:54 AM »
Hi again...

Could I just confirm whether itís possible to have two separate fog layers, each with their own fog of war mask?

Thanks

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4994
    • View Profile
Re: Multiple fog of war layers
« Reply #1 on: July 13, 2019, 12:43:27 PM »
Only one layer of fog of war.
You could edit the Shader to add a second mask texture of course (and add/edit methods to specify which mask is being edited).

Frozenempire

  • Full Member
  • ***
  • Posts: 200
    • View Profile
    • The Frozen Empire
Re: Multiple fog of war layers
« Reply #2 on: July 13, 2019, 01:13:10 PM »
Ah ok... thanks for confirming. I'll try and work around it for the moment...

Frozenempire

  • Full Member
  • ***
  • Posts: 200
    • View Profile
    • The Frozen Empire
Re: Multiple fog of war layers
« Reply #3 on: July 14, 2019, 03:40:52 AM »
Maybe there was some confusion or I got lucky :)

With 2 fog instances, each one can have its own fog of war texture.. at least it seems to work for me ?

I have noticed however that I think the general fog of war effect only works from outside the fog? If so thatís kind of a fundamental issue in my use case where I need closer fog to obscure fog of war holes in the distance

Is there any hope to have a solution that does that 🙏

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4994
    • View Profile
Re: Multiple fog of war layers
« Reply #4 on: July 14, 2019, 10:44:32 AM »
That's correct - fog of war is best viewed from top-down perspective. For optimization purposes, only one sample is taken at the terrain position from the camera position. That works fine from outside the fog.
To make it work inside the fog, the sampling needs to occur inside the raymarching loop but there's no currently option for that (fog Void can be sampled outside or inside the raymarching loop (there's a setting in Shader Options) so the same approach should be followed).
I'll see if that option could be added in next update although it can take some time.

Frozenempire

  • Full Member
  • ***
  • Posts: 200
    • View Profile
    • The Frozen Empire
Re: Multiple fog of war layers
« Reply #5 on: July 14, 2019, 10:56:24 AM »
That gives me some hope, thank you.

The main view in my game is first person therefore it needs some fog of war depth testing to be as realistic as all the other great improvements that have been made with sun shadows etc :)
Sounds like youíre quite clear how it can work which is already 50% towards any solution in my book

Iím really happy the dual instances with their own separate fog of war masks is working

Amazingly flexible asset as always
Thanks for your help


Frozenempire

  • Full Member
  • ***
  • Posts: 200
    • View Profile
    • The Frozen Empire
Re: Multiple fog of war layers
« Reply #6 on: July 28, 2019, 06:51:26 AM »
Hi, just checking in on the subject of fog-of-war "inside view" compatibility.

I think that is probably the one final piece of the puzzle in terms of VFM meeting all my requirements for the current game I'm developing.

Would hugely appreciate this final piece, if it's a relatively straightforward extension similar to the fog void algorithm

Unfortunately it sounds like it goes well beyond my tweaking capabilities, otherwise I'd have a go :)
« Last Edit: September 16, 2019, 10:16:31 PM by Kronnect »

Frozenempire

  • Full Member
  • ***
  • Posts: 200
    • View Profile
    • The Frozen Empire
Re: Multiple fog of war layers
« Reply #7 on: September 10, 2019, 05:28:59 AM »
Hi there!

May I ask if the ray marched fog of war feature is any closer to appearing...

Thanks for an update