Announcement

Collapse
No announcement yet.

Fresnel Node -> linear gradient

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Fresnel Node -> linear gradient

    Hi,
    I have a question regarding the two Fresnel nodes.

    If I use the simple one, that is the Fresnel Utility node, and set the exponent to 1 and the BaseReflectionFractionIn to 0 is the result a linear gradient?
    Does it start at a view angle of 0 degrees at pure black and and then progress LINEARLY to pure white at an angle of 90 degrees?
    Or is there some sort of internal fresnel math going on that distorts the gradient?
    If the latter is the case, is it possible to create such a linear gradient in some other way?

    Another question regards the more complex Fresnel node, that is the one under Vector Ops.
    The manual states about the input "Inverse Fesnel(B)":
    "This will allow you to invert the effect of the Fresnel. This is useful if you want the Fresnel to only be applied in the center or at the edges."
    What does "only in the center or at the edges" mean? Is this a strange way of saying that the gradient is simply inverted or is there something else? Or is there something else going on as well?


    #2
    fresnel is a dot product between camera vector and your surface normals. The further the geometry normals bend away from your camera, the higher the value wil be returned.

    A dot product returns -1.0 if two (direction) vectors point in opposite direction, returns 0.0 if two vectors are perpendicular, and returns 1.0 if two vectors point at exact the same direction.

    So to get a fresnel effect (=brighter at the 'edges') the dot product is extracted from 1.0. saturate( 1.0 - dot(normal, cameravector) ) (and saturated/clamped between 0-1)

    Inversed fresnel means it doesn't subtract the dot product from 1.0, so the normals 'pointing' at the camera get 1.0 added (thus brighter in the 'center' in stead of 'the edges').







    Comment


      #3
      Ok, that would mean that it does fade linearly.
      Thank you very much for the answer.

      I was wondering if it made sense in Unreal to plug a fresnel node into a curve node shaped like a reflectance curve of a specific material. Since the gradient is linear it should work fine with dielectics. The metal/non-metal workflow in Unreal appears to make the use of reflectance curves approach unsuitable for metal objects, though.
      Since "specular" takes only brightness values (as opposed to color values) and albedo includes the color of the reflection (as opposed diffuse) makes this approach.

      Or would it make sense to simply plug the reflectance curve into the metal AND albedo input?

      Is there some information on how exactly the specific inputs of a shader add up to the output? I find principles how to control a PBR shader when using the diffuse/specular approach pretty easy to understand but the metal/non-metal approach seems to be more complicated.

      Comment

      Working...
      X