![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "PhysicsField/PhysicsFieldComponent.h"#include "ChaosStats.h"#include "Engine/Engine.h"#include "Engine/World.h"#include "Field/FieldSystemNodes.h"#include "DataDrivenShaderPlatformInfo.h"#include "GlobalShader.h"#include "HAL/LowLevelMemTracker.h"#include "PipelineStateCache.h"#include "ShaderParameterUtils.h"#include "ProfilingDebugging/RealtimeGPUProfiler.h"#include "RHIBreadcrumbs.h"#include "RHIContext.h"#include "RenderingThread.h"#include "SceneInterface.h"Classes | |
| class | FBuildPhysicsFieldClipmapCS |
| class | FResetPhysicsFieldClipmapCS |
| struct | FVectorFieldAddOperator |
| struct | FScalarFieldAddOperator |
| struct | FIntegerFieldAddOperator |
| FAutoConsoleVariableRef CVarPhysicsFieldBuildClipmap | ( | TEXT("r.PhysicsField.BuildClipmap") | , |
| GPhysicsFieldBuildClipmap | , | ||
| TEXT("Build the Physics field clipmap") | , | ||
| ECVF_Scalability| | ECVF_RenderThreadSafe | ||
| ) |
| DECLARE_CYCLE_STAT | ( | TEXT("Create Scene Proxy [GT]") | , |
| STAT_PhysicsFields_CreateSceneProxy | , | ||
| STATGROUP_PhysicsFields | |||
| ) |
| DECLARE_CYCLE_STAT | ( | TEXT("Send Render Data [GT]") | , |
| STAT_PhysicsFields_SendRenderData | , | ||
| STATGROUP_PhysicsFields | |||
| ) |
| DECLARE_CYCLE_STAT | ( | TEXT("UpdateResource [RT]") | , |
| STAT_PhysicsFields_UpdateResource_RT | , | ||
| STATGROUP_PhysicsFields | |||
| ) |
| DECLARE_GPU_STAT | ( | PhysicsFields_BuildClipmap | ) |
| DECLARE_GPU_STAT | ( | PhysicsFields_ClearClipmap | ) |
| DECLARE_GPU_STAT | ( | PhysicsFields_UpdateBuffers | ) |
| DECLARE_STATS_GROUP | ( | TEXT("PhysicsFields") | , |
| STATGROUP_PhysicsFields | , | ||
| STATCAT_Advanced | |||
| ) |
Stats
| DEFINE_LOG_CATEGORY_STATIC | ( | LogGlobalField | , |
| Log | , | ||
| All | |||
| ) |
Console variables
| void EvaluateFieldIntegerNodes | ( | TArray< FFieldSystemCommand > & | FieldCommands, |
| const EFieldPhysicsType | FieldType, | ||
| FFieldContext & | FieldContext, | ||
| TArray< int32 > & | ResultsArray, | ||
| TArray< int32 > & | MaxArray | ||
| ) |
| void EvaluateFieldNodes | ( | TArray< FFieldSystemCommand > & | FieldCommands, |
| const EFieldPhysicsType | FieldType, | ||
| FFieldContext & | FieldContext, | ||
| TArray< DataType > & | ResultsArray, | ||
| TArray< DataType > & | MaxArray | ||
| ) |
| void EvaluateFieldScalarNodes | ( | TArray< FFieldSystemCommand > & | FieldCommands, |
| const EFieldPhysicsType | FieldType, | ||
| FFieldContext & | FieldContext, | ||
| TArray< float > & | ResultsArray, | ||
| TArray< float > & | MaxArray | ||
| ) |
| void EvaluateFieldVectorNodes | ( | TArray< FFieldSystemCommand > & | FieldCommands, |
| const EFieldPhysicsType | FieldType, | ||
| FFieldContext & | FieldContext, | ||
| TArray< FVector > & | ResultsArray, | ||
| TArray< FVector > & | MaxArray | ||
| ) |
| FORCEINLINE void FillFieldCommands | ( | const TArray< FFieldSystemCommand > & | InputCommands, |
| const FBox & | BoundingBox, | ||
| const float | TimeSeconds, | ||
| TArray< FFieldSystemCommand > & | OutputCommands | ||
| ) |
| void GetFieldIndex | ( | const uint32 | FieldType, |
| int32 & | FieldIndex, | ||
| EFieldOutputType & | FieldOutput | ||
| ) |
Compute the field indexand output given a field type
| IMPLEMENT_SHADER_TYPE | ( | FBuildPhysicsFieldClipmapCS | , |
| TEXT("/Engine/Private/PhysicsFieldBuilder.usf") | , | ||
| TEXT("BuildPhysicsFieldClipmapCS") | , | ||
| SF_Compute | |||
| ) |
| IMPLEMENT_SHADER_TYPE | ( | FResetPhysicsFieldClipmapCS | , |
| TEXT("/Engine/Private/PhysicsFieldReset.usf") | , | ||
| TEXT("ResetPhysicsFieldClipmapCS") | , | ||
| SF_Compute | |||
| ) |
| void InitInternalBuffer | ( | FRHICommandListBase & | RHICmdList, |
| const TCHAR * | DebugName, | ||
| const uint32 | ElementCount, | ||
| FRWBuffer & | OutputBuffer | ||
| ) |
Resource Utilities
| void UpdateInternalBuffer | ( | FRHICommandListBase & | RHICmdList, |
| const TCHAR * | DebugName, | ||
| const uint32 | ElementCount, | ||
| const BufferType * | InputData, | ||
| FRWBuffer & | OutputBuffer, | ||
| const bool | bInitField = false |
||
| ) |
| FAutoConsoleVariableRef CVarPhysicsFieldClipmapCount(TEXT("r.PhysicsField.ClipmapCount"), GPhysicsFieldClipmapCount, TEXT("Number of clipmaps used for the physics field"), ECVF_RenderThreadSafe) | ( | TEXT("r.PhysicsField.ClipmapCount") | , |
| GPhysicsFieldClipmapCount | , | ||
| TEXT("Number of clipmaps used for the physics field") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarPhysicsFieldClipmapDistance(TEXT("r.PhysicsField.ClipmapDistance"), GPhysicsFieldClipmapDistance, TEXT("Max distance from the clipmap center"), ECVF_RenderThreadSafe) | ( | TEXT("r.PhysicsField.ClipmapDistance") | , |
| GPhysicsFieldClipmapDistance | , | ||
| TEXT("Max distance from the clipmap center") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarPhysicsFieldClipmapExponent(TEXT("r.PhysicsField.ClipmapExponent"), GPhysicsFieldClipmapExponent, TEXT("Exponent used to derive each clipmap's size, together with r.PhysicsField.ClipmapDistance"), ECVF_RenderThreadSafe) | ( | TEXT("r.PhysicsField.ClipmapExponent") | , |
| GPhysicsFieldClipmapExponent | , | ||
| TEXT("Exponent used to derive each clipmap's size, together with r.PhysicsField.ClipmapDistance") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarPhysicsFieldClipmapResolution(TEXT("r.PhysicsField.ClipmapResolution"), GPhysicsFieldClipmapResolution, TEXT("Resolution of the physics field. Higher values increase fidelity but also increase memory and composition cost."), ECVF_RenderThreadSafe) | ( | TEXT("r.PhysicsField.ClipmapResolution") | , |
| GPhysicsFieldClipmapResolution | , | ||
| TEXT("Resolution of the physics field. Higher values increase fidelity but also increase memory and composition cost.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarPhysicsFieldEnableCulling(TEXT("r.PhysicsField.EnableCulling"), GPhysicsFieldEnableCulling, TEXT("Enable the spatial culling based on the field nodes bounds"), ECVF_RenderThreadSafe) | ( | TEXT("r.PhysicsField.EnableCulling") | , |
| GPhysicsFieldEnableCulling | , | ||
| TEXT("Enable the spatial culling based on the field nodes bounds") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarPhysicsFieldSingleTarget(TEXT("r.PhysicsField.SingleTarget"), GPhysicsFieldSingleTarget, TEXT("Limnit the physics field build to only one target, the linear force"), ECVF_RenderThreadSafe) | ( | TEXT("r.PhysicsField.SingleTarget") | , |
| GPhysicsFieldSingleTarget | , | ||
| TEXT("Limnit the physics field build to only one target, the linear force") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| int32 GPhysicsFieldBuildClipmap = 1 |
Boolean to check if we need to build or not the clipmap
| int32 GPhysicsFieldClipmapCount = 4 |
Number of used clipmaps
| float GPhysicsFieldClipmapDistance = 10000 |
Clipmap max disatnce
| float GPhysicsFieldClipmapExponent = 2 |
Exponent used to compute each clipmaps distance
| int32 GPhysicsFieldClipmapResolution = 32 |
Resolution of each clipmaps
| int32 GPhysicsFieldEnableCulling = 1 |
Spatial culling
| int32 GPhysicsFieldSingleTarget = 0 |
Single Target Limit