IncludeNormalMapCheck

IncludeNormalMapCheck

#Overview

name: IncludeNormalMapCheck

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 IncludeNormalMapCheck is to control whether normal maps should be included when importing SpeedTree assets into Unreal Engine. This setting variable is specifically used in the SpeedTree importer system, which is part of the SpeedTreeImporter plugin for Unreal Engine.

The SpeedTreeImporter plugin relies on this setting variable to determine if normal maps should be processed and included in the imported SpeedTree materials. It is primarily used in the material creation process for SpeedTree assets.

The value of this variable is set through 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 SpeedTree import settings, such as MakeMaterialsCheck, IncludeDetailMapCheck, and IncludeSpecularMapCheck. These variables collectively determine which texture maps and material features are included in the imported SpeedTree asset.

Developers must be aware that this variable affects the visual quality and performance of imported SpeedTree assets. Including normal maps can enhance the visual detail of the imported trees but may also increase memory usage and rendering costs.

Best practices when using this variable include:

  1. Consider the target platform and performance requirements when deciding whether to include normal maps.
  2. Ensure that the source SpeedTree asset has high-quality normal maps if this option is enabled.
  3. Balance the use of normal maps with other texture types (e.g., detail maps, specular maps) to optimize visual quality and performance.
  4. Test the imported assets with and without normal maps to determine the best setting for your specific use case.
  5. Remember that this setting can be adjusted on a per-asset basis, allowing for fine-tuned control over individual SpeedTree imports.

#Setting Variables

#References In INI files

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

Scope (from outer to inner):

file
class        class USpeedTreeImportData : public UAssetImportData

Source code excerpt:

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

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

Scope (from outer to inner):

file
function     void USpeedTreeImportData::CopyFrom

Source code excerpt:

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

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

Scope (from outer to inner):

file
function     UMaterialInterface* CreateSpeedTreeMaterial7

Source code excerpt:

			UTexture* SpecularTexture = CreateSpeedTreeMaterialTexture(Parent, ANSI_TO_TCHAR(RenderState->m_apTextures[SpeedTree::TL_SPECULAR_MASK]), false, false, LoadedPackages, ImportContext);
		}
		if (SpeedTreeImportData->IncludeNormalMapCheck)
		{
			UTexture* NormalTexture = CreateSpeedTreeMaterialTexture(Parent, ANSI_TO_TCHAR(RenderState->m_apTextures[SpeedTree::TL_NORMAL]), true, false, LoadedPackages, ImportContext);
		}

		return UnrealMaterialInterface;
	}

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

Scope (from outer to inner):

file
function     UMaterialInterface* CreateSpeedTreeMaterial7

Source code excerpt:

	}

	if (SpeedTreeImportData->IncludeNormalMapCheck)
	{
		UTexture* NormalTexture = CreateSpeedTreeMaterialTexture(Parent, ANSI_TO_TCHAR(RenderState->m_apTextures[SpeedTree::TL_NORMAL]), true, false, LoadedPackages, ImportContext);
		if (NormalTexture)
		{
			// make texture sampler
			UMaterialExpressionTextureSample* TextureExpression = NewObject<UMaterialExpressionTextureSample>(UnrealMaterial);