UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MaterialExpressionVolumetricAdvancedMaterialOutput.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
9#include "MaterialExpressionVolumetricAdvancedMaterialOutput.generated.h"
10
14{
16
17
18 UPROPERTY(meta = (RequiredInput = "false", ToolTip = "Parameter 'g' input to the phase function describing how much forward(g<0) or backward (g>0) light scatter around. Valid range is [-1,1]. Defaults to ConstPhaseG from properties panel if not specified. Evaluated per sample if EvaluatePhaseOncePerSample is true."))
19 FExpressionInput PhaseG;
20
22 UPROPERTY(meta = (RequiredInput = "false", ToolTip = "Parameter 'g' input to the second phase function describing how much forward(g<0) or backward (g>0) light scatter around. Valid range is [-1,1]. Defaults to ConstPhaseG2 from properties panel if not specified. Evaluated per sample if EvaluatePhaseOncePerSample is true."))
24
26 UPROPERTY(meta = (RequiredInput = "false", ToolTip = "Lerp factor when blending the two phase functions parameterized by G and G2. Valid range is [0,1] Defaults to ConstPhaseBlend from properties panel if not specified. Evaluated per sample if EvaluatePhaseOncePerSample is true."))
27 FExpressionInput PhaseBlend;
28
29
31 UPROPERTY(meta = (RequiredInput = "false", ToolTip = "Multi-scattering approximation: represents how much contribution each successive octave will add. Evaluated per pixel. Valid range is [0,1], from low to high contribution. Defaults to ConstMultiScatteringContribution from properties panel if not specified. Evaluated per pixel (globally)."))
33
35 UPROPERTY(meta = (RequiredInput = "false", ToolTip = "Multi-scattering approximation: represents how much occlusion will be reduced for each successive octave. Evaluated per pixel. Valid range is [0,1], from low to high occlusion. Defaults to ConstMultiScatteringOcclusion from properties panel if not specified. Evaluated per pixel (globally)."))
37
39 UPROPERTY(meta = (RequiredInput = "false", ToolTip = "Multi-scattering approximation: represents how much the phase will become isotropic for each successive octave. Evaluated per pixel. Valid range is [0,1], from anisotropic to isotropic phase. Defaults to ConstMultiScatteringEccentricity from properties panel if not specified. Evaluated per pixel (globally)."))
41
43 UPROPERTY(meta = (RequiredInput = "false", ToolTip = "This is a 4-components float vector. The X component must represent the participating medium conservative density. This is used to accelerate the ray marching by early skipping expensive material evaluation. For example, the bare minimum would be a top down 2D density texture skipping evaluating the full material in empty regions (better, would be a simple blobby volume representation of clouds). The Y, Z and W components can contain parameters that can be recovered during the material graph evaluation using the VolumetricAdvancedMaterialInput node. Evaluated per sample."))
45
47 UPROPERTY(EditAnywhere, Category = "Phase", meta = (OverridingInputProperty = "PhaseG", UIMin = -0.999f, UIMax = 0.999f, ClampMin = -0.999f, ClampMax = 0.999f))
48 float ConstPhaseG = 0.0f;
49
51 UPROPERTY(EditAnywhere, Category = "Phase", meta = (OverridingInputProperty = "PhaseG2", UIMin = -0.999f, UIMax = 0.999f, ClampMin = -0.999f, ClampMax = 0.999f))
52 float ConstPhaseG2 = 0.0f;
53
55 UPROPERTY(EditAnywhere, Category = "Phase", meta = (OverridingInputProperty = "PhaseBlend", UIMin = 0.0f, UIMax = 1.0f, ClampMin = -0.999f, ClampMax = 0.999f))
56 float ConstPhaseBlend = 0.0f;
57
59 UPROPERTY(EditAnywhere, Category = "Phase")
60 bool PerSamplePhaseEvaluation = false;
61
63 UPROPERTY(EditAnywhere, Category = "Multi-Scattering", meta = (UIMin = 0, UIMax = 1, ClampMin = 0, ClampMax = 2))
64 uint32 MultiScatteringApproximationOctaveCount = 0;
65
67 UPROPERTY(EditAnywhere, Category = "Multi-Scattering", meta = (OverridingInputProperty = "MultiScatteringContribution", UIMin = 0.0f, UIMax = 1.0f, ClampMin = 0.0f, ClampMax = 1.0f))
68 float ConstMultiScatteringContribution = 0.5f;
69
71 UPROPERTY(EditAnywhere, Category = "Multi-Scattering", meta = (OverridingInputProperty = "MultiScatteringOcclusion", UIMin = 0.0f, UIMax = 1.0f, ClampMin = 0.0f, ClampMax = 1.0f))
72 float ConstMultiScatteringOcclusion = 0.5f;
73
75 UPROPERTY(EditAnywhere, Category = "Multi-Scattering", meta = (OverridingInputProperty = "MultiScatteringEccentricity", UIMin = 0.0f, UIMax = 1.0f, ClampMin = 0.0f, ClampMax = 1.0f))
76 float ConstMultiScatteringEccentricity = 0.5f;
77
79 UPROPERTY(EditAnywhere, Category = "Options")
80 bool bGroundContribution = false;
81
83 UPROPERTY(EditAnywhere, Category = "Options")
84 bool bGrayScaleMaterial = false;
85
87 UPROPERTY(EditAnywhere, Category = "Options")
88 bool bRayMarchVolumeShadow = true;
89
91 UPROPERTY(EditAnywhere, Category = "Options")
92 bool bClampMultiScatteringContribution = true;
93
94public:
95#if WITH_EDITOR
96 //~ Begin UMaterialExpression Interface
97 virtual int32 Compile(class FMaterialCompiler* Compiler, int32 OutputIndex) override;
98 virtual void GetCaption(TArray<FString>& OutCaptions) const override;
99 //~ End UMaterialExpression Interface
100
103
104#endif
105
106 //~ Begin UMaterialExpressionCustomOutput Interface
107 virtual int32 GetNumOutputs() const override;
108 virtual FString GetFunctionName() const override;
109 virtual FString GetDisplayName() const override;
110 //~ End UMaterialExpressionCustomOutput Interface
111};
112
116{
118
119
120 UPROPERTY(meta = (RequiredInput = "false", ToolTip = "Specify 0 if no matter (cloud or participating media) can be found within the area, otherwise should be set > 0."))
122
123public:
124#if WITH_EDITOR
125 //~ Begin UMaterialExpression Interface
126 virtual int32 Compile(class FMaterialCompiler* Compiler, int32 OutputIndex) override;
127 virtual void GetCaption(TArray<FString>& OutCaptions) const override;
128 virtual EMaterialValueType GetOutputValueType(int32 OutputIndex) override;
129 //~ End UMaterialExpression Interface
130#endif
131
132 //~ Begin UMaterialExpressionCustomOutput Interface
133 virtual int32 GetNumOutputs() const override;
134 virtual FString GetFunctionName() const override;
135 virtual FString GetDisplayName() const override;
136 //~ End UMaterialExpressionCustomOutput Interface
137};
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EMaterialValueType
Definition MaterialValueType.h:15
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition MaterialCompiler.h:109
Definition Array.h:670
Definition MaterialExpressionCustomOutput.h:15
Definition MaterialExpressionVolumetricAdvancedMaterialOutput.h:14
Definition MaterialExpressionVolumetricAdvancedMaterialOutput.h:116
Definition RobinHoodHashTable.h:18
Definition MaterialExpressionIO.h:23