NPR Effect, Work in progress
This project is a side project that started with the goal to make a rendered scene feel painted. The project is made in Unity's and uses its relatively new Universal Render Pipeline. I'm currently working on this together with one other programmer. So far, I was responsible for setting up the passes and writing the MRT pre-pass shader, the quad generation shader, and the final brush shader that adds the rotated and scaled quads as brush strokes based on the data from the previous passes.
Our first approach was based on this research paper and used a flow field to rotate the brush strokes in a given direction. We created the effect of a flow field by taking the cross product of the surface normal and a given vector. We also scaled down the brush strokes when they appeared on edges to keep more detail there, this was achieved by a size texture that was created with a simple dot product. When replacing points by quads, rotating them based on the flow field and scaling them based on the scaling texture, we achieved the results shown here.
Our current approach
Points
Used to determine where quads are placed.
Flow field
Used as an alpha mask for the screen space quads.
Color texture
Used to determine the color of the screen space quads.
Size texture
Used to scale the screen space quads.
Future plans
Our current approach is going to be quite expensive on bigger scenes so we looked for more brush stroke based sources and eventually found the game memories untold, which uses a pool of screen space particles that have a chance to spawn on each pixel based on parameters and have a given lifetime. We're currently looking into their implementation and aim for a simplified version of their approach.