So I did some testing and I honestly expected the reflections to line up to the orientation of the lights (22.5* rotation) but they don’t. Maybe I’m just tired and over thinking this, but from an orthographic camera, shouldn’t these reflections line up and if they don’t, is what Viscorbel trying to do physically correct?
The Falloff map works with the cosine of the angle, and not with the actual angle. The curve that viscorbel shows above is the graph of its inverse (the arccos function).
Hehe, yeah I’m trying to do so, but my maths skills are just not good enough.
I got the part with the facing ratio, but I can’t get the arccos-thing to work:
Haha! awesome man
Now we can use the osl in both falloff slots and have a linear result. Thanks!
In fact, you don’t even need to use a falloff map anymore. You can just use an output map to alter the curve, since this should be a little bit more effective for computation, I guess.
Yes, if you can recreate the same curve with an Output map, it’s probably going to be somewhat more efficient than the OSL shader (there’s some overhead involved with OSL, even if the shader is just one line).