To use a heightmap from Heightmapper as a displacement map in Blender:
First, note the "z:x scale factor" in the Heightmapper. Then, enter the following keys, in order – make sure your cursor is over the main viewport before you begin.
-
Start with a new scene.
-
Delete the startup cube:
- type
x
- type
return
- Create a grid:
- type
shift-a
- type
m
- type
g
- Enter number of divisions (this can be any number, but these steps will make one vertex per pixel in the heightmap):
- in the "Add Grid" pane on the left, click in the "X Subdivisions" field
- enter number of x pixels in heightmap minus 2
- enter
tab
- enter number of y pixels in heightmap minus 2
- Scale to match image:
- type
s
- enter the number of x pixels / 1000
- enter
tab
- enter y pixels / 1000
- enter
tab
- type
1
(for z-scale) - type
return
- Add displacement modifier:
- in the right pane, click the tools menu (wrench icon)
- click "add modifier"
- click Deform > Displace
- click Texture > "New"
- click "Show texture in texture tab" (far right button)
- click "Open"
- select the heightmap file
- Scale displacement:
- Click the tools menu (wrench icon)
- Set "Midlevel" to
0
- Set "Strength" to be the x-scale multiplied by the "z:x scale factor"
To print, export to .obj
or .stl
.
When preparing a model for 3D printing I like to fade the edges out, to ensure that the edges will be the lowest part of the model. You can do this with the square gradient tool in Photoshop.
The first time you try this, it's convenient to make your heightmap 1000 pixels wide, which makes the math easier: then your mesh x-scale is just 1, and your displacement scale is the "z:x scale factor" value copied from Heightmapper.
Good luck!