I was previously able to load a ply file with full color data in OFXv8.4
However, now running the same code in 9.0 makes the point cloud colors all appear to be dark grey. The point cloud example still displays color, so I assume that 9.0 is retrieving the colors from a vertex incorrectly.
This is the basic code I'm using:
void ofApp::setup() {
ofSetVerticalSync(true);
mesh.setMode(OF_PRIMITIVE_POINTS);
meshSlice.setMode(OF_PRIMITIVE_POINTS);
mesh.load("1.ply");
mesh.enableNormals();
meshSlice.enableNormals();
mesh.enableColors();
meshSlice.enableColors();
for(int i=0; i< mesh.getVertices().size(); i++){
if((mesh.getVertex(i).x<.5) & (mesh.getVertex(i).x > 0) ){
meshSlice.addColor(mesh.getColor(i));
meshSlice.addVertex(mesh.getVertex(i));
}
}
ofEnableDepthTest();
glEnable(GL_POINT_SMOOTH); // use circular points instead of square points
glPointSize(3); // make the points bigger
}
My other option is to download OFXv8.4, however I seem to have an issue with openssl being deprecated and cannot install 8.4 properly. Any suggestions?