Page 1 of 1

Command Line Export Ply with Scalar Field

Posted: Tue Jan 28, 2020 10:46 am
by DummyCoder
Hi Daniel

I'm having an issue where I apply a scalar field to a .ply file but it reverts back to the original... here's my code:

1) Cloud to cloud distance:
CloudCompare -SILENT -C_EXPORT_FMT PLY -NO_TIMESTAMP -O "Example.ply" -O "Example2.ply" -C2C_DIST

2)Apply scalar field:
CloudCompare -SILENT -C_EXPORT_FMT PLY -NO_TIMESTAMP -O "Example_C2C_DIST.ply" -SF_COLOR_SCALE ColorScale.xml -SAVE_CLOUDS

However when I open the new "Example_C2C_DIST_COLOR_SCALE.ply" file it has the original blue to red scale instead of my intended red to blue. Note that when I save it as a .bin file instead of.ply it has the correct colour scale however is less detailed when I make it a mesh afterwards.

Thank you

Re: Command Line Export Ply with Scalar Field

Posted: Sat Feb 01, 2020 1:17 pm
by daniel
Does the Example_C2C_DIST.ply file has multiple scalar fields maybe? In which case you should select the scalar field you want to apply the color scale to before SF_COLOR_SCALE? (with SET_ACTIVE_SF)