[script] map2shape ,a toolkit to create planets ,3D panoramas

hi,
i want to share my map2shape toolkit. If you want to extend or make an addon of it, feel free.

Suppose you have a map(texture) and you know the projection of it(mercator, hammer_aitoff, spherical ). Now you want to project it onto a 3Dshape( sphere,cylinder or plain). In this case the script will do the job.

Before you can start, you need some maps (textures).
google for hammer aitoff cosmos, mercator earth, spherical map, and you will find some maps, or see the next post.

To use the script, proceed in 4 steps.

  1. The script will generate a bmesh corresponding to the projection of the map.
  2. The user can now, simply (operations scale, grab) map the texture onto the bmesh in the UV-Editor.
  3. At the end, the script will transform the bmesh with the texture to a 3D-object of your choice.
    (You can repeat step 3. on the same bmesh created under step 1. for diffrent shapes . :slight_smile: )
  4. Do some minor adjustments on the UV-map and the 3D-bmesh.

The procedure in detail:
##1. select the type of projection of your texture by editing the script and create the projection bmash.

comment out/in the needed projection parameters.

Set the if-statments so that only the first part of the script will be executed.

run the script the first time.

2. create an uv-map (by user)

“Blender Render”

switch 3DView to textured

load the texture in UV-Editor

select bmesh

rotate 3DView to “from Top” (Numpad(7))

switch 3DView to “Edit Mode” (TAB)

select all vertices (a)

uv-Unwrap “Projection from View Bounds” (u b)

map UVmap onto the texture manualy in the UV-Editor, if necessary

switch 3DView to “Object Mode” (TAB)

make sure that bmesh is selected

3. transform the 2D projection bmash to an 3D shape bmash

comment out/in the needed shape parameters.

Set the if-statments so that only the second part of the script will be executed.

run the script a second time.

  1. perform operations on the UVmap(UV-Editor) and the bmesh (3DView)

turn texture inside out:

-center Cursor UVmap (Ctrl+s u)

-Pointinversion UVmap (s x -1 Enter)

-Scale shape in 3DView (s 50 Enter

-Normals Flip Direction in 3DView



For those who want to know the math behind it.
http://local.wasp.uwa.edu.au/~pbourke/geometry/spherical/

Posts containing new versions of this project:
-v001 deleted from the thread
-v002 use blender 26.3 263_map2shape_v002.zip (82.8 KB)

cyperus :slight_smile:

hammer_aitoffprojection map
hammer_aitoffprojection map
mercator_projection map

To test the script some low resolution pics.

Attachments




hi,
here is an update of the current script. I added some projections (stereographic)
and shapes (Möbius, linear conformal map, exponential conformal map, stereographic map).

Attachments

263_map2shape_v003.blend (1.39 MB)


can you make it as an addon, so we can install it, please?Thanks!