assimp/assimp-net

How can I get texture data

huejp21 opened this issue · 1 comments

how can I get byte[] of texture data from scene?

var filePath = "C:\someobject.glb"
var importer = new AssimpContext();
var scene = importer.ImportFile(filePath);
// scene.TextureCount == 0 this file has texture data but in scene it has no texture.

how can I get texture?
I tried with 'obj', 'stl', 'fbx', 'gltf', 'glb'
all cases has no texture.

You need to check the materials, just look for numMaterials in the scene. The you have to look for the different kind of textures which are stored there.