Results 1 to 7 of 7

Thread: Dual Paraboloid map projection conversions

  1. #1
    Professional Artist Naima's Avatar
    Join Date
    Mar 2010
    Location
    Italy
    Posts
    1,586

    Default Dual Paraboloid map projection conversions

    Hello , does anyone knows how to convert a dual paraboloid map into a equirectangular one and viceversa?
    here is a sample of a map I did in dual paraboloid projection.

    Jemison_Color copysmall.png

  2. #2
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,610

    Default

    I've only run across that projection the context of environment mapping before, and those maps are usually missing corners because of how they are defined (look a couple of pages down in http://download.nvidia.com/developer...EnvMapping.pdf for some examples).

    I therefore need to ask: how did you get it into the dual paraboloid projection? And are you sure that this really is a dual paraboloid projection? It looks more like a cubemap than anything else I could come up with. A bit of quick pasting in Photoshop shows beautiful alignment across map edges when one hemisphere is aligned and rotated with respect to the other, meaning that it's much more likely a toroid of some sort. My best guess would be that if you printed it out and folded it back on itself then the edges would perfectly line up without any distortion.

    If it indeed originated as a pair (or more) of flat maps, then you're going to get some significant distortion converting it to equirectangular. One way to make the distortions less unpleasant might be to put the poles into the corners and then go for something like an octahedral environment map. Depending on how much distortion you can tolerate, the Peirce Quincuncial projection might work for preserving conformality, but would require a 45 degree rotation of your image after slicing and rearrangement as well as suffering significant distortions in area for some locations. However, it turns out that your image has convenient oceans in the singularity points (this one was tiled, rotated, and very sloppily cropped after eyeballing the center):
    Jemison_Color copysmall_b.jpg
    Assuming that the original map is really a piecewise-linear set of things, you can split that map into the 16 triangles on the above image and map those to a sphere using a 3D modeling tool like Blender (should be just as easy from the original as from the rotated one I used). I'll try to remember to write a quick-and-dirty mapper, but I don't know when I'll get around to it.
    Last edited by waldronate; 09-20-2023 at 12:42 PM.

  3. #3
    Professional Artist Naima's Avatar
    Join Date
    Mar 2010
    Location
    Italy
    Posts
    1,586

    Default

    Quote Originally Posted by waldronate View Post
    I've only run across that projection the context of environment mapping before, and those maps are usually missing corners because of how they are defined (look a couple of pages down in http://download.nvidia.com/developer...EnvMapping.pdf for some examples).

    I therefore need to ask: how did you get it into the dual paraboloid projection? And are you sure that this really is a dual paraboloid projection? It looks more like a cubemap than anything else I could come up with. A bit of quick pasting in Photoshop shows beautiful alignment across map edges when one hemisphere is aligned and rotated with respect to the other, meaning that it's much more likely a toroid of some sort. My best guess would be that if you printed it out and folded it back on itself then the edges would perfectly line up without any distortion.

    If it indeed originated as a pair (or more) of flat maps, then you're going to get some significant distortion converting it to equirectangular. One way to make the distortions less unpleasant might be to put the poles into the corners and then go for something like an octahedral environment map. Depending on how much distortion you can tolerate, the Peirce Quincuncial projection might work for preserving conformality, but would require a 45 degree rotation of your image after slicing and rearrangement as well as suffering significant distortions in area for some locations. However, it turns out that your image has convenient oceans in the singularity points (this one was tiled, rotated, and very sloppily cropped after eyeballing the center):
    Jemison_Color copysmall_b.jpg
    Assuming that the original map is really a piecewise-linear set of things, you can split that map into the 16 triangles on the above image and map those to a sphere using a 3D modeling tool like Blender (should be just as easy from the original as from the rotated one I used). I'll try to remember to write a quick-and-dirty mapper, but I don't know when I'll get around to it.
    I made the map in imitation of another one from game starfield, the maps are realized directly in houdini , but in similarity process I did this map in Photoshop I did simply a equirectangular map shifted on poles, then I cutted the left half flipped vertically and horizontally and pasted at bottom , fixed the seams, on all directions and that's it , it works fine on the spheres etc, al looks good in the sphere texturing due to the fact that mostly its centered on poles so less distortion but I asked the kind of projection used in a game artist forum and I was told it was a dual paraboloid projection done from a sphereto cube.

  4. #4
    Professional Artist Naima's Avatar
    Join Date
    Mar 2010
    Location
    Italy
    Posts
    1,586

    Default

    Quote Originally Posted by waldronate View Post
    I've only run across that projection the context of environment mapping before, and those maps are usually missing corners because of how they are defined (look a couple of pages down in http://download.nvidia.com/developer...EnvMapping.pdf for some examples).

    I therefore need to ask: how did you get it into the dual paraboloid projection? And are you sure that this really is a dual paraboloid projection? It looks more like a cubemap than anything else I could come up with. A bit of quick pasting in Photoshop shows beautiful alignment across map edges when one hemisphere is aligned and rotated with respect to the other, meaning that it's much more likely a toroid of some sort. My best guess would be that if you printed it out and folded it back on itself then the edges would perfectly line up without any distortion.

    If it indeed originated as a pair (or more) of flat maps, then you're going to get some significant distortion converting it to equirectangular. One way to make the distortions less unpleasant might be to put the poles into the corners and then go for something like an octahedral environment map. Depending on how much distortion you can tolerate, the Peirce Quincuncial projection might work for preserving conformality, but would require a 45 degree rotation of your image after slicing and rearrangement as well as suffering significant distortions in area for some locations. However, it turns out that your image has convenient oceans in the singularity points (this one was tiled, rotated, and very sloppily cropped after eyeballing the center):
    Jemison_Color copysmall_b.jpg
    Assuming that the original map is really a piecewise-linear set of things, you can split that map into the 16 triangles on the above image and map those to a sphere using a 3D modeling tool like Blender (should be just as easy from the original as from the rotated one I used). I'll try to remember to write a quick-and-dirty mapper, but I don't know when I'll get around to it.
    Btw a system that allows shifting the map to poles could help a lot to fix distortions , that can after fixing revert it back , so far to do this I use hugin but it has a quite ankward and not really straightfoward procedure .

  5. #5
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,610

    Default

    So far, I'm about at the point of describing the trivial version of the problem I mentioned above. I doubt that I'll have any extra development time to get back to this until at least next year, however. Here's the comment block from a snippet of code I managed to get to:
    Code:
    // piecewise octahedral to equirectangular projection.
    // question posed by Naima on Cartographers Guild at
    // https://www.cartographersguild.com/showthread.php?t=51893 on 2023-09-20
    
    // original input has a vertically-oriented 1:2 image (1024wx2048h) and that's
    // how the solution was formulated. Probably would have been a little easier
    // to require a horizontal format on the input, but it's not that bad.
    
    
    /*
    
            |<------- W1  ------->|
            |                     |
       ---- +----------C----------+            
        ^   |\                   /|            
        |   |  \               /  |            
        |   |    \     2     /    |            
        |   |      \       /      |            
        |   |        \   /        |            |<--------------------- N --------------------->|
        |   D    3     N     1    B            +-----------+-----------+-----------+-----------+
        |   |        /   \        |            |           |           |           |           |
        |   |      /       \      |            |           |           |           |           |
        |   |    /     0     \    |            |     0     |     1     |     2     |     3     |
        |   |  /               \  |            |           |           |           |           |
            |/                   \|            |           |           |           |           |
        H1  +----------A----------+            +-----A-----+-----B-----+-----C-----+-----D-----+
            |\                   /|            |           |           |           |           |
        |   |  \               /  |            |           |           |           |           |
        |   |    \     4     /    |            |     4     |     5     |     6     |     7     |
        |   |      \       /      |            |           |           |           |           |
        |   |        \   /        |            |           |           |           |           |
        |   D    7     S     5    B            +-----------+-----------+-----------+-----------+
        |   |        /   \        |            |<--------------------- S --------------------->|
        |   |      /       \      |            
        |   |    /     6     \    |            
        |   |  /               \  |            
        v   |/                   \|            
       ---- +----------C----------+            
    
    The idea is to take triangles on the left and warp them to squares on the right.
    The points marked N and S are the north and south poles, respectively.
    Line segments ABCD are the equator.
    Segments B and D are measured in opposite directions (away from A)
    
    block       source points          dest points
                w1, h1                 w2, h2
                  
    0           0.00, 0.50             
                1.00, 0.50             
                0.50, 0.25             
    */
    I didn't quite manage to finish up the mapper points before I got pulled away, but it should be fairly simple to implement if I get an otherwise unoccupied half day or so. It doesn't require a generalized texture mapper because everything is nicely axis aligned, but it might be easier to do that way if using a tool that has that feature implemented (which Wilbur does not).

  6. #6
    Professional Artist Naima's Avatar
    Join Date
    Mar 2010
    Location
    Italy
    Posts
    1,586

    Default

    Thing is though my method doesnt consider stretching and pole deformations unless I work them otherwise.

  7. #7
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,610

    Default

    There will have to be some distortion when going from any spherical mapping to planar. Equirectangular is the simplest conversion, but poles are always represented as line segments, giving infinite distortion at the poles (distortion is 1/cos(lat) where cos(lat) for lat = +/- 90 is zero.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •