I’v done that and all i can get is the black outline, how do i get that cartoon style contrast between dark and light places on the object ? and is it depended on Directional light so it can make sense with the scene ?
I don’t know what your problem might be. Is your mesh within your postprocessing volume?
Try just doing the flat shading by changing the ratio mix to 1.0, and compare it to what it looks like when the ratio is 0.0. They should look very different.
Awesome work so far Brian! I downloaded it and played around with it, works just fine for me although I get some inconsistent line thickness and color but I did mess around with the settings so might just be me (couldn’t help myself :P).
Also have a question for you all, would it be possible to do something like this; watch?v=-z51Cjt4WeM
I find ‘Shade Width’ and ‘Lighting bias’ really interesting
Most of that looks doable. Have you seen Antidamage’s cel shading stuff? More Borderlands 2-ish, I’m shooting more for an anime look:
Ah yes i have seen it, Its kinda cool but I’m actually also going for something like an anime/manga look ^^
also if you have any hunch on how to accomplish the above Id love to hear it!
Someone actully made a shader that might be what your looking for.
forums.unrealengine.com/showthread.php?49796-%E3%83%8E%E3%83%B3%E3%83%95%E3%82%A9%E3%83%88%E3%83%AA%E3%82%A2%E3%83%AB%E3%82%84%E3%82%BB%E3%83%AB%E3%83%AB%E3%83%83%E3%82%AF%E7%AD%89%E3%81%AE%E7%8B%AC%E7%89%B9%E3%81%AA%E3%83%AC%E3%83%B3%E3%83%80%E3%83%AA%E3%83%B3%E3%82%B0%E3%82%92%EF%BC%81
Hey there! If you show me an example of what you’re trying to do I can probably try and help you achieve it.
Certainly interesting but not quite what I am looking for
This; watch?v=-z51Cjt4WeM
Specifically the ‘Shade Width’ and ‘Lighting Bias’ shown between 0:10 - 0:27
Here’s a 4.4.3 version of my shader, if you haven’t gone to 4.5:
Remember the default is to only modify objects with custom depth on, but you can change that.
EDIT:
use this link for the latest version:
AnimeShaderFiles.zip (89 KB)&d=1445222643
OK, here’s are fully parameterized versions for 4.5.1 and 4.4.3, with a few slight changes/bug fixes added. Makes it much easier to try out different settings. Also includes an outline-only test flag. Can be set to do everything (default), or only objects with customdepth, or only objects without customdepth. Allows up to 3 different skin shades for red facial shadows, and it’s obvious how to add more to the shader if needed.
The parameters should be pretty self-explanatory. Each zip file uncompresses into M_PostProcess_Base_Toon.uasset and AnimeShaderSettings.uasset
EDIT: use this link for the latest version:
AnimeShaderFiles.zip (89 KB)&d=1445222643
Just found and fixed a bug in the above M_PostProcess_Base_Toon.uasset shader…
If lighting is very low, the red facial shadows can start making the skin look like it’s glowing red, because it’s actually not allowing the red to go all the way to black.
Here’s an example of buggy shader, fixed shader, and no shader for comparison (left to right):
Instead of reposting the shaders, here’s the change – buggy on top, fixed below. It adds the Mask R, 1-x, Multiply, and Max that modifies the redness factor input:
Yes this is possible but should be integrated as a modified (or its own) shading model for best performance and quality. Post processes can only approximate real lighting information.
Ahh I see, Is that what u have done there? because that looks absolutely superb (marketplace plox :P)
Yes, all it takes is to edit some shader files. I’m planning to make a tutorial about this but this might take some time.
I can however post a short instruction here with the necessary steps.
I think I’m patient enough to wait for the tutorial unless its like 2 months away, if that’s the case then the fast version would be appreciated
Another small change – with the current shader, using a flat shader brightness factor of anything above 0 makes it impossible to go completely black, effectively being ambient lighting that won’t go away.
Limiting it to no larger than original brightness fixes it.
Old shader (near top center):
New shader:
OK, I’ve added two more controls in AnimeShaderSettings for the above changes so you can make more adjustments – the first change tended to make outlines too dark for my taste, for one thing.
Here are pngs of the two changes, and a zip file for the 4.5.1 version, which again uncompresses into M_PostProcess_Base_Toon.uasset and AnimeShaderSettings.uasset
EDIT: use this link for the latest version:
AnimeShaderFiles.zip (89 KB)&d=1445222643
The current 4.6 release has a bug with the “If” expression – to work around the bug, you need to have an input into A==B instead of leaving it unspecified. There are two IFs in my shader that have IFs without an A==B input; simply plug in the same input as the A>=B expression. One IF is in the red facial shadows code, and the other is enabling outline-only test mode.
^ I don’t think that’s a bug, it’s probably intended behaviour to ensure you give it something to output.
I’ve gone over this in the bug forum – it says if there’s no A==B input, it uses the A>=B input (which is always required). 4.6 behavior is considered buggy, albeit easy to work around.