Line of sight against terrain
-
Hi,
Some background info:
I need to calculate line of sight (LOS) against the terrain for one (ideally several) point of interest, using a GPU based heightmap 3D terrain. Ideally I want to be able to use this solution for newer smartphones as well, and so speed is probably going to be an issue. Note that the mobile versions would probably only draw the terrain in 2D, though it would still have access to the heightmap data. The points of interest would be positioned slightly above the terrain.It's surprisingly hard to find more information on the topic while googling / looking at whitepapers, and so I wonder what my options are, given the constraints? I'm not looking for very detailed answers, but perhaps something that could push me in the right direction for something I can read further up on my own?
Here's a few things I've considered so far:
- Using shadowmapping - I think this method would be a bit too slow and memory hungry for mobiles, even modern ones?
- Raycasting - Assumed to be slow, and would probably scale badly without some clever optimizations, but I would perhaps start out with this one so that I can at least get some measurements.