Hi Colin, That's problably a cleaner solution indeed, thank you for the tip. Enjoy pgBokeh Adam !
Denis -FuelVFX 2012/7/12 Colin Doncaster <[email protected]> > > 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]> > >> 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]> >> >>> 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], http://forums.thefoundry.co.uk/ >>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >>> >> >> >> >> _______________________________________________ >> Nuke-users mailing [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 > > > > _______________________________________________ > 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
