Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,
I'm trying to achieve the following task:

Imagine having a 2:1 aspect ratio drawing canvas. I want to place rectangular images on this canvas (..x,y Cartesian coordinates) and as I move the image around further away from the canvas center (0,0) I want to get the distortion to the image as if it was sliding over the imaginary sphere's normals.

The logic I believe is to convert the (x,y) 2D Cartesian coordinates of the image to the corresponding latitude, longitude spherical coordinates, and then apply the equirectangular projection to the sphere and return the image with the corresponding distortion (as if it's uvs where unwrapped in a 3D modeling package).

There is an application doing exactly that called "HDR Light Studio" which generates equirectangular (lat/long) HDR images for 3D scene lighting purposes.
If you check out their videos you will understand exactly what kind of image distortion I'm trying to achieve.

Please give me some help over the subject if you can.
I have searched all around the net for info but no luck.

Thanks in advance


--Edit-----------------
I have found an interesting article here at CodeProject:
http://www.codeproject.com/KB/graphics/PolarView.aspx[^]

The logic is very close to what I'm trying to achieve but not exactly.
Again, if someone can take a look at "HDR Light Studio" videos from their site will understand exactly what kind of real-time image distortion I'm trying to achieve.
Posted
Updated 16-Nov-10 10:02am
v4
Comments
ely_bob 6-Dec-10 13:00pm    
Are you still looking... ?

1 solution

Well.. since I'm compiling... :laugh:

there are a couple of ways to do this... that i can think of.. the best is up to you to decide...

First you will want to make a decision about weather your looking for a fisheye effect or an actual projection, because it isn't exactly clear...

However.. I will proceede like a blind man..

If you want Fish eye... You will need to find the mapping of a curved surface to a square.. (probably easiest to do this in polar coords) there are a lot of these references available on graphics and physics websites... basically what you need to "fudge" is the granularity of the points to which you want to do interpolation...

For a sphere inside a cube, you repeat the previous approach 6 times...

the example you referenced is for a circumscribed circle over a flat surface, as opposed to an inscribed sphere being projected upon from a flat surface... or a sphere projecting onto a surface, as opposed to a
sphere unwrapped (UV style) and placed on a surface...

I hope that helps..?:confused:

If you have the Exact URL of a screen that shows what your looking for it is better to post that then say .."take a look at 'HDR Light Studio' videos from their site"...this isn't very helpfull... :doh:
 
Share this answer
 
Comments
Dan Suthar 29-Dec-11 8:55am    
can anyone else solve the same problem ? how to make an equirectangular image from set of images ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900