InstancedMeshesQueryOnlyMaterial
InstancedMeshesQueryOnlyMaterial
#Overview
name: InstancedMeshesQueryOnlyMaterial
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 InstancedMeshesQueryOnlyMaterial is to provide a specific material for instanced meshes that are used only for queries in the Chaos Vehicle Dynamics (ChaosVD) system of Unreal Engine 5.
This setting variable is primarily used within the ChaosVD plugin, which is part of Unreal Engine’s vehicle simulation system. Based on the callsites, it’s utilized in the ChaosVDEditorSettings, ChaosVDGeometryDataComponent, and ChaosVDScene classes.
The value of this variable is set in the UChaosVDEditorSettings class, which is derived from UObject. It’s declared as a UPROPERTY with Config and Transient specifiers, indicating that its value can be saved in configuration files but won’t be saved when the object is serialized.
This variable interacts with other material-related variables in the ChaosVD system, such as InstancedMeshesMaterial and SimOnlyMeshesMaterial. It’s specifically used when dealing with instanced meshes that are only used for queries, as opposed to those used for simulation or rendering.
Developers must be aware that this material is specifically for query-only instanced meshes in the ChaosVD system. It’s important to ensure that the correct material is assigned to this variable, as it will affect the appearance and behavior of query-only instanced meshes in the vehicle dynamics simulation.
Best practices when using this variable include:
- Ensure that the assigned material is optimized for query operations and doesn’t include unnecessary rendering features.
- Keep the material simple to improve performance in query operations.
- Test the assigned material thoroughly to ensure it doesn’t negatively impact the vehicle dynamics simulation.
- Consider the implications on performance and memory usage when choosing or modifying this material.
- Be cautious when modifying this variable, as it may affect the behavior of the entire ChaosVD system.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Plugins/ChaosVD/Config/Engine.ini:5, section: [default]
- INI Section:
default
- Raw value:
/ChaosVD/Materials/ChaosVDInstancedQueryOnly.ChaosVDInstancedQueryOnly
- 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:366
Scope (from outer to inner):
file
class class UChaosVDEditorSettings : public UObject
Source code excerpt:
UPROPERTY(Config, Transient)
TSoftObjectPtr<UMaterial> InstancedMeshesQueryOnlyMaterial;
UPROPERTY(Config)
FSoftClassPath SkySphereActorClass;
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
#Loc: <Workspace>/Engine/Plugins/ChaosVD/Source/ChaosVD/Private/ChaosVDGeometryDataComponent.cpp:363
Scope (from outer to inner):
file
function UMaterialInterface* FChaosVDGeometryComponentUtils::GetBaseMaterialForType
Source code excerpt:
return EditorSettings->InstancedMeshesMaterial.Get();
case EChaosVDMaterialType::InstancedQueryOnly:
return EditorSettings->InstancedMeshesQueryOnlyMaterial.Get();
default:
return nullptr;
}
}
UMaterialInstanceDynamic* FChaosVDGeometryComponentUtils::CreateMaterialInstance(UMaterialInterface* BaseMaterial)
#Loc: <Workspace>/Engine/Plugins/ChaosVD/Source/ChaosVD/Private/ChaosVDScene.cpp:67
Scope (from outer to inner):
file
function void FChaosVDScene::Initialize
Source code excerpt:
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);
}
bIsInitialized = true;