First pass FBX -> Scene File conversion. (#1699)

This is the simple pass, minimizing code changes and focused on comments.

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
This commit is contained in:
AMZN-stankowi
2021-07-01 08:53:47 -07:00
committed by GitHub
parent ff9d52d38e
commit 4c4be73bd5
33 changed files with 48 additions and 48 deletions
@@ -107,7 +107,7 @@ namespace AZ::SceneGenerationComponents
return AZ::SceneAPI::Events::ProcessingResult::Failure;
}
// Now that we have the tangents and bitangents, calculate the tangent w values for the ones that we imported from Fbx, as they only have xyz.
// Now that we have the tangents and bitangents, calculate the tangent w values for the ones that we imported from the scene file, as they only have xyz.
UpdateFbxTangentWValues(graph, nodeIndex, mesh);
}
@@ -122,7 +122,7 @@ namespace AZ::SceneGenerationComponents
size_t uvSetIndex = 0;
while (uvData)
{
// Get the tangents and bitangents from Fbx.
// Get the tangents and bitangents from the source scene.
AZ::SceneAPI::DataTypes::IMeshVertexTangentData* fbxTangentData = AZ::SceneAPI::SceneData::TangentsRule::FindTangentData(graph, nodeIndex, uvSetIndex, AZ::SceneAPI::DataTypes::TangentSpace::FromFbx);
AZ::SceneAPI::DataTypes::IMeshVertexBitangentData* fbxBitangentData = AZ::SceneAPI::SceneData::TangentsRule::FindBitangentData(graph, nodeIndex, uvSetIndex, AZ::SceneAPI::DataTypes::TangentSpace::FromFbx);
@@ -197,7 +197,7 @@ namespace AZ::SceneGenerationComponents
return true; // No fatal error
}
// Check if we had tangents inside the Fbx file.
// Check if we had tangents inside the source scene file.
AZ::SceneAPI::DataTypes::IMeshVertexTangentData* fbxTangentData = AZ::SceneAPI::SceneData::TangentsRule::FindTangentData(graph, nodeIndex, 0, AZ::SceneAPI::DataTypes::TangentSpace::FromFbx);
AZ::SceneAPI::DataTypes::IMeshVertexBitangentData* fbxBitangentData = AZ::SceneAPI::SceneData::TangentsRule::FindBitangentData(graph, nodeIndex, 0, AZ::SceneAPI::DataTypes::TangentSpace::FromFbx);
@@ -211,7 +211,7 @@ namespace AZ::SceneGenerationComponents
requiredSpaces.emplace_back(AZ::SceneAPI::DataTypes::TangentSpace::MikkT);
}
// If all we need is import from FBX, and we have tangent data from Fbx already, then skip generating.
// If all we need is import from the source scene, and we have tangent data from the source scene already, then skip generating.
if ((requiredSpaces.size() == 1 && requiredSpaces[0] == AZ::SceneAPI::DataTypes::TangentSpace::FromFbx) && fbxTangentData && fbxBitangentData)
{
return true;