PDA

View Full Version : mDiv Combustion equivalent


thatoneguy
04-23-2007, 09:50 PM
I need to unmultiply an image in a node tree not a the footage level. Any ideas? There seems to be no divide operator anywhere in combustion, it's driving me crazy.

Kai01W
04-24-2007, 10:08 PM
maybe in 4 they added "divide" in channel:alpha arithmetic
In 3 its not there...

-k

hemmerli
04-29-2007, 05:06 PM
I need to unmultiply an image in a node tree not a the footage level.

May I ask why? Depending on what you are going to do, you might need no div op to un-premultiply.
Btw., the sapphire plugins have a div operation.

cheers,
rayk

thatoneguy
05-10-2007, 10:12 PM
I had got a bunch of render passes I wanted to pre-comp without re-rendering unmultiplied versions.

hemmerli
05-11-2007, 12:42 AM
if your passes (wich are already rendered, as i understand) are already pre-multiplied then just make sure they are set as pre-mult. at the footage level, and comp them together in an comp-op. depending on what you want to do further, just add new ops in top of that comp-op or render. if you want to render, you have the choice of render the alpha straight or pre-mult.
from what you wrote, there no need to un-premult. anything.

best,
rayk

dg
05-26-2007, 12:59 AM
there no need to un-premult. anything

Yes there is, sometimes you have to.

There is a free plugin for AE that is compatible with C* somewhere. But you can try to use the Channel > Alpha Arithmetic with Operator in "Set" and Operand at 100%, then use Set Matte to put your alpha back to where it was.


Hope it helps,

hemmerli
05-26-2007, 08:48 AM
Yes there is, sometimes you have to.

There is a free plugin for AE that is compatible with C* somewhere. But you can try to use the Channel > Alpha Arithmetic with Operator in "Set" and Operand at 100%, then use Set Matte to put your alpha back to where it was.

Hi Diogo,

when do you need to un-premultiply in combustion? Not that something might be wrong with your statement, just get the feeling that I am missing something :sad:

cheers!
rayk

dg
05-27-2007, 07:47 AM
Hi Ryak,

No man you are not missing anything, if you never felt the need to do it then you haven't missed anything. I personally don't remind having to unpremultiply anything in C*, all the native operations seem to un-premultiply and then premultiply automatically in C* so the user doesn't need to bother about that. But it is a valid operation so I tough I should mention a workaround. Especially since I don't know what he might be facing in his comp.

Sorry for expressing my self badly :)



Cheers,

hemmerli
05-27-2007, 11:11 AM
hi diogo,

never mind, just feared to miss possible recent developments ;-)

back to the original posters question.
i didn't know that there is a free plug-in for unmult in ae (does somebody know, if it works in c*?). one of the sapphire plug in sets has an "div"-op which can be used for un-premultiplying.

if you have a pre-mult pass from a 3d app with no alpha in it and the alpha as a seperate pass, there's another way to go: remember that the "over" operation which put (comp) one piece of footage over another is (FG*A_fg)+(BG*(1-A_fg))., or in plain words: multiply the foreground with its alpha values (this is the "premultiplication", you already have, if you render your images that way). the second part says: multiply the background with the invers of the foreground alpha. Done that, ADD both together. No need to un-premultiply to get rid off black fringes.
If that was the problem.

best,
rayk

thatoneguy
05-28-2007, 05:54 PM
AE has a built in division operation which isn't called div it's called like "UnMultiply" or something.

The most common use of Div that I can think of is pre-comping CGI element passes into its own composite. If you just apply a "set matte" straight onto a pre-comp of render passes you'll get fringing because the setmatte operation will not also do a div operation like it should. So Premultiplied image - SetMatte's alpha does not do an aDiv. If you use a set a matte on an unmultiplied image then it will look right.

If you think about it that's the way it should work. All a set-matte operator should do is use a layer as a mask. If a white pixel is multiplied by 50% opacity. Its luminance will be 50%. tell the program that its premultiplied and over a white background it will appear white. However, we're going to screw it up. Use an alpha arithmatic and set the alpha back to 100% and you should now have a 50% gray pixel just like in the original image. Now we apply a SetMatte operator and set the opacity to 50% again and over the layer onto a white background and now the pixel's luminance over white is 25%. It started off as white but now it's 25% gray.

If you have a div node this is how it *should* go.

You import your image and tell the program it is divided. The program again properly divides by the alpha and displays a 100% white pixel on a white background and a 50% gray pixel on a black background. The pixel is effectively white. Now we apply a Alpha arithmatic and set the alpha to 100% and discover that pixel is still actually 50% gray (multiplied). So we divide it. It's not 100% white and apply a setmatte operator and it will appear to be 100% white on white and 50% white on black. Just like how we want.

hemmerli
05-29-2007, 10:47 PM
If you think about it that's the way it should work. All a set-matte operator should do is use a layer as a mask. If a white pixel is multiplied by 50% opacity. Its luminance will be 50%. tell the program that its premultiplied and over a white background it will appear white. However, we're going to screw it up. Use an alpha arithmatic and set the alpha back to 100% and you should now have a 50% gray pixel just like in the original image. Now we apply a SetMatte operator and set the opacity to 50% again and over the layer onto a white background and now the pixel's luminance over white is 25%. It started off as white but now it's 25% gray.

oh well, i tried and thought and tried again and then thought again, but somehow, i come to another conclusion then you. that's with my thoughts, as well as, with my test setups in combustion....
first, if I put a white pixel with 50% transparency over a (100%) white background(solid pixel) it will always appear 100% white, regardless of it's transparency value. But anyway, that's not the point.
You have a white pixel with 50% alpha, premultiplied on black to make things easier. now you import such an image into combustion and make sure that the premult box is checked. if you apply an alpha arithmetic op to that footage and set the alpha back to 100%, your pixel turns pure white. that's because combustion knows that it is actually a 100% pure white pixel with a 50% alpha value which is stored as premult. so, raising the alpha value back to 100% makes it a 100% white pixel with a solid alpha. if you further apply a set matte op and use the alpha of the original premult footage, your pixel becomes a 100% white pixel with 50% alpha value and will look in front of a black bg 50% grey, again. as it looks on the original imported footage.
as i wrote, i tried it it with several different ops to extract the alpha and replace the alpha, before a comp node, after a comp node, but still can't see any issues.
maybe i miss something when i read your post. if you want to discuss this further, and i don't mind trying to find any bugs, it is for sure helpful, if you could provide me with a simple cws file displaying the issue. i'm not sure, if you can attach any files with the forum post. so in case you are interested, you can use this address rayk dot hemmerling at gmx dot de
(no spaces).

cheers!
rayk

PiXeL_MoNKeY
05-29-2007, 11:23 PM
Easy way way to get Straight Alpha is just render out the footage and save as a non-premultiplied alpha format. You could easily do this with Commit to Disk or a Render Operator. It does mean extra rendering and extra storage space needed, but it does work (as long as the opened footaged is properly set as permultiplied with proper background color).

-Eric

PiXeL_MoNKeY
05-31-2007, 05:54 AM
Rayk, as I posted over at fxGuide:
Or do it for free with Knoll Unmult (http://www.redgiantsoftware.com/unmult.html)
Knoll Unmult recreates the opacity or alpha channel of a layer based on luminance also called brightness of the lens flare. Unmult assumes that the lens flare is rendered against black. The image is also adjusted to compensate for the new alpha channel. But dg's Alpha Arithemtic does it a good job of it as well.

-Eric

hemmerli
06-01-2007, 12:25 AM
hi eric,

well, thanks for the link, but i wasn't looking for an un-premult node. can't see why the original poster would need one. that's why the long and wordy prior post.

cheers!
rayk

PiXeL_MoNKeY
06-01-2007, 05:25 PM
I have had some problems in the past where pre-multiplying left a halo, with either of these you can fix that by unpremultiplying the color component and reseting the alpha. I have no idea if the issue I was having were Combustion or other app bugs, but it happens.

-Eric

hemmerli
06-01-2007, 06:58 PM
ahh, ok, I see.
beside what you already suggested, there might be another solution; of course depending on the induvidual problem.
take the alpha of the fg footage which causes the halo, invert the alpha in an extra branch and apply it to the bg footage you want to have your fg over. then simply add fg and bg together.
kind of self-made over node (or comp node).

cheers!
rayk

thatoneguy
06-08-2007, 11:30 PM
The alpha set actually does work. I have no idea what was wrong before because I'm certain I had tried it. Probably the Screen Blending glitch manifesting itself. Whatever it was it's working perfectly in another comp now. Very Odd.

PiXeL_MoNKeY
06-09-2007, 05:31 AM
Actually it if read my post in the other thread here, all blending modes in Combustion cause Alpha inflation. So you have to do the Alpha corrections after any blending mode calculations. I did send that bug directly to the Combustion Product Manager and one other member of the Combustion development team.

-Eric

thatoneguy
06-09-2007, 09:36 AM
Thanks. Yeah I was trying to troubleshoot the div problems and couldn't figure out what was going on and thought it wasn't properly dividing, but alpha inflation would make sense.

That would also explain why I wasn't able to properly generate edge mattes in another composite... hmmmm.... would make sense since I was blending using merge nodes.

Here's to big combustion 5 announcements at Siggraph. *cheers*

dg
06-09-2007, 04:57 PM
I did send that bug directly to the Combustion Product Manager and one other member of the Combustion development team.

Did you got any response?

thatoneguy
06-09-2007, 08:47 PM
Haha Pixel Monkey and DG do you ever feel like we're the last 3 people using Combustion every day? It seems like this forum is dead except for the occasional new user question and one of our problems.

PiXeL_MoNKeY
06-10-2007, 02:53 AM
I know others use it. Places like Creative Cow and fxguide get most of the traffic. I have yet to get a report back on what could be causing it, but sent a detailed CWS with instructions and results. I titled the e-mail something like "Combustion 4.0.x Serious Blending Modes Bug..." Once I get some info I will let you know what I can.

-Eric

lazzhar
06-10-2007, 07:50 AM
Haha Pixel Monkey and DG do you ever feel like we're the last 3 people using Combustion every day? It seems like this forum is dead except for the occasional new user question and one of our problems.

Give me a break !!

Is it true C*5 is coming?

thatoneguy
06-10-2007, 07:33 PM
oh yeah and you lazzhar :D

&

Hopefully.

CGTalk Moderation
06-10-2007, 07:33 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.