remote.arcameracolorjpeg
remote.arcameracolorjpeg
#Overview
name: remote.arcameracolorjpeg
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
1 (default) sends color data, 0 sends B&W
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of remote.arcameracolorjpeg
is to control the color mode of AR camera images sent through the Remote Session system in Unreal Engine 5. It is used to determine whether the AR camera images should be sent in color or black and white.
This setting variable is primarily used by the Remote Session plugin, specifically within the AR Camera Channel module. It is part of the experimental features in Unreal Engine 5, focusing on remote AR functionalities.
The value of this variable is set using a console variable (CVar) system. It is initialized with a default value of 1, which means color data is sent by default. Developers can change this value at runtime using console commands or through code.
The remote.arcameracolorjpeg
variable interacts directly with the CVarJPEGColor
variable. They share the same value and purpose. This variable is used in conjunction with other variables like CVarJPEGQuality
and CVarJPEGGpu
to control various aspects of AR camera image compression and transmission.
Developers must be aware that this variable affects the data size and potentially the performance of AR camera image transmission in remote sessions. Setting it to 0 will result in black and white images being sent, which may reduce data size but at the cost of color information.
Best practices when using this variable include:
- Consider the bandwidth and performance requirements of your remote session when deciding between color and black and white.
- Test both settings to determine the optimal balance between image quality and performance for your specific use case.
- Be aware that changing this setting at runtime will affect all subsequent AR camera images sent through the remote session.
Regarding the associated variable CVarJPEGColor
:
The purpose of CVarJPEGColor
is identical to remote.arcameracolorjpeg
. It is the C++ variable that directly controls the color mode of AR camera images in the Remote Session system.
This variable is used within the RemoteSession plugin, specifically in the AR Camera Channel module. It’s defined and used in the same file as remote.arcameracolorjpeg
.
The value of CVarJPEGColor
is set through the console variable system, initialized with the same default value of 1 as remote.arcameracolorjpeg
.
CVarJPEGColor
interacts with other variables in the AR camera image processing, such as CVarJPEGQuality
and CVarJPEGGpu
. It’s used as a parameter in the ConvertToJPEG
function call, determining whether the conversion should output color or black and white images.
Developers should be aware that CVarJPEGColor
is the actual variable used in the code, while remote.arcameracolorjpeg
is the console command to control it. Changes to one will affect the other.
Best practices for CVarJPEGColor
are the same as for remote.arcameracolorjpeg
, focusing on balancing image quality, data size, and performance based on the specific requirements of the remote AR application.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Experimental/RemoteSession/Source/RemoteSession/Private/Channels/RemoteSessionARCameraChannel.cpp:40
Scope: file
Source code excerpt:
TAutoConsoleVariable<int32> CVarJPEGColor(
TEXT("remote.arcameracolorjpeg"),
1,
TEXT("1 (default) sends color data, 0 sends B&W"),
ECVF_Default);
TAutoConsoleVariable<int32> CVarJPEGGpu(
TEXT("remote.arcameraqcgpucompressed"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarJPEGColor
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Experimental/RemoteSession/Source/RemoteSession/Private/Channels/RemoteSessionARCameraChannel.cpp:39
Scope: file
Source code excerpt:
ECVF_Default);
TAutoConsoleVariable<int32> CVarJPEGColor(
TEXT("remote.arcameracolorjpeg"),
1,
TEXT("1 (default) sends color data, 0 sends B&W"),
ECVF_Default);
TAutoConsoleVariable<int32> CVarJPEGGpu(
#Loc: <Workspace>/Engine/Plugins/Experimental/RemoteSession/Source/RemoteSession/Private/Channels/RemoteSessionARCameraChannel.cpp:433
Scope (from outer to inner):
file
function void FRemoteSessionARCameraChannel::QueueARCameraImage
Source code excerpt:
CompressionTask->Width = CameraImage->Size.X;
CompressionTask->Height = CameraImage->Size.Y;
CompressionTask->AsyncTask = IAppleImageUtilsPlugin::Get().ConvertToJPEG(CameraImage, CVarJPEGQuality.GetValueOnGameThread(), !!CVarJPEGColor.GetValueOnGameThread(), !!CVarJPEGGpu.GetValueOnGameThread());
}
else
{
UE_LOG(LogRemoteSession, Warning, TEXT("No AR Camera Image to send!"));
}
}