Page MenuHome

Fix for T76984: Normal Node not drawing properly in compositor.
Needs ReviewPublic

Authored by Evan Wilson (EAW) on Sat, May 23, 3:50 PM.

Details

Summary

The normal node draws the bottom input widget as black at all times and cannot be controlled in the compositor.

This happens because the socket has a default value of a zero vector (0, 0, 0).
To fix this, we set the default value to the unit vector (0, 0, 1).

This was fixed in the shader editor in rB25f1783673de. This patch applies the same change to the compositor.

(Note: The above is adapted from the summary of rB25f1783673de. Credit to @Omar Emara (OmarSquircleArt) )

Diff Detail

Repository
rB Blender
Branch
comp-normal-node (branched from master)
Build Status
Buildable 8174
Build 8174: arc lint + arc unit

Event Timeline

Evan Wilson (EAW) requested review of this revision.Sat, May 23, 3:50 PM
Evan Wilson (EAW) created this revision.
Evan Wilson (EAW) added a comment.EditedSat, May 23, 4:33 PM

EDIT: The input widget affects the dot product. I only tested the vector output socket, and wasn't testing the dot output socket, so ignore the rest of this post.

Looking at this more closely, it appears that changing the input vector manually (via the widget) has no effect. While this behavior matches what is in the shader editor, I can't see what the use of a widget that does nothing is. It only serves to confuse users IMO. I will re-title this a WIP. I am not sure how to remove the review request.

My question to @Jeroen Bakker (jbakker) and @Sergey Sharybin (sergey) is: do we want users to be able to manually input vectors at all? Either via the widget or by manually entering the numbers into an input slider?

Evan Wilson (EAW) retitled this revision from Fix for T76984: Normal Node not drawing properly in compositor. to WIP: Fix for T76984: Normal Node not drawing properly in compositor..Sat, May 23, 4:34 PM
Evan Wilson (EAW) added a project: Nodes.

Did you check why exactly socket value is ignored in Compositoir? I can think that in shader it is ignored due to implicit link to the surface normal, but such links are not added in compositor.

Evan Wilson (EAW) retitled this revision from WIP: Fix for T76984: Normal Node not drawing properly in compositor. to Fix for T76984: Normal Node not drawing properly in compositor..Mon, May 25, 5:15 PM
Evan Wilson (EAW) edited the summary of this revision. (Show Details)