Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / 3D Theory & Graphics / Panoramic Image viewer (Ipix, Myst etc. etc.) Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

May 10, 2005, 01:37 PM


i have to write a panoramic image viewer. The full environment is contained in a single texture (a skybox was converted into a single spherical texture using a commercial software). u can see some sample texture here :
(though i use 360 degree picture)

I tried several things using for each screen pixels some ATAN2 (one for x and one for y) but the picture on screen is still distorded, espcially when looking up and down).

Is there a nice soul around here to help and give me more informations about the algorithm i need to apply ? Basically it should be converting Screen coordinates into polar coordinates...

Thanks in advance.


May 10, 2005, 03:20 PM

A few things:

(a) The mouse dragging should control the position directly rather than the rate at which you rotate round. Currently, looking around feels a little like swimming.

(b) For the conversion, basically you want to trace a ray through each pixel and intersect it with the sphere representing the scene. This comes down to setting up a perspective projection (or other if desired) that maps image pixels to unit vectors, and then convert the unit vector to polar coordinates. The distortion, btw, comes from using too large of a field of view. However, shrinking it would let less of the image be visible at a time, so this may not be desirable.

(c) When you get to it, a little filtering would be nice. Currently some jaggies are visible.

(d) About 50% of the time when I open one of the panoramas I can't drag around, or pan using the keyboard - it just stays still no matter what I do.

This thread contains 2 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.