Author Topic: Fog of War - partly occlusion  (Read 4112 times)

roberthahn

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Fog of War - partly occlusion
« on: April 18, 2014, 07:19:01 PM »
Hello everyone,

I am using Unity Free and just bought your Fog of War package from the asset store.
I am using the Fog of War Terrain material from the example code and applied it to my terrain. The fog of war gets rendered and a revealer can reveal it.

I also added a FOWRenderer to an enemy building but when the player comes closer to the building it will not get shown party since the rest of it is still hidden in the fog but it wont be shown until the user has revealed the whole fog around the building.
The same problem occures when the player moves away from the building. It doesnt get party hidden in the fog but instead it will be shown until the player has not full sight on it and than it will immediatley get hidden completly.

How can I achive this partly occlusion?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Fog of War - partly occlusion
« Reply #1 on: April 19, 2014, 11:37:30 PM »
If that's what's happening then I would say didn't modify the building's shader properly. Did you check the FOW diffuse shader that comes with the package? Did you try that instead?

Also keep in mind FOWRenderer is designed to hide game objects that are not visible. As in, flat out disable them. It's not meant to make those buildings be affected by the fog. That's what the shader is for.

roberthahn

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Fog of War - partly occlusion
« Reply #2 on: April 21, 2014, 10:31:36 AM »
This shit is just not working. Sorry for being rude but I expect things to work when I pay 50 bucks.

When my object moves this f******** Fog of war is just WRONG. Totally wrong.
I have no idea what to change and its just totally dumb to wait 3 days to get a reply, change something and than wait again 3 days.
I regret my purchase.

WHERE is a documentation?!
« Last Edit: April 21, 2014, 11:01:51 AM by roberthahn »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Fog of War - partly occlusion
« Reply #3 on: April 22, 2014, 05:25:22 AM »
I responded to you within a day. Your post -- April 18. My response - April 19. Not sure where the 3 day figure is from.

I explained to you that FOWRenderers hides objects that are not visible by the fog of war by disabling them. It's an optional script meant to improve performance by disabling invisible objects.

FOW Image Effect is what actually draws the fog of war. Since you are using Unity Free however, this won't work for you. Only the custom material shader approach will work (second example). For this to work, the objects themselves need to have the appropriate fog-sampling code inside. The package provides two examples of such shaders -- one for the objects (diffuse) and another for the terrain.

If you need better help, provide more details. The more details you provide, the better I can help. And post some pics of the issue. That always helps.