I can’t export the color of an actor(without texture, only single color) to OBJ model. The mesh and geometry of OBJ model is correct. But its color is always white instead of its own color. The color is white in many other 3D software, also in my app using vtkOBJReader. I can not find .mtl file or any other material file exported. How can I solve the problem. Thanks in advance.
I use VTK 8.2.0. This is the part of my source code for exporting OBJ models:
vtkSmartPointer<vtkOBJWriter> objWriter = vtkSmartPointer<vtkOBJWriter>::New(); objWriter->SetFileName(filePath.toUtf8().toStdString().c_str()); objWriter->SetInputData(actor->GetMapper()->GetInput()); objWriter->Write();