Realizing NPR Pencil Sketch Shading with a Pencil Shader in JME

Hello folks,

I was advised to start a new thread and put my more question up for discussion again :wink:

What I am trying to achieve in the end is a working NPR (non-photo-realistic) pencil shader similar to what is presented in this post

For this the plan is to

  • convert every frame to grayscale
  • apply a sobel filter for edge detection
  • use various TAMs (Tonal Art Maps) to be drawn according to the brightness of the pixel

Right now I wanted to use the grayscale filter to test the sobel implementation.

The source I refered to in my first thread was the one I stumbled upon but seems to be deprecated nowadays.

So my questions would be:

  • Does my approach make sense?
  • Anyone has references to grayscale shading?

Thanks in advance :slight_smile:

Which part confuses you? The math to go from RGB to โ€˜valueโ€™ or the rest of filtering?

Easiest way to learn to write a filter is to take one of the other similar filters, cut + paste it, and modify it.

ย