FrontierNav's core feature is its interactive maps. That's where it all started and what everyone uses it for. However, top-down 2D maps don't provide a sense of scale, nor verticality. In my previous FrontierNav Update, I added a Panorama Viewer. FrontierNav's solution to that problem.
The actual programming side of this was pretty simple and I'll go into that in a later post. This post will focus on the harder part: actually generating panoramic images. It took me hours of trial and error to figure it out and it's still not perfect. But, it's good enough.
360° Panoramas take a 2D image and map it to the inside of a 3D shape. A camera is then placed in the middle of it for you to control and look around.
So, how do you create a 2D image of a 3D view? You use a projection. The same sort of idea behind world maps: take a 3D object (Earth) and map it to a 2D image (a map).
Some modern games actually let you do this natively. Since they have full access to the 3D scene, they can project the whole thing onto a single image. However, most games don't support this. So we can only take individual screenshots, kind of like how real-world cameras work. And like real-world photos, we can stitch each image together to make a full projection.