UV Sphere versus Cube for 3D Panoramic Images/Movies...

Started by
3 comments, last by tmason 9 years, 2 months ago
Hello,

Simple question; wondering what is the best option for displaying 3D panormic images and movies, a cube or a 3D sphere?

I tried the 3D sphere but so far the image is distorted at the top and the bottom.

Would a cube work better?

Thank you for your time.
Advertisement

You seem to confuse cube map and spherical mapping coordinates with actual sphere. The panorama is a 3d cube with 6 faces, that is 6 textures (or one texture just maped), that you sample with spherical coordinates. You must find a mechanism on how to translate spherical mapping coordinates into quad coordinate of apropriate texture face. But opengl can do this automaticaly for you if you create a cube texture sampler and sample in fragment shader by 3d normalized vector using texture function, what will usualy be normalized (objviewpos-objcubeinterpolatedfragmentposition) vector

that means you can sample by a direction vector, instead of a 2d vector. That creates even better result in the corners than in the edges midles, due to the density of the pixels on the corners (most further, most leaked). Maybe I dod not provide enough clear information, you can update on your issue how you are doing

The distortion is due to spherical map coordinates not mapping correctly to your panorama. You'll have to adjust the UV coords. Normally I would say go with Mercator projection but it's up to you and how your panorama was created as different software use different projections.

http://earth.rice.edu/mtpe/geo/geosphere/topics/mapprojections.html

That page has some good reading on how to do different map projections.

OK, I will try this, thank you.

This topic is closed to new replies.

Advertisement