-
|
I figure I am doing something wrong yet again, but I thought I'd ask the people of assimp since I have never used this before. I simply want to convert a DirectX .X file to a .FBX file. The .X file contains animation data with some bone stuff. I am pretty sure assimp has no problems whatsoever with importing, it's mainly the exporting part: Any advice would be great, I'd even fix this if it were a bug. But I don't know if it's a bug or something I am doing. My code: const aiScene *scene = importer.ReadFile(in_file_str, aiProcess_ValidateDataStructure);
if (scene == nullptr || scene->mFlags & AI_SCENE_FLAGS_INCOMPLETE) {
spdlog::critical("Failed to load asset at {}", in_file_str);
spdlog::critical("{}", importer.GetErrorString());
return 1;
}
const auto out_file = out_dir / relative(in_file_str, fix_assets ? fixed_assets_dir : asset_dir).
replace_extension("." EXPORT_EXTENSION);
create_directories(out_file.parent_path());
spdlog::info("Exporting asset scene to {}", out_file.string());
auto res = exporter.Export(scene, EXPORT_EXTENSION, out_file.string(), aiProcess_ValidateDataStructure);
if (res != AI_SUCCESS) {
spdlog::error("Failed to export scene.");
}Imported X file: https://www.mediafire.com/file/knfd1cget8y3gty/Bob_DrinkFromBottle.X/file |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I figured it out after I built a little imgui demo to view what assimp was loading. Turns out the FBX exporter is broken. Will raise an issue soon. |
Beta Was this translation helpful? Give feedback.
I figured it out after I built a little imgui demo to view what assimp was loading. Turns out the FBX exporter is broken. Will raise an issue soon.