I've done some tests and you would have to wait until a version of PlayMaker that has a better performance at loops is released. Otherwise it would be very slow. Then you could do it rather easily for the minimap, but the actual viewport would be a slightly more complex setup. You could add a plane on top of your level (but visible to the camera) that stretches across all your terrain. Then you could turn that transparrent by using a transparrent shader. Then you'd need to floodfill the texture of that material with a color that would stand for the fog of war (You can't use a grey texture from the start because Unity won't reset the texture). You can floodfill it by using an FSM like this :
STATE1
Set Pixel color (indexX, indexY)
int add (indexX + 1)
int compare (indexY>textureSizeX) if false go to STATE1, if true, continue the state
int add (indexY + 1)
set int (indexX = 0)
int compare (indexY>textureSizeY) if false go to STATE1, if true then you've succesfully set all the pixels in the texture
If you set indexX/indexY to 0 and the texture sizes to something fitting then this should floodfill it.
Now, as for setting parts of the texture to "clear":
Start of by getting the position of the unity in textureSpace in our new texture (
http://hutonggames.com/playmakerforum/index.php?topic=2806.msg12694#msg12694)
Then we need to write an fsm which sets the color of the pixels around it to transparrent. This is slightly trickier. First we need a radius for our actor/unit. I'll call it... radius ^^
STATE1
Int Operator (maxX = RaycastX + radius) // first we define the outer points of a rectangle
Int Operator (maxY = RayCast Y + radius)
Int Operator (minX = RayCast X - radius)
Int Operator (minY = RayCast Y - radius)
set int (indexX = minX)
set int (indexY = minY)
STATE2
int add (indexX + 1)
int compare (indexX>maxX) if false, go to STATE3, if true, continue in this state
int add (indexY + 1)
set int (indexX = minX)
int compare (indexY>maxY) if false go to STATE3, if true then you've succesfully set all the pixels in the texture
STATE3
int compare ((indexX-RayCastX)^2 + (indexY-RayCastY)^2 < radius^2 ) if true then the pixel is within your radius, so continue in this state. If false, go to STATE2
Set Pixel color (indexX, indexY)
go to STATE2
So yeah, what we did there was we created a square with the center at our RayCast result and the length of 2 radius. Then we checked each pixel within that rectangle and had a look whether it was within the radius. If it was, we set the pixel.
If you want a fog of war that returns after some time, then I'll have to think some more