How to create alpha / height maps in Blender for use in e. g. Substance Painter? Question

Is there an efficient way to create images (height maps) in Blender so that they can be used as alphas in other applications like Substance Painter? If so, what's the proper way to do it? Preferrably without having to uv-unwrap.

What I tried

I tried various settings and came up with this, but it doesn't seem to be right for everything and I hope there's a more efficient way. Here are the changes I did on the default blend file:

* delete lamp

* camera 

    object
        transform
            reset location / rotation / scale, then set location z to 2
        data
            lens
                orthographic
            orthographic
                scale: 2

* render    

    resolution
        x: 2048 px
        y: 2048 px
        percentage scale: 100%

    shading
        alpha mode
            transparent

* render layer

    solid: true, all else: false (especially sky or else you'd get some grey background)

* scene

    color management
        display device: none

* object

    set scale to 0.5 for x/y/z

    material
        shading
            shadeless: true

    texture
        type: blend
        colors
            ramp: true
            color stop: set alpha from 0 to 1
        blend
            progression: linear or quadratic, depends on the effect you want
            vertical: true

    mapping
        coordinates: generated
        mapping
            X: Z
            Y: Z
            Z: Z

* select object

    apply -&gt; rotation


And then render the image and save it.

Here are the settings as graphics:

Camera:



Scene:



Object:



Using a cylinder as object:



And the final alpha / height map:
I finally found a good, working and as it turns out easy solution to this problem. Credits go to Petr Utinek, he made a tutorial video here.

The steps (I modified them a bit):


Create a mesh, e. g. a gear and switch to Top Ortho view





Select the camera, hit space, search "Align Camera to View" and apply it
Select Render tab, change resolution to 2048x2048 and 100%





Select Data, Orthographic and adjust the Orhtographic Scale





Select the Mesh and assign a Material to it
Select Node Editor, Compositing and Use Nodes
Add a Normalize Node and an Invert Node and link the nodes like this:





add a Plane below the Mesh





Render the scene and save the image





Or to follow the initial question: Easy to re-use by simply e. g. deleting the gear and replacing it with a cylinder




which will result in this