QueryOnlyMeshesMaterial
QueryOnlyMeshesMaterial
#Overview
name: QueryOnlyMeshesMaterial
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 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of QueryOnlyMeshesMaterial is to store a reference to a material used for query-only meshes in the Chaos Vehicle Dynamics (ChaosVD) system of Unreal Engine 5. This variable is part of the visualization and debugging tools for the vehicle dynamics simulation.
This setting variable is primarily used within the ChaosVD plugin, which is a part of Unreal Engine’s physics simulation system. Specifically, it’s used in the editor settings and scene management for ChaosVD.
The value of this variable is set in the UChaosVDEditorSettings class, which is likely configured through the editor interface or project settings. It’s stored as a TSoftObjectPtr
QueryOnlyMeshesMaterial interacts with other similar variables like SimOnlyMeshesMaterial and InstancedMeshesMaterial, which are used for different types of meshes in the ChaosVD system.
Developers must be aware that this variable is used to visually distinguish query-only meshes in the ChaosVD simulation. Query-only meshes are typically used for collision detection without affecting the physics simulation.
Best practices when using this variable include:
- Ensuring that the referenced material is appropriate for visualizing query-only meshes.
- Being aware of the performance implications of the chosen material, especially in complex scenes.
- Considering the async loading of materials in the future, as indicated by the TODO comment in the FChaosVDScene::Initialize function.
- Keeping the material consistent with the overall visual style of the debug visualization in the ChaosVD system.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Plugins/ChaosVD/Config/Engine.ini:2, section: [default]
- INI Section:
default
- Raw value:
/ChaosVD/Materials/ChaosVDQueryOnlyMesh.ChaosVDQueryOnlyMesh
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/ChaosVD/Source/ChaosVD/Private/ChaosVDEditorSettings.h:357
Scope (from outer to inner):
file
class class UChaosVDEditorSettings : public UObject
Source code excerpt:
UPROPERTY(Config, Transient)
TSoftObjectPtr<UMaterial> QueryOnlyMeshesMaterial;
UPROPERTY(Config, Transient)
TSoftObjectPtr<UMaterial> SimOnlyMeshesMaterial;
UPROPERTY(Config, Transient)
TSoftObjectPtr<UMaterial> InstancedMeshesMaterial;
#Loc: <Workspace>/Engine/Plugins/ChaosVD/Source/ChaosVD/Private/ChaosVDGeometryDataComponent.cpp:357
Scope (from outer to inner):
file
function UMaterialInterface* FChaosVDGeometryComponentUtils::GetBaseMaterialForType
Source code excerpt:
{
case EChaosVDMaterialType::QueryOnlyMaterial:
return EditorSettings->QueryOnlyMeshesMaterial.Get();
case EChaosVDMaterialType::SimOnlyMaterial:
return EditorSettings->SimOnlyMeshesMaterial.Get();
case EChaosVDMaterialType::Instanced:
return EditorSettings->InstancedMeshesMaterial.Get();
case EChaosVDMaterialType::InstancedQueryOnly:
return EditorSettings->InstancedMeshesQueryOnlyMaterial.Get();
#Loc: <Workspace>/Engine/Plugins/ChaosVD/Source/ChaosVD/Private/ChaosVDScene.cpp:64
Scope (from outer to inner):
file
function void FChaosVDScene::Initialize
Source code excerpt:
// TODO: Do an async load instead, and prepare a loading screen or notification popup
// Jira for tracking UE-191639
StreamableManager->RequestSyncLoad(Settings->QueryOnlyMeshesMaterial.ToSoftObjectPath());
StreamableManager->RequestSyncLoad(Settings->SimOnlyMeshesMaterial.ToSoftObjectPath());
StreamableManager->RequestSyncLoad(Settings->InstancedMeshesMaterial.ToSoftObjectPath());
StreamableManager->RequestSyncLoad(Settings->InstancedMeshesQueryOnlyMaterial.ToSoftObjectPath());
Settings->OnVisibilitySettingsChanged().AddRaw(this, &FChaosVDScene::HandleVisibilitySettingsChanged);
Settings->OnColorSettingsChanged().AddRaw(this, &FChaosVDScene::HandleColorSettingsChanged);