I have a gray-scale image that I want to be used for both positive and negative displacement as a height field. The values go from $00 to $FF (0 ~ 255 decimal, and $ indicates hexadecimal). I would like mid-range ($80) to yield a 0 displacement, while $00 and $FF are taken as -128 and +127 respectively. If the whole map is grayed out to $80, then it has no effect. Using this method, the edges of the height field would show no seams while interior of the height field could cause both positive and negative displacement. Darker grays to black would cause negative displacements while lighter grays to white would cause positive displacements. What is the best way to go about this? All indications are that the image maps are only used as unsigned values and displacements are only in one direction. I have tried to use math nodes to bias the map values downward to -128 but not sure if this can work. An add node output (scalar or vector) can't be applied to the Heightfield load input or inserted between the Heightfield load or the Heightfield shader.
This is what I tried..
[attach=1]
Heightfield Adjust Vertical should work, but not with those settings.
"Set height range" will remap the current lowest and highest values, so it depends on the data in the image. This is probably not what you want.
I would check only "Add height" with the value -128, and leave the other options unchecked.
Matt
Okay. Thanks Matt. :)