How to use the Alpha Mask / Alpha Channel

The Twilight Render Team shares tips, ideas, helpful hints, and more on using Twilight Render
Fletch
Posts: 12895
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2016-2023
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: 228
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: 12895
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2016-2023
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 24807 times

Empyfree
Posts: 11
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: 12895
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2016-2023
Contact:

Re: How to use the Alpha Mask / Alpha Channel

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

Unfortunately not.

pbacot
Posts: 364
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.

ntxdave
Posts: 1003
Joined: Tue Feb 23, 2016 7:05 pm
OS: Win 10
SketchUp: 2020Pro

Re: How to use the Alpha Mask / Alpha Channel

Post by ntxdave » Sat Feb 27, 2021 9:25 pm

I am still trying to learn how to used this feature and GIMP correctly. I created 2 masked images using different render settings and have combined them to get some understand of this whole topic.
FullWashLayout_Rendered.png
FullWashLayout_Rendered.png (1.54 MiB) Viewed 18868 times
Your feedback would be greatly appreciated.

One of the things I have still not learned in GIMP is how to import one of the transparent images and then add a background color to the image. With the image above, I started with a new image that has a background and then brought in my two transparent images. Again, any feedback/instructions or suggestions of tutorials would be greatly appreciated.

Fletch
Posts: 12895
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2016-2023
Contact:

Re: How to use the Alpha Mask / Alpha Channel

Post by Fletch » Mon Mar 01, 2021 2:13 pm


ntxdave
Posts: 1003
Joined: Tue Feb 23, 2016 7:05 pm
OS: Win 10
SketchUp: 2020Pro

Re: How to use the Alpha Mask / Alpha Channel

Post by ntxdave » Mon Mar 01, 2021 3:00 pm

Thanks for the reply Fletch. I thought from your first post that you were a GIMP user. I have watched some videos and am finding some interesting features (especially for a free application). I see some poor things in my last post. If I come up with something worth sharing I will post it. :)

Thanks again for the reply and for creating the thread. I think it is ver worthwhile. :^:

Locked

Who is online

Users browsing this forum: No registered users and 1 guest