Mutiple MatCaps in Eevee and Cycles


I was thinking about multiple matcaps in scene…
After seeing this video by Curtis Holt

I was thinking, that would be nice to have node group for this. I recreated his workflow. I wanted to have group with control for rotation around Z axis. But have hardly failed with Vector Mapping Node. I wanted to have Z rotation as node group input. I was trying to control it with driver, with input from value node, but failed. Then I was able control the driver with added Custom Property on material, but it has problem with updating. Also it is quite incovienient to hunt the value in panel.

Then I was thinking about transforming normals with some math nodes.
Thankfully i found this post: …and rip some parts from it.

After some tweaking and adding some stuff. I have Node group named MatCap Mapping.
Maybe somebody will find it useful, so here it is…

It has control for rotation and flipping matcap.
FlipMatCap is active for values above 0.

It works with EEVEE and Cycles.

Just plug it in to Image Texture node, drop some MatCap image…

MatCap Mapping.blend (782.9 KB)

It is my “first usable” version, so maybe there is some more elegant way…