Photoshop - turn white transparent, specifically preserving shadows - new issue
I have read articles all over the internet today. While some questions and answers are similar to my issue, none precisely cover my problem.
I am currently doing CAD work for a website where my images will need to go on multiple colour backgrounds. Ordinarily in the jewellery trade rings are rendered on white which is very simple to blend in with websites.
In essence, I need to be able to preserve a ring and the shadow it casts on a transparent background. This means that the shadow, currently rendered on white, must look good on any colour. Without the shadow the ring looks very out of place on the page.
So I have explored my options, and using Multiply I have managed to create:
- a bottom layer of whichever colour the web page is
- a middle layer of the ring rendered on white with the shadows (Multiply)
- a top layer of ring highlights for the colour background I want.
Here is the final result:
The issue with this method is that it makes the image look seamless when pasted on a webpage for Windows users, but Mac users see the block colour difference clear as day.
Example 1: What mac users see in example 2
Here is the render on a white background, and here is the alpha, and here is the cutout of the ring with reflection colours correct for #eb472c:
So I want to be able to have the ring and its shadow on a transparent background. This will negate the need to mess around with colour matching with web pages. The best way to describe it would be to have the Multiply effect, but rather than choosing the bottom layer as a colour to blend with, to have it blend with transparent.
Colour range selection does not work for this problem as the shadow needs to blend over many different colour backgrounds.
Many thanks for any help.
Because you are using CAD software, you ought to be able to work out how to make a mask of the object. I am perplexed about why can't export this from your CAD software without a color background, but will assume you can't.
If you texture or light the ring in such a way that it is pure black without lighting, but with a white background, you can then export a greyscale of the silhouette of the object, then you can export a greyscale of the item with shadow, and then a full-color version ("normal").
switch to photoshop.
edit: rewrite with pics
use the mask you provided as "ring mask"
dupe the ring mask layer, dupe the greyscale image
invert the ring mask copy so it is black ring on white
merge with greyscale copy and then invert. This is "shadow mask"
make the foreground color swatch the exact red you used in background
make the ring with red on a white background the active layer active (your color image 3 above)
select -> color range, sample the foreground red swatch, adjust to suit, but keep it above maybe "100" (promiscuous color select)
make a new layer, keep the selection active, and fill with black. this is "reflect mask"
apply the ring mask to the greyscale ring layer (layer mask), then set the layer mask active, ctrl+click on "reflect mask", delete selection derived from reflect mask from the current layer mask
- make a new layer under the greyscale ring, fill with black, apply the shadow mask as a layer mask, then create a selection using the "reflect mask" again and delete that selection from the shadow mask as in the previous step.
profit. see images
ring, shadow, reflect masks:
greyscale with masks; black layer with masks:
The steps above are "how" it is done, the following is "why":
We start with the ring images as layers (the images labeled 1, 2,and 3 in the question). We create two additional layers derived from components of these layers and hide them (named "shadow mask" and "reflect mask"). We use these additional layers as a way to store the selection for easy recall later. When we want to load that selection, we can ctrl+click the layer and a selection will be created.
We create a layer mask on the ring image to knock out the background by recalling the proper stored selection layer ("ring mask"), then use the "reflect mask" stored selection to knock out the inner portions of this new layer mask.
Similarly, we do this with a plain black layer and recall the "shadow mask" selection to create the shadows, and then recall the "reflect mask" selection to knock out the inside of the mask.
The blue layer in my example is for visual checks and is hidden for the final export.
Note that the only layer with an image from the original question that is set to "visible" in the final is image #1.