- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm writing an FBX loader for our in-house 3D renderer using the FBX 2016 sdk. I've been testing w/ various free FBX files from around the web created in various tools and came across one that, although it does have textures packaged with it, the textures don't *appear* to be attached to the FbxMaterials... so I'm wondering how else they could possibly be retrieved from the FBX file...
Here's a link to the FBX file I'm testing with (claims to be made in 3DS Max):
https://free3d.com/3d-model/bb8-35865.html
When I'm reading it in, I recursively search all the FbxNodes in the scene graph and for each node, I call node->GetMaterialCount()... then, I iterate over the materials using node->GetMaterial(i) where 'i' ranges from 0 to the number of materials for that node. However, when I'm looking at the material properties (like FbxSurfaceMaterial::sDiffuse) and call property.GetSrcObjectCount<FbxFileTexture>() or property.GetSourceObjectCount<FbxLayeredTexture>(), the count is '0' for all the materials in the scene graph...
However, I'm pretty sure that the diffuse texture is referenced *somewhere* in the FBX file b.c. it is automatically applied when I load the FBX file into Blender 3D... also, you can grep the FBX file itself and find the texture file name...
I thought that all textures in FBX had to be associated with an FbxSurfaceMaterial property... Is there some other way to retrieve an FbxFileTexture for an FbxNode using the sdk?
Thanks,
Danrae
Solved! Go to Solution.