Home Unreal Engine

FlipFlop Car Paint

polycounter lvl 3
Offline / Send Message
Evil_Fischi polycounter lvl 3
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.
httpss-media-cache-ak0pinimgcomoriginals3ed3ec3ed3ec679ca3e9c4cde63f970d2eb2e2jpg
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

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    - Showing your material would help...
    - Fresnel is dot product between the camera vector and the normal vector so its not light dependent.
    - Yes its possible.
  • Evil_Fischi
    Options
    Offline / Send Message
    Evil_Fischi polycounter lvl 3

    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?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Alright I see this will be a bit complicated... So first of all you are changing the normal direction with that lerp before the fresnel. Normals should be in range of 0,-1 so then if you want flat normal angle, your vector 3 would be 0,0,1. I guess that constant 1 with 0.5 in the alpha of the lerp would be a blend factor for blending between the normalmap and flat normals...

    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.
  • Evil_Fischi
    Options
    Offline / Send Message
    Evil_Fischi polycounter lvl 3
    ok I got this, thank you very much :)
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Great. Let me know if there is any issues still.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    You could also do like this... 

  • Gilgamesh
    Options
    Offline / Send Message
    Gilgamesh polycounter lvl 12
    Btw the paint is called Chromaflair,  I remember when it first came to the UK we had a Ducati 916 with fully painted in chromaflair and it was one of the first ever vehicles to have it in the uk.  On our stands at the Bike shows it would draw hundreds of people all day long.  Ah those were the days.  Sorry can't help with the shader but I'll take a look at some light vector stuff when i get home from work.
Sign In or Register to comment.