I don't need to test my programs. I have an error-correcting modem.

UE3:Material properties (UDK)

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

Contents

Properties[edit]

Property group 'Material'[edit]

BlendMode[edit]

Type: EBlendMode

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

bPerPixelCameraVector[edit]

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[edit]

Type: EMaterialLightingModel

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

OpacityMaskClipValue[edit]

Type: float

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

TwoSidedSeparatePass[edit]

Type: bool

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

Wireframe[edit]

Type: bool


Property group 'Translucency'[edit]

bAllowFog[edit]

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[edit]

Type: bool

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

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.

bUseLitTranslucencyDepthPass[edit]

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[edit]

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[edit]

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'[edit]

bUsedAsLightFunction[edit]

Type: bool

Modifiers: const


bUsedWithBeamTrails[edit]

Type: bool

Modifiers: const


bUsedWithDecals[edit]

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[edit]

Type: bool

Modifiers: const


bUsedWithFogVolumes[edit]

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[edit]

Type: bool

Modifiers: const


bUsedWithFracturedMeshes[edit]

Type: bool

Modifiers: const


bUsedWithGammaCorrection[edit]

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[edit]

Type: bool

Modifiers: const


bUsedWithInstancedMeshParticles[edit]

Type: bool

Modifiers: const

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

bUsedWithLensFlare[edit]

Type: bool

Modifiers: const


bUsedWithMaterialEffect[edit]

Type: bool

Modifiers: const


bUsedWithMorphTargets[edit]

Type: bool

Modifiers: const


bUsedWithParticleSprites[edit]

Type: bool

Modifiers: const


bUsedWithParticleSubUV[edit]

Type: bool

Modifiers: const


bUsedWithRadialBlur[edit]

Type: bool

Modifiers: const


bUsedWithSkeletalMesh[edit]

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[edit]

Type: bool

Modifiers: const


bUsedWithSplineMeshes[edit]

Type: bool

Modifiers: const


bUsedWithStaticLighting[edit]

Type: bool

Modifiers: const


Internal variables[edit]

AnisotropicDirection[edit]

Type: VectorMaterialInput

Specify a vector to use as anisotropic direction

bIsFallbackMaterial[edit]

Type: bool

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

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.

bUsedAsSpecialEngineMaterial[edit]

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[edit]

Type: bool

Modifiers: const


bUsesDistortion[edit]

Type: bool

Modifiers: private

TRUE if Material uses distortion

CustomLighting[edit]

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[edit]

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[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

DiffusePower[edit]

Type: ScalarMaterialInput


Default value:

Member Value
Constant 1.0

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.

EditorParameters[edit]

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

Modifiers: native


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.

FallbackMaterial[edit]

Type: Material

Modifiers: duplicatetransient

The fallback material, which will be used on sm2 platforms

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.

ReferencedTextureGuids[edit]

Type: array<Object.Guid>

Modifiers: private, const, editoronly


ReferencedTextures[edit]

Type: array<Texture>

Modifiers: deprecated, private, const

Legacy texture references, now handled by FMaterial.

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

WorldPositionOffset[edit]

Type: VectorMaterialInput

Adds to world position in the vertex shader.