[OSM-dev] Hikar (augmented reality) points from SOTM
Nick Whitelegg
Nick.Whitelegg at solent.ac.uk
Sun Sep 15 15:18:37 UTC 2013
Hi,
As some of you who attended SOTM may know, I'm working on "hikar", an augmented reality app for walkers which aims to overlay OSM ways on a phone's camera feed.
There were one or two points made by people at the conference (by Robert - that's why I'm emailing you direct - and others) which it would be good to get opinions on from OpenGL or other 3D graphics experts.
One of the issues which the app has to deal with is hiding ways which are behind hills. The way I do this currently is a standard line-of-sight technique: for each point in each way within a certain distance of the user's location, I use the Bresenham algorithm to calculate which DEM grid squares lie on a line between the user's current location and the point in the way. I then compare the expected height (assuming a smooth slope) with the actual height at each DEM grid square and if the actual height is higher, the point is assumed not to be visible. At the moment there is a naive implementation where the way is visible if at least one point within it is visible, or invisible if *no* points within it are visible.
However there were other suggestions made at SOTM such as the use of z-buffering. However given I don't actually triangulate, or draw, the DEM surface at the moment, would this actually be more efficient? Presumably I'd have to either draw the DEM surface as a transparent surface and let OpenGL do the calculations (as it normally would when doing depth testing) or keep a record of the triangles myself and do the z-buffering, or other technique (e.g. ray tracing to find intersecting triangles) myself? Given that, would these alternative techniques actually be more efficient than what I'm currently doing?
Thanks,
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20130915/cf75309d/attachment.html>
More information about the dev
mailing list