It is currently Wed Apr 24, 2024 5:43 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 45 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 18, 2012 11:08 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
This is not really a tutorial. Just a trick to make it the right way.

Mapping objects to sphere in Filters>Map>Map Object yields rather horrible results as the image you are
mapping appears to be stretched along parallels of the sphere.
How to diminish the distortion and get more or less right proportions?
To get my point clearer I'm attaching these 2 images, one with strong distortion and the other with more or less correct proportions.
Image Image

(The original image from DA)
Image

Both images were created in Map Object with identical settings from the same size image with face
The only difference is how you 'prepare' the image to be mapped.

I've found empirically that objects to be mapped should be 'squeezed' from sides by the factor of 1.5 (may not work for any object
but in most cases it does)
How we do it?
Let's say, you want a sphere with mapped object to be around 700 x 700 pixels in size.
Bear in mind that mapping objects to sphere will produce a sphere which is half the size of your original image.
Therefore, our image should be about 1400 x 1400 pixels before mapping.

I used Hexacol BW pattern for better visualization. Here are the results.
The image on the right was made from 1440 x 1440 square without prior 'treatment'
ImageImage
To get the left image I created an image with 1440 px Height and 1440*1.5 Width. We get 2160 x 1440 pixel image
(yes, unlike 2.6 in GIMP 2.8 you can enter common mathematical operations [+ * / -] for height and width) and then filled it
with Hexacol BW pattern.
Image

Scale the image to the desired 1440 x 1440 square as shown at the picture below.
Don't forget to unchain before you enter the width and use Lanczos interpolation
Image

Our pattern becomes 'sqeezed' from the sides.
Here's our face after such a treatment
Image
Now you can map it to sphere to get less distorted results.

Thanks for reading.

P.S. Bonus animation for those who had enough patience to read the whole post

Image


Last edited by K1TesseraEna on Wed Dec 26, 2012 12:14 pm, edited 1 time in total.

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: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 18, 2012 11:39 am  (#2) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Very nice tutorial. It really does make a nice difference. Is it my imagination or did someone take it upon themselves to improve the map object filter? It doesn't seem as cranky as it did in v2.6.
Using the math in the image sizing made me feel geeky. :mrgreen: Who'd have thought Wilber would bring along a calculator to v2.8? :gimp

I love your animation. Really nice work, k1te! :hi5

I made a couple small spheres to show the difference.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 18, 2012 11:57 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
Thank you, O!
Glad you like it.


Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 18, 2012 12:17 pm  (#4) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
Nice K1TesseraEna, clear and easy to understand.
I was just reading something about your technique the other day, can't for the life of me remember where. My memory is good, I just have a hard time finding it sometimes :puzzled

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 18, 2012 12:25 pm  (#5) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Very nice info K1TesseraEna...@Odin lol, me too.

_________________
Image


Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 18, 2012 12:31 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2770
cool info K1te !

he4rty teached me for mapping text to a sphere so you get a slight blow-up effect, to shrink the width by 50% before mapping
i made a "thank you card" with this technique
Attachment:
Danke Martin.png
Danke Martin.png [ 818.33 KiB | Viewed 14587 times ]


EDIT: the text says: "WHOA THANK YOU !" in big letters and the rounded text says: "Martin, you are a treasure"
(in german)


Last edited by Esper on Tue Dec 18, 2012 12:45 pm, edited 3 times in total.

Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 18, 2012 12:35 pm  (#7) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Really nice Esper. The metal text is very nice too.

_________________
Image


Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 18, 2012 8:54 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12517
I've ran into this very same issue and came up with a similar ratio too. Also, if you original layer is square, your results will be much better. They really need to fix this but doubt that it will ever be done. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 18, 2012 9:50 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Aug 30, 2012
Posts: 2174
K1TesseraEna - Nice tutorial and as Esper already pointed out I tend to half the layer width, also in the tab "Orientation" the first three settings called position will determine placement and size of the sphere and adjusting the Z parameter to about 0.96 will make the sphere almost the size of your image.

_________________
Image


Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 18, 2012 10:36 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
Thank you everyone!

Esper, I love your 'thank you' card, I've told here before - I'm a junkie for b/w and all shades of gray images. Background is just awesome,
and do you mind to share your technique on the text along the circle. What font and how did you make the text effect? TY in advance!
He4rty, yes I remember now your technique you shared here, it was a text over dynamics artwork, if memory serves me right.
I loved that work and even made you make an animation out of it, lol.
Lyle, he4rty, thank you guys for valuable remarks.


Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Wed Dec 19, 2012 12:08 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2770
K1TesseraEna wrote:
and do you mind to share your technique on the text along the circle. What font and how did you make the text effect? TY in advance!.
thanks K1te

lets see.....i hope i remember everything *lol*

the font is Sans bold, which is for some reason my fall back font - always looks good....

the blown up text is Sans bold as well, but i scaled the paths until they had good proportions suitable to what i wanted to achieve

for the arched text i probably used the text along path python script, sometimes i just draw a path, but in this case its an elliptical selection and then applied said script, which is very good

the text effect...that just happened by playing around
i rounded the font by applying a bit of blur and then applying curves on the alpha channel
the grey bit is an inner shadow done with layerfx, the lower half is then subtracted by the elliptical selection that was also used for the arched text
on top of that is a grey layer shrank by 1 pixel


Last edited by Esper on Wed Dec 19, 2012 1:12 am, edited 1 time in total.

Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Wed Dec 19, 2012 12:49 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
Thank you, Esper!
Got the file. I'll try to reproduce the effect, and if I have trouble doing it I will get back to you.


Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 25, 2012 8:41 am  (#13) 
Offline
GimpChat Member

Joined: Oct 31, 2011
Posts: 112
how to make the animation?? could you share with me? Thank you :D


Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 25, 2012 9:58 am  (#14) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
hanciong wrote:
how to make the animation?? could you share with me? Thank you :D


It's quite simple. Get your square image with pattern cooked as described. This is going to be your background layer.
To make the animation you need to create 12 frames out of it.
In map object change only the following settings:
1. Options: Sphere, Transparent background, Create new layer
2. Light: No light
3. Material: Specular 0.00
4. Orientation: Rotation Z 35.0 degrees
Then click OK. Your 1st frame is ready.
Select your BG Layer again.
For each next frame change only Rotation Y by 1 degree.
When you come down to making Rotation Y to 11 degrees this must be your 12th frame.
Delete your background layer. Animation is ready.

P.S. N of frames depends on the complexity of pattern. Some patterns require 12 frames, some 18.
But in most cases 8, 6 or even 3 frames is enough. The general rule here: 360 must be divisible by N.


Edit. Forgot to mention, when you save this animation as GIF set frame delays to 20ms.


Last edited by K1TesseraEna on Tue Dec 25, 2012 12:07 pm, edited 1 time in total.

Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 25, 2012 10:15 am  (#15) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
You could also use one of the scripts in animations to animate your sphere. Make a square, fill it with a color, gradient or pattern, then go to filters > animations > spinning globe or O's spinning globe and run that on your square pattern.
You can also go into your settings and slow it down.

Image


Attachments:
anim_sphere.scm [3.46 KiB]
Downloaded 153 times

_________________
Image
Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 25, 2012 10:41 am  (#16) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
K1TesseraEna wrote:
For each next frame change only Rotation Y by 1 degree.
When you come down to making Rotation Y to 11 degrees this must be your 12th frame.
This does not make sense to me.

I ended up with a sphere that rotated just a few degrees. It needs to rotate 360 degrees.

Image

This one, I did changing Y in 30-degree increments.

Image

Then again, perhaps I misunderstood and you did Y 1-degree for 360 degrees? If so, oh my.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 25, 2012 11:12 am  (#17) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
Oregonian wrote:
K1TesseraEna wrote:
For each next frame change only Rotation Y by 1 degree.
When you come down to making Rotation Y to 11 degrees this must be your 12th frame.
This does not make sense to me.

I ended up with a sphere that rotated just a few degrees. It needs to rotate 360 degrees.


@ Oregonian. The steps I described (by the request of hanciong) apply to my animation in the opening post.
Or animations made from symmetrical patterns with uniformed distribution, e.g.checkerboard, polka-dot, polygons, etc.
If you're mapping gradients you don't need to follow these steps, especially when rotating text it is always going to be trials and errors.

@ molly. The same thing basically with the Spinning globe script. If you try to make animation from Hexacol pattern, it won't be smooth or you'll get jumping sphere
Image.


Last edited by K1TesseraEna on Tue Dec 25, 2012 11:37 am, edited 1 time in total.

Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 25, 2012 11:18 am  (#18) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
K1TesseraEna wrote:
@ Oregonian. The steps I described (by the request of hanciong) apply to my animation in the opening post.
Or animations made from symmetrical patterns with unified distribution, e.g.checkerboard, polka-dot, polygons, etc.
Ah! Now I get it. The pattern looks like it's rotating but is just moving the amount of degrees it takes to move just the pattern amount. Dunno if that makes sense, but I DO understand.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 25, 2012 11:24 am  (#19) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
Oregonian wrote:
K1TesseraEna wrote:
@ Oregonian. The steps I described (by the request of hanciong) apply to my animation in the opening post.
Or animations made from symmetrical patterns with unified distribution, e.g.checkerboard, polka-dot, polygons, etc.
Ah! Now I get it. The pattern looks like it's rotating but is just moving the amount of degrees it takes to move just the pattern amount. Dunno if that makes sense, but I DO understand.


Yeah, that makes perfect sense.


Top
 Post subject: Re: Mapping objects to sphere with less distortion
PostPosted: Tue Dec 25, 2012 11:44 am  (#20) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Tried it with a checkerboard. 12 layers. :mrgreen:

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
Post new topic Reply to topic  [ 45 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Disintegration of objects in a layer

4

No new posts Attachment(s) Plays with Colours Mapping

12

No new posts High Intensity Texture Mapping

0

No new posts Los Vegas Sphere

0

No new posts Attachment(s) Glass sphere.py

7



* Login  



Powered by phpBB3 © phpBB Group