Toon shading model

is great news! Thank you :cool:

Iā€™ve been keeping an eye on your thread since your shading model would solve many issues Iā€™ve been having making type of effect through post-process in the last monthā€¦ like being stuck with affecting the scene globally and not being able to have control over specific objects much(Iā€™m already using too much custom depth).

I canā€™t wait to play around with it.

[EDIT]

Really glad you made (wouldā€™ve bought if you were able to sell it, will gladly give attribution if ever release anything). Iā€™ll finally be able to focus more on modeling and particles. These last months have been an arduous journey of just trying to get a specific visual style that is actually usableā€¦

Itā€™s submitted, please try it out and post pretty pictures and/or feedback. You can find the Pull Request here:

https://github.com/EpicGames/UnrealEngine/pull/1552
Make sure you are logged into github with the account linked to your unreal engine account or you will get a 404 error!

Note: to allow for various half toony styles, materials with shading model will default to having regular indirect lighting and reflections. To create a completely flat material, make the material AO black and add your flat shadow color to the emissive channel.

Note number two: For some reason material AO does not block screen space reflections. As a result you might get inappropriate reflections when using the previous technique. Simply raise the base roughness to get rid of them or turn off SSR altogether if you donā€™t need it anyway. I did not change behaviour as all shading models handle SSR way. If anyone from Epic reads : Iā€™d like to know why you chose over blocking SSR with material AO, which seems more logical to me.

Awesome! Will do.

Hehe doubt Iā€™ll sleep much tonight :stuck_out_tongue_winking_eye:

shader is amazing. Thank you so much.

The shading model is phenomenal.

Only been testing for about an hour and it does everything I need :smiley:

Going to post stuff as soon as I have good examples to show. Hehe is going to be a great week.

is seriously awesome and generous.
Your work is really impressive.
Thanks.

Thank you!!

could someone please tell me what i have to do to set up correctly? i am not a coder and have absolutely no clue :frowning:

Thank you so much for , after hours and hours of searching, the best I could find were some post-processing filters that wouldnā€™t of worked how I needed. I was planning on reworking or scrapping the project Iā€™m working on if I was still unable to find anything today, so has come as a massive relief to me!

  • Unfortunately when I click the Github link all Iā€™m getting is a 404 error, so Iā€™ve not yet been able to work with shader model yet, hopefully can be fixed soon :frowning:

aside I have two questions/possible requests/feedback for future implementation that would complete the tools Iā€™d need to take my project to completion:

  1. In my 3DApp Iā€™m currently using vertex color as an AO-like input to create user-defined areas of shadow on the model that are constantly dark, these then blend together with the regular shading, appearing as one.
    effect is really helpful for making the model look more 2D along with the extra control and detail it provides.

  1. Iā€™ve not yet gotten far in my personal project, however one of the next things I was planning on doing is using a texture map to define the colour of the shadowed areas, sort of similar to subsurface colour.
    would be really helpful for visually communicating what kind of surface something is, EG: Lighter shadows could give the impression of something being thin and light (for example hair), redder, more saturated shadows more fleshy and soft, darker shadows, harder and heavier like metal or stone.

Other than those two features, shader model appears to be absolutely perfect for my project, I canā€™t thank you enough for your generosity!

You either have to learn how to compile the engine or you have to wait and hope Epic integrates the PR. If I remember correctly the EULA forbids redistributing the editor itself and even if it didnā€™t I donā€™t have the space to host such a big download. So I donā€™t think there are many other options.

On the positive side: compiling the editor is actually not that hard and quite well documented.

simply means you are not logged in to github. The engine source is in a private repo, so you have to be logged in to reach it. For some reason github just gives you a really unhelpful 404 instead of a informative ā€œplease log inā€ error.

is possible with the current implementation. Remember that itā€™s a shading model, not a single material, so you can use the material editor to achieve effect.

is also possible. To add color to the shadowed area you simply place something in the emissive slot. There is no need for to simply be a float, add whatever you like.

Awesome! thank you for the quick reply - I wasnā€™t sure how easy these effects would be to pull off since Iā€™m still fairly unfamiliar with Unreal 4, Iā€™ll get there :slight_smile:

Also, having never used GitHub before, simply getting a 404 was more confusing than anything else, and a google search to check if it was my fault or not just told me that it was an error on the siteā€™s end
thank you for clearing it up!

EDIT- Iā€™ve created a Github account, however Iā€™m still getting the same 404 error. I tried a different browser client in case chrome was causing the issue, no luck still.

EDIT 2- Fixed now, it was just issues with the Unreal/Github account linking and my own stupidity.

Did you link your unreal engine account to your github account? If so, are you able to access the regular unreal engine repo?

Whatā€™s about cell shadding or the same, anime shadding style?

is awesome!! Iā€™ll post a screenshot of one of my models here with the shader once I get it up and running:)

Thanks again!

Commenting to say I hope it gets integrated. Really great work.

Nice work.

looks incredible. Hoping it gets publicly usable (integrated or available in marketplace)

Hey, nice work! I was hunting around trying to find a good toon shader for UE4 and came across . Just got it built earlier tonight and have been messing around. I was wondering if you could post the settings you used for your teapots and your windwaker shots. Iā€™m still trying to sort out how to relate to what I traditionally think of with Cel Shading, as having x number of bands, each a specific amount of lighting. (So say, 2 bands, one where the normal is aligned with the light source 100% to 40% is one brightness and 40% to 0% is another).

Unreal uses 0 to 1 ranges for all parameters so a number of steps/bands would not have been very consistent. Instead I went with step size, which you can see as 1/number of steps. So if you want two bands you set step size to 0.5. The intensity is done automatically, so with two steps the first cell has 100% light intensity, while the second has 50%, manual control over would have been hard to implement logically within the material editor and would have cost more instructions, so I opted not to add that.

Awesome, thanks for the info. Just spent a while with it tonight and got some pretty cool effects going. Combined the shader w/ some toon style outlines/strokes. I used wind waker Link as a starting point, but then started to apply some of the styles weā€™re looking at using. Overall it worked very well.
windwaker.png
The outlines are are darker versions of the colors of the actual model. Thereā€™s a little bit of funkiness weā€™ll aim to work out, but itā€™s looking pretty nice. One thing I came across is that the shading tends to look better if the model is set to not cast shadows. Or at least to ā€˜Cast self shadows onlyā€™. The self shadows only is what I have on in shot, but you can see where the head makes a shadow on the arm, and the hair on the face that itā€™s diffused. If I turn off shadows it looks more like your shots, but then I have no shadow on the ground. Any ideas there?

(Also I toss a +1 at your PR, if thereā€™s anything else that can be done to promote the branch let me know, Iā€™d love to see it merged.)

Lights have a shadow filter sharpen option. Raising should give you shadows that look a lot better when used with toon shading.

I plan to make a content examples style scene to explain these kinds of tricks, but I got a big new rush assignment at work today, so Iā€™m not making the mistake again of making promises when that will be doneā€¦