IncludeDetailMapCheck

IncludeDetailMapCheck

#Overview

name: IncludeDetailMapCheck

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 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of IncludeDetailMapCheck is to control whether detail maps are included in the material creation process for SpeedTree assets in Unreal Engine.

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

The value of this variable is set through the Unreal Engine editor interface. It is defined as a UPROPERTY with the EditAnywhere and config specifiers, allowing it to be edited in the editor and saved in configuration files.

IncludeDetailMapCheck interacts with other SpeedTree import settings, such as MakeMaterialsCheck (as it’s only used when materials are being created) and IncludeSpecularMapCheck (which is a similar toggle for specular maps).

Developers must be aware that this variable only affects the initial material creation during SpeedTree asset import. It does not affect existing materials or runtime behavior. Additionally, it’s important to note that this option is only relevant for SpeedTree assets that have branch geometry, as indicated by the check for RenderState->m_bBranchesPresent in the code.

Best practices when using this variable include:

  1. Consider the performance implications of including detail maps in materials, especially for lower-end hardware targets.
  2. Ensure that the source SpeedTree asset actually includes detail map data before enabling this option.
  3. Coordinate with artists to determine whether detail maps are necessary for the desired visual quality of the SpeedTree assets in your project.
  4. Be consistent in your use of this setting across similar assets to maintain visual coherence in your game environments.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:946, 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:73

Scope (from outer to inner):

file
class        class USpeedTreeImportData : public UAssetImportData

Source code excerpt:

	/**  */
	UPROPERTY(EditAnywhere, config, Category = Materials, meta = (EditCondition = "MakeMaterialsCheck", DisplayName = "Include Detail Maps"))
	uint32 IncludeDetailMapCheck : 1;
	
	/**  */
	UPROPERTY(EditAnywhere, config, Category = Materials, meta = (EditCondition = "MakeMaterialsCheck", DisplayName = "Include Specular Maps"))
	uint32 IncludeSpecularMapCheck : 1;
	
	/**  */

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

Scope (from outer to inner):

file
function     void USpeedTreeImportData::CopyFrom

Source code excerpt:

	MakeMaterialsCheck = Other->MakeMaterialsCheck;
	IncludeNormalMapCheck = Other->IncludeNormalMapCheck;
	IncludeDetailMapCheck = Other->IncludeDetailMapCheck;
	IncludeSpecularMapCheck = Other->IncludeSpecularMapCheck;
	IncludeBranchSeamSmoothing = Other->IncludeBranchSeamSmoothing;
	IncludeSpeedTreeAO = Other->IncludeSpeedTreeAO;
	IncludeColorAdjustment = Other->IncludeColorAdjustment;
	IncludeSubsurface = Other->IncludeSubsurface;
	IncludeVertexProcessingCheck = Other->IncludeVertexProcessingCheck;

#Loc: <Workspace>/Engine/Plugins/Editor/SpeedTreeImporter/Source/SpeedTreeImporter/Private/SpeedTreeImportFactory.cpp:699

Scope (from outer to inner):

file
function     UMaterialInterface* CreateSpeedTreeMaterial7

Source code excerpt:

		if (DiffuseTexture)
		{
			if (RenderState->m_bBranchesPresent && SpeedTreeImportData->IncludeDetailMapCheck)
			{
				UTexture* DetailTexture = CreateSpeedTreeMaterialTexture(Parent, ANSI_TO_TCHAR(RenderState->m_apTextures[SpeedTree::TL_DETAIL_DIFFUSE]), false, false, LoadedPackages, ImportContext);
			}
		}
		if (SpeedTreeImportData->IncludeSpecularMapCheck)
		{

#Loc: <Workspace>/Engine/Plugins/Editor/SpeedTreeImporter/Source/SpeedTreeImporter/Private/SpeedTreeImportFactory.cpp:800

Scope (from outer to inner):

file
function     UMaterialInterface* CreateSpeedTreeMaterial7

Source code excerpt:

		}

		if (RenderState->m_bBranchesPresent && SpeedTreeImportData->IncludeDetailMapCheck)
		{
			UTexture* DetailTexture = CreateSpeedTreeMaterialTexture(Parent, ANSI_TO_TCHAR(RenderState->m_apTextures[SpeedTree::TL_DETAIL_DIFFUSE]), false, false, LoadedPackages, ImportContext);
			if (DetailTexture)
			{
				// add/find UVSet
				UMaterialExpressionTextureCoordinate* DetailTexcoordExpression = NewObject<UMaterialExpressionTextureCoordinate>(UnrealMaterial);