ImgMedia.FieldOfViewMultiplier
ImgMedia.FieldOfViewMultiplier
#Overview
name: ImgMedia.FieldOfViewMultiplier
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Multiply the field of view for active cameras by this value, generally to increase the frustum overall sizes to mitigate missing tile artifacts.\n
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ImgMedia.FieldOfViewMultiplier is to adjust the field of view for active cameras in the ImgMedia plugin, which is part of Unreal Engine’s media framework. This setting is used to increase the overall size of the frustum, which can help mitigate missing tile artifacts in image-based media rendering.
This setting variable is primarily used in the ImgMedia plugin, specifically within the ImgMediaSceneViewExtension module. Based on the callsites, it’s clear that this variable is used in the process of rendering image-based media in the scene.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 1.0f, but can be changed at runtime through console commands or configuration files.
The associated variable CVarImgMediaFieldOfViewMultiplier directly interacts with ImgMedia.FieldOfViewMultiplier. They share the same value and purpose.
Developers should be aware that modifying this variable will affect the field of view for all active cameras in the scene when using the ImgMedia plugin. Increasing the value will expand the frustum, which may help with artifacts but could also impact performance or visual quality in other ways.
Best practices when using this variable include:
- Start with the default value of 1.0 and only adjust if necessary.
- Make small incremental changes and test thoroughly to find the optimal value for your specific use case.
- Be aware of potential performance implications when increasing the field of view.
- Document any changes made to this variable in your project settings for future reference.
Regarding the associated variable CVarImgMediaFieldOfViewMultiplier:
The purpose of CVarImgMediaFieldOfViewMultiplier is the same as ImgMedia.FieldOfViewMultiplier. It’s the actual console variable that controls the field of view multiplier for the ImgMedia plugin.
This variable is used in the ImgMediaSceneViewExtension module of the ImgMedia plugin. It’s accessed in the CacheViewInfo function of the FImgMediaSceneViewExtension class.
The value of CVarImgMediaFieldOfViewMultiplier is set when the console variable is created, with a default value of 1.0f. It can be changed at runtime using console commands.
CVarImgMediaFieldOfViewMultiplier directly interacts with ImgMedia.FieldOfViewMultiplier, as they represent the same setting.
Developers should be aware that this is a thread-safe variable, as evidenced by the use of GetValueOnGameThread() when accessing its value.
Best practices for using CVarImgMediaFieldOfViewMultiplier include:
- Use the GetValueOnGameThread() method when accessing the value to ensure thread safety.
- Consider caching the value if it’s accessed frequently in performance-critical code sections.
- Be cautious when modifying this value, as it can affect the rendering of all image-based media in the scene.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Media/ImgMedia/Source/ImgMedia/Private/ImgMediaSceneViewExtension.cpp:9
Scope: file
Source code excerpt:
static TAutoConsoleVariable<float> CVarImgMediaFieldOfViewMultiplier(
TEXT("ImgMedia.FieldOfViewMultiplier"),
1.0f,
TEXT("Multiply the field of view for active cameras by this value, generally to increase the frustum overall sizes to mitigate missing tile artifacts.\n"),
ECVF_Default);
static TAutoConsoleVariable<bool> CVarImgMediaProcessTilesInnerOnly(
TEXT("ImgMedia.ICVFX.InnerOnlyTiles"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarImgMediaFieldOfViewMultiplier
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Media/ImgMedia/Source/ImgMedia/Private/ImgMediaSceneViewExtension.cpp:8
Scope: file
Source code excerpt:
#define LOCTEXT_NAMESPACE "ImgMediaSceneViewExtension"
static TAutoConsoleVariable<float> CVarImgMediaFieldOfViewMultiplier(
TEXT("ImgMedia.FieldOfViewMultiplier"),
1.0f,
TEXT("Multiply the field of view for active cameras by this value, generally to increase the frustum overall sizes to mitigate missing tile artifacts.\n"),
ECVF_Default);
static TAutoConsoleVariable<bool> CVarImgMediaProcessTilesInnerOnly(
#Loc: <Workspace>/Engine/Plugins/Media/ImgMedia/Source/ImgMedia/Private/ImgMediaSceneViewExtension.cpp:75
Scope (from outer to inner):
file
function void FImgMediaSceneViewExtension::CacheViewInfo
Source code excerpt:
static const auto CVarMinAutomaticViewMipBiasOffset = IConsoleManager::Get().FindTConsoleVariableDataFloat(TEXT("r.ViewTextureMipBias.Offset"));
static const auto CVarMinAutomaticViewMipBias = IConsoleManager::Get().FindTConsoleVariableDataFloat(TEXT("r.ViewTextureMipBias.Min"));
const float FieldOfViewMultiplier = CVarImgMediaFieldOfViewMultiplier.GetValueOnGameThread();
float ResolutionFraction = InViewFamily.SecondaryViewFraction;
if (InViewFamily.GetScreenPercentageInterface())
{
DynamicRenderScaling::TMap<float> UpperBounds = InViewFamily.GetScreenPercentageInterface()->GetResolutionFractionsUpperBound();