jariq / KUK360

Simple 360 photo viewer for Windows
Other
5 stars 0 forks source link

New algorithm for 360° projection #10

Open jariq opened 9 months ago

jariq commented 9 months ago

Current implementation of SphereViewer inspired by PanoDotNet project maps the image onto a geometric mesh approximation of a sphere:

image

This approach has quite a few downsides. As described in #4, straight lines in the images can be deformed when the number of mesh fragments is too low. As described in #2, nadir and zenith is deformed when the number of mesh fragments is too low. Obviously these issues could be partially resolved by increasing the number of mesh fragments but that would decrease the performance of 360° projection at the same time 🤷🏻‍♂️

So I guess it's time to abandon the current implementation (which by the way makes it also hard to support huge panoramas in #1) and look for a better alternative.

I would like to experiment with algorithm used in pannellum which I'm using to display equirectangular images on my website and which does not seem to suffer from the issues described above.

jariq commented 9 months ago

I just published a new experimental branch 10-new-algorithm-for-360-projection which contains new 360 viewer that runs pannellum in WebView2. I expected rather a poor performance from this kind of setup but it is surprisingly fast and smooth. Regardless I'd like to try to port pannellum (javascript + WebGL) to .NET (C# + OpenGL).