It is currently Mon Apr 15, 2024 8:06 am


All times are UTC - 5 hours [ DST ]


Switch to mobile style

Post new topic Reply to topic  [ 17 posts ] 
Author Message
 Post subject: [SOLVED] Problem with Map Object Cylinder
PostPosted: Fri Dec 10, 2010 1:55 pm  (#1) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I have done this multiple times, starting from scratch each time and I get the same results. I even varied the resolution.

The cylinder mapping puts cracks or lines in the results. :(

Image

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


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: Problem with Map Object Cylinder
PostPosted: Fri Dec 10, 2010 2:08 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
This is a first for me. I tried to reproduce the problem and can only do it if I start with an image with holes in it already.

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
 Post subject: Re: Problem with Map Object Cylinder
PostPosted: Fri Dec 10, 2010 2:14 pm  (#3) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
What is your original image?

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Problem with Map Object Cylinder
PostPosted: Fri Dec 10, 2010 2:29 pm  (#4) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I've attached my xcf image below. I'm ready to start Step 26 in Greg's tutorial here.


Attachments:
xmasballtut.xcf [1.1 MiB]
Downloaded 157 times

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein
Top
 Post subject: Re: Problem with Map Object Cylinder
PostPosted: Fri Dec 10, 2010 5:36 pm  (#5) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
There seems to be a bug (edit: this is not a bug, it is a feature) with the way Map Object is handling the alpha channel. The cracks are occurring because some of the pixels in the graphic have an alpha value of "254" and though this should not cause such drastic misbehavior, it can be fairly easily remedied by forcing those pixels to have an alpha value of "255".

Add a layermask to your layer, initialized using the Transfer Layer's Alpha Channel method. Open the Curves dialog (leave the Value channel selected from the dropdown list) and drag the point in the upper right (x=255,y=255) just a little bit to the left (x=252,y=255). Apply the layermask and continue.


Edited to remove a less optimal solution.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Last edited by saulgoode on Sat Dec 11, 2010 2:56 am, edited 2 times in total.

Top
 Post subject: Re: Problem with Map Object Cylinder
PostPosted: Fri Dec 10, 2010 5:51 pm  (#6) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Thanks. I wondered if it had some transparency in it I couldn't see because I could start with a solid color layer and that didn't happen.

Map Object is kind of a cranky filter but I wouldn't want to lose it. Hopefully someone will take it in hand and make a better one.

Here are my results ... and look! ... no cracks or lines.

Image

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


Top
 Post subject: Re: Problem with Map Object Cylinder
PostPosted: Fri Dec 10, 2010 6:05 pm  (#7) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
After a quick check of the source code (around line 950 of plug-ins/map-object-shade.c), it would seem that anything less than fully opaque (alpha = "255") results in the rear surface being shown. A test run suggests that an alpha of 254 is acceptable, but an alpha of 253 will produce "holes".

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Problem with Map Object Cylinder
PostPosted: Fri Dec 10, 2010 7:29 pm  (#8) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I tried it the mask way and that works well. I appreciate you taking the time to figure this all out, saulgoode. Thank you.

I wrote down the selection method too, just to have the two different ways to do it.

I made a yellow layer and set it to burn over the two gray layers to give a gold effect. I need to improve the color but it works for now.

This was one done using the layer mask on the cylinder.

Image

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


Top
 Post subject: Re: Problem with Map Object Cylinder
PostPosted: Fri Dec 10, 2010 8:22 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
Wow! You really analyzed it! I just duplicated the cap layer, and flipped one of them horizontally. Then I merged the two cap layers. It worked ok after that.

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
 Post subject: Re: Problem with Map Object Cylinder
PostPosted: Fri Dec 10, 2010 8:35 pm  (#10) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
PhotoMaster wrote:
I just duplicated the cap layer, and flipped one of them horizontally. Then I merged the two cap layers. It worked ok after that.
That's the way I did it too, Greg, but apparently I have leaky pixels or something because some got kinda slightly less than opaque in the process. Rather humiliating, eh?

Image

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


Top
 Post subject: Re: Problem with Map Object Cylinder
PostPosted: Fri Dec 10, 2010 11:14 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
Hmmmm? Very interesting!

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
 Post subject: Re: Problem with Map Object Cylinder
PostPosted: Sun Dec 12, 2010 10:47 am  (#12) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I just had the same thing happen when I mapped an image to a sphere. Threw in some lines not in the image.

Interesting how the outside edge of the sphere is involved too. Before has a dark line around it. Perhaps it was caused by the antialiasing of the crop tool when I cropped out a square from the original image.

I used the mask method and it worked very nicely.

Going to see if using the mask on the original image would have prevented it before I scaled the layer.

Image
Oregonian wrote:
Going to see if using the mask on the original image would have prevented it before I scaled the layer.
Nope. Needs to be done after the layer is scaled.

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


Top
 Post subject: Re: Problem with Map Object Cylinder
PostPosted: Sun Dec 12, 2010 5:37 pm  (#13) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Oregonian wrote:
I used the mask method and it worked very nicely.

If your original image is not supposed to have any amount of transparency, you can just flatten it before mapping.

Oregonian wrote:
Nope. Needs to be done after the layer is scaled.

Could you describe this step in more detail? It seems strange that scaling would introduce any amount of transparency.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Problem with Map Object Cylinder
PostPosted: Sun Dec 12, 2010 6:18 pm  (#14) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
saulgoode wrote:
If your original image is not supposed to have any amount of transparency, you can just flatten it before mapping.
The original image was already a flattened jpg image. I cropped a square area from it to make the sphere.

saulgoode wrote:
Could you describe this step in more detail? It seems strange that scaling would introduce any amount of transparency.
I had to add an alpha channel and scaled the width of the layer by 50% to make the sphere come out right (50%w x 100%h).

View or download the original image.
christmas_wallpaper_3.jpg

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


Top
 Post subject: Re: Problem with Map Object Cylinder
PostPosted: Mon Dec 13, 2010 5:13 am  (#15) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Oregonian wrote:
I had to add an alpha channel and scaled the width of the layer by 50% to make the sphere come out right (50%w x 100%h).

View or download the original image.
christmas_wallpaper_3.jpg

When I perform the following steps on that image, the final result exhibits no sign of "cracking".

  • "Layer->Transparency->Add Alpha Channel"
  • Selected a rectangle 960x960 pixels
  • "Image->Crop to Selection"
  • "Layer->Scale Layer..." :: x = 480, y = 960
  • "Layer->Layer to Image Size"
  • "Filters->Map->Map Object..." :: Sphere, Transparent background, Enable antialiasing

If you perform those steps, does your result have cracks? If not, then how did the steps you took (which produced cracks) differ from the above? If so, then could you provide some more details on your installation?

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: [SOLVED] Problem with Map Object Cylinder
PostPosted: Mon Dec 13, 2010 7:44 am  (#16) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I did it in the order you did it and had none of the lines. I did it in the order you did it 3 times to make sure.

I cropped mine before I added an alpha channel and got the lines every time I did it.

That seems to be the only difference in the way it was done.

I cropped to 693x693 for my beginning size on both.

Using gimp 2.6.11 from Fedora repos.

Interestingly, when I had the problem with the cylinder, that layer had an alpha channel from the time I made it.

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


Top
 Post subject: Re: [SOLVED] Problem with Map Object Cylinder
PostPosted: Mon Dec 13, 2010 9:25 am  (#17) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
An added note. I had turned off the lights in mine and set the z position to 0.50 and didn't mention it (forgot).

When I turned off the lights this time, clicked preview, I got lines both in your way and mine.

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


Top
Post new topic Reply to topic  [ 17 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Map to Object

3

No new posts Attachment(s) Extract Object plugin question

7

No new posts Attachment(s) Pots & Bowls Using 'Map Object>Sphere'

41

No new posts Attachment(s) WRITING A TEXT IN THE FRONT AROUND AN OBJECT

14

No new posts Attachment(s) Quick and Dirty Lightning Object

2



* Login  



Powered by phpBB3 © phpBB Group