• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can I keep a glass object transparent on export?

Community Beginner ,
Feb 12, 2022 Feb 12, 2022

Copy link to clipboard

Copied

I am trying to export an image with a glass lens. I only need the image, not the background.

 

In Stager, my background is white. When I export it to Photoshop, I can remove the white background layer, but the glass portion is no longer transparent. It still shows the white background through the glass.

 

Is there a way to keep the true transparency of glass in the rendered image?

 

Thank you.

Views

868

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Feb 13, 2022 Feb 13, 2022

Thank you. I tried it with the black background and it ended up working without needing to modify when I imported to Photoshop.

 

I see now that I was previously missing the opacity setting for glass in Stager.  The default opacity is 1 for the glass. I typically work with ray tracing off. With it off, when I test the look with any background, the glass appears transparent. That's how I thought it would render, but it was always opaque instead. I never previewed the image with ray tracing on. With

...

Votes

Translate

Translate
Community Expert ,
Feb 12, 2022 Feb 12, 2022

Copy link to clipboard

Copied

Transparency of objects, including refractive index, internal color (if any), and surface reflectivity are properties that are only defined in the 3D space. The same is true of reflectivity and surface properties that disperse the light falling on them. What you get in Photoshop is a 2D representation of what was in the Stager view, including any background or other objects seen (distorted) through the glass. It isn't 3D anymore. Once the render is in Photoshop, opacity is controlled by blending modes and the Fill and Opacity sliders. Your lens is no longer a 3D object. It is part of a flat image.

 

All is not lost, though. It's just a matter of using each tool for what it's designed for. There are ways to recreate the lens effect within Photoshop using filters, so what you see through the lens is distorted or enlarged realistically. Stager will give you the realistic specular highlights in the lens that will "sell" the effect.

 

Here's one way to do it:

  • Create your lens in Stager as you did, but make the background fully black. Arrange your lighting so that you get the specular highlights you want, then render it out.
  • Open the render in Photoshop, remove the background layer and bring in or create your new background. 
  • Change the Blend Mode of the "Rendered image" layer to Screen. This will make the black disappear but keep the specular highlights visible. (You can turn off the lens layer but don't move it yet! Keep it turned off for now.)
  • Make the Additional layers group visible, turn off the "Material selection masks" layer so that you have only the "Object selections masks" layer visible. That should be just one item and it is the exact position and size of the lens. (This is why you mustn't move the lens image.)
  • Choose Select > Color Range and click on the color that represents the lens then choose OK. You now have an exactly lens-shaped selection and can turn off the Additional layers group.
  • In the Layers panel, target the layer behind your lens and move the selection to where the lens will be in your final composite.
  • Assuming there's just one layer or a Smart Object background, use Command/Ctrl+J (or choose Layer > New > New Layer Via Copy from the menu) to create a new layer containing just what's inside the selection. (Use Command/Ctrl+Shift+J if multiple layers are visible below the lens.) Make it a Smart Object, then choose Select > Reselect to get back your marching ants.
  • Click on the New Mask icon at the bottom of the Layers panel or choose Layer > New Layer Mask. (This will allow you to enlarge, distort or otherwise mess with what's visible through the "lens" while keeping it within the shape.) Call it "Contents."
  • Turn your Rendered image layer back on (the lens) and move it so it aligns with your new layer.

 

From there, you can work on the Contents layer with Liquify (the Bloat tool, in particular), scale it up, dodge and burn, whatever works for your composition.

 

Another workflow would be to create your Photoshop composite without the lens, use that as your background image in Stager, then render the whole thing. Which workflow you use is a matter of preference and how ,much compute power you have to render from Stager.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 13, 2022 Feb 13, 2022

Copy link to clipboard

Copied

Thank you. I tried it with the black background and it ended up working without needing to modify when I imported to Photoshop.

 

I see now that I was previously missing the opacity setting for glass in Stager.  The default opacity is 1 for the glass. I typically work with ray tracing off. With it off, when I test the look with any background, the glass appears transparent. That's how I thought it would render, but it was always opaque instead. I never previewed the image with ray tracing on. With ray tracing on, the glass is opaque. I moved the opacity down, and now it works beautifully. The image renders fully transparent in all the right places.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2022 Feb 13, 2022

Copy link to clipboard

Copied

Glad you got it worked out. Curious though, because what you show is not at all how glass behaves in ray tracing. It looks like you may have set Interior translucency to 0 or you've turned on subsurface scattering or some other internal effect that does not apply to lens glass. The default glass material from the Starter Assets does not go opaque in ray tracing; it refracts and reflects as you would expect.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 13, 2022 Feb 13, 2022

Copy link to clipboard

Copied

LATEST

I am very new at this, so it is entirely possible I turned on/off a necessary setting. Thanks for your assistance.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2022 Feb 13, 2022

Copy link to clipboard

Copied

Can you share any image example what you want to achieve? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources