Page 1 of 1

Creating glass bubble

Posted: 2012-08-28T04:37:05-07:00
by Marcel71
First thanks fmw42 for answering my previous question :)

What i am trying to create now is something like the following:
http://www.imagemagick.org/Usage/thumbn ... hading.png

But then with this image:
http://www.imagemagick.org/Usage/thumbn ... ghting.png

That the gray part is gone and it is transparent like the badge_shading.

I was reading this topic:
viewtopic.php?f=1&t=19337

But because i don't see the starting images i can't see the result. I tried it with the following images, but it did not work:
http://www.imagemagick.org/Usage/thumbn ... hading.png
http://www.imagemagick.org/Usage/thumbn ... l_mask.png

Any help would be appriciated.

Regards,
Marcel

Re: Creating glass bubble

Posted: 2012-08-28T10:05:08-07:00
by fmw42
see http://www.imagemagick.org/Usage/thumbn ... mask_paint

Just create a white round rectangle the same as the white circle and process using the appropriate part of the commands given. You can create a white round rectangle using -draw. See http://www.imagemagick.org/Usage/draw/#primitives

Re: Creating glass bubble

Posted: 2012-08-28T13:16:46-07:00
by Marcel71
Hi fmw42,

In that example they create a button from an image, using a pre-made glass button and a white circle.
What i want to make the transparent glass button with imagemagick.

Regards,
Marcel

Re: Creating glass bubble

Posted: 2012-08-28T15:11:15-07:00
by fmw42
It was premade in Photoshop and I do not know how. See viewtopic.php?f=1&t=19116

Re: Creating glass bubble

Posted: 2012-08-28T18:34:41-07:00
by anthony
You also need to be sure that for the gray lighting mask a perfect 50% gray values means no shading.
I have not looked at how the new colorspace handling effects these examples. Idealy it shouldn't as colorspace handle should not change the values in an image UNLESS specific requested or required.

I did not create the badge image, I downloaded it from the images submited to the forum topic composite overlay and masking. Just the one source image generated all the various masks (using the commands given in the forum topic). The only thing I added was a circle mask to separate background/shadow areas from the internal glass areas, which often needed slightly different processing to convert between masking styles.

If you understand how each of the methods work, it is fairly straight forward to do the convertion, though as I mentioned some styles generate nicer looking masking images than others, especially with things like shadows (which requires a black background color) than others.

It is also often easier to generate your own shading masks directly than convert them, using methods such as used to generate the 'glass button'.

Re: Creating glass bubble

Posted: 2012-08-28T18:51:19-07:00
by anthony
The Aqua Shading is probably one of the better 'glass like' shading methods.
http://www.imagemagick.org/Usage/advanced/#aqua_effects

But you may like the 'Gel' effect instead
http://www.imagemagick.org/Usage/advanced/#gel_effects

Other effects are also posible.

You may also like to look at the use of 'shade' for sphere/bubble surface (not glass) effects
I generated a lot of more and more complex examples of this, as it was so central to many other effects.
http://www.imagemagick.org/Usage/transform/#shade

What I have not explored much is the use of distance gradients (with anti-aliasing)
http://www.imagemagick.org/Usage/morpho ... anti-alias
This should really become a separate special but standard function, much like 'shade' is.

Combining shade and distance in various ways should generate almost any highlight effect you care to name, but I have not explored it myself.

Please contribute.