From 7b31cb5df882cd8959f60c661787de1b1efef6c4 Mon Sep 17 00:00:00 2001 From: apistol78 Date: Mon, 15 Apr 2024 15:15:33 +0200 Subject: [PATCH] Traktor: For now do not enable alpha blend path for FBX meshes which has a Alpha value of 1. --- code/Model/Formats/Fbx/MaterialConverter.cpp | 7 +++++-- code/Model/Formats/Fbx/SkeletonConverter.cpp | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/Model/Formats/Fbx/MaterialConverter.cpp b/code/Model/Formats/Fbx/MaterialConverter.cpp index bc4a4ff725..ef2e96cd91 100644 --- a/code/Model/Formats/Fbx/MaterialConverter.cpp +++ b/code/Model/Formats/Fbx/MaterialConverter.cpp @@ -161,8 +161,11 @@ bool convertMaterials(Model& outModel, SmallMap< int32_t, int32_t >& outMaterial if (material->pbr.opacity.has_value) { - mm.setTransparency(material->pbr.opacity.value_real); - mm.setBlendOperator(Material::BoAlpha); + if (material->pbr.opacity.value_real < 1.0f - FUZZY_EPSILON) + { + mm.setTransparency(material->pbr.opacity.value_real); + mm.setBlendOperator(Material::BoAlpha); + } } if (material->pbr.base_color.texture) diff --git a/code/Model/Formats/Fbx/SkeletonConverter.cpp b/code/Model/Formats/Fbx/SkeletonConverter.cpp index 5595aef6b9..27025e42f5 100644 --- a/code/Model/Formats/Fbx/SkeletonConverter.cpp +++ b/code/Model/Formats/Fbx/SkeletonConverter.cpp @@ -169,10 +169,11 @@ Ref< Pose > convertPose( return nullptr; // Find evaluated skeleton. - //#fixme Ensure it's the same skeleton... ufbx_node* eskeletonNode = search(escene->root_node, [&](ufbx_node* node) { - return (node->children.count > 0 && node->bind_pose != nullptr); + return node->element_id == skeletonNode->element_id; }); + if (!eskeletonNode) + return nullptr; const Matrix44 Mrx90 = rotateX(deg2rad(-90.0f));