landscape.DumpDiffDetails
landscape.DumpDiffDetails
#Overview
name: landscape.DumpDiffDetails
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
When dumping diffs for heightmap (landscape.DumpHeightmapDiff) or weightmap (landscape.DumpWeightmapDiff), dumps additional details about the pixels being different
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
The associated variable CVarLandscapeDumpDiffDetails directly interacts with landscape.DumpDiffDetails. They share the same value and purpose.
Developers must be aware that:
- This variable is intended for debugging purposes and should not be enabled in production builds.
- Enabling this variable may impact performance due to additional logging and image saving operations.
- It works in conjunction with other debugging variables like landscape.DumpHeightmapDiff and landscape.DumpWeightmapDiff.
Best practices when using this variable include:
- Only enable it when actively debugging landscape editing issues.
- Use it in combination with landscape.DumpHeightmapDiff or landscape.DumpWeightmapDiff for comprehensive debugging.
- Be prepared to handle and analyze the additional output generated when this variable is enabled.
- Disable it when not needed to avoid unnecessary performance overhead.
Regarding the associated variable CVarLandscapeDumpDiffDetails:
- It serves the same purpose as landscape.DumpDiffDetails.
- It’s used within the OnDirtyWeightmap and OnDirtyHeightmap functions of the ALandscape class.
- The value is retrieved using GetValueOnGameThread(), indicating it’s safe for use in game thread contexts.
- It’s used in conjunction with other debugging variables to control the level of detail in diff dumps.
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)