How to use nodes to get Height field ?

I have been trying to use a node based material to get the height map of a terrain field:

  • geometry -->
  • mapping -->
  • separate rgb -->
  • use the b channel as heightmap

but i get some non linear distortions because the greyscale does not seem to be mapped linear to the height values.
I have uploaded a blendfile to http://www.pasteall.org/blend/9010

it contains the node material and a tilted plane which should give a linear transition from black to white. I also added an image expected_map.png which contains what i expect to see when looking on the object from top view.

Can anybody explain to me what i am doing wrong, or give me a hint how to do it right ?

thanks a lot.

cheers,
Gaia

Ok, the problem is “color management”.

In the properties tab, under Render -> Shading

disable color management

And now the height map works as expected.