Cartoon shader improvements

Ok. Thanks :slight_smile:

Is there an approximate timeframe for 1.9.0?

Namely, there are a couple more things I’d be interested in fixing/adding, if I have the time:

  1. Some last-minute fixes to the cartoon shader. There is still something funky going on with the inking, as can be seen in the screenshots.
  • The alpha gradient in the outline of the side bangs, in places where they are rendered in front of the head, looks as if shaded backwards (causing visibly jaggy edges). I didn’t change the normal map based edge detection logic, and indeed, the artifact is visible both in the original and improved versions.
  • The detector doesn’t seem to like rendering horizontal edges at those places where the object’s outline meets the default background (empty space), although edges with a significant vertical component (when viewed in the screen plane) render just fine.

Under most circumstances, the edge detector seems to work correctly, so this may be a shortcoming of the algorithm. But I need to investigate this to be sure.

  1. Character hair physics simulation, if deemed useful enough to include into Panda. At least one other community member is interested in having such functionality.

This one must be ported to a C or C++ extension and slightly expanded before it becomes practically useful. An initial usable version will probably take a few days of coding, depending on how easy or difficult it is to add new modules to the Panda build system. (I’ve had a look at your comments in https://discourse.panda3d.org/t/c-extensions/3098/1], the manual [url]https://www.panda3d.org/manual/index.php/Interrogate, and the skel example that comes with the Panda sources - but haven’t yet had time to try creating my own module.)

  1. I think it would be interesting to integrate ninth’s procedural lens flare filter ( [url]Lens flare postprocess filter] ) into CommonFilters. The updated logic in the cartoon shader patch should make the integration slightly easier. The filter looks spectacular, requires no special setup for the scene, and at least I think it would make an especially nice addition to the standard filter set. (It goes well with bloom, as both are psychovisual tricks intended to increase the perceived dynamic range.)