No announcement yet.

Formulas to Blueprint Scripting (Material-based)

  • Filter
  • Time
  • Show
Clear All
new posts

    Formulas to Blueprint Scripting (Material-based)


    I've been working on Unreal for a bit of time, yesterday I was reading Naughty Dog Tech Art PDF (that can be found here).

    Then in page 46, that moss material got my attention; microfiber BRDF with sheen, Light Wrap, Fuzzy Shading and Parallax Shadows.
    After searching the web, I failed to finding anything about Sheen in UE4 but I Found that Unreal have a function called "Fuzzy Shading Grass".

    Then Searching about Lightwrap that is:

    This modifies the basic NdotL of the light, letting it
    travel further around the mesh. This simulates both Subsurface Scattering, and also
    the phenomenon where fuzzy fibers beyond the usual 90-degree light terminator may
    not be in shadow. Our light wrap ignores the normal map, so it fills in the cracks
    more nicely. And the artist can also supply a tint for the wrapped light (in this case,
    green!) This is inspired by Eric Penner’s Pre-Integrated Subsurface Scattering. For a
    good monochromatic solution, refer to Steve McAuley’s Extension to Energy-Conserving
    Wrapped Diffuse.
    Steve McAuley's Extension to Energy-Conserving Wrap Diffuse (that can be found here) got my attention, but I got no experience in C++ to use the formula in UE4.

    Someone could help me port that formula and the Microfiber BRDF model to Unreal so I can achieve the same effect or/and Would help if someone could help me understand the BRDF Microfiber formula (also can be found here at page 6) so I can port that to Blueprint Script?

    I got stuck on how to get the angle from lights that affect the material, "light source" node only works with Deferred Decals, and "calclightsourceangle" function gives me a vector 3 value.