I wanted to use some of these techniques in Unity. Thankfully Robert Woodley had already built a shader for WebGL (GLSL), so all I had to do was port it to ShaderLab/Cg.
The shader can be downloaded here, in case anyone fancies making some crazy visual effects with panoramic media in Unity. A zoom controller script is here, that zooms in when you press "i", out when you press "o", and sets the zoom point to where the camera is looking when you press "p".
Here's an example, showing a creative commons equirectangular image by Alexandre Duret-Lutz.
This is the original view, without any zoom applied
Zooming out in the equirectangular.
The mapping is conformal, meaning that local angles are preserved, but straight lines don't remain straight. So things look right locally, but the global effect is quite strange.
No comments:
Post a Comment