# Why does my cycles-rendered heightmap have wrong values?

I've been trying to render a heightmap using cycles.

To that effect, i've set up:

1) A sculpted plane squeezed between -0.25 and 1.0 altitude (z-axis) in Blender.

2) An orthographic camera scaled to perfectly match the plane.

3) A cycles emission material set up in such a way that its final emission value is geometry.blue (z-axis position) -> math.add 0.25 -> math.multiply 0.8.

I render this to a 16-bit grayscale png image.

The issue is: The resulting heightmap's pixel values are slightly (or not so slightly) wrong - i.e, different from what the math should say.

For example, while math says that vertices at position ~0 in Blender should produce heightmap values around (0.0+0.25)*0.8 = 0.2 , in the resulting image, those areas are ~0.5; while math says that 0.94 should translate to 0.95, in Gimp when sampling those pixels i see their HSV Value as 0.89.

Upon some asking around in #blender, i've eliminated the following possible sources of trouble:

• World (and its material)

• Sky pass in render layers

• Material color is set to 1,1,1

• I've eliminated sections of the plane that violated the bottom boundary.

None of these fixed the problem.

If anyone feels like poking around instead of guessing around, i've also put the blend file to here.