Digital humans the art of the digital double
Ever wanted to know how digital doubles are created in the movie industry? This course will give you an insight into how it's done.
# 1 13-11-2012 , 12:42 PM
Registered User
Join Date: Jan 2003
Location: Germany / Hannover
Posts: 2

Problems with spherical Mapping a Polysphere

Hello everyone,

im trying to map a Planettexture to a sphere. Everything works well with the standard mapping. My problem is, that i want Mecca to be on one of the poles.


I tried fiddling and rotating the UV's but I get strong distortions on my texture. Any ideas if this can be achieved some way?

Attached Thumbnails
# 2 15-11-2012 , 08:35 PM
PixalZA's Avatar
Lifetime Member
Join Date: May 2011
Location: Riyadh, Saudi Arabia
Posts: 525
One can play around with the rotation of the spherical projection when creating the UVs but you will get distortion at the poles. The problem is the texture that you are using. The textures is for a spherical projection where the north and south poles are at the top and bottom. The texture compensates for the projection distortion.

You will need to create your own texture where Mecca is at the top.
I created the image below by doing the following:

1. Create a sphere and place it at the origin.
2. Flip the normals on the sphere.
3. Assign a lambert with color set to white to the sphere.
3. Create a point light at the origin.
4. Mapped the existing texture to the color channel of the point light.
5. Rotate the point light until the projected image is where you want it. I did this by trial and error with my render camera inside the sphere facing one of the poles. I'm sure there is some mathematical calculation that one can use. Maybe our resident surveyor can help user added image
6. Bake out the color and light to a texture. Use a 2:1 ratio e.g. 1024x512.

You can use the created texture in a standard spherical projection.

Earthmap courtesy of visibleearth.nasa.gov.

Attached Thumbnails

Earth: The crazy asylum of the universe.
# 3 16-11-2012 , 06:36 AM
ctbram's Avatar
Moderator
Join Date: Jan 2004
Location: Michigan, USA
Posts: 2,998
Given the latitude and longitude of Mecca

Mecca, Saudi Arabia Lat: 21 29 N Long: 39 45E

1. rewrite the lat and long such that north lat is + and south lat is - and East long is - and West long is + or...

Mecca, Saudi Arabia Lat: +21.29 Long: -39.45

2. To place Mecca at the pole

rotate about the y-axis (Long) to place Mecca on the Prime meridian then

then if the lat is positive rotate about the z-axis (90-Lat)

else if the lat is negative rotate about the z-axis (90+(-Lat))

So the rotations for Mecca would be

rotate about the y-axis -39 45/60 == -39.75 degrees then freeze rotational transforms and

rotate about the z-axis 89 60/60 - 21 29/60 == 68 31/60 == 68.52 degrees

Since you are working from a projection from a point at the center of the sphere my signs might not be correct but the basic idea is first rotate the earth about the pole so that Mecca lies on the Prime meridian (-39.75 degrees) and then rotate the earth along the Prime meridian until Mecca is at the Pole (68.52 degrees).

-Rick


"If I have seen further it is by standing on the shoulders of giants." Sir Isaac Newton, 1675

Last edited by ctbram; 16-11-2012 at 06:48 AM.
# 4 16-11-2012 , 11:31 AM
PixalZA's Avatar
Lifetime Member
Join Date: May 2011
Location: Riyadh, Saudi Arabia
Posts: 525
Thanks Rick. It works but not as a rotation of the light but as a rotation of the sphere that the image is projected upon. RotX = 68.52 and RotY = 39.75.


Earth: The crazy asylum of the universe.
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads