PDA

View Full Version : Straight 32bit alpha from Lightwave?


Avrigus
12-07-2003, 11:03 PM
Greetings,

Does anyone know of a plugin or image exporter that lets you render your 32bit images out of Lightwave with a straight alpha? (as opposed to the premultiplied alpha that Lightwave outputs by default).

The client we are working for requires straight 32bit PNG's so our work around from Lightwave is to render 32bit images then load them into After Effects then output them from After Effects as a straight 32bit image.

We've messed around with the "Fader alpha mode" tickbox in the render settings which seems to simulate a straight alpha but isn't quite what we need.

Any help or suggestions would be grand :thumbsup:

LittleFenris
12-08-2003, 02:48 PM
Could you tell me what the difference between those is? I'm interested since I don't know what the technical and practical differences of the 2 are. :shrug:

tburbage3
12-08-2003, 07:37 PM
I seem to recall that Arnie Cachelin wrote an Image Filter LScript to unmultiply -- but don't know off hand whether it ships with the current product or not or what its name was.

Maybe this will jog another reader's memory...

Found a reference to "Alpha Clip" on Flay which may or may not do what you want. You might take a look at that.

All in all, it still might be faster to do it the way you are doing it now via After Effects.

MooseDog
12-08-2003, 07:47 PM
straight alpha: think of your stack of layers in photoshop. one of those layers contains an alpha mask. needless to say, the other layers do not contain that alpha information.

pre-multiplied: the other color layers will reflect some of that mask information (i.e. some blurring for instance) and are not true, straight, unadulterated color layers.

correct me if i'm wrong anyone :wip:

Steve Warner
12-08-2003, 07:50 PM
Would Unmult for LightWave (http://www.ats-3d.com/post_Alpha/index.htm) from Al Street do what you're looking for?

Or possibly John Knoll's Unmult (for After Effects) (http://www.digitalanarchy.com/spkKnoll/knoll_unmult.html)?

Avrigus
12-10-2003, 09:52 PM
Hey guys,

Thanks for your help so far, although Unmult and Post_Alpha2 don't do exactly what i'm after. I'll have a search around for Arnie's Lscript. I would have thought it would be more in the realm of an image exporter plugin.

Ohh well, I guess AE will have to stay in our pipeline for the time being :cry:

tburbage3
12-11-2003, 04:54 AM
I think what I was remembering is 'SpriteEdger'. I have it, but now don't recall whether it came with the package or not... It has an option to unmultiply edges -- but only by specifying a single color background. If you're just talking render against a black backdrop or something, it should work. I just tried a quick experiment, and it did seem to do the trick against a black background. On the other hand, I'm not sure I saw the difference between its output and that created using Fader Alpha.

Let us know how it goes.

Avrigus
12-11-2003, 09:42 PM
Sprite edger isn't what we're after, here's an example of exactly what i'm talking about.

I created a green sphere and used a gradient incidence angle on its transparency channel so that the middle is transparent and the sides are opaque. I rendered it in layout with a "hot pink" background and saved it out as a 32bit image.

When you load it directly into photoshop you can see the pink background bleeding into the transparency of the ball (see image below on the left), that's because Lightwave outputs a premultiplied 32bit image.

To turn this image into a straight alpha image I load it into after effects where it asks how I want to treat the embeded alpha channel. I select premultiplied and then choose the exact colour of the background I used in Lightwave (the hot pink color). I then export the PNG image (or sequence) and in the options choose "straight alpha".

When I load the the image into Photoshop you can see that the premultiplied color has been removed by AE and we're left with a straight alpha channel (see image below on the right).

http://www.avrigus.com/alpha-balls.jpg

There has to be a way to output a straight 32bit image from Lightwave without having to mess around with After Effects. If there isn't then put it on the top of my Lightwave 8 features wish list! :love:

js33
12-11-2003, 11:57 PM
Why are you using a "hot pink" background? Just use a white background and your alpha should be correct. You can also alter the way the alpha image is output in the surface panel>advanced.
Your options are:
1. Unaffected by surface.
2. Constant Value with a range setting 0-255.
3. Surface Opacity
4. Shadow density.

Cheers,
JS

Cman
12-12-2003, 12:02 AM
You dont' understand.
If he used a black background, then black would bleed through because it's premultiplied.

I hope you find the answer and post it here Avrigus.

js33
12-12-2003, 12:05 AM
OK well Constant Value of 255 will give him a solid alpha if that's what he's after. Surface opacity will give you a transparent center if that's what he's after.

Here is an example from photoshop. I rendered the ball as a 32 bit tga from LW with surface>advanced>alpha channel set to surface opacity. Then in PS7 I copied the alpha to the layer as a mask. If you have PS6 it will do that by default.

Test ball (http://jsgraphics.tv/ball.jpg)


Cheers,
JS

hrgiger
12-12-2003, 12:07 AM
The other day I rendered out an image and I forgot to specify my image format. It was set on tga and when I went to open up the file, it opened up photoshop and all that was there was the model in it's own layer with no background. Very cool! I didn't know you could do that. You could make an alpha from that, could you not? Sorry if I misunderstood what you were loooking for, I'm not up on my alphas other, then using them as a texture layer in the surface editor to cut from the surface below it.

anieves
12-12-2003, 12:25 AM
hr: I belive that it was a bug in the tga file format plug in PS. Adobe released and updated tga plug to fix the problem. I ran into a situation where that automatic layer in the old tga was a problem but cann't recall exactly what that was... :hmm:

js33
12-12-2003, 12:37 AM
Earlier versions of PS always put the alpha on the alpha channel then in 6 they changed the tga alpha to be a layer mask by default and it upset alot of people that needed the seperate alpha so they changed it back. Yes they did release an updated tga plugin to fix it. It was also fixed in 7.

Cheers,
JS

Avrigus
12-12-2003, 04:51 AM
Originally posted by js33
Why are you using a "hot pink" background? Just use a black background and your alpha should be correct. You can also alter the way the alpha image is output in the surface panel>advanced.
Your options are:
1. Unaffected by surface.
2. Constant Value with a range setting 0-255.
3. Surface Opacity
4. Shadow density.


I don't think you understand what i'm after. I simply want to know if there's a way to render a 32bit image out of Lightwave with a Straight alpha channel.

I used a "hot pink" background to demonstrate what the raw 32bit image out of Lightwave looks like when loaded directly into photoshop, pink looks much more obvious than black.

It seems that Lightwave can only output premultiplied 32bit images. As I said in my opening post in this thread our client needs these images to be PNG's with a straight alpha.

So if there were a way to output a straight alpha directly from Lightwave I would be a happy man :applause:

js33
12-12-2003, 05:09 AM
When you say "straight alpha" do you mean a solid alpha?
As I said you can get that with a surface>advanced>alpha channel set to Constant Value of 255. Save as 32 bit.

If you want the center to be transparent then a surface>advanced>alpha channel set to surface opacity. Save as 32 bit.

It looks like this in PS.

Ball test (http://jsgraphics.tv/ball.jpg)

What is your final use of the images? Are they being composited in with other things for a video? Or a game? Website?

It would seem like you would need to take them into AE anyway.
I mean the alpha channel in LW is useless unless you are compositing it with something else.

Cheers,
JS

Cman
12-12-2003, 01:04 PM
js33 ou are completly missing it. If you even look atyour ball example you will see black bleeding into the alpha of the image. That means the alpha is multiplied and not straight. straight would mean,sort of like getting your image to alpha over alpha, no color at all multiplied into the transparency of the ball.

Sounds like the only way is the AE conversion being done.
good luck!

CourtJester
12-12-2003, 03:01 PM
Originally posted by Cman
I hope you find the answer and post it here Avrigus.

Hear here! I was just talking about this issue yesterday with our editor.

I also suggested to Newtek via the beta list a few years back(had a buddy on it) that LW should be "alpha aware" not only in terms of its render output, but with regards to texture alpha also. Currently, LW render output is always premultiplied, but assumes a straight alpha for texturing (!), which gives fringes on edges of decals, etc. when you render them out of LW.

Note: the term "premultiplied" originates from the mathematics used in compositing. The Steven Wright book on compositing is an excellent reference for this.

js33
12-12-2003, 04:10 PM
Originally posted by Cman
js33 ou are completly missing it. If you even look atyour ball example you will see black bleeding into the alpha of the image. That means the alpha is multiplied and not straight. straight would mean,sort of like getting your image to alpha over alpha, no color at all multiplied into the transparency of the ball.

Sounds like the only way is the AE conversion being done.
good luck!

Just trying to help.
Yeah i see what you're saying about the black premultiplied in the image. I did some more tests. I set the background to white and the surface>advanced> to the default of surface opacity and saved as a 32 bit png. Here is the unaltered file opened in PS7.
It's premultiplied with white now but is closer to the AE post.
I opened the file in PS and AE and I see the difference.
I guess there is no way to get the same results without a transparent background option in LW.

Ball2 (http://jsgraphics.tv/ball2.jpg)


Cheers,
JS

Avrigus
12-13-2003, 11:14 AM
I think I may have found an answer for this problem guys!

I was chatting to Jonny Gorden (aka Kretin) and he clarified the use of the "fader alpha mode" checkbox. Basically you can get a straight 32bit image when you check the Fader Alpha Mode box only when you render your image with a black background!

I tested this on Friday afternoon and it yields exactly the same results as my post After Effects image. It would have saved me a lot of time if Newtek explained this feature a little more clearly than "This option should only be used when the alpha channel is used to control a video fader".

Personally I think the handling of 32bit image output should have more options (like the After Effects output options panel). Anyway, this fix will keep us happy for the time being :applause:

Cman
12-13-2003, 02:41 PM
Excellent! Thanks for sharing. :)

CGTalk Moderation
01-16-2006, 08:00 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.