How to use the Alpha Mask / Alpha Channel

The Twilight Render Team shares tips, ideas, helpful hints, and more on using Twilight Render
Post Reply
Fletch
Posts: 11057
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2013-20
Contact:

How to use the Alpha Mask / Alpha Channel

Post by Fletch » Thu Jan 24, 2019 12:17 pm

If you want to put in a different sky background, or want to place only a single selected item you have rendered into another image, you need to render an Alpha Mask.
Image
Render the Alpha Mask at twice the resolution you will need in your final image and resize the mask in your image editing program. This increases the quality of your alpha mask image.
Then place that Alpha Mask rendering onto the Alpha Channel for your rendered image's layer.


Image

In GIMP this video tutorial explains how to copy and paste your black and white image into the alpha mask channel for your rendered image layer (these are the steps for GIMP as shown in the video tutorial linked here):
  1. open Alpha Mask Rendering (it's a greyscale image, basically almost completely black and white)
    resize the Alpha Mask Render (which you rendered at 2x the scale of the original rendered image) and resize it to be exact same size as original rendering. (Use the "resize image" function to do this - not the "free transform" or "scale" function.)
  2. Ctrl+C to copy the entire newly re-sized Alpha Mask Render
  3. Now you right-click your rendered image layer and choose "Add Alpha Channel". (choose either white or transparent alpha channel, it doesn't matter)
  4. Then select the rendering's new alpha channel icon now showing on your layers pallette next to the thumbnail of the rendering, and paste the Alpha Mask Render into the Alpha Channel for the rendered image using Ctrl+V
  5. GIMP will create a new layer with the pasted info, right-click that new layer and click the anchor icon, which will force that info to be pasted into the alpha mask channel.
  6. In GIMP or in Photoshop if the alpha mask on your layer is being edited it will have a highlight line around the little mask thumbnail icon
  7. add new layer BELOW your rendering containing the new sky you want to use
NOTE: If you are in Photoshop, and you create a mask on your rendered image layer, you can hold ALT key down and click the mask icon on the layer to open up that alpha channel for editing, then paste in your mask there. Click on the image icon thumbnail for the same layer to get out of alpha channel editing mode.

JGA
Posts: 193
Joined: Fri Aug 28, 2009 12:13 pm
OS: win7 pro 64 bit
SketchUp: 2015 pro

Re: How to use the Alpha Mask / Alpha Channel

Post by JGA » Tue Jan 29, 2019 1:35 pm

:gj:
JGA

mrluther
Posts: 1
Joined: Wed Jun 12, 2019 5:58 pm

Re: How to use the Alpha Mask / Alpha Channel

Post by mrluther » Wed Jun 12, 2019 8:26 pm

Can anyone share a screenshot of exactly where the alpha channel option appears in twilight :! ? I'm having trouble finding it.
Thank you!

Fletch
Posts: 11057
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2013-20
Contact:

Re: How to use the Alpha Mask / Alpha Channel

Post by Fletch » Thu Jun 13, 2019 9:59 am

:hat:
Attachments
AlphaMask-AlphaChannel-Setting.gif
AlphaMask-AlphaChannel-Setting.gif (87.01 KiB) Viewed 2439 times

Empyfree
Posts: 10
Joined: Fri Feb 10, 2017 1:20 pm
OS: OSX
SketchUp: 2017
Location: England
Contact:

Re: How to use the Alpha Mask / Alpha Channel

Post by Empyfree » Wed Feb 19, 2020 9:50 am

Is there any way of rendering an alpha for a semi transparent object? I seem to get solid "cut" masks rather than the type of Alpha I was expecting.

For reference, I'm rendering a stage design, with a transparent perspex lectern. Looking out from the stage with the lectern in the foreground I would expect to get a mid grey alpha, to allow layering in post.

Fletch
Posts: 11057
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2013-20
Contact:

Re: How to use the Alpha Mask / Alpha Channel

Post by Fletch » Fri Feb 21, 2020 8:03 pm

Unfortunately not.

pbacot
Posts: 352
Joined: Wed Oct 03, 2012 2:27 am
OS: MacOSXMojave
SketchUp: 2019

Re: How to use the Alpha Mask / Alpha Channel

Post by pbacot » Sat Feb 22, 2020 7:31 pm

I often use alpha mask and for windows that may have glass and look through to the rear, the HDR image I use in rendering is often OK. That is, it is similar enough to the background picture I want to add in postpro. Perhaps you can use a HDR background in the rendering where the transparency effect you get in the rendering is acceptable alongside the final background.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest