Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output difference between Pure Nuke Implementation and Nuke Blink Node. #5

Open
KelSolaar opened this issue Aug 7, 2020 · 3 comments
Assignees

Comments

@KelSolaar
Copy link
Collaborator

@jedypod, @nick-shaw :
While implementing the Python version, I just noticed a difference between the Pure Nuke Implementation and Nuke Blink Node for colours that are all negatives:

image

It has something to do with the toe node that is disabled according to shd_rolloff, the Blink Node seems to match my loose Python pot so far.

@nick-shaw
Copy link
Collaborator

Good catch @KelSolaar. It seems that when all three channels are negative, the Blink result is r=g=b=max(rgb), whereas with pure Nuke the lower two are compressed toward the max value. The latter seems the more desirable result, but the Blink one will probably be what happens with all the others. I'll investigate.

@nick-shaw
Copy link
Collaborator

It appears that because when all three channels are negative, max(rgb) is negative, the ach_shd calculation fails because (1.0-ach)<(1.0-shd_rolloff) is false if ach is negative. Therefore instead of a passthru, the roll-off calculation is used which includes a division by shd_rolloff and thus produces an inf if shd_rolloff is zero.

At least that seems to me to be what is happening.

@nick-shaw
Copy link
Collaborator

When bypassing the shadow roll-off calculation in Blink, the results still don't match. This turns out to be because Nuke's divide merge mode is not a simple mathematical divide. It seems to be a pass-thru if the denominator is negative.

Nuke's merge mode description says:

divide A/B, 0 if A<0 and B<0

But it would appear to be:

divide A/B, A if B<0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants