It is currently Sat Sep 26, 2026 7:50 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: sphere to plane or reversing map to sphere
PostPosted: Tue Sep 15, 2015 9:56 am  (#1) 
Offline
GimpChat Member

Joined: Sep 15, 2015
Posts: 5
GIMP Version: 2.8.14
Operating System: Windows
OS Version: 7
GIMP Experience: Basic Level



Hello everyone! This is my first topic on this forum and I am looking for some help, if possible. I am trying to modify an animated spherical gif from donjon's rpg tool, fractal world generator. I opened the gif in gimp and copied the first frame I will be modifying to a new image. I am basing my modifications on another image of a planet that has a giant gash running down it. Now I have figured out how to map to a sphere through the map to object filter but I cannot for the life of me figure out how to reverse the process. I have tried several times to just draw out the gash on a mercator projection of this same map from donjon's fractal world generator and then apply it to the frame and go from there. My goal is to map the modification onto the mercator map (modify it for my purposes) and then rotate the gash as i map it onto the matching spherical frames. I am aware that gimp treats everything as a 2d image but it obviously has a way to mimic 3d images. Why isn't there a way to reverse the distortions it uses to do that to make it a plane again?

TLDR: map a spherical image onto a flat plane (distortions and loss of detail is expected).

Thanks for any suggestions!


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: sphere to plane or reversing map to sphere
PostPosted: Tue Sep 15, 2015 10:30 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
maybe G'MIC is able to do that
who knows whether some G'MIC guru is fascinated by your proposal...

_________________
"Where am I ?"


Top
 Post subject: Re: sphere to plane or reversing map to sphere
PostPosted: Tue Sep 15, 2015 12:41 pm  (#3) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4555
Location: Canada
if i understand what you're trying to do .. i don't think it's possible.
as when you map a flat surface onto a sphere, you know that the flat surface is flat and it's on all the same depth (Z-coordinate). But once this is mapped onto a sphere, and then shown as a 2D image, all the the z-coordinate information is lost and is now just a 2D image.
In order to reverse map, you'd have to know the depth (z-coord) of that point.
I could be wrong though.

_________________
Image
Visualize your and others dreams coming true.


Top
 Post subject: Re: sphere to plane or reversing map to sphere
PostPosted: Tue Sep 15, 2015 12:43 pm  (#4) 
Offline
GimpChat Member

Joined: Sep 15, 2015
Posts: 5
trandoductin wrote:
if i understand what you're trying to do .. i don't think it's possible.
as when you map a flat surface onto a sphere, you know that the flat surface is flat and it's on all the same depth (Z-coordinate). But once this is mapped onto a sphere, and then shown as a 2D image, all the the z-coordinate information is lost and is now just a 2D image.
In order to reverse map, you'd have to know the depth (z-coord) of that point.
I could be wrong though.


true but you could assume the z coordinates based on a default setting of z coordinates

you could also assume the z coordinates based on the diameter of the sphere


Top
 Post subject: Re: sphere to plane or reversing map to sphere
PostPosted: Tue Sep 15, 2015 12:46 pm  (#5) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4555
Location: Canada
you'd have to know what how it was originally mapped like size and depth of sphere and stuff. otherwise a single point could belong to infinite possible sphere.

_________________
Image
Visualize your and others dreams coming true.


Top
 Post subject: Re: sphere to plane or reversing map to sphere
PostPosted: Tue Sep 15, 2015 1:27 pm  (#6) 
Offline
GimpChat Member

Joined: Sep 15, 2015
Posts: 5
trandoductin wrote:
you'd have to know what how it was originally mapped like size and depth of sphere and stuff. otherwise a single point could belong to infinite possible sphere.


well assuming you know that info how would you do it is my question. for mine the size of the sphere is 2000 px diameter 0x 0y 0z angle and 1000 px deep.


Top
 Post subject: Re: sphere to plane or reversing map to sphere
PostPosted: Tue Sep 15, 2015 1:35 pm  (#7) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4555
Location: Canada
if you know the math of how to map from plane to sphere, you should be able to algebraically do the reverse.
I just don't know the math of mapping from plane to sphere.
you might have to cheat by looking at how gimp maps to sphere code, i don't know where that code is though.

you could try hunting for it starting here: https://git.gnome.org/browse/gimp/tree/plug-ins/map-object/map-object-main.c?h=gimp-2-8#n47

_________________
Image
Visualize your and others dreams coming true.


Top
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


cron

* Login  



Powered by phpBB3 © phpBB Group