landscape.DumpDiffDetails

landscape.DumpDiffDetails

#Overview

name: landscape.DumpDiffDetails

This variable is created as a Console Variable (cvar).

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of landscape.DumpDiffDetails is to provide additional debugging information when dumping differences for heightmaps and weightmaps in the Unreal Engine 5 landscape system. It is primarily used for diagnostic and development purposes within the landscape editing functionality.

This setting variable is utilized by the Landscape module in Unreal Engine 5, specifically within the landscape editing system. Based on the callsites, it’s clear that this variable is used in the LandscapeEditLayers.cpp file, which is part of the landscape editing functionality.

The value of this variable is set through a console variable (CVar) system. It’s defined as a static TAutoConsoleVariable with a default value of false. This means it can be changed at runtime through console commands or configuration files.

The associated variable CVarLandscapeDumpDiffDetails directly interacts with landscape.DumpDiffDetails. They share the same value and purpose.

Developers must be aware that:

  1. This variable is intended for debugging purposes and should not be enabled in production builds.
  2. Enabling this variable may impact performance due to additional logging and image saving operations.
  3. It works in conjunction with other debugging variables like landscape.DumpHeightmapDiff and landscape.DumpWeightmapDiff.

Best practices when using this variable include:

  1. Only enable it when actively debugging landscape editing issues.
  2. Use it in combination with landscape.DumpHeightmapDiff or landscape.DumpWeightmapDiff for comprehensive debugging.
  3. Be prepared to handle and analyze the additional output generated when this variable is enabled.
  4. Disable it when not needed to avoid unnecessary performance overhead.

Regarding the associated variable CVarLandscapeDumpDiffDetails:

Developers should treat CVarLandscapeDumpDiffDetails as the programmatic interface to the landscape.DumpDiffDetails setting, using it in C++ code when they need to check or utilize this debugging feature.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeEditLayers.cpp:141

Scope: file

Source code excerpt:


static TAutoConsoleVariable<bool> CVarLandscapeDumpDiffDetails(
	TEXT("landscape.DumpDiffDetails"),
	false,
	TEXT("When dumping diffs for heightmap (landscape.DumpHeightmapDiff) or weightmap (landscape.DumpWeightmapDiff), dumps additional details about the pixels being different"));

TAutoConsoleVariable<int32> CVarLandscapeDirtyHeightmapHeightThreshold(
	TEXT("landscape.DirtyHeightmapHeightThreshold"),
	0,

#Associated Variable and Callsites

This variable is associated with another variable named CVarLandscapeDumpDiffDetails. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeEditLayers.cpp:140

Scope: file

Source code excerpt:

	TEXT("This will save images for readback weightmap textures that have changed in the last edit layer blend phase. (= 0 No Diff, 1 = Mip 0 Diff, 2 = All Mips Diff"));

static TAutoConsoleVariable<bool> CVarLandscapeDumpDiffDetails(
	TEXT("landscape.DumpDiffDetails"),
	false,
	TEXT("When dumping diffs for heightmap (landscape.DumpHeightmapDiff) or weightmap (landscape.DumpWeightmapDiff), dumps additional details about the pixels being different"));

TAutoConsoleVariable<int32> CVarLandscapeDirtyHeightmapHeightThreshold(
	TEXT("landscape.DirtyHeightmapHeightThreshold"),

#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeEditLayers.cpp:5272

Scope (from outer to inner):

file
function     void ALandscape::OnDirtyWeightmap

Source code excerpt:

	const bool bDumpDiff = (DumpWeightmapDiff > 0);
	const bool bDumpDiffAllMips = (DumpWeightmapDiff > 1);
	const bool bDumpDiffDetails = CVarLandscapeDumpDiffDetails.GetValueOnGameThread();
	const bool bTrackDirty = CVarLandscapeTrackDirty.GetValueOnGameThread() != 0;
	ULandscapeSubsystem* LandscapeSubsystem = GetWorld()->GetSubsystem<ULandscapeSubsystem>();
	check(LandscapeSubsystem != nullptr);
	const FDateTime CurrentTime = LandscapeSubsystem->GetAppCurrentDateTime();

	if ((!bDumpDiff && !bTrackDirty)

#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeEditLayers.cpp:5404

Scope (from outer to inner):

file
function     void ALandscape::OnDirtyHeightmap

Source code excerpt:

	const bool bDumpDiff = (DumpHeightmapDiff > 0);
	const bool bDumpDiffAllMips = (DumpHeightmapDiff > 1);
	const bool bDumpDiffDetails = CVarLandscapeDumpDiffDetails.GetValueOnGameThread();
	const bool bTrackDirty = CVarLandscapeTrackDirty.GetValueOnGameThread() != 0;
	ULandscapeSubsystem* LandscapeSubsystem = GetWorld()->GetSubsystem<ULandscapeSubsystem>();
	check(LandscapeSubsystem != nullptr);
	const FDateTime CurrentTime = LandscapeSubsystem->GetAppCurrentDateTime();

	if ((!bDumpDiff && !bTrackDirty)