Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / help
  RSS 2.0 ATOM  

help
Rate this thread
 
62263
 
Permlink of this thread  
avatar
  • agerlis
  • Posted: 25 November 2011 02:23 AM
  • Total Posts: 3
  • Joined: 25 November 2011 02:18 AM

when try the fbx sdk,i got problem with the sample ExportScene03.i dont make any trange to the source code.the sample says the cue will be texture.but when i import the result fbx file into max stdio.it display with no textures. and no material at all.

any one can help me with this?tanks.



Replies: 0
avatar

I just tested with 2012.2 and 2013.0, and the sample work fine for both. Maybe you forgot to copy the image files along with your FBX file? They are not embedded.



Robert Goulet, FBX Dev Lead

Replies: 0
avatar
  • agerlis
  • Posted: 01 December 2011 12:28 AM

helo,my version is 2012.2. ExportScene03 dosnt works.ExportScene02 when i import to 3ds,and in materail window i can pick the material from scene.but when i comment these lines code.the texture cant export.~

// Create GeometryElementMaterial
KFbxNurb* lNurb = pNurbs->GetNurb();
//KFbxGeometryElementMaterial* lGeometryElementMaterial = lNurb->GetElementMaterial( 0);

//if (!lGeometryElementMaterial)
//{
// lGeometryElementMaterial = lNurb->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);
pNurbs->AddMaterial(lMaterial);

I just use the AddMaterial method without create a element material.the texutre disappeared when imported.



Replies: 0
avatar
  • agerlis
  • Posted: 01 December 2011 12:52 AM

..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



Replies: 0