Alpha Chan/Transparency in SketchyPhysics Animations?

For all the users of Twilight Render (V1 & V2), to ask questions and get started
Post Reply
irenaeus
Posts: 41
Joined: Fri Aug 27, 2010 6:27 pm

Alpha Chan/Transparency in SketchyPhysics Animations?

Post by irenaeus » Wed Sep 15, 2010 10:14 pm

I'd like to find a more direct way, if one exists, to add transparency to my TwilightRender output. At the moment it's all post production for me with Photoshop and a lot of patience. Far too much patience!

I'm using SketchyPhysics to animate some extruded text. So far so good. Now, I'd like to put that text in a video layer over some other stuff - compositing one over the other. My current video editing app wants an alpha channel to signal transparency.

This post http://www.twilightrender.com/phpBB3/vi ... ency#p1799
hints at something. Perhaps I need to wait? Or maybe just keep the patience high and post-pro as before?

Jay

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

Re: Alpha Chan/Transparency in SketchyPhysics Animations?

Post by Fletch » Wed Sep 15, 2010 11:40 pm

To render the Alpha Channel for your video use the "Alpha Mask" render setting and render the video with that.
now you will have each frame rendered as a black-n-white alpha image... it renders relatively quickly.

Now you should be able to add those into your video editor. Either you will have to turn them into their own avi first, or you can import them as an image sequence and set that image sequence as your video's alpha mask channel.

if your video editor can not do this, you need to find one that can... but until then, you will need to apply each alpha mask image to it's companion image frame you rendered using photoshop or similar.

Let us know if you do not know how to do this.

hope this helps.
Attachments
alpha.jpg
alpha.jpg (56.25 KiB) Viewed 9063 times

irenaeus
Posts: 41
Joined: Fri Aug 27, 2010 6:27 pm

Re: Alpha Chan/Transparency in SketchyPhysics Animations?

Post by irenaeus » Thu Sep 16, 2010 1:35 pm

Thank you, Fletch. That is very helpful. I do understand. Whether I can make it happen or not, well, I'll see what my current trial (Sony Vegas Movie Studio HD Platinum 10) can do.

I would be interested in getting your input on which video editors can handle this. Do you know which can, or cannot? Or perhaps you can point me to a source that does? I am in the middle of evaluating options and I believe this particular feature - now that I know I need it! - should be a strong part of the evaluation process.

No hurries - I just got this particular assignment yesterday. I have a whole week to acquire the software, learn how to use it, and then work within the confines of the script being written by others to produce a video for a trade show we're sponsoring!

Jay

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

Re: Alpha Chan/Transparency in SketchyPhysics Animations?

Post by Fletch » Thu Sep 16, 2010 2:39 pm

I like Sony Vegas a lot... I've used it, and Premiere and Premiere Elements. Sony was easier and more powerful because of its ease than past Adobe products for video - but I can not say I've tried latest versions of Adobe vid. editors... Sony Vegas was easier in most things... or maybe my brain just think more like Vegas does.

Look in the "Help" and Sony Vegas forums, I'm sure they will help you figure it out... I'm confident it can handle this. It's a fairly common/simple thing for a pro vid. editor.

irenaeus
Posts: 41
Joined: Fri Aug 27, 2010 6:27 pm

Re: Alpha Chan/Transparency in SketchyPhysics Animations?

Post by irenaeus » Thu Sep 16, 2010 3:09 pm

Thanks again, Fletch. It's Sony Vegas, but not Pro.

I have found a way to get there from here, for now. I did as you suggested and made the alpha mask render in png format. Fast and easy. Then I did a Photoshop Action to make the png bg layer editable, select all the black, clear it, deselect, save the file, then close.

With that action done, still in Photoshop, I did File -> Automate -> Batch, made sure it was my new action, and selected the folder where I had placed all of the pngs from the alpha mask render. Took a minute or two. The mask images were then white or transparent, which is what Sony Vegas (non pro) wanted.

Inside Sony Vegas I made the masks one event on a video track, the real rendering on a video track just below it, made that track a child of the alpha track, then made sure the alpha track's compositing mode was alpha. Now I see what I want to see, and it shows on top of the underlying video I am adding it to. I think this proves the concept for me.

Again, thanks.

Jay

Ecuadorian
Posts: 1779
Joined: Fri Mar 20, 2009 3:43 pm
OS: Windows 7 Pro 64-bit
SketchUp: 7.1
Location: Guayaquil, Ecuador
Contact:

Re: Alpha Chan/Transparency in SketchyPhysics Animations?

Post by Ecuadorian » Thu Sep 16, 2010 4:00 pm

Wow... :shock:
:rspkt:

Some time ago I had the same problem and I took a different approach:
-I rendered everything at twice (or 3x, can't remember) the size, with NO antialiasing, and with a solid green background.
-I made this green color become transparent in Irfanview and then re-save each frame as a PNG with transparency. You can automatize this process via command line in Irfanview. Unfortunately I've found no affordable software to do this via GUI.
-I re-scaled the PNG sequence with Pliska Image Resizer
-I opened the rescaled PNG sequence in my video editor, et voilá!

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

Re: Alpha Chan/Transparency in SketchyPhysics Animations?

Post by Fletch » Thu Sep 16, 2010 4:08 pm

ok, glad it's starting to work for you.
create a droplet in photoshop for your action, then you just drop your folder onto the droplet icon, and it runs it automatically on the whole folder.

Saving in PNG of course keeps your transparency.

Not sure I understood 100% what you're doing in pshop,
Then I did a Photoshop Action to make the png bg layer editable, select all the black, clear it, deselect, save the file, then close.
but to apply an alpha mask, I do it this way using the quickmask button and pasting my rendered alpha mask into the quickmask by alt-clicking the quickmask. Then, after it's ready, I right-click the quick-mask and choose "apply mask" and it makes the black disappear. I think it's just one more way to do the same thing you are doing.

similar idea here: Background Image / Picture Using Alpha Mask

irenaeus
Posts: 41
Joined: Fri Aug 27, 2010 6:27 pm

Re: Alpha Chan/Transparency in SketchyPhysics Animations?

Post by irenaeus » Thu Sep 16, 2010 5:27 pm

Fletch wrote:ok, glad it's starting to work for you.

create a droplet in photoshop for your action, then you just drop your folder onto the droplet icon, and it runs it automatically on the whole folder.
Ah yes, I had remembered droplets, but forgot where they were. An excellent alternative.
Fletch wrote:
Saving in PNG of course keeps your transparency.
Yes, exactly.
Fletch wrote:
Not sure I understood 100% what you're doing in pshop,
Then I did a Photoshop Action to make the png bg layer editable, select all the black, clear it, deselect, save the file, then close.
but to apply an alpha mask, I do it this way using the quickmask button and pasting my rendered alpha mask into the quickmask by alt-clicking the quickmask. Then, after it's ready, I right-click the quick-mask and choose "apply mask" and it makes the black disappear. I think it's just one more way to do the same thing you are doing.

similar idea here: Background Image / Picture Using Alpha Mask
As for what I was doing, and your alternative, yes, they have a similar result. In my case, I was simply selecting all the black and clearing it. That left a bunch of pixels blank/clear/transparent, pretty much the same as what your method did.

Jay

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests