POV-Ray : Newsgroups : povray.general : "Wrapping" an image around a sphere : Re: "Wrapping" an image around a sphere Server Time
1 Aug 2024 12:25:55 EDT (-0400)
  Re: "Wrapping" an image around a sphere  
From: Mike Williams
Date: 27 Oct 2005 01:48:31
Message: <pxu5zCAnoGYDFwRx@econym.demon.co.uk>
Wasn't it Tail Kinker who wrote:
>I'd like to take a map of a planet and wrap it around a sphere.  I thought
>that perhaps the image_map texture was the way to go, but nope - it
>doesn't work the way I thought.  (Shoulda read the manual...it works
>*exactly* as advertised.)
>
>Any ideas on how to handle such a hack?  The map is in Mercator's
>projection.

Yes, it's a bit confusing that what POV calls "spherical mapping" is
what cartographers call the "cylindrical projection". If you want areas
near the poles to look right, you have to use some external tool to
convert your map from Mercator to cylindrical projection. I don't know
of any tricks within POV itself that can perform the change of
projection for you.

All the methods of wrapping an image map round a sphere use the same
"cylindrical projection" method:

sphere {0,1
  texture {pigment {image_map{ png "world.png" map_type 1} } }
}

sphere {0,1
  texture {uv_mapping pigment {image_map{ png "world.png"} } }
}

sphere {0,1
  texture {pigment {image_map{ png "world.png"} warp {spherical}} }
}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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