IncludeColorAdjustment
IncludeColorAdjustment
#Overview
name: IncludeColorAdjustment
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 IncludeColorAdjustment is to control whether random color variation should be included in the materials generated for SpeedTree assets during import.
This setting variable is primarily used in the SpeedTreeImporter plugin, which is part of the Unreal Engine’s editor functionality for importing SpeedTree assets. Specifically, it’s used in the SpeedTree import and material creation process.
The value of this variable is set in the USpeedTreeImportData class, which is likely configured through the SpeedTree import settings in the Unreal Editor. It’s defined as a bit field within a UPROPERTY, indicating it’s exposed to the editor and can be modified by users during the import process.
IncludeColorAdjustment interacts with other SpeedTree import settings, such as IncludeSubsurface, IncludeBranchSeamSmoothing, and IncludeSpeedTreeAO. These settings collectively determine various aspects of how SpeedTree assets are imported and materials are generated.
Developers should be aware that this variable only affects the material creation process if certain conditions are met. Specifically, it’s only applied to materials for leaves, facing leaves, vertical billboards, or horizontal billboards, as seen in the SpeedTreeImportFactory.cpp file.
Best practices when using this variable include:
- Consider the visual impact: Enabling color adjustment can add variety to vegetation, but ensure it fits the artistic direction of your project.
- Performance implications: Be aware that enabling additional material features like color variation may have a small performance cost.
- Consistency: If using multiple SpeedTree assets, consider keeping this setting consistent across imports for a uniform look, unless intentionally varied.
- Testing: Always test the visual results with and without this option to determine the best setting for your specific assets and project needs.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:950, 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:89
Scope (from outer to inner):
file
class class USpeedTreeImportData : public UAssetImportData
Source code excerpt:
/** */
UPROPERTY(EditAnywhere, config, Category = Materials, meta = (EditCondition = "MakeMaterialsCheck", DisplayName = "Include Random Color Variation"))
uint32 IncludeColorAdjustment : 1;
/** */
UPROPERTY(EditAnywhere, config, Category = Materials, meta = (EditCondition = "MakeMaterialsCheck", DisplayName = "Include Subsurface", SpeedTreeVersion = "8"))
uint32 IncludeSubsurface : 1;
/** */
#Loc: <Workspace>/Engine/Plugins/Editor/SpeedTreeImporter/Source/SpeedTreeImporter/Private/SpeedTreeImportData.cpp:46
Scope (from outer to inner):
file
function void USpeedTreeImportData::CopyFrom
Source code excerpt:
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:961
Scope (from outer to inner):
file
function UMaterialInterface* CreateSpeedTreeMaterial7
Source code excerpt:
}
if (SpeedTreeImportData->IncludeColorAdjustment && UnrealMaterialEditorOnly->BaseColor.Expression != NULL &&
(RenderState->m_bLeavesPresent || RenderState->m_bFacingLeavesPresent || RenderState->m_bVertBillboard || RenderState->m_bHorzBillboard))
{
UMaterialFunction* ColorVariationFunction = LoadObject<UMaterialFunction>(NULL, TEXT("/Engine/Functions/Engine_MaterialFunctions01/SpeedTree/SpeedTreeColorVariation.SpeedTreeColorVariation"), NULL, LOAD_None, NULL);
if (ColorVariationFunction)
{
UMaterialExpressionMaterialFunctionCall* ColorVariation = NewObject<UMaterialExpressionMaterialFunctionCall>(UnrealMaterial);