Hey there! I’ve encountered this before, Rhino which is a CAD program can do this “baking” of the bump map into the texture. It’s not open source so I don’t know exactly what they do, but my general idea would be something like that: for each face of the model, get the average normal value of the displacement map, get the angle difference between the model normal and the displaced normal, and apply that to the vertices (like this very bad diagram but in 3D):
It would work better with very subdivided models, and there must be a bunch of edge cases to work through, but it’s doable
All kidding aside, that sounds about right. My models are not very subdivided at all. I think with a sphere you’d be starting in a better place. Let me have a look at the source and see it makes any sense to me.
Thank you, Carol
And for what it’s worth, since I have been working with BJS and have had to dig up geometry from the dark recesses of my brain, not touched for 45 years I have had to make so many lovely diagrams like that.