IncludeSmoothLODCheck
IncludeSmoothLODCheck
#Overview
name: IncludeSmoothLODCheck
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 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of IncludeSmoothLODCheck is to control the Level of Detail (LOD) transition method for SpeedTree assets in Unreal Engine 5. It determines whether the LOD transition should be smooth or abrupt (pop).
This setting variable is primarily used in the SpeedTree Importer plugin, which is part of the Unreal Engine editor tools for importing SpeedTree vegetation assets. The main subsystems that rely on this variable are the asset import system and the material system for SpeedTree assets.
The value of this variable is set in the USpeedTreeImportData class, which is likely configured through the SpeedTree import settings in the Unreal Engine editor. It’s defined as a UPROPERTY with the EditAnywhere and config specifiers, indicating that it can be edited in the editor and saved in configuration files.
IncludeSmoothLODCheck interacts with other SpeedTree import settings, particularly IncludeVertexProcessingCheck, as they are both part of the same import data structure. It also influences the LODType parameter of the UMaterialExpressionSpeedTree class, which is used in creating materials for SpeedTree assets.
Developers must be aware that this variable affects the visual quality and performance of SpeedTree assets. Smooth LOD transitions can provide a more visually pleasing result but may have a higher performance cost compared to pop transitions.
Best practices when using this variable include:
- Consider the target platform and performance requirements when deciding whether to use smooth LOD transitions.
- Be aware that smooth LOD transitions may not be noticeable or necessary for assets with only one LOD level.
- Test the visual impact and performance implications of both smooth and pop LOD transitions for your specific SpeedTree assets.
- Coordinate with artists and performance engineers to determine the optimal setting for your project’s needs.
- Be consistent in the use of this setting across similar types of vegetation in your project to maintain visual coherence.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:953, section: [/Script/SpeedTreeImporter.SpeedTreeImportData]
- INI Section:
/Script/SpeedTreeImporter.SpeedTreeImportData
- Raw value:
false
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Editor/SpeedTreeImporter/Source/SpeedTreeImporter/Classes/SpeedTreeImportData.h:105
Scope (from outer to inner):
file
class class USpeedTreeImportData : public UAssetImportData
Source code excerpt:
/** */
UPROPERTY(EditAnywhere, config, Category = Materials, meta = (EditCondition = "IncludeVertexProcessingCheck", DisplayName = "Include Smooth LOD"))
uint32 IncludeSmoothLODCheck : 1;
void CopyFrom(USpeedTreeImportData* Other);
};
#Loc: <Workspace>/Engine/Plugins/Editor/SpeedTreeImporter/Source/SpeedTreeImporter/Private/SpeedTreeImportData.cpp:50
Scope (from outer to inner):
file
function void USpeedTreeImportData::CopyFrom
Source code excerpt:
IncludeVertexProcessingCheck = Other->IncludeVertexProcessingCheck;
IncludeWindCheck = Other->IncludeWindCheck;
IncludeSmoothLODCheck = Other->IncludeSmoothLODCheck;
}
FSpeedTreeImportDataDetails::FSpeedTreeImportDataDetails()
{
SpeedTreeImportData = nullptr;
CachedDetailBuilder = nullptr;
#Loc: <Workspace>/Engine/Plugins/Editor/SpeedTreeImporter/Source/SpeedTreeImporter/Private/SpeedTreeImportFactory.cpp:901
Scope (from outer to inner):
file
function UMaterialInterface* CreateSpeedTreeMaterial7
Source code excerpt:
UMaterialExpressionSpeedTree* SpeedTreeExpression = NewObject<UMaterialExpressionSpeedTree>(UnrealMaterial);
SpeedTreeExpression->LODType = (SpeedTreeImportData->IncludeSmoothLODCheck ? STLOD_Smooth : STLOD_Pop);
SpeedTreeExpression->WindType = WindType;
float BillboardThreshold = FMath::Clamp((float)(NumBillboards - 8) / 16.0f, 0.0f, 1.0f);
SpeedTreeExpression->BillboardThreshold = 0.9f - BillboardThreshold * 0.8f;
if (RenderState->m_bBranchesPresent)
#Loc: <Workspace>/Engine/Plugins/Editor/SpeedTreeImporter/Source/SpeedTreeImporter/Private/SpeedTreeImportFactory.cpp:2083
Scope (from outer to inner):
file
function UObject* USpeedTreeImportFactory::FactoryCreateBinary7
Source code excerpt:
// Force LOD code out of the shaders if we only have one LOD
if (SpeedTreeImportData->IncludeSmoothLODCheck)
{
int32 TotalLODs = 0;
if (SpeedTreeImportData->ImportGeometryType != EImportGeometryType::IGT_Billboards)
{
TotalLODs += SpeedTreeGeometry->m_nNumLods;
}
#Loc: <Workspace>/Engine/Plugins/Editor/SpeedTreeImporter/Source/SpeedTreeImporter/Private/SpeedTreeImportFactory.cpp:2096
Scope (from outer to inner):
file
function UObject* USpeedTreeImportFactory::FactoryCreateBinary7
Source code excerpt:
if (TotalLODs < 2)
{
SpeedTreeImportData->IncludeSmoothLODCheck = !SpeedTreeImportData->IncludeSmoothLODCheck;
}
}
// make geometry LODs
if (SpeedTreeImportData->ImportGeometryType != EImportGeometryType::IGT_Billboards)
{