UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MaterialExpressionSpeedTree.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"
8#include "MaterialExpressionSpeedTree.generated.h"
9
10UENUM()
12{
13 STG_Branch UMETA(DisplayName="Branch"),
14 STG_Frond UMETA(DisplayName="Frond"),
15 STG_Leaf UMETA(DisplayName="Leaf"),
16 STG_FacingLeaf UMETA(DisplayName="Facing Leaf"),
17 STG_Billboard UMETA(DisplayName="Billboard")
18};
19
20UENUM()
22{
23 STW_None UMETA(DisplayName="None"),
24 STW_Fastest UMETA(DisplayName="Fastest"),
25 STW_Fast UMETA(DisplayName="Fast"),
26 STW_Better UMETA(DisplayName="Better"),
27 STW_Best UMETA(DisplayName="Best"),
28 STW_Palm UMETA(DisplayName="Palm"),
29 STW_BestPlus UMETA(DisplayName="BestPlus"),
30};
31
32UENUM()
34{
35 STLOD_Pop UMETA(DisplayName="Pop"),
36 STLOD_Smooth UMETA(DisplayName="Smooth")
37};
38
39
42{
44
45public:
46
47 UPROPERTY(meta = (RequiredInput = "false", ToolTip = "Defaults to 'WindType' if not specified"))
48 FExpressionInput GeometryInput;
49
50 UPROPERTY(meta = (RequiredInput = "false", ToolTip = "Defaults to 'GeometryType' if not specified"))
52
53 UPROPERTY(meta = (RequiredInput = "false", ToolTip = "Defaults to 'LODType' if not specified"))
55
56 UPROPERTY(meta = (RequiredInput = "false", ToolTip = "An extra bending of the tree for local effects"))
57 FExpressionInput ExtraBendWS;
58
59 UPROPERTY(EditAnywhere, Category=MaterialExpressionSpeedTree, meta=(DisplayName = "Geometry Type", ToolTip="The type of SpeedTree geometry on which this material will be used"))
61
62 UPROPERTY(EditAnywhere, Category=MaterialExpressionSpeedTree, meta=(DisplayName = "Wind Type", ToolTip="The type of wind effect used on this tree. This can only go as high as it was in the SpeedTree Modeler, but you can set it to a lower option for lower quality wind and faster rendering."))
64
65 UPROPERTY(EditAnywhere, Category=MaterialExpressionSpeedTree, meta=(DisplayName = "LOD Type", ToolTip="The type of LOD to use"))
67
68 UPROPERTY(EditAnywhere, Category=MaterialExpressionSpeedTree, meta=(DisplayName = "Billboard Threshold", ToolTip="The threshold for triangles to be removed from the bilboard mesh when not facing the camera (0 = none pass, 1 = all pass).", ClampMin = "0.0", ClampMax = "1.0", UIMin = "0.0", UIMax = "1.0"))
69 float BillboardThreshold = 0.9f;
70
71 UPROPERTY(EditAnywhere, Category=MaterialExpressionSpeedTree, AdvancedDisplay, meta=(DisplayName = "Accurate Wind Velocities", ToolTip="Support accurate velocities from wind. This will incur extra cost per vertex."))
72 bool bAccurateWindVelocities = false;
73
74 //~ Begin UObject Interface
75 virtual void Serialize(FStructuredArchive::FRecord Record) override;
76#if WITH_EDITOR
77 virtual bool CanEditChange(const FProperty* InProperty) const override;
78#endif // WITH_EDITOR
79 //~ End UObject Interface
80
81 //~ Begin UMaterialExpression Interface
82#if WITH_EDITOR
83 virtual int32 Compile(class FMaterialCompiler* Compiler, int32 OutputIndex) override;
84 virtual void GetCaption(TArray<FString>& OutCaptions) const override;
85#endif
86 //~ End UMaterialExpression Interface
87};
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
ESpeedTreeLODType
Definition MaterialExpressionSpeedTree.h:34
@ UMETA
Definition MaterialExpressionSpeedTree.h:13
ESpeedTreeWindType
Definition MaterialExpressionSpeedTree.h:22
ESpeedTreeGeometryType
Definition MaterialExpressionSpeedTree.h:12
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UCLASS(...)
Definition ObjectMacros.h:776
#define UENUM(...)
Definition ObjectMacros.h:749
if(Failed) console_printf("Failed.\n")
Definition MaterialCompiler.h:109
Definition UnrealType.h:174
Definition StructuredArchive.h:57
Definition Array.h:670
Definition EnumAsByte.h:22
Definition MaterialExpressionSpeedTree.h:42
Definition MaterialExpression.h:150
@ false
Definition radaudio_common.h:23
Definition MaterialExpressionIO.h:23