Hi! I need some help with a material I want to achieve.
I want to make an unlit material that emulates a directional light from a custom
angle and make it constant relative to the camera. That means that If I orbit with the camera, the light will rotate with the camera too making the light direction always fixed related to the camera.
I can just achieve the effect I want from a fixed view point but I cant figure out to fix the angle of the light with the angle of the camera view.
I started from scratch and I think A have a good one.
This one includes light/shadow/hardness/rim light control and highlight
And finally it is fixed with the camera so I rotate the camera around and light is consistent.
here is a sample video (cam is orbiting the elements)
You need to click the Transform node, and change the source to view space. I think this should work in 4.x.
The remap itself isn’t necessary really, I just stuck that in there to bring in the edges. Could do that with other nodes, but the values for the remap should be from 0.x to 1 on input.
I updated the material using a bit of yours and a bit of my material and now I am super happy with the results.
Your approach works perfect for the main goal (shading from camera) but I noticed
Vivew aligned reflection works better for the specular highlight
Thanks man!