Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Engine.Material

Extends
MaterialInterface
Modifiers
native ( Material ) hidecategories ( object )

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

Core.Object
|   
+-- Engine.Surface
   |   
   +-- Engine.MaterialInterface
      |   
      +-- Engine.Material

Direct Known Subclasses:

DecalMaterial, PreviewMaterial

Variables Summary
VectorMaterialInputAnisotropicDirection
boolbIsFallbackMaterial
boolbIsMasked
boolbIsPreviewMaterial
boolbUsedAsSpecialEngineMaterial
boolbUsedWithParticleSystem
boolbUsesDistortion
ColorMaterialInputCustomLighting
ColorMaterialInputCustomSkylightDiffuse
pointerDefaultMaterialInstances[3]
ColorMaterialInputDiffuseColor
ScalarMaterialInputDiffusePower
Vector2MaterialInputDistortion
array<MaterialExpressionComment>EditorComments
array<MaterialExpressionCompound>EditorCompounds
mapEditorParameters
intEditorPitch
intEditorX
intEditorY
intEditorYaw
ColorMaterialInputEmissiveColor
array<MaterialExpression>Expressions
pointerMaterialResources[2]
VectorMaterialInputNormal
ScalarMaterialInputOpacity
ScalarMaterialInputOpacityMask
class<PhysicalMaterial>PhysicalMaterial
array<guid>ReferencedTextureGuids
array<texture>ReferencedTextures
ColorMaterialInputSpecularColor
ScalarMaterialInputSpecularPower
ColorMaterialInputSubsurfaceAbsorptionColor
ColorMaterialInputSubsurfaceInscatteringColor
ScalarMaterialInputSubsurfaceScatteringRadius
Vector2MaterialInputTessellationFactors
ColorMaterialInputTwoSidedLightingColor
ScalarMaterialInputTwoSidedLightingMask
VectorMaterialInputWorldDisplacement
VectorMaterialInputWorldPositionOffset
D3D11
boolbEnableMaskedAntialiasing
boolbUseImageBasedReflections
EMaterialTessellationModeD3D11TessellationMode
boolEnableSeparateTranslucency
boolEnableSubsurfaceScattering
floatImageReflectionNormalDampening
Material
EBlendModeBlendMode
EMaterialLightingModelLightingModel
floatOpacityMaskClipValue
boolTwoSided
Misc
boolbAllowLightmapSpecular
boolbPerPixelCameraVector
floatShadowDepthBias
boolWireframe
MutuallyExclusiveUsage
boolbUsedAsLightFunction
boolbUsedWithDecals
boolbUsedWithFogVolumes
PhysicalMaterial
PhysicalMaterialBlackPhysicalMaterial
PhysicalMaterialPhysMaterial
Texture2DPhysMaterialMask
INTPhysMaterialMaskUVChannel
PhysicalMaterialWhitePhysicalMaterial
Translucency
boolbAllowFog
boolbAllowTranslucencyDoF
boolbCastLitTranslucencyShadowAsMasked
boolbDisableDepthTest
boolbTranslucencyInheritDominantShadowsFromOpaque
boolbTranslucencyReceiveDominantShadowsFromStatic
boolbUseLitTranslucencyDepthPass
boolbUseLitTranslucencyPostRenderDepthPass
boolbUseOneLayerDistortion
boolTwoSidedSeparatePass
Usage
boolbUsedWithAPEXMeshes
boolbUsedWithBeamTrails
boolbUsedWithFluidSurfaces
boolbUsedWithFracturedMeshes
boolbUsedWithGammaCorrection
boolbUsedWithInstancedMeshes
boolbUsedWithInstancedMeshParticles
boolbUsedWithLandscape
boolbUsedWithLensFlare
boolbUsedWithMaterialEffect
boolbUsedWithMorphTargets
boolbUsedWithParticleSprites
boolbUsedWithParticleSubUV
boolbUsedWithRadialBlur
boolbUsedWithScreenDoorFade
boolbUsedWithSkeletalMesh
boolbUsedWithSpeedTree
boolbUsedWithSplineMeshes
boolbUsedWithStaticLighting
boolbUsedWithTerrain
Inherited Variables from Engine.MaterialInterface
bAutoFlattenMobile, bLockColorBlending, bMobileAllowFog, bUseMobileBumpOffset, bUseMobilePixelSpecular, bUseMobileSpecular, bUseMobileTextureTransform, bUseMobileUniformColorMultiply, bUseMobileVertexColorMultiply, bUseMobileVertexSpecular, bUseMobileWaveVertexMovement, DefaultUniformColor, FixedScaleX, FixedScaleY, FlattenedTexture, LightingGuid, LightmassSettings, MobileAmbientOcclusionSource, MobileBaseTexture, MobileBaseTextureTexCoordsSource, MobileBumpOffsetHeightRatio, MobileBumpOffsetReferencePlane, MobileDetailTexture, MobileDetailTextureTexCoordsSource, MobileEmissiveColor, MobileEmissiveColorSource, MobileEmissiveMaskSource, MobileEmissiveTexture, MobileEnvironmentAmount, MobileEnvironmentBlendMode, MobileEnvironmentColor, MobileEnvironmentFresnelAmount, MobileEnvironmentFresnelExponent, MobileEnvironmentMaskSource, MobileEnvironmentTexture, MobileMaskTexture, MobileMaskTextureTexCoordsSource, MobileMaxVertexMovementAmplitude, MobileNormalTexture, MobileRimLightingColor, MobileRimLightingExponent, MobileRimLightingMaskSource, MobileRimLightingStrength, MobileSpecularColor, MobileSpecularMask, MobileSpecularPower, MobileSwayFrequencyMultiplier, MobileSwayMaxAngle, MobileTangentVertexFrequencyMultiplier, MobileTextureBlendFactorSource, MobileTextureTransformTarget, MobileVerticalFrequencyMultiplier, PannerSpeedX, PannerSpeedY, ParentRefFence, PreviewMesh, RotateSpeed, SineScaleFrequencyMultipler, SineScaleX, SineScaleY, TransformCenterX, TransformCenterY

Enumerations Summary
Inherited Enumerations from Engine.MaterialInterface
EMaterialUsage

Structures Summary
ColorMaterialInput
UseConstant, Constant
MaterialInput
Expression, Mask, MaskR, MaskG, MaskB, MaskA, GCC64_Padding
ScalarMaterialInput
UseConstant, Constant
Vector2MaterialInput
UseConstant, ConstantX, ConstantY
VectorMaterialInput
UseConstant, Constant
Inherited Structures from Engine.MaterialInterface
LightmassMaterialInterfaceSettings

Functions Summary
Inherited Functions from Engine.MaterialInterface
GetFontParameterValue, GetMaterial, GetParameterDesc, GetPhysicalMaterial, GetScalarCurveParameterValue, GetScalarParameterValue, GetTextureParameterValue, GetVectorCurveParameterValue, GetVectorParameterValue, SetForceMipLevelsToBeResident
Inherited Functions from Engine.Surface
GetSurfaceHeight, GetSurfaceWidth


Variables Detail

AnisotropicDirection Source code

var VectorMaterialInput AnisotropicDirection;
Specify a vector to use as anisotropic direction

bIsFallbackMaterial Source code

var deprecated bool bIsFallbackMaterial;
Indicates that the material will be used as a fallback on sm2 platforms

bIsMasked Source code

var private bool bIsMasked;
TRUE if Material is masked and uses custom opacity

bIsPreviewMaterial Source code

var transient duplicatetransient private bool bIsPreviewMaterial;
TRUE if Material is the preview material used in the material editor.

bUsedAsSpecialEngineMaterial Source code

var duplicatetransient const bool bUsedAsSpecialEngineMaterial;
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 Source code

var const bool bUsedWithParticleSystem;

bUsesDistortion Source code

var private bool bUsesDistortion;
TRUE if Material uses distortion

CustomLighting Source code

var ColorMaterialInput CustomLighting;
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 Source code

var ColorMaterialInput CustomSkylightDiffuse;
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[3] Source code

var const native duplicatetransient pointer DefaultMaterialInstances[3];

DiffuseColor Source code

var ColorMaterialInput DiffuseColor;

DiffusePower Source code

var ScalarMaterialInput DiffusePower;

Distortion Source code

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

EditorComments Source code

var editoronly array<MaterialExpressionComment> EditorComments;
Array of comments associated with this material; viewed in the material editor.

EditorCompounds Source code

var editoronly array<MaterialExpressionCompound> EditorCompounds;
Array of material expression compounds associated with this material; viewed in the material editor.

EditorParameters Source code

var native map EditorParameters;

EditorPitch Source code

var int EditorPitch;

EditorX Source code

var int EditorX;

EditorY Source code

var int EditorY;

EditorYaw Source code

var int EditorYaw;

EmissiveColor Source code

var ColorMaterialInput EmissiveColor;

Expressions Source code

var array<MaterialExpression> Expressions;
Array of material expressions, excluding Comments and Compounds. Used by the material editor.

MaterialResources[2] Source code

var const native duplicatetransient pointer MaterialResources[2];

Normal Source code

var VectorMaterialInput Normal;

Opacity Source code

var ScalarMaterialInput Opacity;

OpacityMask Source code

var ScalarMaterialInput OpacityMask;

PhysicalMaterial Source code

var class<PhysicalMaterial> PhysicalMaterial;
For backwards compatibility only.

ReferencedTextureGuids Source code

var private const editoronly array<guid> ReferencedTextureGuids;

ReferencedTextures Source code

var deprecated private const array<texture> ReferencedTextures;
Legacy texture references, now handled by FMaterial.

SpecularColor Source code

var ColorMaterialInput SpecularColor;

SpecularPower Source code

var ScalarMaterialInput SpecularPower;

SubsurfaceAbsorptionColor Source code

var ColorMaterialInput SubsurfaceAbsorptionColor;
Light from subsurface scattering is attenuated by SubsurfaceAbsorptionColor^Distance.

SubsurfaceInscatteringColor Source code

var ColorMaterialInput SubsurfaceInscatteringColor;
Modulates the local contribution to the subsurface scattered lighting of the material.

SubsurfaceScatteringRadius Source code

var ScalarMaterialInput SubsurfaceScatteringRadius;
The maximum distance light from subsurface scattering will travel.

TessellationFactors Source code

var Vector2MaterialInput TessellationFactors;
Multiplies to the tessellation factors applied when a tessellation mode is set. X = Edges, Y = Inside

TwoSidedLightingColor Source code

var ColorMaterialInput TwoSidedLightingColor;
Modulates the lighting without the Lambertian term in two sided lighting.

TwoSidedLightingMask Source code

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

WorldDisplacement Source code

var VectorMaterialInput WorldDisplacement;
Offset in tangent space applied to tessellated vertices. A scalar connected to this input will be treated as the z component (float3(0,0,x)).

WorldPositionOffset Source code

var VectorMaterialInput WorldPositionOffset;
Adds to world position in the vertex shader.

D3D11

bEnableMaskedAntialiasing Source code

var(D3D11) bool bEnableMaskedAntialiasing<bShowOnlyWhenTrue=bShowD3D11Properties>;
Indicates that the material should be rendered with antialiasing. Opacity is evaluated multiple times (for each MSAA sample).

bUseImageBasedReflections Source code

var(D3D11) bool bUseImageBasedReflections<bShowOnlyWhenTrue=bShowD3D11Properties>;
Replaces analytical phong specular highlights on this material with an image based reflection, Specified by the ImageReflection actors placed in the world. Only works in D3D11.

D3D11TessellationMode Source code

var(D3D11) const EMaterialTessellationMode D3D11TessellationMode<bShowOnlyWhenTrue=bShowD3D11Properties>;
The type of tessellation to apply to this object. Note D3D11 required for anything except MTM_NoTessellation.

EnableSeparateTranslucency Source code

var(D3D11) bool EnableSeparateTranslucency<bShowOnlyWhenTrue=bShowD3D11Properties>;
Indicates that the material should be rendered in the SeparateTranslucency Pass (does not affect bloom, not affected by DOF).

EnableSubsurfaceScattering Source code

var(D3D11) bool EnableSubsurfaceScattering<bShowOnlyWhenTrue=bShowD3D11Properties>;
Indicates that the material should be rendered with subsurface scattering.

ImageReflectionNormalDampening Source code

var(D3D11) float ImageReflectionNormalDampening<bShowOnlyWhenTrue=bShowD3D11Properties>;
Values larger than 1 dampen the normal used for image reflections, values smaller than 1 exaggerate the normal used for image reflections.

Material

BlendMode Source code

var(Material) EBlendMode BlendMode;
Determines how the material's color is blended with background colors.

LightingModel Source code

var(Material) EMaterialLightingModel LightingModel;
Determines how inputs are combined to create the material's final color.

OpacityMaskClipValue Source code

var(Material) float OpacityMaskClipValue;
If BlendMode is BLEND_Masked or BLEND_SoftMasked, the surface is not rendered where OpacityMask < OpacityMaskClipValue.

TwoSided Source code

var(Material) bool TwoSided;
Indicates that the material should be rendered without backface culling and the normal should be flipped for backfaces.

Misc

bAllowLightmapSpecular Source code

var(Misc) bool bAllowLightmapSpecular;
Controls whether lightmap specular will be rendered or not. Can be disabled to reduce instruction count.

bPerPixelCameraVector Source code

var(Misc) bool bPerPixelCameraVector;
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.

ShadowDepthBias Source code

var(Misc) float ShadowDepthBias;
Can be used to bias shadows away from the surface.

Wireframe Source code

var(Misc) bool Wireframe;

MutuallyExclusiveUsage

bUsedAsLightFunction Source code

var(MutuallyExclusiveUsage) const bool bUsedAsLightFunction;

bUsedWithDecals Source code

var(MutuallyExclusiveUsage) const bool bUsedWithDecals;
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.

bUsedWithFogVolumes Source code

var(MutuallyExclusiveUsage) const bool bUsedWithFogVolumes;
Indicates that the material is used on fog volumes. This usage flag is mutually exclusive with all other mesh type usage flags!

PhysicalMaterial

BlackPhysicalMaterial Source code

var(PhysicalMaterial) PhysicalMaterial BlackPhysicalMaterial;
The physical material to use when a black pixel in the PhysMaterialMask texture is hit.

PhysMaterial Source code

var(PhysicalMaterial) PhysicalMaterial PhysMaterial;
Physical material to use for this graphics material. Used for sounds, effects etc.

PhysMaterialMask Source code

var(PhysicalMaterial) Texture2D PhysMaterialMask;
A 1 bit monochrome texture that represents a mask for what physical material should be used if the collided texel is black or white.

PhysMaterialMaskUVChannel Source code

var(PhysicalMaterial) INT PhysMaterialMaskUVChannel;
The UV channel to use for the PhysMaterialMask.

WhitePhysicalMaterial Source code

var(PhysicalMaterial) PhysicalMaterial WhitePhysicalMaterial;
The physical material to use when a white pixel in the PhysMaterialMask texture is hit.

Translucency

bAllowFog Source code

var(Translucency) bool bAllowFog;
Whether the material should allow fog or be unaffected by fog. This only has meaning for materials with translucent blend modes.

bAllowTranslucencyDoF Source code

var(Translucency) bool bAllowTranslucencyDoF;
Whether the material should allow Depth of Field or be unaffected by DoF. This only has meaning for materials with translucent blend modes.

bCastLitTranslucencyShadowAsMasked Source code

var(Translucency) bool bCastLitTranslucencyShadowAsMasked;
If this is set, lit translucent objects will cast shadow as if they were masked

bDisableDepthTest Source code

var(Translucency) bool bDisableDepthTest;
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.

bTranslucencyInheritDominantShadowsFromOpaque Source code

var(Translucency) bool bTranslucencyInheritDominantShadowsFromOpaque;
Whether the material should inherit the dynamic shadows that dominant lights are casting on opaque and masked materials behind this material. This is useful for ground meshes using a translucent blend mode and depth biased alpha to hide seams.

bTranslucencyReceiveDominantShadowsFromStatic Source code

var(Translucency) bool bTranslucencyReceiveDominantShadowsFromStatic;
Whether the material should receive dynamic dominant light shadows from static objects when the material is being lit by a light environment. This is useful for character hair.

bUseLitTranslucencyDepthPass Source code

var(Translucency) bool bUseLitTranslucencyDepthPass;
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 Source code

var(Translucency) bool bUseLitTranslucencyPostRenderDepthPass;
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 Source code

var(Translucency) bool bUseOneLayerDistortion;
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.

TwoSidedSeparatePass Source code

var(Translucency) bool TwoSidedSeparatePass;
Indicates that the material should be rendered in its own pass. Used for hair renderering

Usage

bUsedWithAPEXMeshes Source code

var(Usage) const bool bUsedWithAPEXMeshes;

bUsedWithBeamTrails Source code

var(Usage) const bool bUsedWithBeamTrails;

bUsedWithFluidSurfaces Source code

var(Usage) const bool bUsedWithFluidSurfaces;

bUsedWithFracturedMeshes Source code

var(Usage) const bool bUsedWithFracturedMeshes;

bUsedWithGammaCorrection Source code

var(Usage) const bool bUsedWithGammaCorrection;
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 Source code

var(Usage) const bool bUsedWithInstancedMeshes;

bUsedWithInstancedMeshParticles Source code

var(Usage) const bool bUsedWithInstancedMeshParticles;
Enables instancing for mesh particles. Use the "Vertex Color" node when enabled, not "MeshEmit VertColor."

bUsedWithLandscape Source code

var(Usage) const bool bUsedWithLandscape;

bUsedWithLensFlare Source code

var(Usage) const bool bUsedWithLensFlare;

bUsedWithMaterialEffect Source code

var(Usage) const bool bUsedWithMaterialEffect;

bUsedWithMorphTargets Source code

var(Usage) const bool bUsedWithMorphTargets;

bUsedWithParticleSprites Source code

var(Usage) const bool bUsedWithParticleSprites;

bUsedWithParticleSubUV Source code

var(Usage) const bool bUsedWithParticleSubUV;

bUsedWithRadialBlur Source code

var(Usage) const bool bUsedWithRadialBlur;

bUsedWithScreenDoorFade Source code

var(Usage) const bool bUsedWithScreenDoorFade;
Enables support for screen door fading for primitives rendering with this material. This adds an extra texture lookup and a few extra instructions.

bUsedWithSkeletalMesh Source code

var(Usage) const bool bUsedWithSkeletalMesh;
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 Source code

var(Usage) const bool bUsedWithSpeedTree;

bUsedWithSplineMeshes Source code

var(Usage) const bool bUsedWithSplineMeshes;

bUsedWithStaticLighting Source code

var(Usage) const bool bUsedWithStaticLighting;

bUsedWithTerrain Source code

var(Usage) const bool bUsedWithTerrain;


Structures Detail

ColorMaterialInput Source code

struct ColorMaterialInput extends MaterialInput
{
var color Constant;
var bool UseConstant;
};


MaterialInput Source code

struct MaterialInput
{
var MaterialExpression Expression;
var int GCC64_Padding;
var int Mask;
var int MaskA;
var int MaskB;
var int MaskG;
var int MaskR;
};


ScalarMaterialInput Source code

struct ScalarMaterialInput extends MaterialInput
{
var float Constant;
var bool UseConstant;
};


Vector2MaterialInput Source code

struct Vector2MaterialInput extends MaterialInput
{
var float ConstantX;
var float ConstantY;
var bool UseConstant;
};


VectorMaterialInput Source code

struct VectorMaterialInput extends MaterialInput
{
var vector Constant;
var bool UseConstant;
};



Defaultproperties

defaultproperties
{
	BlendMode=BLEND_Opaque
	DiffuseColor=(Constant=(R=128,G=128,B=128))
	DiffusePower=(Constant=1.0)
	SpecularColor=(Constant=(R=128,G=128,B=128))
	SpecularPower=(Constant=15.0)
	Distortion=(ConstantX=0,ConstantY=0)
	Opacity=(Constant=1)
	OpacityMask=(Constant=1)
	OpacityMaskClipValue=0.3333
	ShadowDepthBias=0
	TwoSidedLightingColor=(Constant=(R=255,G=255,B=255))
	SubsurfaceInscatteringColor=(Constant=(R=255,G=255,B=255))
	SubsurfaceAbsorptionColor=(Constant=(R=230,G=200,B=200))
	bAllowFog=TRUE
	bUsedWithStaticLighting=FALSE
	bAllowLightmapSpecular=TRUE
	PhysMaterialMaskUVChannel=-1
	D3D11TessellationMode=MTM_NoTessellation
	ImageReflectionNormalDampening=5
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Creation time: ti 22-3-2011 19:56:51.812 - Created with UnCodeX