# Associate extra scalar data field with mesh or pointcloud

I work with scientific pointclouds and I often have extra columns of data in my .ply files. For example, I might have a column for "temperature" where there is a temperature value for each point or mesh triangle. In a 3D package called CloudCompare, it's easy to hide parts of a pointcloud or mesh based on the value of one of these "scalar fields."

Is there a similar feature in Blender? If I have a .ply with extra columns, is there any way for me to, say, color the mesh by the value of that column, or use that column as the input to a python script?

• there is a vertex group option you can use it the same way it hold a value between 0.0 and 1.0 (on the point level ) and there is a special mode to display this value as a color on the mesh – Chebhou Mar 17 '15 at 22:10
• Chebhou, I did not fully understand your comment, but I think maybe you have the right idea here. If I could import the extra column in the .ply as vertex group data, that would probably answer my question. Do you know how I can do that? – foobarbecue Mar 17 '15 at 22:15
• I'm not familiar with this format so how are you importing the file ? is there an addon or a script i could alter it to get this option ? – Chebhou Mar 17 '15 at 22:20
• Ah, I forgot that it was a plugin. Here it is. PLY is very simple -- basically just a table of numbers, in ASCII or binary format. – foobarbecue Mar 17 '15 at 22:25
• @Chebhou the Stanford ply import/export addon is included with blender, just enable it. – sambler Mar 18 '15 at 6:24

I have edited the import script so you can get extra info from the file as vertex weights with a factor as object property ex : temperature info column will generate

• vertex_group named 'temperature'
• object property named 'temperature_factor'
• point temperature = vertex_weight*temperature_factor

download this file ( import_ply.py ) and replace the one in Program Files\Blender Foundation\Blender\2.73\scripts\addons\io_mesh_ply\ , restart blender after that to take effect

I have used the factor to normalize all values (0.0<->1.0) because weight can't handle more than that

• Wow, above and beyond the call of duty! This is really useful! – foobarbecue Mar 23 '15 at 19:58
• @foobarbecue thanks, be sure to try and give feedback – Chebhou Mar 23 '15 at 20:00