Advanced Cel Shader Pack

That’s odd, why do you have problems connecting to imgur? They’re pretty much the best image host out there, so that’d be a bummer. Just blocking imgur for the sake of removing ads makes no sense.

I don’t get where you’re coming from to be honest. There’s no difference between a “full” game and whatever sample content you can throw at something. No one thing will completely contribute towards your frame generation times. If you find your AI isn’t performing well, you adjust it or turn some of it off, or try to fall back to built-in techniques that have a known performance cost. This is exactly the same.

If during your performance tests you find a particular group of settings are too slow for your target hardware, make them optional or turn them off. As we’ve discussed, the watercolour shader is not going to perform as well on low end hardware as it will on high end hardware, so if you’ve decided to use this effect, make it scale or make it optional.

On my setup the high end watercolour effects raise the frame time to around 20ms which wouldn’t be acceptable for games with direct camera control, but would be fine for anything with a fixed camera. I always envisaged this effect to be more of a story-telling device than something you’d throw into an FPS.

The base techniques were running well on the then-current-gen mobile hardware in 2009 at the kind of resolutions you’d expect mobile hardware to have (1280x768). The part of the shader that just draws lines, flattens colour, does colour grading, etc. all have a very low cost and can generally be used without caution.

Send me your email address in a PM. :slight_smile:

images.duckduckgo.com.png

(Actually I already bought your asset but more Anime characters on the Marketplace would be great. And your shaders work brilliantly with such characters :))

Hehe thanks :slight_smile:

I keep describing the UE marketplace as small yet accommodating and sure to grow to colleagues, hopefully someone takes notice and starts submitting more character assets!

This particular character is just something from Turbosquid and I think it’s from a recognised IP anyway so you wouldn’t want to use it in your game, but I expect making them isn’t difficult with things like Mixamo.

I wanted to understand what you meant by this explicitly, but I you explained very well, thanks a lot. It never hurts to plan ahead before making a full game, you know, since, well I have released a game before.

Agreed, but I’m toying with the idea of making an rpg-ish game with this effect(s). Apart from that I’m really curious how it will look and perform if we apply this pp effects to something like the Kite demo:)

Man that reminds me, I STILL have not checked out the kite demo. And the second thing I always do is inject the cel shader. My evening is planned! :slight_smile:

I think the shader will work excellently for an RPG as it handles scaling down objects really nicely, unlike vertex cel effects. Your small objects that matter won’t get lost in the shading if you set it up right.

I really like the look of the cel shader in my project. But saddly its too expensive for me in some parts, especially in forest with lots of Speedtree trees (quite low poly and proper LODs but still). Maybe its the ammount of transparent leaves…
Interior locations with few characters it works dandy though.

I am still in the process of making nicer textures, and the lightning is just temporary, but I was very pleased to see the results with the shader.

My original edge shader:

Cel Shader from the pack with values adjusted:
752f21cdab68fe249a919ecf6fb97739e1c1b284.jpeg

I think I could get the same results with my original shader by fixing lighting etc, but the shader made everything soooo quickly! :smiley: Thanks!
I try to find a way to make it cheaper for my use so that I actually can use it. Now there is about 10fps difference when I dont use it.

That’s looking gorgeous! Thank you for posting screenshots of your work!

Just checking, did you also notice that you have print dots enabled with a very small dot texture applied? Have a look for “print dot opacity” and set it to zero and see if that isn’t a better result. If its deliberate, ignore me! :slight_smile:

Hang in there until the next release - you’ll be able to disable some of the features that are slowing it down. I’m using a TON of speedtrees in the updated sample island, almost as many as you have and it still runs nicely. I found early on when speedtree for UE was first released that using a lot of different trees ran slowly, so I think there’s an art behind getting them set up right. The next version of the shader will definitely take some of the hit out of it though and bring your overall performance up.

Thanks for fast feedback and help :). I am still learning the shader pack and post processing workflow in general, so I still have to find out what I need and what not ^^.

Yes, I am using the print dots at the moment. I liked the faint tint I got from them, its adjusted to 0.8 now though. Not sure if I keep them or make similar effect by adding a directional light to the scene though.

Yeah, I will look how to streamline Speedtrees a bit, I feel they are still spendig way more resources than they would do if they were just static meshes I set up myself. Inexpensive material instancing them is kind of hard due to the
wind materials though…

I like how the shader is full of adjustable parts so I dont need to set up everything from 5 different places!

Badly there is still the problem with the eyes.

There should be no outlines on the eye textures.

Would it be a performance problem to use two shaders? One for the environment and one for the characters?

You can exclude meshes from the shader by checking “Render custom depth” on the component and then “Enable exclusions” in the celshader preset. To do this you’d need to make your eyeball a separate mesh that you attach to a mesh socket in the head. It’s a bit more work, but then the cel shader will avoid shading the eyes. You can do the same thing for the eyelashes and anything else you don’t want shaded, although IMO shading on the eyes looks quite good. :slight_smile:

I’ll try to work this into the example content as I bet this is something that gets re-asked about a lot, thanks for raising it!

In regards to two shaders, I always thought that the priority control on post-processing effects caused one to run, then another to run, etc. Every time I’ve tried it however, it only runs the highest priority shader and never runs the others. This might be unintended or I might be doing it wrong, but at the moment the only way to do two cel shaders is to do two post-processing volumes. I’ll have a play around with that again and see if I can get a better result, since it’d be nice to have things like colour grading smoothly change as you move into different locations. Shouldn’t be a major performance hit though unless you’re doubling up on watercolour or something.

Is there a parameter to adjust the shader from affecting metal materials? I found the “flatten metallic” etc. parameters, but no matter how I set them, all the metallic materials that used to be dark, are super bright and flat with the shader.
I know its something that I can take care of when making the textures and materials themselves, but I wonder if there is a quicker workaround withing the shader I could try?

Very easy example. Original;


With the shader, curtain chains and the chair which had high metal values look very bright now;
8141f0ed83cc83006573a06b10d2d6996b3ef5bc.jpeg

Im kinda prepared for the idea that I have to make the textures with this in mind, and its not a big deal really. Those were some generic temporary metals I had used anyway.

EDIT:
Oh well. For my problem, easy solution was just to tweak the metallic values of the materials that caused problems. Fixing them took less time than writing about the problem did ^^.
Still if you happen to have another solution I am all ears.

Metals are a tricky one. I added the flatten metallic parameters as a quick way of trying to handle them if you were just dropping the shader into existing Epic sample content, but they probably need some more thought put into how they’re handled. I’ll have another crack at it this weekend as I can’t remember what the actual issue with them was now. I think you ran smack-bang into what I did though.

Nice screenshots by the way, thank you for sharing! :slight_smile:

I know, but I don’t want to make the eyes a extra mesh and only as texture.

If this is not possible, than your shader is useless for characters for me and I need a other sort of shader for characters, like on Unity.

To be clear, your eyes would simply be the same polygons you’re using now but the polygons that the eyes sit on would be detached.

Another option is to copy the polygons they sit on, slide them forward a fraction, assign a new material and then make the eyes a translucent texture on the face of the model, or even a decal, as both of these can be ignored by the celshader. This would allow you to animate them separately with a flipbook, so it’s probably something you would find yourself doing anyway.

It’s not that much more work and would look exactly the same otherwise.

Didn’t work, than the shader draw outlines where I cut out the eyes.

That could work, but it is only a workaround. On Blender and Unity I didn’t must do such things and it looks correct: http://blizado.deviantart.com/

And this is not only a problem on the eyes, it is a problem on every object that should be shaded but without the textures itself. I wish there would be a way exclude materials itself…

And it seems that it is not impossible to do it right, here without to modify the eye texture with an other celshader: Trying to make Toon Shader Material on UE4 - World Creation - Epic Developer Community Forums

Edit: a combined shader from the Thread above without changing textures (only the character). So it is definitely possible.

Hmm. I think I need to tweak the shader to include the excluded objects, then just draw the original buffer back over the result. That’s not the best solution for what you’re trying to do though I guess.

I’m assuming Unity bakes the cel shading into the texture. That’s a different method to what my shader does. You can do that in UE too, but I don’t provide for it as there’s already several solutions for that floating around, including the stylized rendering example from Epic.

Anyway, the transparency method turned out to work fine. I’ll show you how.

Before:

After:

So the first thing I did was copy these badboys and shift them forward a millimeter:

Then I applied a new material with the exact same UVs. Then I duplicated the face texture and masked out everything except the eyeballs. I could also have masked the edges of the eyes and eyebrows, etc.

And voila, unshaded eyes.

The material MUST be translucent, not masked. You can also adjust how much of the cel lines get through the transparency, but this is unfortunately a global setting so will affect other transparent objects as well.

The lines were most obvious when you’re about a foot or two from the character, so here’s a more distant screenshot:

Those peaks on the hair are new too… hmm. Time to add more samples to the outline shader as well.

I didn’t need this Workaround with the other Shader and it gives me better outlines too, because on you example you have only outlines on the outside of the character where you can see the background, but there are no outline on the hair in the face, on the ear, on the shoulders etc.

Whoops. I had cel detail lines turned off, you are correct. I was wondering why it only looked darker in the eyes. Here you go:

The cel detail lines contribute greatly to the overall smoothness of the outlines as well. Phew, had me worried.

Your other shader appears to be a per-material outline shader. As I explained above, this is well covered and I don’t intend to provide an asset that does that in addition to the existing post-process shader, as there’s plenty of them around for free.