POV-Ray : Newsgroups : povray.general : Wrapping a 360 photo around the inside of a sphere Server Time
29 Nov 2024 21:33:52 EST (-0500)
  Wrapping a 360 photo around the inside of a sphere (Message 1 to 4 of 4)  
From: Rick Measham
Subject: Wrapping a 360 photo around the inside of a sphere
Date: 7 May 2005 06:17:08
Message: <427c95a4$1@news.povray.org>
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

From: Warp
Subject: Re: Wrapping a 360 photo around the inside of a sphere
Date: 7 May 2005 06:23:53
Message: <427c9738@news.povray.org>
map_type 1

-- 
                                                          - Warp


Post a reply to this message

From: Loki
Subject: Re: Wrapping a 360 photo around the inside of a sphere
Date: 7 May 2005 08:10:00
Message: <web.427cafe4f1da041a3c2dad70@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> map_type 1
>
> --
>                                                           - Warp

I've posted a quick pic in the images section using map_type 1 and a
metallic superellipsoid, just to demo this.  Looks OK to me.

L
-


Post a reply to this message

From: Mike Williams
Subject: Re: Wrapping a 360 photo around the inside of a sphere
Date: 7 May 2005 08:37:47
Message: <b8DlgBAPaLfCFw63@econym.demon.co.uk>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.