bSuppressFaceRemapTable

bSuppressFaceRemapTable

#Overview

name: bSuppressFaceRemapTable

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

#Summary

#Usage in the C++ source code

The purpose of bSuppressFaceRemapTable is to optimize memory usage in the physics system by controlling the generation of internal PhysX face to Unreal Engine face mapping.

This setting variable is primarily used in the physics subsystem of Unreal Engine 5. It is referenced in various modules including the GeoReferencingEditor plugin, the core Engine module, and the physics-related components.

The value of this variable is set in the UPhysicsSettings class, which is part of the Engine’s physics configuration. It is initialized to false by default in the UPhysicsSettings constructor.

bSuppressFaceRemapTable interacts with other collision and physics-related variables, particularly in collision queries and hit results. For example, it affects the bReturnFaceIndex parameter in collision queries.

Developers must be aware that enabling this variable (setting it to true) will prevent the generation of the face remap table. This can save memory, but it will also disable the ability to retrieve accurate face indices from physics collision queries. This could impact features or gameplay mechanics that rely on precise face information from collisions.

Best practices when using this variable include:

  1. Only enable it (set to true) if your game doesn’t rely on face indices returned by scene queries.
  2. Be consistent with its usage across your project to avoid unexpected behavior.
  3. If you’re developing for both editor and runtime environments, be aware that this setting might cause differences in collision results between the two.
  4. Consider the trade-off between memory optimization and the need for detailed collision information in your specific use case.
  5. If you change this setting, you may need to adjust any code that relies on face indices from collision results.

#Setting Variables

#References In INI files

Location: <Workspace>/Projects/Lyra/Config/DefaultEngine.ini:327, section: [/Script/Engine.PhysicsSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Runtime/GeoReferencing/Source/GeoReferencingEditor/Private/GeoReferencingEditorBPLibrary.cpp:82

Scope (from outer to inner):

file
function     void UGeoReferencingEditorBPLibrary::LineTrace

Source code excerpt:

	CollisionParams.bTraceComplex = bTraceComplex;
	CollisionParams.bReturnPhysicalMaterial = true;
	CollisionParams.bReturnFaceIndex = !UPhysicsSettings::Get()->bSuppressFaceRemapTable; // Ask for face index, as long as we didn't disable globally
	CollisionParams.AddIgnoredActors(ActorsToIgnore);

	FCollisionObjectQueryParams ObjectParams = FCollisionObjectQueryParams(ECC_WorldStatic);
	ObjectParams.AddObjectTypesToQuery(ECC_WorldDynamic);
	ObjectParams.AddObjectTypesToQuery(ECC_Pawn);

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/PhysicsEngine/PhysicsSettings.h:163

Scope (from outer to inner):

file
class        class UPhysicsSettings : public UPhysicsSettingsCore

Source code excerpt:

	*  If true, the internal physx face to UE face mapping will not be generated. This is a memory optimization available if you do not rely on face indices returned by scene queries. */
	UPROPERTY(config, EditAnywhere, Category = Optimization)
	bool bSuppressFaceRemapTable;

	/** If true, store extra information to allow FindCollisionUV to derive UV info from a line trace hit result, using the FindCollisionUV utility */
	UPROPERTY(config, EditAnywhere, Category = Optimization, meta = (DisplayName = "Support UV From Hit Results", ConfigRestartRequired = true))
	bool bSupportUVFromHitResults;

	/**

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Collision/CollisionConversions.cpp:249

Scope (from outer to inner):

file
function     EConvertQueryResult ConvertQueryImpactHitImp

Source code excerpt:

	if(bReturnFaceIndex && World->IsGameWorld())
	{
		if(UPhysicsSettings::Get()->bSuppressFaceRemapTable)
		{
			bReturnFaceIndex = false;	//The editor uses the remap table, so we modify this to get the same results as you would in a cooked build
		}
	}
#endif

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/KismetTraceUtils.cpp:15

Scope (from outer to inner):

file
function     FCollisionQueryParams ConfigureCollisionParams

Source code excerpt:

	FCollisionQueryParams Params(TraceTag, SCENE_QUERY_STAT_ONLY(KismetTraceUtils), bTraceComplex);
	Params.bReturnPhysicalMaterial = true;
	Params.bReturnFaceIndex = !UPhysicsSettings::Get()->bSuppressFaceRemapTable; // Ask for face index, as long as we didn't disable globally
	Params.AddIgnoredActors(ActorsToIgnore);
	if (bIgnoreSelf)
	{
		const AActor* IgnoreActor = Cast<AActor>(WorldContextObject);
		if (IgnoreActor)
		{

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/PhysicsEngine/PhysicsSettings.cpp:14

Scope (from outer to inner):

file
function     UPhysicsSettings::UPhysicsSettings

Source code excerpt:

	: Super(ObjectInitializer)
	, LockedAxis_DEPRECATED(ESettingsLockedAxis::Invalid)
	, bSuppressFaceRemapTable(false)
	, bDisableActiveActors(false)
	, AnimPhysicsMinDeltaTime(0.f)
	, bSimulateAnimPhysicsAfterReset(false)
	, MinPhysicsDeltaTime(UE_SMALL_NUMBER)
	, MaxPhysicsDeltaTime(1.f / 30.f)
	, bSubstepping(false)