Can't embed texture in output FBX file with fbxsdk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm creating an FBX file and write it with texture. But when I want to move it on another PC the texture isn't loading because filepath for it has been obviously changed. I've decided to embed texture in FBX file. How can I do it?
Now it works so:
auto aPhongSurface = fbxsdk::FbxSurfacePhong::Create (&theScene, "");
fbxsdk::FbxFileTexture* aFBXTexture = fbxsdk::FbxFileTexture::Create (&theScene, "");
aFBXTexture->SetTextureUse (fbxsdk::FbxTexture::eStandard);
aFBXTexture->SetSwapUV (false);
aFBXTexture->SetMaterialUse (fbxsdk::FbxFileTexture::eModelMaterial);
aFBXTexture->SetAlphaSource (fbxsdk::FbxTexture::eNone);
aPhongSurface .Diffuse.ConnectSrcObject (a);
theNode.AddMaterial (aPhongSurface);
Also during writing I use
theTarget.SetBoolProp (EXP_FBX_TEXTURE, true);
But output model still contained only path references without embedded texture image.