Be careful what you ask for, you might get it?
Wow! A bit of a learning curve here, but my original thought was that wrap map was somehow involved. Guess not. I get the level layer, but not sure where to go with it from that point, so I will wait, patiently, for a brief explanation.
Ok , quickie:
Assume you want a 300px rim around something:
- draw the profile in black on white in a 300px-wide layer (can be in the same image or not). Height is irrelevant, ProfileMap will consider that the full height is produce values of 255.
- run ProfileMap. This creates a 300x1px "Levels" layer where the profile height has been converted to values. You can scale the profile vertically if you want to see what it looks like comfortably.
- to use the result, use WrapMap to wrap the "Levels" layer around a selection
- use that as a bump map on another layer.