This is a simple material shader written for use with Megascan assets in Unreal Engine. It is written in Blueprint for use in Unreal Engine 4.24, but should be scalable for use in versions 4.25 and later (if not immediately usable).
A megascan is a high-resolution scan of a real world object. Megascans can be used to create remarkably photorealistic scenes in Unreal Engine.
This shader allows one to change the materials properties of the megascan. While this shader allows one to change ambient occlusion, specular reflectance, roughness, and cavity properties of the megascan material, it can be extended to provide support for more properties!
The heart of the shader itself is the UE4 blueprint that provides both the underlying shader math and the user interface (UI) code that allows users to easily change material properties in the Editor. As the values are changed in the editor, they are used as inputs to update the shader. The shader then applies the updated values to the material instance, resulting in an updated look in real time.
To comply with the terms of the Unreal Engine EULA, this project can be used in UE4/Twinmotion ONLY.
Special thanks for Michael Gerard for his udemy course on megascan shaders. Please check out his LinkedIn page here.
And, as well, the good people at Quixel and Unreal Engine for making this all possible. ;)