0
$\begingroup$

I am trying to make a fresnel kind of effect that only is visible on the edges of an object. Kind of like a fading outline. So I tried to take the angle between the camera normal and object normal and depending on the size of the angle I want another color. This is how my shader graph looks like

enter image description here

I'm not sure if the vectors are normalized, hence the normalization nodes. Also not sure if the vector transformations from different spaces are correct, but I think so. The result looks like something I'm trying to achieve, but it's not so easy to see. Is there a way to visualize it better or "debug" the shader? And is this a correct setup for what I am trying to achieve?

$\endgroup$
  • 2
    $\begingroup$ May I ask why didn't you just use the fresnel node as a factor? $\endgroup$ – Georges Apr 28 at 14:26
  • $\begingroup$ @Georges doesn’t the fresnel node just act like a ”shell” on the object? I mean if I put it on a sphere it ads value not only on the outlines, but to the middle facing the camera as well? Sorry, if I aint making myself clear $\endgroup$ – Kyozoku Apr 28 at 14:34
  • $\begingroup$ You can try it yourself, just add a "Layer Weight" node from input in the shader editor, you can use either "Facing" or "Fresnel" Ctrl+Shift+RMB on the node to see it's effect in the viewport in render mode, if you need more control you can add a "Color Ramp" node. I usually use this node combination as a factor between two shaders or two textures. "Fersnel" is supposed to be more physically accurate, but sometimes I find "Facing" provides me better with the effect I'm after, so you need to experiment with these. $\endgroup$ – Georges Apr 28 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.