A command line tool for computing derivative maps from height maps. Despite lots of articles describing the process, I couldn't find an actual tool to do it. The idea for how it should work is obvious, but there are some gotchas to get it to match standard tools, such as normalizing the range of derivatives, and using the Sobel Operator to compute higher quality derivatives.
No dependencies required besides standard library.
Derivative maps are a bump mapping alternative to tangent space normal or height maps. The key advantage is that it uses screen space derivatives so you don't need to compute and store model tangent space.
See Rory, Whigham, Mikkelsen 1 and Mikkelsen 2. Blender was also a helpful reference.
If you are planning to use DXT compression, I recommend following general guidelines as those for normal maps. DXT 1 typically is very poor, especially if you want to pack another map in the other channel you will get cross channel compression. I got good results using DXT 5 with roughness in alpha, derivative in red and green, and leaving the blue empty. See Waveren (PDF) for an in-depth discussion.
GPL 3.0 - It's intended to be used as a tool in your pipeline, or as a reference to write code under your own license. If it is helpful to you either way, I would appreciate a citation, although this is not required.