Results 1 to 10 of 23

Thread: Rotating equirectangular maps (G'mic script, GIMP and Krita) + Sinusoidal projection

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Guild Adept Naeddyr's Avatar
    Join Date
    Jun 2008
    Location
    Finland
    Posts
    300

    Default

    I actually did it!

    Turns out that if you create the kind of combined rotation matrix I used in the script, if you do the multiplications of the individual rotation matrices in "the wrong" order you get different results that do the rotations in different orders. So if you multiply Yaw and Pitch and then Roll you get the "reversion" matrix to the one I used in the script, and I was able to pretty easily plug it in... Except it took me half an hour figuring out the exact if-statement syntax in the script, before noticing I should have been trying to figure out the other kind of if-statement syntax, half an hour more figuring out the other kind of if-syntax again and after debugging by putting minus signs in front of every single alpha, beta and gamma in the else-branch formulas, bob's your uncle!

    I left a gui toggle in the Rotate Equirectangular Map script only, because the other scripts don't really need this functionality that much. With the same values (do not turn the angles negative) just click on Revert and you should get the same rotations as before the first transformation. Of course the distortions on the edges are really bad, but that's life.

    https://pastebin.com/NKN9VEE4
    Last edited by Naeddyr; 01-13-2021 at 03:16 AM.

  2. #2

    Default

    Quote Originally Posted by Naeddyr View Post
    I actually did it!

    Turns out that if you create the kind of combined rotation matrix I used in the script, if you do the multiplications of the individual rotation matrices in "the wrong" order you get different results that do the rotations in different orders. So if you multiply Yaw and Pitch and then Roll you get the "reversion" matrix to the one I used in the script, and I was able to pretty easily plug it in... Except it took me half an hour figuring out the exact if-statement syntax in the script, before noticing I should have been trying to figure out the other kind of if-statement syntax, half an hour more figuring out the other kind of if-syntax again and after debugging by putting minus signs in front of every single alpha, beta and gamma in the else-branch formulas, bob's your uncle!

    I left a gui toggle in the Rotate Equirectangular Map script only, because the other scripts don't really need this functionality that much. With the same values (do not turn the angles negative) just click on Revert and you should get the same rotations as before the first transformation. Of course the distortions on the edges are really bad, but that's life.

    https://pastebin.com/NKN9VEE4
    Thanks man, you're a hero!

Tags for this Thread

Posting Permissions

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