Closed liaocheng closed 9 years ago
hey liaocheng I am working on the plugin + libawd right now, and will upload a new version for both in next days. To get the vertex-color and vertex-alpha, i would try to use the IGameMesh-interface instead of the Mesh-interface. Right now i cannot test, becausei have some refactoring going on that prevents me from compile... To get the alpha and color for a vertex, i suspect it will work something like this:
FaceEx * f=facelist[idx]; // get pointer to face - is already in the code.
for (v=2; v>=0; v--) { // loop over verts of face - is already in the code
Point3 vertexColor=igame_mesh->GetColorVertex(f->color[v]); // returns (-1,-1,-1) if no color is set for vertex
float vertexAlpha=igame_mesh->GetAlphaVertex(f->alpha[v]); // return -1 if no alpha is set for vertex
}
You are right. It works for me now. Thank you very much, Robin!
Hello Robin I'm trying to implement vertex color exporting based on your plugins. But I am troubled by a question. This is not a question about your plugin but about 3ds max plugin. Here's my question:
mesh.vertCol[vIdx]
(vIdx is the index of the vertex) However I don't know how to get the alpha value. I triedmesh.setVDataSupport(VDATA_ALPHA);
mesh.vertexFloat(VDATA_ALPHA)[vIdx];
But it didn't work (mesh.vertexFloat(VDATA_ALPHA)[vIdx]
always was 1.0) .I'm sorry to bother you. Any suggestion is appreciated. Regards