13 #include "Components/SceneCaptureComponent2D.h" 21 const FObjectInitializer &ObjectInitializer)
22 : Super(ObjectInitializer)
31 Super::SetUpSceneCaptureComponent(SceneCapture);
33 ApplyViewMode(VMI_Unlit,
true, SceneCapture.ShowFlags);
35 SceneCapture.ShowFlags.SetNotDrawTaggedComponents(
false);
37 SceneCapture.ShowFlags.SetAtmosphere(
false);
39 SceneCapture.PrimitiveRenderMode = ESceneCapturePrimitiveRenderMode::PRM_UseShowOnlyList;
41 TArray<UObject *> TaggedComponents;
42 GetObjectsOfClass(UTaggedComponent::StaticClass(), TaggedComponents,
false, EObjectFlags::RF_ClassDefaultObject, EInternalObjectFlags::AllFlags);
44 TArray<UPrimitiveComponent *> ShowOnlyComponents;
45 for (
UObject *Object : TaggedComponents) {
47 SceneCapture.ShowOnlyComponents.Emplace(Component);
56 TArray<UObject *> TaggedComponents;
57 GetObjectsOfClass(UTaggedComponent::StaticClass(), TaggedComponents,
false, EObjectFlags::RF_ClassDefaultObject, EInternalObjectFlags::AllFlags);
59 SceneCapture->ClearShowOnlyComponents();
60 for (
UObject *Object : TaggedComponents) {
62 SceneCapture->ShowOnlyComponents.Emplace(Component);
65 FPixelReader::SendPixelsInRenderThread<AInstanceSegmentationCamera, FColor>(*this);
AInstanceSegmentationCamera(const FObjectInitializer &ObjectInitializer)
void PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaSeconds) override
bool AddPostProcessingMaterial(const FString &Path)
Load the UMaterialInstanceDynamic at the given Path and append it to the list of shaders with Weight...
A definition of a Carla Actor with all the variation and attributes.
USceneCaptureComponent2D * GetCaptureComponent2D()
static FActorDefinition GetSensorDefinition()
void SetUpSceneCaptureComponent(USceneCaptureComponent2D &SceneCapture) override
static FActorDefinition MakeCameraDefinition(const FString &Id, bool bEnableModifyingPostProcessEffects=false)