There is no spoon

UE3:Material (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> Surface >> MaterialInterface >> Material
Package: 
Engine
Known classes within Material:
MaterialExpression, MaterialExpressionAbs, MaterialExpressionAdd, MaterialExpressionAppendVector, MaterialExpressionBumpOffset, MaterialExpressionCameraVector, MaterialExpressionCameraWorldPosition, MaterialExpressionCeil, MaterialExpressionClamp, MaterialExpressionComment, MaterialExpressionComponentMask, MaterialExpressionCompound, MaterialExpressionConstant, MaterialExpressionConstant2Vector, MaterialExpressionConstant3Vector, MaterialExpressionConstant4Vector, MaterialExpressionConstantClamp, MaterialExpressionCosine, MaterialExpressionCrossProduct, MaterialExpressionDepthBiasBlend, MaterialExpressionDepthBiasedAlpha, MaterialExpressionDepthBiasedBlend, MaterialExpressionDesaturation, MaterialExpressionDestColor, MaterialExpressionDestDepth, MaterialExpressionDivide, MaterialExpressionDotProduct, MaterialExpressionFlipBookSample, MaterialExpressionFloor, MaterialExpressionFontSample, MaterialExpressionFontSampleParameter, MaterialExpressionFrac, MaterialExpressionFresnel, MaterialExpressionIf, MaterialExpressionLensFlareIntensity, MaterialExpressionLensFlareOcclusion, MaterialExpressionLensFlareRadialDistance, MaterialExpressionLensFlareRayDistance, MaterialExpressionLensFlareSourceDistance, MaterialExpressionLightVector, MaterialExpressionLinearInterpolate, MaterialExpressionMeshEmitterVertexColor, MaterialExpressionMeshSubUV, MaterialExpressionMultiply, MaterialExpressionNormalize, MaterialExpressionOneMinus, MaterialExpressionPanner, MaterialExpressionParameter, MaterialExpressionParticleSubUV, MaterialExpressionPixelDepth, MaterialExpressionPower, MaterialExpressionReflectionVector, MaterialExpressionRotator, MaterialExpressionScalarParameter, MaterialExpressionSceneDepth, MaterialExpressionSceneTexture, MaterialExpressionScreenPosition, MaterialExpressionSine, MaterialExpressionSquareRoot, MaterialExpressionStaticComponentMaskParameter, MaterialExpressionStaticSwitchParameter, MaterialExpressionSubtract, MaterialExpressionTextureCoordinate, MaterialExpressionTextureSample, MaterialExpressionTextureSampleParameter, MaterialExpressionTextureSampleParameter2D, MaterialExpressionTextureSampleParameterCube, MaterialExpressionTextureSampleParameterMovie, MaterialExpressionTime, MaterialExpressionTransform, MaterialExpressionTransformPosition, MaterialExpressionVectorParameter, MaterialExpressionVertexColor
Direct subclass:
DecalMaterial
This class in other games:
U2, UE2Runtime, UT2003, UT2004, U2XMP, UDK

Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.

Properties[edit]

Property group 'Material'[edit]

bDisableDepthTest[edit]

Type: bool

Allows the material to disable depth tests, which is only meaningful with translucent blend modes. Disabling depth tests will make rendering significantly slower since no occluded pixels can get zculled.

BlendMode[edit]

Type: EBlendMode

Determines how the material's color is blended with background colors.

FallbackMaterial[edit]

Type: Material

The fallback material, which will be used on sm2 platforms

LightingModel[edit]

Type: EMaterialLightingModel

Determines how inputs are combined to create the material's final color.

OpacityMaskClipValue[edit]

Type: float

If BlendMode is BLEND_Masked, the surface is not rendered where OpacityMask < OpacityMaskClipValue.

Default value: 0.3333

PhysMaterial[edit]

Type: PhysicalMaterial

Physical material to use for this graphics material. Used for sounds, effects etc.

TwoSided[edit]

Type: bool

Indicates that the material should be rendered without backface culling and the normal should be flipped for backfaces.

Wireframe[edit]

Type: bool


Property group 'Usage'[edit]

bIsFallbackMaterial[edit]

Type: bool

Indicates that the material will be used as a fallback on sm2 platforms

bUsedAsLightFunction[edit]

Type: bool

Modifiers: const


bUsedAsSpecialEngineMaterial[edit]

Type: bool

Modifiers: const


bUsedWithBeamTrails[edit]

Type: bool

Modifiers: const


bUsedWithFogVolumes[edit]

Type: bool

Modifiers: const


bUsedWithFoliage[edit]

Type: bool

Modifiers: const


bUsedWithGammaCorrection[edit]

Type: bool

Modifiers: const

Adds an extra pow instruction to the shader using the current render target's gamma value

bUsedWithInstancedMeshParticles[edit]

Type: bool

Modifiers: const


bUsedWithLensFlare[edit]

Type: bool

Modifiers: const


bUsedWithParticleSprites[edit]

Type: bool

Modifiers: const


bUsedWithParticleSubUV[edit]

Type: bool

Modifiers: const


bUsedWithSkeletalMesh[edit]

Type: bool

Modifiers: const


bUsedWithSpeedTree[edit]

Type: bool

Modifiers: const


bUsedWithStaticLighting[edit]

Type: bool

Modifiers: const


Default value: True

Internal variables[edit]

bIsMasked[edit]

Type: bool

Modifiers: private

TRUE if Material is masked and uses custom opacity

bIsPreviewMaterial[edit]

Type: bool

Modifiers: transient, duplicatetransient, private

TRUE if Material is the preview material used in the material editor.

bUsedWithParticleSystem[edit]

Type: bool

Modifiers: const


bUsesDistortion[edit]

Type: bool

Modifiers: private

TRUE if Material uses distortion

bUsesSceneColor[edit]

Type: bool

Modifiers: private

TRUE if Material uses a scene color exprssion

CustomLighting[edit]

Type: ColorMaterialInput


DefaultMaterialInstances[edit]

Type: pointer{class FDefaultMaterialInstance}

Array size: 2

Modifiers: const, native, duplicatetransient


DiffuseColor[edit]

Type: ColorMaterialInput


Default value:

Member Value
Constant
Member Value
A 0
B 128
G 128
R 128

Distortion[edit]

Type: Vector2MaterialInput

Allows the material to distort background color by offsetting each background pixel by the amount of the distortion input for that pixel.

EditorComments[edit]

Type: array<MaterialExpressionComment>

Modifiers: editoronly

Array of comments associated with this material; viewed in the material editor.

EditorCompounds[edit]

Type: array<MaterialExpressionCompound>

Modifiers: editoronly

Array of material expression compounds associated with this material; viewed in the material editor.

EditorPitch[edit]

Type: int


EditorX[edit]

Type: int


EditorY[edit]

Type: int


EditorYaw[edit]

Type: int


EmissiveColor[edit]

Type: ColorMaterialInput


Expressions[edit]

Type: array<MaterialExpression>

Array of material expressions, excluding Comments and Compounds. Used by the material editor.

MaterialResources[edit]

Type: pointer{FMaterialResource}

Array size: 2

Modifiers: const, native, duplicatetransient


Normal[edit]

Type: VectorMaterialInput


Opacity[edit]

Type: ScalarMaterialInput


Default value:

Member Value
Constant 1.0

OpacityMask[edit]

Type: ScalarMaterialInput


Default value:

Member Value
Constant 1.0

PhysicalMaterial[edit]

Type: class<PhysicalMaterial>

For backwards compatibility only.

ReferencedTextures[edit]

Type: array<Texture>

Modifiers: private, const

Array of textures referenced, updated in PostLoad. These are needed to keep the textures used by material resources from getting destroyed by realtime GC.

SpecularColor[edit]

Type: ColorMaterialInput


Default value:

Member Value
Constant
Member Value
A 0
B 128
G 128
R 128

SpecularPower[edit]

Type: ScalarMaterialInput


Default value:

Member Value
Constant 15.0

TwoSidedLightingColor[edit]

Type: ColorMaterialInput

Modulates the lighting without the Lambertian term in two sided lighting.

Default value:

Member Value
Constant
Member Value
A 0
B 255
G 255
R 255

TwoSidedLightingMask[edit]

Type: ScalarMaterialInput

Lerps between lighting color (diffuse * attenuation * Lambertian) and lighting without the Lambertian term color (diffuse * attenuation * TwoSidedLightingColor).

Enums[edit]

EBlendMode[edit]

BLEND_Opaque 
BLEND_Masked 
BLEND_Translucent 
BLEND_Additive 
BLEND_Modulate 

EMaterialLightingModel[edit]

MLM_Phong 
MLM_NonDirectional 
MLM_Unlit 
MLM_SHPRT 
MLM_Custom 

Structs[edit]

ColorMaterialInput[edit]

Extends: MaterialInput

bool UseConstant 
Object.Color Constant 

MaterialInput[edit]

MaterialExpression Expression 
int Mask 
int MaskR 
int MaskG 
int MaskB 
int MaskA 
int GCC64_Padding 
Todo: 64: if the C++ didn't mismirror this structure (with ExpressionInput), we might not need this

ScalarMaterialInput[edit]

Extends: MaterialInput

bool UseConstant 
float Constant 

Vector2MaterialInput[edit]

Extends: MaterialInput

bool UseConstant 
float ConstantX 
float ConstantY 

VectorMaterialInput[edit]

Extends: MaterialInput

bool UseConstant 
Object.Vector Constant 

Instance functions[edit]

GetTextures[edit]

function array<TextureGetTextures ()

Returns the referenced Textures so one may set flats on them (e.g. bForceMiplevelsToBeResident ) *