The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE3:Material properties (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> Surface >> MaterialInterface >> Material (properties)

Contents

Properties

Property group 'Material'

BlendMode

Type: EBlendMode

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

bPerPixelCameraVector

Type: bool

When enabled, the camera vector will be computed in the pixel shader instead of the vertex shader which may improve the quality of the reflection. Enabling this setting also allows VertexColor expressions to be used alongside Transform expressions.

LightingModel

Type: EMaterialLightingModel

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

OpacityMaskClipValue

Type: float

If BlendMode is BLEND_Masked or BLEND_SoftMasked, 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.

TwoSidedSeparatePass

Type: bool

Indicates that the material should be rendered in its own pass. Used for hair renderering

Wireframe

Type: bool


Property group 'Translucency'

bAllowFog

Type: bool

Whether the material should allow fog or be unaffected by fog. This only has meaning for materials with translucent blend modes.

Default value: True

bCastLitTranslucencyShadowAsMasked

Type: bool

If this is set, lit translucent objects will cast shadow as if they were masked

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.

bUseLitTranslucencyDepthPass

Type: bool

If this is set, a depth-only pass for will be rendered for solid (A=255) areas of dynamic lit translucency primitives. This improves hair sorting at the extra render cost.

bUseLitTranslucencyPostRenderDepthPass

Type: bool

If this is set, a depth-only pass for will be rendered for any visible (A>0) areas of dynamic lit translucency primitives. This is necessary for correct fog and DoF of hair

bUseOneLayerDistortion

Type: bool

Whether the material should use one-layer distortion, which can be cheaper than normal distortion for some primitive types (mainly fluid surfaces). One layer distortion won't handle overlapping one layer distortion primitives correctly. This causes an extra scene color resolve for the first primitive that uses one layer distortion and so should only be used in very specific circumstances.

Property group 'Usage'

bUsedAsLightFunction

Type: bool

Modifiers: const


bUsedWithBeamTrails

Type: bool

Modifiers: const


bUsedWithDecals

Type: bool

Modifiers: const

WARNING: bUsedWithDecals is mutually exclusive with all other mesh type usage flags! A material with bUsedWithDecals=true will not work on any other mesh type.

bUsedWithFluidSurfaces

Type: bool

Modifiers: const


bUsedWithFogVolumes

Type: bool

Modifiers: const

Indicates that the material is used on fog volumes. This usage flag is mutually exclusive with all other mesh type usage flags!

bUsedWithFoliage

Type: bool

Modifiers: const


bUsedWithFracturedMeshes

Type: bool

Modifiers: const


bUsedWithGammaCorrection

Type: bool

Modifiers: const

Gamma corrects the output of the base pass using the current render target's gamma value. This must be set on materials used with UIScenes to get correct results.

bUsedWithInstancedMeshes

Type: bool

Modifiers: const


bUsedWithInstancedMeshParticles

Type: bool

Modifiers: const

Enables instancing for mesh particles. Use the "Vertex Color" node when enabled, not "MeshEmit VertColor."

bUsedWithLensFlare

Type: bool

Modifiers: const


bUsedWithMaterialEffect

Type: bool

Modifiers: const


bUsedWithMorphTargets

Type: bool

Modifiers: const


bUsedWithParticleSprites

Type: bool

Modifiers: const


bUsedWithParticleSubUV

Type: bool

Modifiers: const


bUsedWithRadialBlur

Type: bool

Modifiers: const


bUsedWithSkeletalMesh

Type: bool

Modifiers: const

Indicates that the material and its instances can be assigned to skeletal meshes. This will result in the shaders required to support skeletal meshes being compiled which will increase shader compile time and memory usage.

bUsedWithSpeedTree

Type: bool

Modifiers: const


bUsedWithSplineMeshes

Type: bool

Modifiers: const


bUsedWithStaticLighting

Type: bool

Modifiers: const


Internal variables

AnisotropicDirection

Type: VectorMaterialInput

Specify a vector to use as anisotropic direction

bIsFallbackMaterial

Type: bool

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

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.

bUsedAsSpecialEngineMaterial

Type: bool

Modifiers: duplicatetransient, const

This is a special usage flag that allows a material to be assignable to any primitive type. This is useful for materials used by code to implement certain viewmodes, for example the default material or lighting only material. The cost is that nearly 20x more shaders will be compiled for the material than the average material, which will greatly increase shader compile time and memory usage. This flag should only be set when absolutely necessary, and is purposefully not exposed to the UI to prevent abuse.

bUsedWithParticleSystem

Type: bool

Modifiers: const


bUsesDistortion

Type: bool

Modifiers: private

TRUE if Material uses distortion

CustomLighting

Type: ColorMaterialInput

Use a custom light transfer equation to be factored with light color, attenuation and shadowing. This is currently only used for Movable, Toggleable and Dominant light contribution. LightVector can be used in this material input and will be set to the tangent space light direction of the current light being rendered.

CustomSkylightDiffuse

Type: ColorMaterialInput

Use a custom diffuse factor for attenuation with lights that only support a diffuse term. This should only be the diffuse color coefficient, and must not depend on LightVector. This is currently used with skylights, SH lights, materials exported to lightmass and directional lightmap contribution.

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

DiffusePower

Type: ScalarMaterialInput


Default value:

Member Value
Constant 1.0

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.

EditorParameters

Type: Map{FName, TArray<UMaterialExpression*>}

Modifiers: native


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.

FallbackMaterial

Type: Material

Modifiers: duplicatetransient

The fallback material, which will be used on sm2 platforms

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.

ReferencedTextureGuids

Type: array<Object.Guid>

Modifiers: private, const, editoronly


ReferencedTextures

Type: array<Texture>

Modifiers: deprecated, private, const

Legacy texture references, now handled by FMaterial.

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).

WorldPositionOffset

Type: VectorMaterialInput

Adds to world position in the vertex shader.