PDA

View Full Version : Changing the pre-multiply color



Philbert
06-25-2009, 11:06 PM
I'm outputting 32 bit images with transparency. I understand that LW premultiplies with black, however my object is mostly black so only a small part of the object shows up in the alpha. I recall hearing a while ago about a way to make LW render use white instead of black. Or maybe it was any color. Anyone know what I'm thinking of?

nickdigital
06-26-2009, 06:59 AM
Do you mean changing the color of the backdrop?

Philbert
06-26-2009, 11:17 AM
I don't know, would that work? If you're rendering a 32 bit TGA with transparency and you load it into After Effects, AE gives you alpha options of "Ignore", "Straight Unmatted", or "premultiplied - Matted With Color". The third one is the correct one and the color, which is already selected, is black. The way I see it, it's like a TV weather man on a bluescreen who goes to work wearing a blue shirt. Except in this case it's black.

nickdigital
06-26-2009, 12:38 PM
Do this, change your backdrop color in Layout to a different color other than black. Try full green. RGB values of 0/255/0. Then import your sequence into AE and pre-multiply against that same green color; 0/255/0.

TeZzy
06-26-2009, 01:11 PM
load the image into AE. it should prompt you with the 3 options you mentioned. default is black but if you rendered with say for example white then you click on the colour swatch to change it to white.
This doesn't affect the model or whatever you rendered...only helps to get rid of the white(or whatever colour you rendered the image against in lw) edge. it's too early in the morning...hope this makes sense :D

Philbert
06-26-2009, 01:14 PM
OK I'll have to try it. I'm rendering another shot at the moment so I'll have to try when that's done. I'm not actually using a background color in the render though it's an HDRI sphere

Philbert
06-26-2009, 01:52 PM
Nope, still no good, changing the background color to white makes a very slight difference. Here's a JPEG to show what it's supposed to look like:

Airplane propeller:
http://i151.photobucket.com/albums/s136/willohmsford/p47d_plane_prop_042w.jpg

I'll attach a frame of the propeller and the background plane if you want to try it yourself.

Actually, now that I look at the alpha in LW I see this, which is the part of the propeller that I'm seeing in AE. So the alpha isn't showing the full thing properly.

http://content.screencast.com/users/philnolan3d/folders/Jing/media/04c26974-38a5-4fa1-a494-5812f6f22fbb/2007-01-26_1554.png

nickdigital
06-26-2009, 03:23 PM
Hm, I can get close. I see what you mean about the alpha. I assume it's motion blur that's in the shot?

This is what I cobbled together in AfterFX with your stills. It's not perfect.

Tobian
06-26-2009, 03:26 PM
Are you saving out the file using the buffer export options, or just saving it from the 'image viewer'. If you do the former, you get the object appearing opaquely, where it exists in the plane, and the alpha mattes it out so it shouldn't make a difference what colour the backdrop is?

Philbert
06-26-2009, 03:42 PM
Hmm.. I was just rendering normally but saving as TGA32. I don't see anything in Render Buffer Export that would be related to this.

Tobian
06-26-2009, 03:47 PM
Hang on, just doing you an example scene :)

toby
06-26-2009, 04:10 PM
That looks correct to me, what is it that you prefer to see? If you want it more opaque you'd want to slow down the rotors, or you could even fudge the alpha if you want -

Background should always be black btw, black pixels don't get matted out by premultiplication.

Philbert
06-26-2009, 04:16 PM
How could it be right, It look good in LW, but not in AE or other programs after it's saved?

Tobian
06-26-2009, 04:23 PM
Ok sample scene..

Unpremultiply checked... You can see 2 images...

'output' is the saved RGB (f10)
'viewer' is how it appears in the LW previewer..

Try and comp that into a scene.. works rather nicely! :)

Philbert
06-26-2009, 04:35 PM
That's looking for a plugin called SunSky_Suncolor that I don't have. Know what that is?

Tobian
06-26-2009, 04:37 PM
Sorry i just thought everyone had that :)
http://pagesperso-orange.fr/dpont/plugins/Sunsky.html

Philbert
06-26-2009, 04:56 PM
Thanks I've never heard of it. I see that the alpha works nicely, what is unpremultiply?

toby
06-26-2009, 05:03 PM
How could it be right, It look good in LW, but not in AE or other programs after it's saved?
It's because Adobe's interpretation of alpha is jacked (there was a thread about it if you're curious). Open it in Shake or Nuke and it'll be good, so I'm sure it's coming out of lw correctly. But setting the premultiply color to black in AE seems to work too, I've always been able to find a setting that worked.

Philbert
06-26-2009, 05:12 PM
No that's why I started this thread, premultiply with black doesn't work. However whatever Tobian is doing seems to work great.

Tobian
06-26-2009, 05:13 PM
render globals > output > alpha format > unpremultiply alpha

:)

toby
06-26-2009, 05:19 PM
No that's why I started this thread, premultiply with black doesn't work. However whatever Tobian is doing seems to work great.
That's funny, I just tried it with Tobian's scene - oh well

Anyway, if you want to save some render time you can pre-blur the propellor with an orthographic render of it, map that and it's alpha onto a poly, and slowly rotate it. Saves having to use dozens passes on the whole frame.

Philbert
06-26-2009, 06:27 PM
render globals > output > alpha format > unpremultiply alpha

:)

Oh, you said "check" before so I was looking for a checkbox. Still no difference. What kills me is that this scene is actually about 3 years old and I'm reworking it since I never really liked the one on my reel. Thing is 3 years ago it worked fine, I'm pretty sure I just did the same thing I am doing.


That's funny, I just tried it with Tobian's scene - oh well

Anyway, if you want to save some render time you can pre-blur the propellor with an orthographic render of it, map that and it's alpha onto a poly, and slowly rotate it. Saves having to use dozens passes on the whole frame.

I thought about that because I've heard of that technique before. The problem is that the propeller disappears when viewed from the side.

Tobian
06-26-2009, 06:37 PM
So uh.. my scene works, and your scene doesn't ? Err well - investigate what's different. I don't know what all your render settings are?! :)

toby
06-26-2009, 07:04 PM
I thought about that because I've heard of that technique before. The problem is that the propeller disappears when viewed from the side.
Yip, that's the drawback


Oh, you said "check" before so I was looking for a checkbox. Still no difference. What kills me is that this scene is actually about 3 years old and I'm reworking it since I never really liked the one on my reel. Thing is 3 years ago it worked fine, I'm pretty sure I just did the same thing I am doing.
Try the Remove Color Matting under Effects/Channel/ (AE)
Posting the scene might help too

Philbert
06-26-2009, 10:04 PM
Here's the scene simplified to just the propeller. Just don't steal my model. :)

toby
06-26-2009, 11:32 PM
Ok, this is what it looks like in a screengrab and in AE, AE on the left.
The only alpha setting that causes a problem here is Straight Unmatted. The matte with color was left at default black.
If it still doesn't to work maybe check your color settings in AE, if it's making everything dark that could explain it.

Philbert
06-27-2009, 12:16 AM
I'm confused by your post. Neither one of those is correct. There should be two rings of yellow with only 4 small gaps in the rings, just like in the very first image I posted. The problem is in LightWave before it even gets saved out, it should have nothing to do with After Effects.

toby
06-27-2009, 12:41 AM
I'm confused by your post. Neither one of those is correct. There should be two rings of yellow with only 4 small gaps in the rings, just like in the very first image I posted. The problem is in LightWave before it even gets saved out, it should have nothing to do with After Effects.
I thought you said it looked ok in lw? Being on black makes mine look worse, I'm sure it's about the same as the one you posted with the background.

In any case, this is what you're going to get with this much motion and this much motion blur, unless you cheat it. Look at it this way - if you were to do a non-motion blurred render, each yellow stripe would take up something like 20x30 pixels. If you spread that patch of color over a 100 pixels with motion blur, it'll become about 1/4 as bright. One thing you can try right away is to increase the light on it.

Another thought I had, since you've got a lot of motion blur passes, you could surely turn off the anim cache and still have no radiosity flicker. 8 passes was enough for one of my animations to not flicker, and it should render waaay faster!

Philbert
06-27-2009, 03:04 AM
Well it is possible, since it works in Tobian's scene. Yes at first I said it looks good, but then I pointed out the alpha and showed you with a picture that even inside LightWave before exporting, the alpha looks bad.

I've been playing with his scene for the past few minutes and I think it has to do with the amount of motion blur. His is at 50%, mine is 100%. After messing with his amount I could get it to start disappearing like mine does.

Good point about the radiosity cache, it was really set up for the rest of the plane, I wasn't doing it to avoid flicker though, caching the rad. really cut down on the render time. I spent about 3 days rendering this scene on two computers.

Tobian
06-27-2009, 12:10 PM
Ok I now see what the problem was... Your render settings were epic weird! :)

I changed the settings to something more reasonable and got good results fasts :)

Because you had 50+ mblurpasses, each one generates a radiosity sampling. 2 yeilded acceptible results, but 3-4 should be perfect...

you also had no AA or adaptive sampling.. that's how Mblur WORKS period! :) for clean mblur use something like AA 12 and adaptive sampling of 0.01 (ish) the oversampling also takes care of the noise, so it comes out quite smooth too! :) The frame I did there rendered in about 36 seconds, and my computer is not too powerful :)

Tobian
06-27-2009, 12:20 PM
Oh and to get realistic falloff - drop the shutter efficiency to say 50% - which makes it realistically drop off from centre...

Philbert
06-27-2009, 12:56 PM
Thank you. I was sure I remembered hearing something like "when using motion blur the number of passes controls the AA", so I just kept adding passes to smooth out the graininess in the blur. It's been a while since I used it. Actually I've been using 3D Coat so much lately I've started to forget other simple LW things too. heh

So finally After Effects shows a nice propeller.
http://content.screencast.com/users/philnolan3d/folders/Jing/media/56709f2b-1fee-4cc4-b14a-a67f18adafae/2007-01-27_1444.png

Tobian
06-27-2009, 02:39 PM
It does, just the regular old AA and adaptive sampling also helps to smooth it out. The point about the Mblur passes is to allow you to separate out the amount of smoothness of the mblur from the AA. However, in this case, it was getting to silly levels, because the number of passes needed, exceeded what you needed. There was a little more graininess to my image than your settings, but I think it's acceptable, and you can always add a few more passes, or improved the AA levels, it's just about finding the happy medium between them! :)