Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
With IM v6.8.9-5 Q16 integer on Windows 8.1, your first command gives a result close to your desired result. RMSE 0.06, ie 6% difference. Your second command fails with:
convert.exe: unable to open image `null:': Invalid argument @ error/blob.c/OpenBlob/2658.
convert.exe: WriteBlob Failed `null:' @ error/png.c/MagickPNGErrorHandler/1805.
With IM v6.8.9-6 Q32 HDRI, self-compiled on Cygwin, your first and second commands give identical results, even closer to your desired result (RMSE 0.001).
Alpha channels are undefined by default. Add an opaque alpha channel to your displacement map with -alpha to initialize the alpha channel to a known value. Does that fix the problem?
magick wrote:Alpha channels are undefined by default. Add an opaque alpha channel to your displacement map with -alpha to initialize the alpha channel to a known value. Does that fix the problem?