My question is very similar to this one, but the answers there don't capture the essence of the problem imo. Assume you have beveled paths in Blender, then every location on the path has a tangent vector that points in the direction of the path.
In the coordinate system of the camera, assuming the z-axis is our viewing direction, we are only interested in the x-y-portion of the tangential vectors. What you want to achieve is that path-parts that go into the same x-y-direction have the same coloring. This also means that a vector that points into the opposite direction another vector, will get the same color.
For people working with visualizations of vector fields, this is nothing new and besides coloring the magnitude of the vectors, one major application. A good test-case is a ring viewed from above because it contains all directions and one can easily check the correct coloring. I came up with the following solution in Blender 2.81
This is a simple nurbs-circle. I used the Geometry node to get the tangent vector and after converting the coordinate system, one can calculate the direction using trigonometry. I have 3 questions, but the first one is the major problem I'm trying to understand:
- In the small rendered view, one sees that on the blue and red spots, it almost looks as if the coloring changes too fast. It doesn't look so severe in the preview but I have the feeling that the color between blue and red on the left side takes a too large portion. Did I do something wrong or is there a reason for that?
- Is there a simpler node-structure that achieves the same?
- Is it a bug that the "Hue Saturation Value" doesn't work if the second color doesn't have the saturation set to max?