Search Unity

Animated Minimap/Fog of War effect

Discussion in 'General Graphics' started by armorhide406, Dec 24, 2020.

  1. armorhide406

    armorhide406

    Joined:
    Mar 18, 2016
    Posts:
    18
    So there are many posts in this same vein, however I don't think any one that I've encountered covers this problem exactly

    Thus far I have set up a few layers and sorting layers and a second camera other than the Main Camera.
    The second camera has two raw images on a canvas, one a large black square, the other a small white one (default) and I have it culling everything except intended layers.
    map camera culling.png
    The plan is to have a minimap not on a canvas, but physically on a model. Would that be best on a plane or just trick it to be on the canvas and remain static? Instead of drawing a constant sort of reveal, however, it's more you reveal a section, and then it goes back to fog, so really I'm planning on tweening an alpha mask on a UI layer to see a circle, then going back to just a reference grid.

    Thus far I have the second camera seeing the reference grid inside the small white square, but it doesn't seem to want to see the symbolic map on a plane physically below the reference grid plane.
    visibleGrid.PNG
    How would you go about making it so that 1) the second camera renders to a non-UI element, 2) have one thing be rendered all the time essentially, 3) a similar object physically below it be rendered some of the time?
     
  2. armorhide406

    armorhide406

    Joined:
    Mar 18, 2016
    Posts:
    18
    So I've gotten the second camera to draw both planes, by setting their rendering mode to transparent, the trick now is that the black and white raw images clip through and essentially you can't see them and they don't do any alpha masking.