I love the smell of UnrealEd crashing in the morning. – tarquin

Difference between revisions of "UE3:Material (UT3)"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(Auto-generated page)
 
(Talk)
Line 35: Line 35:
  
 
If BlendMode is BLEND_Masked, the surface is not rendered where OpacityMask < OpacityMaskClipValue.
 
If BlendMode is BLEND_Masked, the surface is not rendered where OpacityMask < OpacityMaskClipValue.
 +
 +
'''Default value:''' 0.3333
  
 
====PhysMaterial====
 
====PhysMaterial====

Revision as of 08:40, 23 May 2008

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

Property group 'Material'

bDisableDepthTest

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

Type: EBlendMode

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

FallbackMaterial

Type: Material

The fallback material, which will be used on sm2 platforms

LightingModel

Type: EMaterialLightingModel

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

OpacityMaskClipValue

Type: float

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

Default value: 0.3333

PhysMaterial

Type: PhysicalMaterial

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

TwoSided

Type: bool

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

Wireframe

Type: bool


Property group 'Usage'

bIsFallbackMaterial

Type: bool

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

bUsedAsLightFunction

Type: bool

Modifiers: const


bUsedAsSpecialEngineMaterial

Type: bool

Modifiers: const


bUsedWithBeamTrails

Type: bool

Modifiers: const


bUsedWithFogVolumes

Type: bool

Modifiers: const


bUsedWithFoliage

Type: bool

Modifiers: const


bUsedWithGammaCorrection

Type: bool

Modifiers: const

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

bUsedWithInstancedMeshParticles

Type: bool

Modifiers: const


bUsedWithLensFlare

Type: bool

Modifiers: const


bUsedWithParticleSprites

Type: bool

Modifiers: const


bUsedWithParticleSubUV

Type: bool

Modifiers: const


bUsedWithSkeletalMesh

Type: bool

Modifiers: const


bUsedWithSpeedTree

Type: bool

Modifiers: const


bUsedWithStaticLighting

Type: bool

Modifiers: const


Default value: True

Internal variables

bIsMasked

Type: bool

Modifiers: private

TRUE if Material is masked and uses custom opacity

bIsPreviewMaterial

Type: bool

Modifiers: transient, duplicatetransient, private

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

bUsedWithParticleSystem

Type: bool

Modifiers: const


bUsesDistortion

Type: bool

Modifiers: private

TRUE if Material uses distortion

bUsesSceneColor

Type: bool

Modifiers: private

TRUE if Material uses a scene color exprssion

CustomLighting

Type: ColorMaterialInput


DefaultMaterialInstances

Type: pointer{class FDefaultMaterialInstance}

Array size: 2

Modifiers: const, native, duplicatetransient


DiffuseColor

Type: ColorMaterialInput


Default value:

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

Distortion

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

Type: array<MaterialExpressionComment>

Modifiers: editoronly

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

EditorCompounds

Type: array<MaterialExpressionCompound>

Modifiers: editoronly

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

EditorPitch

Type: int


EditorX

Type: int


EditorY

Type: int


EditorYaw

Type: int


EmissiveColor

Type: ColorMaterialInput


Expressions

Type: array<MaterialExpression>

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

MaterialResources

Type: pointer{FMaterialResource}

Array size: 2

Modifiers: const, native, duplicatetransient


Normal

Type: VectorMaterialInput


Opacity

Type: ScalarMaterialInput


Default value:

Member Value
Constant 1.0

OpacityMask

Type: ScalarMaterialInput


Default value:

Member Value
Constant 1.0

PhysicalMaterial

Type: class<PhysicalMaterial>

For backwards compatibility only.

ReferencedTextures

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

Type: ColorMaterialInput


Default value:

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

SpecularPower

Type: ScalarMaterialInput


Default value:

Member Value
Constant 15.0

TwoSidedLightingColor

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

Type: ScalarMaterialInput

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

Enums

EBlendMode

BLEND_Opaque 
BLEND_Masked 
BLEND_Translucent 
BLEND_Additive 
BLEND_Modulate 

EMaterialLightingModel

MLM_Phong 
MLM_NonDirectional 
MLM_Unlit 
MLM_SHPRT 
MLM_Custom 

Structs

ColorMaterialInput

Extends: MaterialInput

bool UseConstant 
Object.Color Constant 

MaterialInput

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

Extends: MaterialInput

bool UseConstant 
float Constant 

Vector2MaterialInput

Extends: MaterialInput

bool UseConstant 
float ConstantX 
float ConstantY 

VectorMaterialInput

Extends: MaterialInput

bool UseConstant 
Object.Vector Constant 

Instance functions

GetTextures

function array<TextureGetTextures ()

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