MikkT tangent generation support

* Default setting when no tangents rule: MikkT tangents.
* Calculates tangents/bitangents for all available uv sets.
* Creates tangent/bitangent data in in case they are not existing yet (as in: the source scene contains tangents/bitangents)
* Overwrites the tangent/bitangent data from the source scene in case MikkT is wished.
* Added helper functions to create tangent/bitangent scene nodes, finding tangent/bitangent data for a given uv layer and calculating the number of uv layers provided by the mesh scene node.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
This commit is contained in:
Benjamin Jillich
2021-07-20 16:32:34 +02:00
parent fe661bc159
commit d987c45072
4 changed files with 211 additions and 96 deletions
@@ -540,7 +540,9 @@ namespace AZ
}
else
{
AZ_Warning(s_builderName, false, "Found multiple tangent data sets. Only the first will be used.");
AZ_Warning(s_builderName, false,
"Found multiple tangent data sets for mesh '%s'. Only the first will be used.",
content.m_name.GetCStr());
}
}
else if (azrtti_istypeof<BitangentData>(data.get()))
@@ -552,7 +554,9 @@ namespace AZ
}
else
{
AZ_Warning(s_builderName, false, "Found multiple bitangent data sets. Only the first will be used.");
AZ_Warning(s_builderName, false,
"Found multiple bitangent data sets for mesh '%s'. Only the first will be used.",
content.m_name.GetCStr());
}
}
else if (azrtti_istypeof<MaterialData>(data.get()))