InstancedMeshesMaterial
InstancedMeshesMaterial
#Overview
name: InstancedMeshesMaterial
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 InstancedMeshesMaterial is to provide a specific material for instanced meshes within the Chaos Vehicle Dynamics (ChaosVD) plugin in Unreal Engine 5. This setting variable is used to define and access the material that should be applied to instanced meshes in the ChaosVD visualization system.
This setting variable is primarily used by the ChaosVD plugin, which is part of Unreal Engine’s physics and vehicle dynamics system. Specifically, it’s utilized in the editor settings and geometry data components of the ChaosVD module.
The value of this variable is set in the UChaosVDEditorSettings class, which is likely configured through the editor interface or project settings. It’s declared as a UPROPERTY with the Config and Transient specifiers, indicating that it’s saved in configuration files and not serialized.
InstancedMeshesMaterial interacts with other similar variables such as InstancedMeshesQueryOnlyMaterial, QueryOnlyMeshesMaterial, and SimOnlyMeshesMaterial. These variables work together to provide different materials for various types of meshes used in the ChaosVD system.
Developers should be aware that this variable is part of a larger system for managing materials in the ChaosVD plugin. It’s specifically used for instanced meshes, which are typically used for efficient rendering of multiple copies of the same mesh.
Best practices when using this variable include:
- Ensure that the referenced material is appropriate for instanced meshes and compatible with the ChaosVD visualization requirements.
- Be mindful of performance implications when changing this material, as it affects all instanced meshes in the ChaosVD system.
- Coordinate changes to this variable with other related material settings to maintain consistency in the visualization.
- Remember that this is a soft object pointer, so proper loading and error checking should be implemented when accessing the material.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Plugins/ChaosVD/Config/Engine.ini:4, section: [default]
- INI Section:
default
- Raw value:
/ChaosVD/Materials/ChaosVDInstanced.ChaosVDInstanced
- 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:363
Scope (from outer to inner):
file
class class UChaosVDEditorSettings : public UObject
Source code excerpt:
UPROPERTY(Config, Transient)
TSoftObjectPtr<UMaterial> InstancedMeshesMaterial;
UPROPERTY(Config, Transient)
TSoftObjectPtr<UMaterial> InstancedMeshesQueryOnlyMaterial;
UPROPERTY(Config)
FSoftClassPath SkySphereActorClass;
#Loc: <Workspace>/Engine/Plugins/ChaosVD/Source/ChaosVD/Private/ChaosVDGeometryDataComponent.cpp:361
Scope (from outer to inner):
file
function UMaterialInterface* FChaosVDGeometryComponentUtils::GetBaseMaterialForType
Source code excerpt:
return EditorSettings->SimOnlyMeshesMaterial.Get();
case EChaosVDMaterialType::Instanced:
return EditorSettings->InstancedMeshesMaterial.Get();
case EChaosVDMaterialType::InstancedQueryOnly:
return EditorSettings->InstancedMeshesQueryOnlyMaterial.Get();
default:
return nullptr;
}
}
#Loc: <Workspace>/Engine/Plugins/ChaosVD/Source/ChaosVD/Private/ChaosVDScene.cpp:66
Scope (from outer to inner):
file
function void FChaosVDScene::Initialize
Source code excerpt:
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);
}