You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.8 KiB
63 lines
2.8 KiB
// Copyright Voulz 2021-2025. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "MoviePipelineImagePassBase.h"
|
|
#include "MovieRenderPipelineDataTypes.h"
|
|
#include "ArchVisMoviePipelineDeferredPassObjectId.generated.h"
|
|
|
|
|
|
enum class EArchVisMoviePipelineObjectIdPassIdType : uint8;
|
|
|
|
UCLASS(BlueprintType)
|
|
class ARCHVISTOOLSEDITOR_API UArchVisMoviePipelineObjectIdRenderPass : public UMoviePipelineImagePassBase
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UArchVisMoviePipelineObjectIdRenderPass();
|
|
|
|
virtual UE::MoviePipeline::FImagePassCameraViewData GetCameraInfo(FMoviePipelineRenderPassMetrics& InOutSampleState, IViewCalcPayload* OptPayload = nullptr) const override;
|
|
|
|
public:
|
|
|
|
virtual FText GetDisplayText() const override
|
|
{
|
|
return INVTEXT("[ArchVis] Object Ids (Limited)");
|
|
}
|
|
protected:
|
|
virtual int32 GetNumCamerasToRender() const;
|
|
public:
|
|
virtual void GetViewShowFlags(FEngineShowFlags& OutShowFlag, EViewModeIndex& OutViewModeIndex) const override;
|
|
virtual void RenderSample_GameThreadImpl(const FMoviePipelineRenderPassMetrics& InSampleState) override;
|
|
virtual void TeardownImpl() override;
|
|
virtual void SetupImpl(const MoviePipeline::FMoviePipelineRenderPassInitSettings& InPassInitSettings) override;
|
|
virtual void GatherOutputPassesImpl(TArray<FMoviePipelinePassIdentifier>& ExpectedRenderPasses) override;
|
|
virtual bool IsScreenPercentageSupported() const override { return false; }
|
|
virtual int32 GetOutputFileSortingOrder() const override { return 10; }
|
|
virtual void UpdateTelemetry(FMoviePipelineShotRenderTelemetry* InTelemetry) const override;
|
|
|
|
virtual TWeakObjectPtr<UTextureRenderTarget2D> CreateViewRenderTargetImpl(const FIntPoint& InSize, IViewCalcPayload* OptPayload = nullptr) const override;
|
|
virtual TSharedPtr<FMoviePipelineSurfaceQueue, ESPMode::ThreadSafe> CreateSurfaceQueueImpl(const FIntPoint& InSize, IViewCalcPayload* OptPayload = nullptr) const override;
|
|
|
|
protected:
|
|
void PostRendererSubmission(const FMoviePipelineRenderPassMetrics& InSampleState);
|
|
virtual void AddViewExtensions(FSceneViewFamilyContext& InContext, FMoviePipelineRenderPassMetrics& InOutSampleState) override;
|
|
|
|
private:
|
|
/** Gets the typename hash used as part of the cryptomatte metadata. Eg, "cryptomatte/<typename_hash>/..." */
|
|
FString GetTypenameHash() const;
|
|
|
|
public:
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Settings")
|
|
EArchVisMoviePipelineObjectIdPassIdType IdType;
|
|
|
|
/** If true, translucent objects will be included in the ObjectId pass (but as an opaque layer due to limitations). False will omit translucent objects. */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Settings")
|
|
bool bIncludeTranslucentObjects;
|
|
|
|
private:
|
|
TSharedPtr<FAccumulatorPool, ESPMode::ThreadSafe> AccumulatorPool;
|
|
TArray<FMoviePipelinePassIdentifier> ExpectedPassIdentifiers;
|
|
bool bPrevAllowSelectTranslucent;
|
|
};
|
|
|