-1

I'm trying to make my own FBX importer using FBX SDK, OpenGL 3.3 (c++).

I know that you can embed textures within a fbx file. That way you can work with a single fbx file without any texture images which is very convenient.

However, assuming that I have a fbx file with textures embedded, how can I extract the textures out of the file so I can send them to my fragment shader? Are there any classes or documentations I can look at?

Peter
  • 460
  • 6
  • 23

1 Answers1

3

I'm assuming you're using FBX SDK class FbxImporter to open and extract the data in the FBX file. In that case, whenever you tell the SDK to import a file, it will create a folder with the name xxx.fbm (where xxx is your file's name). You'll find this folder in the same directory as your file. That's where it also automatically extracts all embedded media like textures. All you have to do is look in that folder and see if there're any texture files (e.g. jpg, png, etc.) and read them however you want into your application.

rashmatash
  • 1,699
  • 13
  • 23