A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Calling all New Unity users! Join the Halloween Mods Showcase Challenge until October 31.
Discussion in 'Assets and Asset Store' started by stu_pidd_cow, Oct 11, 2016.
You can use the Post Processing Stack v2 sample with the LWRP.
BTW, ppsv2 sample under Universal RP seems not work~ Unity version is 2019.3.0a11. Thx for any help.
Ah yes the universal RP will use the same post processing tech as the HDRP, but custom shaders are yet to be supported (even in the alpha). I'd recommend sticking with 2019.2 for now if you can. Unfortunately, there's not much I can do, but I do intend on supporting the URP when I can.
Have you thought about using RayCastCommand for raycasting? I think this asset will benefit a lot from it.
Thanks for pointing this out. I think FoW can definitely benefit from this. I'll look into doing it asap.
Any idea when this asset be supporting hdrp 2019.2 or 2019.3?
I have found a problem, not sure if this is a Unity issue or an issue with your multi-threading code. Unfortunately I don't get any stack trace of the crash.
As soon as I compile a build with (PC/Windows10/Net 4.x) IL2CPP and switch on multithreading in FogOfWarTeam, it will crash when I exit my game. Quitting the game works fine if I compile to Mono.
I am currently using Unity 2018.4.9f1 and the newest version of FogOfWar.
I think unity isn't intending on giving HDRP custom shader functionality in 2019.2, so FoW won't work with it until 2019.3. When the HDRP team has finalized the custom shader stuff, I'll be working on it as soon as I can.
I haven't heard of this before. Some questions:
Do you see the fog at all?
Are you using legacy, LWRP or PPSv2?
Do you have a run time toggle that turns FoW multithreading on/off, and it only crashes when you turn it on?
Yes it works totally fine all the time, just exiting the game crashes it.
I am using Standard Render Pipeline (legacy)
Multithreading is switched always on from the getgo, I do not change this while the game is running.
I haven't been able to reproduce this. Does it happen if you have multithreading turned off?
Only happen with multithreading turned on and only in IL2CPP builds. Monobuilds are fine.
It seems like an IL2CPP bug. I'll try to reproduce it and send unity a bug report. Thanks for pointing this out!
Great! Any news on this?
Also, I know it is already doing threads, but I am not sure what part it is using thread for, so just want to ask if ECS + Jobs + Bust compiler can benefit this asset in anyway?
FoW is using C#/mono threads to do the rendering part of the fog. The jobs system probably wouldn't help much with that, but it would help with the unit raycasting. I'm not too keen on jumping onto the ECS/Jobs bandwagon just yet since it is still in beta (as far as I can tell). I was planning on fiddling around with it and, if all goes well, have it as a toggleable option. So I wouldn't count on it happening anytime soon unfortunately.
I'm happy to try and help with any performance-related issues. There's always a bunch of ways to improve performance!
Ok. So did you look into the raycastcommand?
I have got a prototype working. I'll try to have it ready for the next release.
I am trying to get the fog to cover the map again. As an example, I have a player. As the player walks the fog is lifted around the player but the path gets covered up again so the only spot that there is no fog is right around the player. How do I accomplish this task? Thanks
NM. I figured out how to do exactly what I wanted by using the clear fog button on the camera and setting the layer to the correct layer.
I am using the clear fog option. I have a clear fog mask layer picked. It works good but the fog is grey instead of the color I chose. I looked through the code but didn't see where it changed the color. How do I change this to use my color instead of the grey. Thanks.
Are you saying that the fog is visibly gray, or that the fog values are gray (128)?
The fog in the scene is gray.
The fog color is black (which is what I want)
If I turn off the clear fog check box I get the black color I want
I don't understand why I can't use the clear fog for the layer I want but still have it be black
Ah I see what you mean. I think what you actually want to do is reset all the fog. You can do it in code with something like this:
That should completely reset the fog to be fully fogged.
I don't want it to be fully fogged. I want the clear fog to happen on the layer I have selected (which it is doing correctly) it is just gray. I just want the color to be black. That is it. Change the gray fog to black fog.
Sorry, I don't think I understand. So you are saying:
You have the fog set to black with clear fog turned off
You then turn clear fog on, then the fog appears gray
Is this right?
Correct. I can make a video of it happening if that would help.
I've been fiddling around with the clear fog stuff and I've found a bunch of bugs. I suspect that you've come across one of them. If you send me an email then I can give you the latest unitypackage with the fixes.
1 - Is your Fow Authoritative ?
I am making a moba game, i need a server side Fow
2 - Can you make a webGL version to check ?
I'm not sure what you are looking for specifically. Fog of War does not do any networking, so you might need to handle this yourself. If there is any part of this I can help with, let me know.
I am working on a webGL demo. It will be out soon (hopefully).
usually the games that use fow are networked games, in a competitive game, often you need to make things happen on the server side only, so:
- your FowManager
FowManager calculate each frame if the player1 is in fow for player2 and reverse.
when the player1 is not in the fow - FowManager sends informations to player2 that he can see it.
Because, if fow is calculated on local, the player2 can hack the Fow and see the player1 locally.
What information would you want the server to be sending to the clients? Would it be:
The whole fog texture?
Where a unit is at a particular time?
What units can see each other?
For most of these, there is a way to do it with FoW's current system. But maybe you want something else?
every X seconds server would send:
A unit is visible - react in local accordingly
B unity is notVisible - react in local accordingly
Client should never know from itself if the unit is visible or not.
does your system handle teams ?
Yes, this is possible to do. There is a FogOfWarTeam component which doesn't require any visuals to display for the server. You can then do something like this:
Vector3 unitPos = transfrom.position;
byte fogValue = FoW.FogOfWarTeam.GetTeam(0).GetFogValue(unitPos);
bool isVisible = fogValue > 128;
You can then send the isVisible over the network.