NormalGenerationMethod
NormalGenerationMethod
#Overview
name: NormalGenerationMethod
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 27
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of NormalGenerationMethod is to specify the method used for generating normal and tangent vectors for imported meshes in Unreal Engine 5. This setting variable is part of the rendering system, specifically for mesh import and processing.
Key points about NormalGenerationMethod:
-
It is used by the Unreal Engine subsystems related to mesh importing, including the FBX importer and the static/skeletal mesh import process.
-
The value of this variable is typically set during the mesh import process, either through user interface options or programmatically in import functions.
-
It interacts with other import settings like NormalImportMethod and bUseMikkTSpace.
-
There are two main options for this variable:
- EFBXNormalGenerationMethod::BuiltIn: Uses Unreal Engine’s built-in method for normal and tangent generation.
- EFBXNormalGenerationMethod::MikkTSpace: Uses the MikkTSpace algorithm for normal and tangent generation, which is often considered more accurate for certain types of meshes.
-
Developers should be aware that changing this setting can affect the visual appearance of imported meshes, particularly in how they react to lighting.
-
Best practices when using this variable include:
- Consider using MikkTSpace for most meshes, as it generally produces better results for normal mapping.
- Be consistent across your project to ensure visual coherence.
- If reimporting meshes, be aware that changing this setting might affect existing materials and textures.
-
This setting is particularly important for ensuring proper normal and tangent data for imported meshes, which is crucial for correct lighting and shading in the game engine.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:651, section: [/Script/UnrealEd.FbxMeshImportData]
- INI Section:
/Script/UnrealEd.FbxMeshImportData
- Raw value:
EFBXNormalGenerationMethod::MikkTSpace
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Interchange/Editor/Source/InterchangeEditor/Private/InterchangeFbxAssetImportDataConverter.cpp:73
Scope (from outer to inner):
file
namespace UE::Interchange::Private
function void FillFbxMeshImportData
Source code excerpt:
if (GenericAssetPipeline->CommonMeshesProperties->bUseMikkTSpace)
{
MeshImportData->NormalGenerationMethod = EFBXNormalGenerationMethod::MikkTSpace;
}
else
{
MeshImportData->NormalGenerationMethod = EFBXNormalGenerationMethod::BuiltIn;
}
if (GenericAssetPipeline->CommonMeshesProperties->bRecomputeNormals)
{
MeshImportData->NormalImportMethod = EFBXNormalImportMethod::FBXNIM_ComputeNormals;
}
#Loc: <Workspace>/Engine/Plugins/Interchange/Editor/Source/InterchangeEditor/Private/InterchangeFbxAssetImportDataConverter.cpp:108
Scope (from outer to inner):
file
namespace UE::Interchange::Private
function void FillInterchangeGenericAssetsPipelineFromFbxMeshImportData
Source code excerpt:
GenericAssetPipeline->CommonMeshesProperties->bBakeMeshes = LegacyMeshImportData->bTransformVertexToAbsolute;
if (LegacyMeshImportData->NormalGenerationMethod == EFBXNormalGenerationMethod::MikkTSpace)
{
GenericAssetPipeline->CommonMeshesProperties->bUseMikkTSpace = true;
}
else
{
GenericAssetPipeline->CommonMeshesProperties->bUseMikkTSpace = false;
#Loc: <Workspace>/Engine/Plugins/Tests/EditorTests/Source/EditorTests/Private/UnrealEd/FbxAutomationTests.cpp:392
Scope (from outer to inner):
file
function BEGIN_FUNCTION_BUILD_OPTIMIZATION bool F
Source code excerpt:
ImportData->bImportMeshLODs = TestPlan->ImportUI->StaticMeshImportData->bImportMeshLODs;
ImportData->NormalImportMethod = TestPlan->ImportUI->StaticMeshImportData->NormalImportMethod;
ImportData->NormalGenerationMethod = TestPlan->ImportUI->StaticMeshImportData->NormalGenerationMethod;
ImportData->bComputeWeightedNormals = TestPlan->ImportUI->StaticMeshImportData->bComputeWeightedNormals;
//Copy UFbxAssetImportData
ImportData->ImportTranslation = TestPlan->ImportUI->StaticMeshImportData->ImportTranslation;
ImportData->ImportRotation = TestPlan->ImportUI->StaticMeshImportData->ImportRotation;
ImportData->ImportUniformScale = TestPlan->ImportUI->StaticMeshImportData->ImportUniformScale;
ImportData->bImportAsScene = TestPlan->ImportUI->StaticMeshImportData->bImportAsScene;
#Loc: <Workspace>/Engine/Plugins/Tests/EditorTests/Source/EditorTests/Private/UnrealEd/FbxAutomationTests.cpp:435
Scope (from outer to inner):
file
function BEGIN_FUNCTION_BUILD_OPTIMIZATION bool F
Source code excerpt:
ImportData->bImportMeshLODs = TestPlan->ImportUI->SkeletalMeshImportData->bImportMeshLODs;
ImportData->NormalImportMethod = TestPlan->ImportUI->SkeletalMeshImportData->NormalImportMethod;
ImportData->NormalGenerationMethod = TestPlan->ImportUI->SkeletalMeshImportData->NormalGenerationMethod;
//Copy UFbxAssetImportData
ImportData->ImportTranslation = TestPlan->ImportUI->SkeletalMeshImportData->ImportTranslation;
ImportData->ImportRotation = TestPlan->ImportUI->SkeletalMeshImportData->ImportRotation;
ImportData->ImportUniformScale = TestPlan->ImportUI->SkeletalMeshImportData->ImportUniformScale;
ImportData->bImportAsScene = TestPlan->ImportUI->SkeletalMeshImportData->bImportAsScene;
#Loc: <Workspace>/Engine/Plugins/Tests/EditorTests/Source/EditorTests/Private/UnrealEd/FbxAutomationTests.cpp:500
Scope (from outer to inner):
file
function BEGIN_FUNCTION_BUILD_OPTIMIZATION bool F
Source code excerpt:
ImportData->bImportMeshLODs = TestPlan->ImportUI->StaticMeshImportData->bImportMeshLODs;
ImportData->NormalImportMethod = TestPlan->ImportUI->StaticMeshImportData->NormalImportMethod;
ImportData->NormalGenerationMethod = TestPlan->ImportUI->StaticMeshImportData->NormalGenerationMethod;
ImportData->bComputeWeightedNormals = TestPlan->ImportUI->StaticMeshImportData->bComputeWeightedNormals;
//Copy UFbxAssetImportData
ImportData->ImportTranslation = TestPlan->ImportUI->StaticMeshImportData->ImportTranslation;
ImportData->ImportRotation = TestPlan->ImportUI->StaticMeshImportData->ImportRotation;
ImportData->ImportUniformScale = TestPlan->ImportUI->StaticMeshImportData->ImportUniformScale;
ImportData->bImportAsScene = TestPlan->ImportUI->StaticMeshImportData->bImportAsScene;
#Loc: <Workspace>/Engine/Plugins/Tests/EditorTests/Source/EditorTests/Private/UnrealEd/FbxAutomationTests.cpp:533
Scope (from outer to inner):
file
function BEGIN_FUNCTION_BUILD_OPTIMIZATION bool F
Source code excerpt:
ImportData->bImportMeshLODs = TestPlan->ImportUI->SkeletalMeshImportData->bImportMeshLODs;
ImportData->NormalImportMethod = TestPlan->ImportUI->SkeletalMeshImportData->NormalImportMethod;
ImportData->NormalGenerationMethod = TestPlan->ImportUI->SkeletalMeshImportData->NormalGenerationMethod;
//Copy UFbxAssetImportData
ImportData->ImportTranslation = TestPlan->ImportUI->SkeletalMeshImportData->ImportTranslation;
ImportData->ImportRotation = TestPlan->ImportUI->SkeletalMeshImportData->ImportRotation;
ImportData->ImportUniformScale = TestPlan->ImportUI->SkeletalMeshImportData->ImportUniformScale;
ImportData->bImportAsScene = TestPlan->ImportUI->SkeletalMeshImportData->bImportAsScene;
#Loc: <Workspace>/Engine/Source/Editor/Persona/Private/PersonaMeshDetails.cpp:4050
Scope (from outer to inner):
file
function FReply FPersonaMeshDetails::ApplyLODChanges
Source code excerpt:
{
SKImportData->NormalImportMethod = LODInfo->BuildSettings.bRecomputeNormals ? EFBXNormalImportMethod::FBXNIM_ComputeNormals : EFBXNormalImportMethod::FBXNIM_ImportNormals;
SKImportData->NormalGenerationMethod = LODInfo->BuildSettings.bUseMikkTSpace ? EFBXNormalGenerationMethod::MikkTSpace : EFBXNormalGenerationMethod::BuiltIn;
}
SKImportData->bComputeWeightedNormals = LODInfo->BuildSettings.bComputeWeightedNormals;
SKImportData->ThresholdPosition = LODInfo->BuildSettings.ThresholdPosition;
SKImportData->ThresholdTangentNormal = LODInfo->BuildSettings.ThresholdTangentNormal;
SKImportData->ThresholdUV = LODInfo->BuildSettings.ThresholdUV;
SKImportData->MorphThresholdPosition = LODInfo->BuildSettings.MorphThresholdPosition;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Factories/FbxMeshImportData.h:80
Scope (from outer to inner):
file
class class UFbxMeshImportData : public UFbxAssetImportData
Source code excerpt:
/** Use the MikkTSpace tangent space generator for generating normals and tangents on the mesh */
UPROPERTY(EditAnywhere, BlueprintReadWrite, config, AdvancedDisplay, Category = Mesh, meta=(ImportType="Mesh|GeoOnly"))
TEnumAsByte<enum EFBXNormalGenerationMethod::Type> NormalGenerationMethod;
/** Enabling this option will use weighted normals algorithm (area and angle) when computing normals or tangents */
UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, config, Category = Mesh, meta = (OBJRestrict = "true", ImportType = "Mesh|GeoOnly"))
uint32 bComputeWeightedNormals : 1;
/* If checked, The material list will be reorder to the same order has the FBX file. */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Factories/FbxSceneImportOptionsStaticMesh.h:85
Scope (from outer to inner):
file
class class UFbxSceneImportOptionsStaticMesh : public UObject
Source code excerpt:
/** Use the MikkTSpace tangent space generator for generating normals and tangents on the mesh */
UPROPERTY(EditAnywhere, config, Category = StaticMesh)
EFBXSceneNormalGenerationMethod NormalGenerationMethod;
void FillStaticMeshInmportData(class UFbxStaticMeshImportData* StaticMeshImportData, class UFbxSceneImportOptions* SceneImportOptions);
};
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Factories/EditorFactories.cpp:6706
Scope (from outer to inner):
file
function EReimportResult::Type UReimportFbxSkeletalMeshFactory::Reimport
Source code excerpt:
LODInfo->BuildSettings.bRecomputeNormals = SKImportData->NormalImportMethod == EFBXNormalImportMethod::FBXNIM_ComputeNormals;
LODInfo->BuildSettings.bRecomputeTangents = SKImportData->NormalImportMethod != EFBXNormalImportMethod::FBXNIM_ImportNormalsAndTangents;
LODInfo->BuildSettings.bUseMikkTSpace = SKImportData->NormalGenerationMethod == EFBXNormalGenerationMethod::MikkTSpace;
LODInfo->BuildSettings.ThresholdPosition = SKImportData->ThresholdPosition;
LODInfo->BuildSettings.ThresholdTangentNormal = SKImportData->ThresholdTangentNormal;
LODInfo->BuildSettings.ThresholdUV = SKImportData->ThresholdUV;
LODInfo->BuildSettings.MorphThresholdPosition = SKImportData->MorphThresholdPosition;
}
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxMainImport.cpp:407
Scope (from outer to inner):
file
namespace UnFbx
function void ApplyImportUIToImportOptions
Source code excerpt:
UFbxStaticMeshImportData* StaticMeshData = ImportUI->StaticMeshImportData;
InOutImportOptions.NormalImportMethod = StaticMeshData->NormalImportMethod;
InOutImportOptions.NormalGenerationMethod = StaticMeshData->NormalGenerationMethod;
InOutImportOptions.bComputeWeightedNormals = StaticMeshData->bComputeWeightedNormals;
InOutImportOptions.ImportTranslation = StaticMeshData->ImportTranslation;
InOutImportOptions.ImportRotation = StaticMeshData->ImportRotation;
InOutImportOptions.ImportUniformScale = StaticMeshData->ImportUniformScale;
InOutImportOptions.bTransformVertexToAbsolute = StaticMeshData->bTransformVertexToAbsolute;
InOutImportOptions.bBakePivotInVertex = StaticMeshData->bBakePivotInVertex;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxMainImport.cpp:427
Scope (from outer to inner):
file
namespace UnFbx
function void ApplyImportUIToImportOptions
Source code excerpt:
UFbxSkeletalMeshImportData* SkeletalMeshData = ImportUI->SkeletalMeshImportData;
InOutImportOptions.NormalImportMethod = SkeletalMeshData->NormalImportMethod;
InOutImportOptions.NormalGenerationMethod = SkeletalMeshData->NormalGenerationMethod;
InOutImportOptions.bComputeWeightedNormals = SkeletalMeshData->bComputeWeightedNormals;
InOutImportOptions.ImportTranslation = SkeletalMeshData->ImportTranslation;
InOutImportOptions.ImportRotation = SkeletalMeshData->ImportRotation;
InOutImportOptions.ImportUniformScale = SkeletalMeshData->ImportUniformScale;
InOutImportOptions.bTransformVertexToAbsolute = SkeletalMeshData->bTransformVertexToAbsolute;
InOutImportOptions.bBakePivotInVertex = SkeletalMeshData->bBakePivotInVertex;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxMainImport.cpp:1655
Scope (from outer to inner):
file
namespace UnFbx
function bool FFbxImporter::ImportFromFile
Source code excerpt:
* @EventParam ImportRigidMesh boolean Returns whether the importer should try to create a rigid mesh (static mesh import as skeletal mesh)
* @EventParam NormalImportMethod string Return if the tangents or normal should be imported or compute
* @EventParam NormalGenerationMethod string Return tangents generation method
* @EventParam CreatePhysicsAsset boolean Returns whether the importer should create the physic asset
* @EventParam ImportAnimations boolean Returns whether the importer should import also the animation
* @EventParam ImportAsSkeletalGeometry boolean Returns whether the importer should import only the geometry
* @EventParam ImportAsSkeletalSkinning boolean Returns whether the importer should import only the skinning
* @EventParam ImportMeshesInBoneHierarchy boolean Returns whether the importer should import also the mesh found in the bone hierarchy
* @EventParam ImportMorph boolean Returns whether the importer should import the morph targets
* @EventParam ImportSkeletalMeshLODs boolean Returns whether the importer should import the LODs
* @EventParam PreserveSmoothingGroups boolean Returns whether the importer should import the smoothing groups
* @EventParam UpdateSkeletonReferencePose boolean Returns whether the importer should update the skeleton reference pose
* @EventParam UseT0AsRefPose boolean Returns whether the importer should use the the animation 0 time has the reference pose
* @EventParam ThresholdPosition float Returns the threshold delta to weld vertices
* @EventParam ThresholdTangentNormal float Returns the threshold delta to weld tangents and normals
* @EventParam ThresholdUV float Returns the threshold delta to weld UVs
* @EventParam MorphThresholdPosition float Returns the morph target threshold delta to compute deltas
* @EventParam AutoComputeLodDistances boolean Returns whether the importer should set the auto compute LOD distance
* @EventParam LodNumber integer Returns the LOD number we should have after the import
* @EventParam BuildReversedIndexBuffer boolean Returns whether the importer should fill the reverse index buffer when building the static mesh
* @EventParam GenerateLightmapUVs boolean Returns whether the importer should generate light map UVs
* @EventParam ImportStaticMeshLODs boolean Returns whether the importer should import the LODs
* @EventParam RemoveDegenerates boolean Returns whether the importer should remove the degenerated triangles when building the static mesh
* @EventParam MinimumLodNumber integer Returns the minimum LOD use by the rendering
* @EventParam StaticMeshLODGroup string Returns the LOD Group settings we use to build this imported static mesh
* @EventParam VertexColorImportOption string Returns how the importer should import the vertex color
* @EventParam VertexOverrideColor string Returns the color use if we need to override the vertex color
* @EventParam AnimationLengthImportType string Returns how we choose the animation time span
* @EventParam DeleteExistingMorphTargetCurves boolean Returns whether the importer should delete the existing morph target curves
* @EventParam AnimationRange string Returns the range of animation the importer should sample if the time span is custom
* @EventParam DoNotImportCurveWithZero boolean Returns whether the importer should import curves containing only zero value
* @EventParam ImportBoneTracks boolean Returns whether the importer should import the bone tracks
* @EventParam ImportCustomAttribute boolean Returns whether the importer should import the custom attribute curves
* @EventParam PreserveLocalTransform boolean Returns whether the importer should preserve the local transform when importing the animation
* @EventParam RemoveRedundantKeys boolean Returns whether the importer should remove all redundant key in an animation
* @EventParam Resample boolean Returns whether the importer should re-sample the animation
* @EventParam SetMaterialDriveParameterOnCustomAttribute boolean Returns whether the importer should hook all custom attribute curve to unreal material attribute
* @EventParam SetMaterialDriveParameterOnCustomAttribute boolean Returns whether the importer should hook some custom attribute (having the suffix) curve to unreal material attribute
* @EventParam ResampleRate float Returns the rate the exporter is suppose to re-sample any imported animations
*
* @Owner Alexis.Matte
*/
FbxDocumentInfo* DocInfo = Scene->GetSceneInfo();
if (DocInfo)
{
if( FEngineAnalytics::IsAvailable() )
{
const static UEnum* FBXImportTypeEnum = StaticEnum<EFBXImportType>();
const static UEnum* FBXAnimationLengthImportTypeEnum = StaticEnum<EFBXAnimationLengthImportType>();
const static UEnum* MaterialSearchLocationEnum = StaticEnum<EMaterialSearchLocation>();
const static UEnum* FBXNormalGenerationMethodEnum = StaticEnum<EFBXNormalGenerationMethod::Type>();
const static UEnum* FBXNormalImportMethodEnum = StaticEnum<EFBXNormalImportMethod>();
const static UEnum* VertexColorImportOptionEnum = StaticEnum<EVertexColorImportOption::Type>();
TArray<FAnalyticsEventAttribute> Attribs;
FString LastSavedVendor(UTF8_TO_TCHAR(DocInfo->LastSaved_ApplicationVendor.Get().Buffer()));
FString LastSavedAppName(UTF8_TO_TCHAR(DocInfo->LastSaved_ApplicationName.Get().Buffer()));
FString LastSavedAppVersion(UTF8_TO_TCHAR(DocInfo->LastSaved_ApplicationVersion.Get().Buffer()));
Attribs.Add(FAnalyticsEventAttribute(TEXT("LastSaved Application Vendor"), LastSavedVendor));
Attribs.Add(FAnalyticsEventAttribute(TEXT("LastSaved Application Name"), LastSavedAppName));
Attribs.Add(FAnalyticsEventAttribute(TEXT("LastSaved Application Version"), LastSavedAppVersion));
Attribs.Add(FAnalyticsEventAttribute(TEXT("FBX Version"), FbxFileVersion));
//////////////////////////////////////////////////////////////////////////
//FBX import options
Attribs.Add(FAnalyticsEventAttribute(TEXT("GenOpt ImportType"), FBXImportTypeEnum->GetNameStringByValue(ImportOptions->ImportType)));
Attribs.Add(FAnalyticsEventAttribute(TEXT("GenOpt ConvertScene"), ImportOptions->bConvertScene));
Attribs.Add(FAnalyticsEventAttribute(TEXT("GenOpt ConvertSceneUnit"), ImportOptions->bConvertSceneUnit));
Attribs.Add(FAnalyticsEventAttribute(TEXT("GenOpt ForceFrontXAxis"), ImportOptions->bForceFrontXAxis));
Attribs.Add(FAnalyticsEventAttribute(TEXT("GenOpt ImportMaterials"), ImportOptions->bImportMaterials));
Attribs.Add(FAnalyticsEventAttribute(TEXT("GenOpt ImportTextures"), ImportOptions->bImportTextures));
Attribs.Add(FAnalyticsEventAttribute(TEXT("GenOpt InvertNormalMap"), ImportOptions->bInvertNormalMap));
Attribs.Add(FAnalyticsEventAttribute(TEXT("GenOpt RemoveNameSpace"), ImportOptions->bRemoveNameSpace));
Attribs.Add(FAnalyticsEventAttribute(TEXT("GenOpt UsedAsFullName"), ImportOptions->bUsedAsFullName));
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxMainImport.cpp:1746
Scope (from outer to inner):
file
lambda-function
Source code excerpt:
Attribs.Add(FAnalyticsEventAttribute(TEXT("MeshOpt TransformVertexToAbsolute"), CaptureImportOptions->bTransformVertexToAbsolute));
Attribs.Add(FAnalyticsEventAttribute(TEXT("MeshOpt ImportRigidMesh"), CaptureImportOptions->bImportRigidMesh));
Attribs.Add(FAnalyticsEventAttribute(TEXT("MeshOpt NormalGenerationMethod"), FBXNormalGenerationMethodEnum->GetNameStringByValue(CaptureImportOptions->NormalGenerationMethod)));
Attribs.Add(FAnalyticsEventAttribute(TEXT("MeshOpt NormalImportMethod"), FBXNormalImportMethodEnum->GetNameStringByValue(CaptureImportOptions->NormalImportMethod)));
Attribs.Add(FAnalyticsEventAttribute(TEXT("MeshOpt ComputeWeightedNormals"), CaptureImportOptions->bComputeWeightedNormals));
};
auto AddSKAnalytic = [&Attribs, &CaptureImportOptions]()
{
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxMeshImportData.cpp:9
Scope (from outer to inner):
file
function UFbxMeshImportData::UFbxMeshImportData
Source code excerpt:
{
NormalImportMethod = FBXNIM_ComputeNormals;
NormalGenerationMethod = EFBXNormalGenerationMethod::MikkTSpace;
bComputeWeightedNormals = true;
bBakePivotInVertex = false;
bReorderMaterialToFbxOrder = true;
}
bool UFbxMeshImportData::CanEditChange(const FProperty* InProperty) const
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxSceneImportData.cpp:76
Scope (from outer to inner):
file
function UnFbx::FBXImportOptions *JSONToFbxOption
Source code excerpt:
Option->NormalImportMethod = (EFBXNormalImportMethod)NormalImportMethod;
}
int32 NormalGenerationMethod;
if (OptionObj->TryGetNumberField(TEXT("NormalGenerationMethod"), NormalGenerationMethod))
{
Option->NormalGenerationMethod = (EFBXNormalGenerationMethod::Type)NormalGenerationMethod;
}
OptionObj->TryGetBoolField(TEXT("bTransformVertexToAbsolute"), Option->bTransformVertexToAbsolute);
OptionObj->TryGetBoolField(TEXT("bBakePivotInVertex"), Option->bBakePivotInVertex);
OptionObj->TryGetBoolField(TEXT("bCombineToSingle"), Option->bCombineToSingle);
int32 VertexColorImportOption;
if (OptionObj->TryGetNumberField(TEXT("VertexColorImportOption"), VertexColorImportOption))
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxSceneImportData.cpp:184
Scope (from outer to inner):
file
function FString FbxOptionToJSON
Source code excerpt:
JsonString += FString::Printf(TEXT("\"NormalImportMethod\" : \"%d\", \"NormalGenerationMethod\" : \"%d\", \"bTransformVertexToAbsolute\" : \"%d\", \"bBakePivotInVertex\" : \"%d\", \"bCombineToSingle\" : \"%d\", \"VertexColorImportOption\" : \"%d\", \"VertexOverrideColor\" : {\"R\" : \"%d\", \"G\" : \"%d\", \"B\" : \"%d\", \"A\" : \"%d\" }, "),
(int32)Option->NormalImportMethod,
(int32)Option->NormalGenerationMethod,
Option->bTransformVertexToAbsolute ? 1 : 0,
Option->bBakePivotInVertex ? 1 : 0,
Option->bCombineToSingle ? 1 : 0,
(int32)Option->VertexColorImportOption,
Option->VertexOverrideColor.R,
Option->VertexOverrideColor.G,
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxSceneImportOptionsStaticMesh.cpp:24
Scope (from outer to inner):
file
function UFbxSceneImportOptionsStaticMesh::UFbxSceneImportOptionsStaticMesh
Source code excerpt:
VertexOverrideColor = FColor(255, 255, 255, 255);
NormalImportMethod = EFBXSceneNormalImportMethod::FBXSceneNIM_ComputeNormals;
NormalGenerationMethod = EFBXSceneNormalGenerationMethod::MikkTSpace;
}
void UFbxSceneImportOptionsStaticMesh::FillStaticMeshInmportData(UFbxStaticMeshImportData* StaticMeshImportData, UFbxSceneImportOptions* SceneImportOptions)
{
check(StaticMeshImportData != nullptr);
check(SceneImportOptions != nullptr);
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxSkeletalMeshImport.cpp:1821
Scope (from outer to inner):
file
function USkeletalMesh* UnFbx::FFbxImporter::ImportSkeletalMesh
Source code excerpt:
BuildOptions.bRecomputeNormals = !ImportOptions->ShouldImportNormals() || !SkelMeshImportDataPtr->bHasNormals;
BuildOptions.bRecomputeTangents = !ImportOptions->ShouldImportTangents() || !SkelMeshImportDataPtr->bHasTangents;
BuildOptions.bUseMikkTSpace = (ImportOptions->NormalGenerationMethod == EFBXNormalGenerationMethod::MikkTSpace) && (!ImportOptions->ShouldImportNormals() || !ImportOptions->ShouldImportTangents());
BuildOptions.bComputeWeightedNormals = ImportOptions->bComputeWeightedNormals;
BuildOptions.bRemoveDegenerates = ImportOptions->bRemoveDegenerates;
BuildOptions.ThresholdPosition = ImportOptions->OverlappingThresholds.ThresholdPosition;
BuildOptions.ThresholdTangentNormal = ImportOptions->OverlappingThresholds.ThresholdTangentNormal;
BuildOptions.ThresholdUV = ImportOptions->OverlappingThresholds.ThresholdUV;
BuildOptions.MorphThresholdPosition = ImportOptions->OverlappingThresholds.MorphThresholdPosition;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxSkeletalMeshImport.cpp:2452
Scope (from outer to inner):
file
function USkeletalMesh* UnFbx::FFbxImporter::ReimportSkeletalMesh
Source code excerpt:
LODInfo->BuildSettings.bRecomputeTangents = SKImportData->NormalImportMethod != EFBXNormalImportMethod::FBXNIM_ImportNormalsAndTangents;
LODInfo->BuildSettings.bRemoveDegenerates = true;
LODInfo->BuildSettings.bUseMikkTSpace = SKImportData->NormalGenerationMethod == EFBXNormalGenerationMethod::MikkTSpace;
LODInfo->BuildSettings.ThresholdPosition = SKImportData->ThresholdPosition;
LODInfo->BuildSettings.ThresholdTangentNormal = SKImportData->ThresholdTangentNormal;
LODInfo->BuildSettings.ThresholdUV = SKImportData->ThresholdUV;
LODInfo->BuildSettings.MorphThresholdPosition = SKImportData->MorphThresholdPosition;
}
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxSkeletalMeshImport.cpp:4734
Scope (from outer to inner):
file
function void UnFbx::FFbxImporter::ImportMorphTargetsInternal
Source code excerpt:
ImportOptions->ShouldImportNormals(),
ImportOptions->ShouldImportTangents(),
(ImportOptions->NormalGenerationMethod == EFBXNormalGenerationMethod::MikkTSpace),
ImportOptions->OverlappingThresholds
);
}
}
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxStaticMeshImport.cpp:2048
Scope (from outer to inner):
file
function UStaticMesh* UnFbx::FFbxImporter::ImportStaticMeshAsSingle
Source code excerpt:
SrcModel.BuildSettings.bRecomputeNormals = ImportOptions->NormalImportMethod == FBXNIM_ComputeNormals;
SrcModel.BuildSettings.bRecomputeTangents = ImportOptions->NormalImportMethod != FBXNIM_ImportNormalsAndTangents;
SrcModel.BuildSettings.bUseMikkTSpace = (ImportOptions->NormalGenerationMethod == EFBXNormalGenerationMethod::MikkTSpace) && (!ImportOptions->ShouldImportNormals() || !ImportOptions->ShouldImportTangents());
SrcModel.BuildSettings.bComputeWeightedNormals = ImportOptions->bComputeWeightedNormals;
StaticMesh->NaniteSettings.bEnabled = ImportOptions->bBuildNanite;
SrcModel.BuildSettings.DistanceFieldResolutionScale = ImportOptions->DistanceFieldResolutionScale;
if (ImportOptions->bGenerateLightmapUVs)
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/SFbxSceneOptionWindow.cpp:1434
Scope (from outer to inner):
file
function void SFbxSceneOptionWindow::CopyStaticMeshOptionsToFbxOptions
Source code excerpt:
break;
}
switch (StaticMeshOptions->NormalGenerationMethod)
{
case EFBXSceneNormalGenerationMethod::BuiltIn:
ImportSettings->NormalGenerationMethod = EFBXNormalGenerationMethod::BuiltIn;
break;
case EFBXSceneNormalGenerationMethod::MikkTSpace:
ImportSettings->NormalGenerationMethod = EFBXNormalGenerationMethod::MikkTSpace;
break;
}
}
void SFbxSceneOptionWindow::CopyFbxOptionsToStaticMeshOptions(UnFbx::FBXImportOptions *ImportSettings, UFbxSceneImportOptionsStaticMesh* StaticMeshOptions)
{
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/SFbxSceneOptionWindow.cpp:1480
Scope (from outer to inner):
file
function void SFbxSceneOptionWindow::CopyFbxOptionsToStaticMeshOptions
Source code excerpt:
break;
}
switch (ImportSettings->NormalGenerationMethod)
{
case EFBXNormalGenerationMethod::BuiltIn:
StaticMeshOptions->NormalGenerationMethod = EFBXSceneNormalGenerationMethod::BuiltIn;
break;
case EFBXNormalGenerationMethod::MikkTSpace:
StaticMeshOptions->NormalGenerationMethod = EFBXSceneNormalGenerationMethod::MikkTSpace;
break;
}
}
void SFbxSceneOptionWindow::CopySkeletalMeshOptionsToFbxOptions(UnFbx::FBXImportOptions *ImportSettings, UFbxSceneImportOptionsSkeletalMesh* SkeletalMeshOptions)
{
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/FbxMeshUtils.cpp:75
Scope (from outer to inner):
file
namespace FbxMeshUtils
namespace Private
function void SetupFbxImportOptions
Source code excerpt:
// Use the lod 0 to set the import settings
const FStaticMeshSourceModel& SourceModel = BaseStaticMesh->GetSourceModel(0);
ImportOptions->NormalGenerationMethod = SourceModel.BuildSettings.bUseMikkTSpace ? EFBXNormalGenerationMethod::MikkTSpace : EFBXNormalGenerationMethod::BuiltIn;
ImportOptions->bComputeWeightedNormals = SourceModel.BuildSettings.bComputeWeightedNormals;
ImportOptions->DistanceFieldResolutionScale = SourceModel.BuildSettings.DistanceFieldResolutionScale;
ImportOptions->bRemoveDegenerates = SourceModel.BuildSettings.bRemoveDegenerates;
ImportOptions->bBuildReversedIndexBuffer = SourceModel.BuildSettings.bBuildReversedIndexBuffer;
ImportOptions->bGenerateLightmapUVs = SourceModel.BuildSettings.bGenerateLightmapUVs;
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/FbxMeshUtils.cpp:652
Scope (from outer to inner):
file
namespace FbxMeshUtils
function bool ImportSkeletalMeshLOD
Source code excerpt:
LODInfo->BuildSettings.bRecomputeNormals = !ImportOptions->ShouldImportNormals();
LODInfo->BuildSettings.bRecomputeTangents = !ImportOptions->ShouldImportTangents();
LODInfo->BuildSettings.bUseMikkTSpace = (ImportOptions->NormalGenerationMethod == EFBXNormalGenerationMethod::MikkTSpace) && (!ImportOptions->ShouldImportNormals() || !ImportOptions->ShouldImportTangents());
LODInfo->BuildSettings.bComputeWeightedNormals = ImportOptions->bComputeWeightedNormals;
LODInfo->BuildSettings.bRemoveDegenerates = ImportOptions->bRemoveDegenerates;
LODInfo->BuildSettings.ThresholdPosition = ImportOptions->OverlappingThresholds.ThresholdPosition;
LODInfo->BuildSettings.ThresholdTangentNormal = ImportOptions->OverlappingThresholds.ThresholdTangentNormal;
LODInfo->BuildSettings.ThresholdUV = ImportOptions->OverlappingThresholds.ThresholdUV;
LODInfo->BuildSettings.MorphThresholdPosition = ImportOptions->OverlappingThresholds.MorphThresholdPosition;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Public/FbxImporter.h:139
Scope (from outer to inner):
file
namespace UnFbx
Source code excerpt:
float ImportUniformScale;
EFBXNormalImportMethod NormalImportMethod;
EFBXNormalGenerationMethod::Type NormalGenerationMethod;
bool bComputeWeightedNormals;
bool bTransformVertexToAbsolute;
bool bBakePivotInVertex;
EFBXImportType ImportType;
// Static Mesh options
bool bCombineToSingle;