User avatar
By tom
#235030
Activate the mask layer with Alt+clicking it prior to pasting.
User avatar
By Ernesto
#235329
tom wrote:It's not about the sky is not useful so it's rendering black. It's a technical must in compositing. Only with using alpha you can't crop the background perfectly because the sky will always appear in the pixels where you have blur due to dof or even on AA pixels when the edge is sharp. So, it will make your composition fail. This is one of the most common mistake in compositing. Instead the RGB channels comes pre-multiplied with black so you can easily unmultiply black using alpha in compositing applications.

I do not agree with this viewpoint, because:
1) I love the Maxwell Sky, and I trust in it, so, I will never try a composite that is too diferent from it. Having the original sky is usefull to find out the righ photograph to replace it, or to use certain transparency to create a new composition that really takes into account the sky colours, that anyway will be affecting all the objects in the scene.
2) The problems with skyblue pixels arround the sky, is true, but you are not solving it by rendering the sky black, you are just turning it to the black pixels problem arround the sky.
3) When you make a composite you have to take into consideration lots of things, as the reflections. If your object is reflecting the sky, there will be pixels that will show the sky colour in the borders, and making the sky black will not solve it.

Conclusion: With this Black Sky Idea you are introducing real new problems to the serious user, in order to solve partially a problem that occurs when the user do not take into account basic photo composition rules.

My opinion: go back to the full sky image no matter the alpha channel.

Ernesto
User avatar
By tom
#235333
Ernesto wrote:Conclusion: With this Black Sky Idea you are introducing real new problems to the serious user, in order to solve partially a problem that occurs when the user do not take into account basic photo composition rules.
It's not something we arbitrarily invented now. It's a known industrial standard among compositing professionals for years called "Black Matte (Pre-multiplied)". I suggest you going through the following article:
http://www.itbusinessnet.com/articles/v ... d=135386-0
User avatar
By mverta
#235337
That's not a bad article, and Tom's 100% correct - compositing standards are well established; those of us in vfx do it every day.

Bottom line is that if you have anti-aliased edges on your objects, the edges become permanently polluted by whatever color is behind them, sort of "trapped" in the anti-aliasing. If it's a single, uniform color in the background, then it can be "removed" by the compositor later, making the edges able to be filled by the new background instead. If you use anything other than a single solid color behind the object, like a gradient (sky) or other image, then you can't unpollute the anti-aliasing, and your composite is permanently ruined.

_Mike
User avatar
By deadalvs
#235353
i recently watched a dvd covering compositing. a thing i did not perfectly understand was pre-multiplication respectively un-premultiplication.

i know this has to do with the black edges when an image is mulpiplyed by it's alpha (black instead of the real color information). could someone explain this more technic-related ??
:roll:

[ in shake i heard it's best to un-premultiply every image before using further on with the div-node. ]
User avatar
By mverta
#235362
Here:

Straight Alphas vs. Premultiplied Alphas

To start, let's know one important thing: whether you're processing an image with Straight or Premultiplied alpha, in both cases the alpha channel will look exactly the same. Confusingly, what's different between an image with straight alpha versus one with premultiplied alpha is what's happening in the RGB channels, not in the alpha channels!

Here is a blown-up image of a white sphere on a green background:
  • Image
The edges are anti-aliased, which of course, makes the image look nice.
Here's the alpha channel for this render:
  • Image
Makes sense so far. But here's a problem - watch what happens if I use the alpha channel on the image, to recomposite over a red background:
  • Image
The green from the background is "trapped" in the anti-aliasing. This is called Premultiplying. The image is premultiplied with green.

Now, I used green to illustrate the point, but no matter what color is back there, even just the standard black in a Maxwell render, it still pollutes the edges with its color. For the skeptics, I'll prove it - here's a standard Maxwell render of the sphere on black:
  • Image
And here's what happens when you use its alpha channel to try and composite over red:
  • Image
So even though there's nothing actually back there in the scene, the anti-aliased edges are still polluted with black, creating a dark halo around the object when composited.

Now, most compositing apps know how to subtract this premultiplied background color - you just tell them what color it is. You say, "here comes an image that's premultiplied with green," and it can pull it out. But this only works if the original background color is absolutely uniform. So this will not work with a physical sky background, for example, or an HDR. The anti-aliased edges of objects set against physical sky will have a whole range of hues in them, so you can't pick a single value and remove the ring successfully. This is why many 3D apps use Straight Alphas. Here's how it works...


Remember I said the alpha channel was the same for both cases, so we start with the alpha channel render:
  • Image
As I mentioned, the difference is in the RGB channels. A straight alpha image "oversprays" the edges in the RGB channels, all the way to the anti-aliasing boundaries, making a fully aliased edge, like this:
  • Image
That looks like ass, but when combined with the alpha, you get this:
  • Image
A perfect composite, with nice anti-aliased edge, and no background color pollution. The overspraying ensures that the underlying alpha channel can cut through cleanly. Now it doesn't matter what image or color you put behind the sphere; it will always composite correctly.

Now, as you've noticed, the RGB image for the Straight Alpha looks like shit, with horrific aliasing. This would freak most people out, which is why most renderers embed the alpha channel in the file, as RGBA, and not as a separate file. This way, when you open the images in After Effects or wherever, you already see it with the alpha applied, and never see the crappy aliasing edge. But if you were to extract the RGB channels, this is what it would look like. Here's a real-world example:

RGB channels:
  • Image
Here I've temporarily disabled the alpha channel for this image, so we can see the raw, crappy RGB channels. Here's what the alpha channel looks like:
  • Image
Put the two together and you get:
  • Image
And because it's a straight alpha, I can use any background color or image, and get full gradients with no pollution:
  • Image
Now, this is an unpleasant combination of colors, but you can see the composite working properly with no halos or fringes.



Now you know!

_Mike
User avatar
By b-kandor
#235363
I learned something new today, and it's only 2 in the morning - Thanks! :)
User avatar
By Ernesto
#235468
tom wrote:
Ernesto wrote:Conclusion: With this Black Sky Idea you are introducing real new problems to the serious user, in order to solve partially a problem that occurs when the user do not take into account basic photo composition rules.
It's not something we arbitrarily invented now. It's a known industrial standard among compositing professionals for years called "Black Matte (Pre-multiplied)". I suggest you going through the following article:
http://www.itbusinessnet.com/articles/v ... d=135386-0
Ok, Tom, if you could ad a box, so that the user can check the option that fits better with the needs, it will keep everybody happy.

Ernesto

PS. In my opinion the background colour has to affect every object in the scene, and it is not something to get rid off, therefore I will never try to paste a sky that could have a too diferent from the original atmosphere.
User avatar
By deadalvs
#235520
thanks Mike ! thanks a lot.

i guess this helped many people !
User avatar
By rivoli
#235527
Ernesto wrote: PS. In my opinion the background colour has to affect every object in the scene, and it is not something to get rid off, therefore I will never try to paste a sky that could have a too diferent from the original atmosphere.
sure, in fact the sky will affect everything in scene. it doesn't matter whether it's rendered out or not in the rgb output.
so you're totally right, but then again, this has nothing to with the technical need to render against a black background to get working mattes.
By leoA4D
#236002
For those who are *not* ps experts, and I am not one, some of the pixels in the black areas of the MWR-alpha are gray resulting in a speckled or pepper effect over the background image. It required correcting in ps post.

This is based on limited experience with an 11 hour render (SL 12.42) + alpha and confirmed by switching the ps alpha-layers on/off.
User avatar
By hyltom
#237905
Mike, I don't understand how do you get this aliased alpha image? Is it the one included in an RGBA image? if yes, why maxwell can't output such image?
User avatar
By rivoli
#237934
hyltom wrote: if yes, why maxwell can't output such image?
actually it does output the same thing, only the alpha comes as a separate channel.
User avatar
By hyltom
#237943
rivoli wrote:actually it does output the same thing, only the alpha comes as a separate channel.
So how can i get this aliased alpha, because mine is always antialiased?
Sketchup 2025 Released

Thank you Fernando!!!!!!!!!!!!!!!!!!!!!!!!!!! hwol[…]

I've noticed that "export all" creates l[…]

hmmm can you elaborate a bit about the the use of […]

render engines and Maxwell

Funny, I think, that when I check CG sites they ar[…]