|
..haha ExportScene03 finally works! but i dont know why so much error with the sample. i change the following codes.
lMesh->BeginPolygon(-1, -1, false); to
lMesh->BeginPolygon(0, -1, false); ..use the first material ?
KFbxGeometryElementMaterial* lGeometryElementMaterial = pMesh->GetElementMaterial( 0);
if (!lGeometryElementMaterial)
{
lGeometryElementMaterial = pMesh->CreateElementMaterial();
}
// The material is mapped to the whole Nurbs
lGeometryElementMaterial->SetMappingMode(KFbxGeometryElement::eALL_SAME);
// And the material is avalible in the Direct array
lGeometryElementMaterial->SetReferenceMode(KFbxGeometryElement::eDIRECT);
int error = lNode->AddMaterial(lMaterial);
Create an element materail before add materail.
then for each texture layer set the uv source
lTexture->UVSet = “DiffuseUV”;
I dont know why this is public and have no method to access it.
...o
|