IncludeSpeedTreeAO
IncludeSpeedTreeAO
#Overview
name: IncludeSpeedTreeAO
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 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of IncludeSpeedTreeAO is to control the inclusion of SpeedTree Ambient Occlusion (AO) in the imported SpeedTree assets. This setting variable is specifically related to the SpeedTree importer and the material creation process for SpeedTree assets in Unreal Engine 5.
IncludeSpeedTreeAO is used within the SpeedTreeImporter plugin, which is responsible for importing and processing SpeedTree assets in Unreal Engine. Specifically, it is used in the material creation process for SpeedTree assets.
The value of this variable is set in the USpeedTreeImportData class, which is a configuration class for SpeedTree import settings. It is defined as a UPROPERTY with the EditAnywhere and config specifiers, allowing it to be edited in the Unreal Engine editor and saved in configuration files.
This variable interacts with other import settings in the USpeedTreeImportData class, such as IncludeColorAdjustment and IncludeVertexProcessingCheck. It is also used in conjunction with the SpeedTree::SRenderState structure when creating materials for imported SpeedTree assets.
Developers must be aware that this variable only affects non-billboard SpeedTree assets. The code checks explicitly that the asset is not a vertical or horizontal billboard before applying the SpeedTree AO.
Best practices when using this variable include:
- Consider enabling it for more realistic lighting on SpeedTree assets, as it can add depth and detail to the vegetation.
- Be mindful of performance implications, as including AO may increase the complexity of the generated materials.
- Test the visual quality and performance impact with and without this option enabled to determine the best setting for your specific use case.
- Remember that this setting is part of the import process, so changes will require reimporting the SpeedTree assets.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:949, 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:85
Scope (from outer to inner):
file
class class USpeedTreeImportData : public UAssetImportData
Source code excerpt:
/** */
UPROPERTY(EditAnywhere, config, Category = Materials, meta = (EditCondition = "MakeMaterialsCheck", DisplayName = "Include SpeedTree AO"))
uint32 IncludeSpeedTreeAO : 1;
/** */
UPROPERTY(EditAnywhere, config, Category = Materials, meta = (EditCondition = "MakeMaterialsCheck", DisplayName = "Include Random Color Variation"))
uint32 IncludeColorAdjustment : 1;
/** */
#Loc: <Workspace>/Engine/Plugins/Editor/SpeedTreeImporter/Source/SpeedTreeImporter/Private/SpeedTreeImportData.cpp:45
Scope (from outer to inner):
file
function void USpeedTreeImportData::CopyFrom
Source code excerpt:
IncludeSpecularMapCheck = Other->IncludeSpecularMapCheck;
IncludeBranchSeamSmoothing = Other->IncludeBranchSeamSmoothing;
IncludeSpeedTreeAO = Other->IncludeSpeedTreeAO;
IncludeColorAdjustment = Other->IncludeColorAdjustment;
IncludeSubsurface = Other->IncludeSubsurface;
IncludeVertexProcessingCheck = Other->IncludeVertexProcessingCheck;
IncludeWindCheck = Other->IncludeWindCheck;
IncludeSmoothLODCheck = Other->IncludeSmoothLODCheck;
}
#Loc: <Workspace>/Engine/Plugins/Editor/SpeedTreeImporter/Source/SpeedTreeImporter/Private/SpeedTreeImportFactory.cpp:922
Scope (from outer to inner):
file
function UMaterialInterface* CreateSpeedTreeMaterial7
Source code excerpt:
}
if (SpeedTreeImportData->IncludeSpeedTreeAO &&
!(RenderState->m_bVertBillboard || RenderState->m_bHorzBillboard))
{
UMaterialExpressionVertexColor* VertexColor = NewObject<UMaterialExpressionVertexColor>(UnrealMaterial);
UnrealMaterial->GetExpressionCollection().AddExpression(VertexColor);
UnrealMaterialEditorOnly->AmbientOcclusion.Expression = VertexColor;
UnrealMaterialEditorOnly->AmbientOcclusion.Mask = VertexColor->GetOutputs()[0].Mask;