Hi everyone,
I want to create a flip flop like car paint shader and what I have done by now was just using a lerp with a fresnel node as the mask to blend between two colours.
But somehow it looks that the blend colour is visible where a lot of light is hitting the geometry and the fresnel is more dependent on the lighting angle than the camera angle.
Did I understand the fresnel wrong? is there an other way to reate this effect without going too deep into complex shaders?
Cheers,
Evil_Fischi
Replies
- Fresnel is dot product between the camera vector and the normal vector so its not light dependent.
- Yes its possible.
This is my material setup.
For me it loks like the flipflop effect is depending on the lightdirection in unreal, but in reality it does not seem to be depending on the direction of the light. So is there any explenation why it looks like that in Unreal?
Then:
Normalmap doesn't need to be plugged into the fresnel. It should just go into the normal input. If you do plug the normals into the fresnel, transform it from tangent space to world space first. You can do this if you want to get the fresnel affected by a different normalmap than the input attribute. When nothing is plugged in, that normal input of the fresnel takes the pixel normal world space by itself.
If you want it to get affected by a lights, thats more complicated, you'd need a blueprint with some nodes on the construction scripts so it picks up the directional light vector.
And then in the material, for that part, youd do a dot product between a vector 3 and your normals. And that vector 3 would be updated in the blueprint with the actual light vector from the level.