IncludeBranchSeamSmoothing

IncludeBranchSeamSmoothing

#Overview

name: IncludeBranchSeamSmoothing

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 IncludeBranchSeamSmoothing is to control whether branch seam smoothing is applied in SpeedTree models imported into Unreal Engine. This setting is specifically related to the rendering and material system for SpeedTree vegetation assets.

This setting variable is primarily used within the SpeedTreeImporter plugin, which is part of the Unreal Engine editor tools. It’s specifically utilized in the import and material creation process for SpeedTree assets.

The value of this variable is set in the USpeedTreeImportData class, which is likely configurable through the Unreal Engine editor interface when importing SpeedTree assets. It’s defined as a bitfield within a UPROPERTY, indicating it’s exposed to the Unreal property system and can be edited in the editor.

IncludeBranchSeamSmoothing interacts with other SpeedTree-related variables, such as IncludeSpeedTreeAO, IncludeColorAdjustment, and others within the same class. It’s also used in conjunction with the SpeedTree RenderState to determine if branches are present and if branch seam smoothing is enabled in the SpeedTree model.

Developers should be aware that this variable only affects the material creation process during SpeedTree asset import. It won’t have any effect on already imported assets unless they are reimported or the materials are regenerated.

Best practices when using this variable include:

  1. Only enable it when working with SpeedTree models that have branches and support seam smoothing.
  2. Consider the performance implications of enabling additional material features like seam smoothing.
  3. Use it in conjunction with other SpeedTree import settings to achieve the desired visual quality and performance balance.
  4. Be consistent in its use across similar asset types in your project to maintain visual coherence.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:948, section: [/Script/SpeedTreeImporter.SpeedTreeImportData]

#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:81

Scope (from outer to inner):

file
class        class USpeedTreeImportData : public UAssetImportData

Source code excerpt:

	/**  */
	UPROPERTY(EditAnywhere, config, Category = Materials, meta = (EditCondition = "MakeMaterialsCheck", DisplayName = "Include Branch Seam Smoothing"))
	uint32 IncludeBranchSeamSmoothing : 1;
	
	/**  */
	UPROPERTY(EditAnywhere, config, Category = Materials, meta = (EditCondition = "MakeMaterialsCheck", DisplayName = "Include SpeedTree AO"))
	uint32 IncludeSpeedTreeAO : 1;
	
	/**  */

#Loc: <Workspace>/Engine/Plugins/Editor/SpeedTreeImporter/Source/SpeedTreeImporter/Private/SpeedTreeImportData.cpp:44

Scope (from outer to inner):

file
function     void USpeedTreeImportData::CopyFrom

Source code excerpt:

	IncludeDetailMapCheck = Other->IncludeDetailMapCheck;
	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:735

Scope (from outer to inner):

file
function     UMaterialInterface* CreateSpeedTreeMaterial7

Source code excerpt:


	UMaterialExpressionClamp* BranchSeamAmount = NULL;
	if (SpeedTreeImportData->IncludeBranchSeamSmoothing && RenderState->m_bBranchesPresent && RenderState->m_eBranchSeamSmoothing != SpeedTree::EFFECT_OFF)
	{
		UMaterialExpressionTextureCoordinate* SeamTexcoordExpression = NewObject<UMaterialExpressionTextureCoordinate>(UnrealMaterial);
		SeamTexcoordExpression->CoordinateIndex = 4;
		UnrealMaterial->GetExpressionCollection().AddExpression(SeamTexcoordExpression);

		UMaterialExpressionComponentMask* ComponentMaskExpression = NewObject<UMaterialExpressionComponentMask>(UnrealMaterial);