Non-planar laser engraving?

I’ve had my laser engraver based on my first MPCNC, a Burly, working for a couple of years. It uses a 5W Sculpfun 450nm laser and I’m using the MKS DLC32 (GRBL) board with the TS32 display. It’s not very fancy, but after adding a home built rotary (rollers) it’s doing most everything it needs to do…wood engraving and cutting, slate and stone engraving, white tile engraving, and even rubber stamp engraving and cutting.

However, after implementing the simple rotary unit, it’s clear that this might work better if I could use the z-axis control to engrave on non-planar surfaces since many items don’t have constant cross-sections. Obviously, this could be used on things like tumblers, but even on non-rotary projects, the ability to follow contours as one engraves would be useful… maybe using the laser to highlight a 2.5D carving, for example?

So, my question is whether anyone out there has developed a recipe for taking the “finishing” pass for a carving in Estlcam, for example, and converting the gcode to be used by a laser. Since the finishing pass would have all the necessary z-height information, to my simple mind, it seems like it could be done.

There is a little information “out there” for specific machines, but, the approaches seem pretty complex. But, here’s an example:
Non-planar laser engraving