An image of a transparent sphere isn't a fully absurd idea, because
Materials are not fully transparent, they absorb and reflect light or scatter it diffusely
A piece of well purified high quality glass can seem to be fully transparent, but it refracts light . That causes "lens effect" ie. it distorts the objects which are seen through the glass
All effects can depend on the wavelength. That appears as coloring. It occurs in several ways:
- a piece of glass can be colored like other materials
- thin (1 micrometer or less) films such as soap bubbles reflect differently different wavelenghths and you can see reflections in all rainbow colors.
- thick glass acts as a dispersive prism and causes color aberration
Enough? Ok, no more theory. Lets see some practical applications. Let's at first have two glass spheres against a black background. One is hollow, it's made of thin glass and the other is full of glass. The glass is assumed only to cause some diffuse scattering (=milkiness), no reflections, refractions nor coloring. In the left we have the hollow thin shell and in the right we have the one full of glass. The light is assumed to be diffuse.
Both are drawn as solid white circles, which are made transparent with gradient layer masks. Linear gradients do not make plausible effect. They are made non-linear with the curves tool. You see the actual non-linearizing curves dialog for the thin shell.
The amount of opacity can be justified by the thickness of the glass just in front of the eyes. The thin shell has most of glass in front of the watcher at the edges, full glass is thinnest at the edges. A mathematician could calculate the right opacity profiles, but these are only my guesses.
These do not at all seem to be partially transparent glass spheres. The glass in the right is far too milky to be seen as nearly transparent glass and all other effects are omitted.
We make the glass in the right clearer and take along some surface reflections. In cartoons we see distorted windows (even outdoors). We try it, too. At first we purify the material of the full glass ball. We make it in the middle about as opaque as the thin version at the edges. Part of the dimming is made with the opacity slider to be able to take it back later if needed.
We draw some rectangular windows. We are going to distort them like they are reflected from a spherical surface. Photoshop's Filter > Distort > Spherize does not do the job because it causes distortion like stretching a flat image over a half sphere.Everything gets bulged outwards from the middle, but the result still isn't curved enough. Double spherize is doubly bulged. We use at first warp and then apply the spherizing.
Extra dots are to make some playground for Edit > Transform > Warp:
This is not curved enough, but Photoshop's Spherize makes it better. With reduced opacity it's acceptable:
The full glass sphere got it's reflection otherwise. Freeware Paint.NET has a fisheye lens distortion filter. The windows were distorted with it. After tweaking the opacities, both spheres are now:
Windows are a cliche. Actually any distorted photo or syntethic image will go as long as it has some apparent lines that seem to be bended to curves in a plausible way.
Another practical must is a bright highlight or several of them. If there's somewhere a bright light, it will bounce in the glass several times without getting attenuated invisible. Finally some part of it hits watcher's eye, often several copies of it.
In the following image both spheres have got a bright highlight - a spot, the thin glass version has also a couple internal reflections. All are painted with a round brush, one clik per spot.
The opacities of the layers needed some tweaks to keep everything well visible.
Everything is about as simple as possible. For me the result is acceptable for demonstration purposes. Real use probably would need richer reflections and highlight spots.
So, the spheres are just acceptable against black background. But when the background is a real photo, the spheres start to look out very poor:
What's the problem and how to fix it?
There are several problems. The easy one is the fact, that the city cannot be as bright seen through the glass as elsewhere, because the glass reflects part of the light off. The easy solution is to make a selection with the magic wand and the origimal "milkiness" layer and reduce the brightness. I added an adjustment layer "curves". The layer mask become automatically after the spheres were selected:
I reduced the brightness uniformly. Actually the reduction should be more where the glass is thicker. The layer mask of the adjustment layer should contain gradients. We try it, too:
Now there are opposite gradients in the layer mask of the city darkening layer. The difference is only just noticeable ==> The benefit of the extra complexity is marginal. We do not use it further.
The adjustment layer isn't good for use, because it cannot be merged into one PNG image which is used as a transparent overlay. Fortunately it can be replaced. Insert a low opacity layer with black solid circles. They are easy to make by selecting the original milky shapes with the magic wand and painting black to a new layer just above the background image:
Actually the result is quite good for the thin sphere, if we assume the glass is ultra thin, which makes lens effects neglible.
Full glass sphere needs the lens effects and some of it should applied also to the thin one just for plausibility.
A full glass sphere rotates the through seen image upside down ad reduces the apparent size. Depending on the refractivity of the glass material a part near the edge can be distorted unrecognizable. If there's some objects very close in front of the sphere or the wiewing point is close the sphere, the refracted image is extremely complex. We skip it. Without smudged edge the image with a full glass sphere is:
The darkening layer was deleted and the darkening was applied directly to the through seen image. That image is a 180 degrees rotated copy of the photo, only warped and spherized and darkened.
Practical full glass sphere wouldn't show the background well near the edges. To simulate it a heavily smudged version was made. Physically it's a total fake, but can create a plausible effect. Smudging is done with Filter > Blur > Radial Blur > Spin. Transition between the perfect lens image and the spinned image is made with a layer mask:
The windows reflections seem still to be ok, but the light spot Isn't. It would need the sun. The spot is deleted. We add the sun later.
The thin sphere needs some distortion at the edges. A piece of background is copied and spherized negatively. It also is physically nonsense, but a different distortion is tried than in full glass sphere. Probably spin blus would have been as good here.
A layer mask limits the distorted zone to be about the same, where the original milkiness is obvious.
Windows reflections work still, but the spot highlight is removed. Outdoors the spot must be the sun or nothing. The darkening is made with low opacity black circle:
The sun creates some flare in cameras, so it must be added, if the sun reflection is included. Here It's a white spot with layer style Outer Glow. A blurred white spot works, too, but the layer style is adjustable. Both spheres got the same sun. To be plausible it must be put to a physically possible place and covering the sharp edge of a close window reflection. Multiple bounces inside the glass are skipped.
The thin sphere can be transformed to soap bubble. Only colorize the reflections slightly with random rainbow colors: