I’m adding a map view to my game (by basically doing a looking-down view of the world). I want to add a fog of war, whereby the map is initially blacked-out, and is slowly uncovered as the player explores.
I was thinking of doing this by placing a plane mesh across the map, and adding data to it’s material to use as the opacity mask of where the player has been.
I can probably store data of where the player has been in a grid array, but how can I use this data in a material? I know how I would add one (or several) co-ordinates as points to draw the alpha, but how would I use a grid of many hundreds of them?
Or does anyone else have a better suggestion on how to go about this?
Edit: I guess what I’m after is similar to how other games deal with snow footstep displacement during run time. They must be writing to a displacement texture and using that in the materia. I can’t find any info on that in UDK though.