I can programatically generate PLY files with RGB color values as attributes for each vertex, like below
ply
format ascii 1.0
element vertex 126272
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
element face 252540
property list uchar int vertex_index
end_header
-5.38773 -92.173 13.6437 0 0 0
-5.7427 -92.1753 13.6356 0 0 0
-5.10993 -92.1504 13.2691 0 0 0
-5.43053 -92.1653 13.366 0 0 0
-5.75901 -92.1091 13.238 255 0 0
-4.93855 -92.0976 13.0949 255 255 0
-5.32676 -92.0818 12.9526 0 255 0
-5.86176 -92.0882 12.8743 0 255 255
......
3 0 1 3
3 4 3 1
3 0 40 1
3 41 1 40
3 0 3 48
3 0 48 40
3 1 41 49
......
Then I can import the PLY file into Blender (I am using v2.78/79), add a camera (and light and material, etc.), and render it as color images. That works totally fine.
Now I want to change the idea to only generate grayscale images with intensities at each vertex be exactly the value I assign to each vertex in PLY file, like below:
ply
format ascii 1.0
element vertex 126272
property float x
property float y
property float z
property float intensity
element face 252540
property list uchar int vertex_index
end_header
-5.38773 -92.173 13.6437 0
-5.7427 -92.1753 13.6356 -3.5
-5.10993 -92.1504 13.2691 4.2
-5.43053 -92.1653 13.366 2
-5.75901 -92.1091 13.238 -1
-4.93855 -92.0976 13.0949 -2
-5.32676 -92.0818 12.9526 0
-5.86176 -92.0882 12.8743 0.1
......
3 0 1 3
3 4 3 1
3 0 40 1
3 41 1 40
3 0 3 48
3 0 48 40
3 1 41 49
......
What I want to know is, after importing the PLY file to Blender and setting up a camera, what should I do further to let Blender generate a grayscale image that has the exact intensities I assigned at each vertex? I.e. I don't want Blender to change the intensities for me, but I do need it to render several grayscale images from different viewpoints.
Please note that I do have both positive and negative intensities at vertexes. I know these output grayscale images are not easy to be viewed in any image viewer, but that is not an issue for me.
Please kindly help. Thanks!