-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
Implement "Add Image Diff" node #2385
base: main
Are you sure you want to change the base?
Implement "Add Image Diff" node #2385
Conversation
Fixes a name check error
Fixes another name check fail.
Not sure what the Pyright error is about; it looks like it's unhappy about this line:
Is that a false positive? The code seems to work OK. |
Just add a |
@RunDevelopment You're suggesting applying the High Pass node to the |
I think I understand what you want to do now. Essentially, you have an LR image This would also explain why my suggestion with High Pass kinda works. High Pass can somewhat approximate the We can split what your node is doing in 2 parts: calculating
Of course, my above suggestions assume that I understood your use case correctly. So did I get that correctly? If so, what do you think about my suggestions? |
Actually, I think I'm gonna implement custom "blurred" images for High Pass quickly myself. It's a feature I wanted before anyway. |
@RunDevelopment Yes, I think your description of my use case is accurate (unless I'm misreading, which I suppose is possible). The main reason I combined them into one node was that I wasn't sure if there was any practical use for a diff image besides adding it to another image, and also I wasn't sure if passing around negative RGB values between nodes would break anything. If passing around negative RGB values between nodes is OK, then yes, I think splitting this node in two is OK. One potential caveat: my implementation has special-case logic for fully transparent pixels, which was necessary for RGBA images to look correct. I'm not sure whether High Pass and Overlay can do that out of the box, nor am I sure whether adding that special-case logic to High Pass and Overlay will break other use cases. |
I have an entire folder of just these high frequency details :) They are super useful to have around when you want to add more crunch to a texture.
I would. We only allow passing 0-1 values. That's why High Pass does the
The alpha logic in High Pass is just something tacked on. It's kinda broken rn tbh. We might as well fix it... It's the same old alpha == 0 -> diff = 0, right? |
@RunDevelopment Hmm, if potentially lossy workarounds are needed for passing between nodes, I think I'd prefer to keep this within one node, so that users don't have to analyze whether they're hitting the lossy condition. Unless you have another way to fix that?
This PR copies the reference goal pixel (i.e. it discards the reference init pixel and the input pixel) if the input pixel is fully transparent. This is the correct behavior for my use case, but I don't know whether that behavior would break other use cases. |
@RunDevelopment Thoughts on how to proceed with this PR? |
This PR implements an "Add Image Diff" node. The intended usage looks like this: