How to set Material using assimp?

I’ve got mesh created using UProceduralMeshComponent class, I’ve used assimp library to extract mesh data from .obj file. But I don’t know how to extract Material from .mtl and set to mesh. pls guide me.
I’ve refereed

Have you found a solution to this problem yet? I’m also looking for a similar method for .fbx files.

Yes, I figured out the solution.

  1. Get aMaterial from aiScene
  2. Get Texture
    aiString diffuse_map;
    material->GetTexture(aiTextureType_DIFFUSE, 0, &diffuse_map);
  3. Get 2D buffer from Texture (read png file),
  4. Create UTexure2D from this buffer
  5. Create readymade Texture2D in editor, create material, Convert to parameter
  6. Create CreateDynamicMaterialInstance from mesh and set texture using SetTextureParameterValue with above parameter name.

Is there any chance you can explain step 3 (and potentially 4?) on how to accomplish this? :o

I have the same problem.

Same issue here, did you guys make it?

Fairly sure I took a different approach but it’s been a while haha

Yes, its almost two years ago, could you help me a little bit with that ?

By the way, which version of Assimp are you using?