1
\$\begingroup\$

I have found some kind of explanation about working with Asset-ImporterLib here. Unfortunately it's very badly done and really important things are not explained at all. There is a piece of code which is really useless in my opinion, as it reads obj file and writes it back in the same format:

bool exporterTest() override {
    ::Assimp::Importer importer;
    ::Assimp::Exporter exporter;
    const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/OBJ/spider.obj", aiProcess_ValidateDataStructure);
    exporter.Export(scene, "obj", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_out.obj");
    return true;
}

Can it be changed to read fbx file and write back as 3ds? Which import flags I have to use then? something like this:

exporterTest() override { 
::Assimp::Importer importer; 
::Assimp::Exporter exporter; 
const aiScene *scene = importer.ReadFile( "myModel.fbx", 0); 
exporter.Export(scene, "3ds", "myModel.3ds"); 
return true; 
}
\$\endgroup\$
29
  • \$\begingroup\$ According to the doc, this appears to be pretty straightforward. What have you tried so far? \$\endgroup\$
    – Vaillancourt
    Jan 1, 2022 at 17:57
  • \$\begingroup\$ At the moment nothing, stil triing to build the API with MINGW and without boost dependance. Which doc you mean? \$\endgroup\$
    – convert
    Jan 1, 2022 at 23:33
  • \$\begingroup\$ The one you linked to. I suppose you can just try to load the fbx and the loader will figure the right loader to use based on the file extension. And the exporter says you just need to provide the right 3ds string to export it... \$\endgroup\$
    – Vaillancourt
    Jan 1, 2022 at 23:41
  • \$\begingroup\$ And what about that import flags like aiProcess_ValidateDataStructure? \$\endgroup\$
    – convert
    Jan 1, 2022 at 23:43
  • \$\begingroup\$ Please test this out when you get there first, and come back to us with an actual issue you're facing. \$\endgroup\$
    – Vaillancourt
    Jan 2, 2022 at 0:13

0

You must log in to answer this question.

Browse other questions tagged .