|
|
Over at http://www.plattenhof.com/ehtml/index.html, if you go to virtual
tour you can get a whole pile of 360 degree photos, taken for use in
quicktime VR presentations.
It struck me that it should be possible to image_map these onto the
inside of a sphere in POVRay and be able to view them just like in QTVR.
The following is my quick-scene test. It doesn't work and produces
horribly distorted pictures. I'm sure I'm missing something simple!
Learned ones, am I just crazy thinking I should be able to do this?
I'm convinced the pictures are 360 degrees left-to-right, but I don't
think they're complete top-to-bottom, so I probably need to adjust my
scale a bit to compensate.
Any help greatly appreciated.
Cheers!
Rick Measham
P.S. If you don't want to go to the site and click about to get to the
pictures, the one in my scene is at
http://www.plattenhof.com/pict/360_lobby.jpg
camera {
location <0.0, 0.0, 0.0>
direction 1.5*z
right x*image_width/image_height
look_at <50.0, 0.0, 00.0>
}
sphere {
0, 50
pigment {
image_map {jpeg "360_lobby.jpg"}
scale 100
translate -50
}
finish { ambient 0.9 }
}
Post a reply to this message
|
|
|
|
Wasn't it Rick Measham who wrote:
>Over at http://www.plattenhof.com/ehtml/index.html, if you go to virtual
>tour you can get a whole pile of 360 degree photos, taken for use in
>quicktime VR presentations.
>
>It struck me that it should be possible to image_map these onto the
>inside of a sphere in POVRay and be able to view them just like in QTVR.
>
>The following is my quick-scene test. It doesn't work and produces
>horribly distorted pictures. I'm sure I'm missing something simple!
>
>Learned ones, am I just crazy thinking I should be able to do this?
>
>I'm convinced the pictures are 360 degrees left-to-right, but I don't
>think they're complete top-to-bottom, so I probably need to adjust my
>scale a bit to compensate.
One way to do the compensation is to modify the image. Add about 56
pixels to the top edge and about 46 to the bottom edge, giving an image
that's 1000x500. Obviously you're not going to be able to fill those
strips with the correct textures, so you're going to get circles on your
floor and ceiling without the proper texture, but it makes the geometry
of everything else work out correctly.
Then do something like:
camera {
location <0, 0,0>
look_at <0,0,50>
angle 100
//rotate -90*x
}
sphere {
0, 50
pigment {
image_map {jpeg "360_lobby2.jpg"
map_type 1
interpolate 2
}
scale <-1,1,1>
}
finish { ambient 0.9 }
}
Apply camera rotation -90*x or +90*x to see the blank circles on floor
and ceiling.
"map_type 1" is spherical image mapping. It would automatically perform
the scaling you suggested if you use the 1000*398 image, but then the
geometry gets a bit distorted.
"interpolate 2" improves the result at points that map between pixels of
the original image.
"scale <-1,1,1>" flips it the right way round for being viewed from
inside the sphere.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|