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.
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
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:
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.
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
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.
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.
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…