I'm trying to unwrap a UV Sphere and I can't seem to get a perfect Mercator projection. What process should I follow to get a perfect UV unwrap that looks like the black grid lines in this image?:
Newer versions of Blender now come with a Generate UVs checkbox (that can do as the name says and provides pretty decent maps) when adding a new mesh for most of the objects. Simply access this from the F6 menu or the toolshelf. This option is only available when generating a new object. The layout is below, still not perfect but useful nonetheless .
Add a UV Sphere to the scene and select an edge with AltRMB, next enter Face selection mode and select a face near the edge you marked. Next hit A to select the entire sphere and hit U > Follow Active Quads.
Note the grayed face near the middle of the sphere along the edge, this means that it had been selected before you selected the entire sphere and this is similar to what you should have done.
After unwrapping, you should get a huge UV map in the Image Editor. Transform it as desired, I would recommend aligning one corner of the map to a corner of the image and scaling it via the 2D Cursor.
A perfectly unwrapped sphere sans exponentially spaced UVs which aren't possible unless you tweak the map afterwards or modify the object's geometry.
You might notice a sharp seam near the top of your sphere where the texture stops. This is caused by the geometry of the sphere as the top vertices merge into a single point and the unwrap method basically ignores it.
To fix, just get an edge ring as close as you can to the middle vertex so that it won't be noticeable.
Mercator Projection Addon
Install the addon.
To use the addon, have a spherical mesh in edit mode. From Mesh > UV unwrap menu choose Mercator Project
Set the minimum and maximum latitudes of your mercator map, in the example image world map that's from -69.814 degrees (south), to 85 degrees north. The code selects all verts within this range (inclusive) and maps a UV.
The poles have an infinite mapping, and hence are not mapped.
Currently the object's origin needs to be in centre.
Will expand more later.
As you know, a full Mercator projection expands vertically to infinity, so it always has to be truncated on the latitude and different images use different truncation angles. So I made 2 scripts :
Note that some images are not even truncated at the same angle between North and South. For those you have to extend the canvas of the image so the equator is in the middle.
Here's how to do the whole thing :
Now you can do this with any image and any sphere resolution.
Have fun Mercatorizing !