Announcement

Collapse
No announcement yet.

[Question] Is it possible to make a Shading Model Plugin in UE4?

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

    [Question] Is it possible to make a Shading Model Plugin in UE4?

    Hello everyone this is my first post. Thank you for your time if u are reading this.
    I believe Unreal Engine 4 has a great material editor system; it provides a lot of possibilities, and is quite easy to use. However, the thing that bugged me was that there was no way to access certain things like light vectors or light information inside the material editor. I consider myself quite new to this field so correct me if im wrong. The reason that there is no access to light information in the material editor has to do with the nature of Unreal working as a deferred renderer, so everything gets passed through in the route: UV->Textures->Other Material Editor Customizations->Material Input->Shading Model and G-buffer ->Post Process. The part where the lighting information takes action is after the Material Input, so unless you force to input it in certain ways (like making a directional light and inputting the Light Vector as a global material parameter, or doing things post process) , you have to dig into the Shading Model and G-buffer part of things....... which is the coding side of things.
    I've done some research of what people are capable of doing with Unreal Engine, and it is possible to make shading models. In this case I will take Cel Shading(some people call it Toon Shading or "Anime Shading", but I personally like calling it Cel Shading ) as an example. I was very surprised when I found out that Guilty Gear Xrd was done in Unreal(UDK), I was only interested in doing PBR in Unreal back then(which is well provided by the default Unreal Engine 4), it tickled me and I was curious about how they achieved that look with Unreal. I found a few things while looking into it. First of all there were two methods which I believe don not require coding at all.
    the post process method:
    https://qiita.com/junyash/items/0e528e1f291a710cf04f (its in Japanese, but I think you can find a lot of articles about it),
    https://www.youtube.com/watch?v=_bpQoI5Xrx8 (another one which also works)
    the limitations of this is that it changes the whole screen. so everything would be effected.

    the material editor method:
    https://www.youtube.com/watch?v=9YQEAvvzh0k&t=489s
    the limitations of this is that it doesn't receive shadows properly. and is limited to the light you bind it with

    these methods are okay but it doesn't feel like the best way.
    so I digged in more and finally I found out someone has already managed to build a custom shading model inside UE4, which opens up a whole new gate for me.

    https://blog.felixkate.net/2016/05/2...ading-model-1/
    https://forums.unrealengine.com/comm...-shading-model


    the actual code:
    https://github.com/marynate/UnrealEn...8-release-toon (requires a github account and Epic games added)

    it works like a miracle, however the code is written into the Engine. In that case the Engine needs to built customly in order to use it which causes some inconvenience. it means that this engine is its own version, and if I made anything in it, that may require someone else to have the same thing, building the whole engine is quite long, it would be a lot nicer if this was made as a plugin.

    Ive been keeping up with the Unreal Engine news-feed, in 4.17 update I saw a feature that says Shaders can now be added into Plugins, however all I have found was "global shader" plugins which I believe have to do with post processing.

    If something like a Shading Model Plugin can be achieved, I believe there would be a ton of possibilities not just limited to Celshading.

    Thank you for you time and have a Merry Christmas.
    Last edited by Yiyang Buffalo; 12-24-2017, 05:34 PM.
Working...
X