How to determine what points on terrain can be seen from a certain point?

Hi guys thanks in advance for any help you can provide. I have a scene with an uneven, sloped terrain. I want to place an object/firstperson at the bottom on the slope and be able to get a visual representation of the areas of terrain that are visible from this point, Maybe highlight these areas in one color and hidden area due to slope in another. Any Ideas?


That’s exactly what a shadowmap does. Set the “sun” at the player’s eyes and create the shadowmap based on that. But, have never used one in Unity. In theory, you can change “in shadow = draw darker” to “not in shadow = blue tint.”

If the ground is divided into squares, say. Could raycast from the player to every square. If you don’t move a lot (like a turn-based game,) then doing that for a few hundred squares shouldn’t be a problem.