Ok cool. though I am having trouble figuring out how to remove the rgb channels from a deep in comp to make this work, Recoloring with a black constant, or a deep expression with 0 in the rgb channels, still renders out a black screen in Bokeh. And it still has the uncut defocused alpha from the 'a' channel of the deep. Or do the rgb channels need to be stripped out at render time?

Thanks,
Adam

On 07/12/2012 01:19 PM, Colin Doncaster wrote:
Hi,

If you remove the RGB channels from your deep image then Bokeh will do #1.

#2. It looks like this is an oversight, we used ChannelSet_knob and looking at the more recent c++ reference this has to be InputChannelSet_knob for "all" to show up. Not too sure if there's any other differences but we can change that easily.

Cheers

On 2012-07-12, at 3:01 PM, Adam Hazard wrote:

Thanks Dennis, took a good little while to figure out the order of operations and placement, but I got this to work with the dual phBokeh setup. Thank you!


However, I am having a bit of trouble figuring out Colin's single pgBokeh setup though.

Currently, I am doing the deep holdout to get the cut alpha I want. Then shuffle copying that alpha into the mask.a channel into the original beauty rgba. Then piping that into a deepRecolor and setting the channels to 'all'. That recolor is going into the 'Deep Input' of pgBokeh, and the previous shuffle copy is going into the 'Input'. In the pgBokeh I have the Bokeh channels set to rgba and switching the 'a' channel to the mask.a, since I can't set the channels to 'all'. Out of that I am then shuffle copying the cut defocused mask.a back into the rgba.a. However the defocused rgb is still uncut, and I cant seem to figure out how to cut the full rgb by the cut defocusd 'a', without loosing edge detail since I also dont have full uncut defocused a. All I have still is a full uncut nondefocused 'a'. Hopefully this all makes sense, but how are you setting this up for a single pgBokeh?

Additionally, I do have a couple suggestion for ease of use of the pgBokeh in this instance.

1. Since this node requires something plugged into 'Input', then it should also have an option to use the rgba from 'Input' and not default to the rgba of the 'Deep Input'. That way I can use the deep as a defocus mask but use what ever rgba I want plugged into 'Input', straight out of a deep holdout or whatever. Not sure why it requires something plugged into 'Input' when using Deeps. if it just ends up completely ignoring it, as far as I can tell. Unless I am missing some switch?

2. Include an 'all' in the Bokeh Channels dropdown.


If either of those would be possible, mainly #1, it would make this node much more useful for us in production, and would work like most other defocus nodes already in use.

Ok, thanks for any further help and suggestions.

-Adam


On 07/11/2012 07:24 PM, Colin Doncaster wrote:

You should be able to avoid the double defocus if you copy the alpha to a different channel first, do the holdout, do the defocus any make sure your pseudo alpha channel is included and then copy it back into the alpha.

Cheers

( sorry for the listjack )

On 2012-07-11, at 10:12 PM, Denis SCOLAN wrote:

Hi Adams,

Usually there are two cases where you can have NAN.
The first one would be if for one deep opacity sample you have NO value. The deep opacity sample has an opacity but no color so the deep to image is freaking out. Even if you want to assign a black value to a deep sample, you need to have a value in your alpha channel. The other case (rare but it happens) is when you are deepmerging two deepcolor streams and unfortunately one sample has the same position in space than an other sample from the other stream. The quick fix is to change slighty the depth of one of the stream by using a deeptransform in Z.

For pgBokeh, I know exactly what you are facing.
Before we've created our own deepholdout at Fuel, I've found one trick to kind of doing what you want.
It's expensive but it does the trick.
You need to defocus the color and the alpha separately and combine with a copy after pgBokeh.
How ?
First you have to create an holdout for the color : put a fully black color on the deep opacity you are using to cut out with a Constant ( 0,0,0,1) and and a deeprecolor. Then do a deep merge between the deep color stream and the "black stream". Then you have a deep holdout but the alpha is wrong because is the combinaison of the two streams.
So you need to deep holdout the alpha.
For doing that you have to use the same "black stream" and merge it with your deep color stream that you have to turn into fully white (same technic as above : recolor your deep color stream with a white constant (1,1,1,1). If you merge the "black" and the "white" stream you will have the holdout of the "alpha" but in the color pass. Now you can defocus each stream separately and combine then with copy alpha. You have to expect heavy renders but that the only way i've found at that time.

Good luck.
Denis
-FuelVFX


2012/7/12 Adam Hazard <[email protected] <mailto:[email protected]>>

    Thanks for the reply. I do know why I am getting nans after the
    recolor, because exactly what you describe, they are different
    alpha channels between the 2.  I didn't really elaborate  on my
    issue, because I was just hoping for a quick answer if copying
    deep values was possible. Anyways, what I am trying to do is 2
    deep operations in a row, but cant seem to figure out a way.

    First operation is cutting my renders with a deep holdout. Then
    trying to feed that into a  pgBokeh through the deep input. I
    was hoping I could cut the render, and then copy the deep
    values back into the stack after the holdout and then feed that
    into the pgBokeh.

    But yeah, the recolor gives nans because one alpha is full,
    uncut, while the other is cut. I wish the recolor had some
    options to choose which alpha to use or something, or to do no
    alpha operations. Otherwise it works just fine between the deep
    and regular uncut rgba.

    And yeah I was surprised to find out you loose the deep values
    after a holdout, and I really hope they provide something soon
    in an update. Anyways, any other ideas?

    Thanks again,
    Adam


    On 07/11/2012 05:49 PM, Denis SCOLAN wrote:
    Hi Adam,

    If you are trying to copy the color values of a 3D render on
    its own deep opacity you should use the deep recolor node for
    sure.
    The reasons why you have artifact is because your deep opacity
    isn't matching at 100% the alpha channel of your 3d render.
    If you ping-pong between the deep opacity and the alpha you'll
    see a difference.
    Why ? Because the filter setting you've got on your render
    (Blackman-Harris, Mitchell, etc.) aren't the same than the
    deep image filter.
    Basically the only filter that is the same for both is Box
    filter.
    So why do you have artifacts ? To understand that issue you
    have to know that the deep recolor is doing an Unpremult of
    your 3D render and then "multiply" it by the opacity level of
    the deep stream.
    It's like if you are repremultiplying a 3d render in Nuke with
    different alpha than the original... you'll have edges
    artifacts. Well, it is the same for deep stream.
    Here is a way to avoid this issue :
    Before plug 2D stream into the deep stream with a deep
    recolor, just do an unpremultiplacation test to see if you
    don't have illegal values (negative valus, nan, extremly high
    values).
    Then I strongly recommend to really do the unpremultiplication
    before and then the trick is to use the "alpha" of the deep
    image (with a deeptoimage) to remultiply the image before
    plugin it into the deep recolor node.
    It's a bit of an overkill but it works perfectly well.

    For the deepholdout question, in  the current state of Nuke
    you can't have a deep stream after the deep holdout.
    But I'm sure Nuke will do it in the future.

    I hope it helps.

    Denis.
    - FuelVFX


    2012/7/12 Adam Hazard <[email protected]
    <mailto:[email protected]>>

        Hi,

        Anyone know if it is possible to copy deep values, and add
        them into a non deep image? Maybe something like
        image>deepFromImage>deepExpression(with copied deep values
        from a deep read)?  Deep recolor doesn't seem to be doing
        the trick and is adding some edge artifacts and nans.

        Or on the other hand, and slightly related, if it is
        possible to some how keep deep information after a deep
        holdout?
        Thanks for any help.

        -Adam
        _______________________________________________
        Nuke-users mailing list
        [email protected]
        <mailto:[email protected]>,
        http://forums.thefoundry.co.uk/
        http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users




    _______________________________________________
    Nuke-users mailing list
    [email protected]  
<mailto:[email protected]>,http://forums.thefoundry.co.uk/
    http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


    _______________________________________________
    Nuke-users mailing list
    [email protected]
    <mailto:[email protected]>,
    http://forums.thefoundry.co.uk/
    http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


_______________________________________________
Nuke-users mailing list
[email protected] <mailto:[email protected]>, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users



_______________________________________________
Nuke-users mailing list
[email protected],http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users



_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to