[Nuke-users] How does DeepRecolor distribute a target opacity across multiple samples?

2013-12-17 Thread Ivan Busquets
Hi,

Sorry for the repost. I sent this to the development list yesterday, but
posting over here as well to cast a broader net.

Has anyone dug around the "target input alpha" option in the DeepRecolor
node, and has some insight on how it is retargetting each sample internally?

Long story short, I'm trying to implement a procedure to re-target opacity
of each sample in a deep pixel, akin to what's happening in a DeepRecolor
node when "target input alpha" is checked.

I've got this to a point where it's working ok, but I think I might be
missing something, as my results differ from those you'd get in a
DeepRecolor.

My re-targetting algorithm is based on the assumption that the relative
opacity between samples should be preserved, but DeepRecolor clearly uses a
different approach.

Example:

Say you have a deep pixel with 2 samples, and the following opacities:

Samp1 :   0.4
Samp2 :   0.2

The accumulated opacity is 0.52  (Samp1 over Samp2). Note that Samp1
deliberately has an opacity of 2 times Samp2.

Now, let's say we want to re-target those samples to an accumulated opacity
of 0.9.

What I am doing is trying to calculate new opacities for Samp1 and Samp2 in
such a way that both of these conditions are met.

a) Samp1 == 2 * Samp2
b) Samp1 over Samp2 == 0.9

This gives me the following re-targeted values:

Samp1 :   0.829284

Samp2 :   0.414642


I'm happy with those, but it bugs me that DeepRecolor throws different
results:


Samp1 :   0.798617
Samp2 :   0.503434

Which meets the second condition (Samp1 over Samp2 == 0.9), but does not
preserve the relative opacities of the original samples.

It seems to me like DeepRecolor is applying some sort of non-linear
function to apply a different weight to each of the original samples, but I
haven't been able to figure out the logic of that weighting, or a reason
why it's done that way.

Does anyone have any insight/ideas on what DeepRecolor might be doing
internally?
Or a reason why you might want to distribute the target alpha in a
non-linear way?

Thanks in advance,
Ivan
___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

[Nuke-users] Disparity

2013-12-17 Thread Johannes Hezer

Hey Nukers,

I do have to expose my stupidity.
I do not fully understand the concept behind the disparity channels in 
nuke and how we should feed them from 3d.


We do have a shader that calculates the pixel distance between left to 
right eye and from right to left eye.

Those get rendered in the according eyes.
So the disparityL.x channel contains "left to right" in the Left image 
and "right to left" in the right image.


Now looking at nukes disparity setup I came to the conclusion (which I 
am questioning a lot),
that the disparity needs to go into the channels disparityL.x (we only 
have x difference) for the "left to right" stuff from the left eye and 
in the disparityR.x I copied the "right to left" from the right eye.


looking at that from the left view it all makes sense, so my next 
conclusion was that the "right view" of the disparity channel (which is 
the sum of disparityL and disparityR) does not need to have a "right 
view" or should the right view be the same as the left view...


The reconverge node behaves as expected but I am not sure how the 
disparity is supposed to look like from the right view.


So the questions are:
Does disparityL look the same through left and right eye ? Does it need 
to have a right eye ? or can the right eye be black ?
Does disparityR look the same through left and right eye ? Does it need 
to have a left eye ? or can the left eye be black ?

This all leads to the question is disparity "monoscopic" in nuke ?
with all that came another question if one can access the "other eye" in 
the expression node ?

like disparityL.left.x (I have tried some combinations without success)

Or is there somewhere a page that explains all that ??

Thanks in advance for enlightening me.

Cheers
Johannes



--
STUDIO RAKETE GmbH
Johannes Hezer, Compositing TD
Schomburgstr. 120
D - 22767 Hamburg

j.he...@studiorakete.de
Tel:+49 (0)40 - 380 375 69 - 0
Fax:+49 (0)40 - 380 375 69 - 99

--
Pflichtangaben laut Handelsgesetzbuch und GmbH-Gesetz:

STUDIO RAKETE GmbH
Schomburgstr. 120 D - 22767 Hamburg

www.studiorakete.de / i...@studiorakete.de

Geschaeftsfuehrer: Jana Bohl / Hans-Martin Rickers

Die Gesellschaft ist eingetragen im Handelregister des
Amtsgerichts Hamburg unter der Nummer HR B 95660
USt.-ID Nr.: DE 245787817



 ESET 8964 (20131025) 
The message was checked by ESET Mail Security.

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users