step one set your height output to .png step two Click on the mountain icon on the top bar. Look in the "Location" box there should be something saying Width and Height. Next look at the Resolution, The resolution number should be roughly 100 times bigger than the width and the height (in my case the resolution is 4096*4096, and the width and the height is 40km by 40 km) but these numbers are not exact you can further refine these numbers with experimentation.
step three build your world by pressing "Crtl B" (this may take a while depending on you'r resolution)
step four click on your height output, set your file name and then press "Write Output to disk!".
step five boot up worldpainter, than press "Ctrl M". I new window will pop up select the image you made (it will be in Documents / World Machine Documents). When you selected your image press "open" than press ok on the "Import Height Map" window.