I'm trying to displace a plane using (a) a height map (greyscale) image texture to set the height, such that each pixel of the height map determines the height of a corresponding column and (b) another (colour) image texture to set the colour of each column. I'm essentially looking to create a 3d bar chart (or column chart if you prefer) where I can set the height and colour of each column.
I'm having two problems:
First, the colours of the sides of the columns aren't set by the colour of the pixel at that location, but rather are sometimes that colour, and sometimes the colour of a neighbour - as shown e.g. in the areas I've circled in red here:
Secondly, the columns aren't quite vertical, but rather taper towards the top. You can't see that so easily above, but when I use a higher resolution height map, (e.g. 4000x2000 pixels), it's more apparent, e.g.:
Any advice on the above problems much appreciated. I'm using a sub-surface modifier, with adaptive subdivision, and the dicing scale set as low as Blender allows (0.1).
Should I, for example, instead be creating a giant mesh at say 4 times the resolution of the height map? The problem is for a 4000x2000 height map, that is going to be rather large...
Many thanks
John
Edit - grids used for heightmap and colour are below (although they're only 10x10 pixels so may not be visible in the post)