Gah - a solution with more questions. – EntropicLqd
Difference between revisions of "UE3:Material properties (UDK)"
(Talk) |
(Talk) |
||
Line 27: | Line 27: | ||
'''Type:''' [[float]] | '''Type:''' [[float]] | ||
− | If BlendMode is BLEND_Masked, the surface is not rendered where OpacityMask < OpacityMaskClipValue. | + | If BlendMode is BLEND_Masked or BLEND_SoftMasked, the surface is not rendered where OpacityMask < OpacityMaskClipValue. |
'''Default value:''' 0.3333 | '''Default value:''' 0.3333 | ||
Line 94: | Line 94: | ||
<!-- enter variable description --> | <!-- enter variable description --> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
====bUsedWithBeamTrails==== | ====bUsedWithBeamTrails==== | ||
Line 117: | Line 107: | ||
'''[[Variables#Modifiers|Modifiers]]:''' const | '''[[Variables#Modifiers|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==== | ====bUsedWithFluidSurfaces==== | ||
Line 131: | Line 121: | ||
'''[[Variables#Modifiers|Modifiers]]:''' const | '''[[Variables#Modifiers|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==== | ====bUsedWithFoliage==== | ||
Line 152: | Line 142: | ||
'''[[Variables#Modifiers|Modifiers]]:''' const | '''[[Variables#Modifiers|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==== | ====bUsedWithInstancedMeshes==== | ||
Line 166: | Line 157: | ||
'''[[Variables#Modifiers|Modifiers]]:''' const | '''[[Variables#Modifiers|Modifiers]]:''' const | ||
− | + | Enables instancing for mesh particles. Use the "Vertex Color" node when enabled, not "MeshEmit VertColor." | |
====bUsedWithLensFlare==== | ====bUsedWithLensFlare==== | ||
Line 215: | Line 206: | ||
'''[[Variables#Modifiers|Modifiers]]:''' const | '''[[Variables#Modifiers|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==== | ====bUsedWithSpeedTree==== | ||
Line 263: | Line 255: | ||
TRUE if Material is the preview material used in the material editor. | TRUE if Material is the preview material used in the material editor. | ||
− | ==== | + | ====bUsedAsSpecialEngineMaterial==== |
'''Type:''' [[bool]] | '''Type:''' [[bool]] | ||
− | '''[[Variables#Modifiers|Modifiers]]:''' | + | '''[[Variables#Modifiers|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==== | ====bUsedWithParticleSystem==== | ||
Line 290: | Line 283: | ||
Use a custom light transfer equation to be factored with light color, attenuation and shadowing. | 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==== | ====CustomSkylightDiffuse==== | ||
Line 295: | Line 290: | ||
Use a custom diffuse factor for attenuation with lights that only support a diffuse term. | Use a custom diffuse factor for attenuation with lights that only support a diffuse term. | ||
− | This is currently used with skylights | + | 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==== | ====DefaultMaterialInstances==== | ||
Line 470: | Line 466: | ||
'''Type:''' [[array]]<{{cl|Texture}}> | '''Type:''' [[array]]<{{cl|Texture}}> | ||
− | '''[[Variables#Modifiers|Modifiers]]:''' private, const | + | '''[[Variables#Modifiers|Modifiers]]:''' deprecated, private, const |
− | + | Legacy texture references, now handled by FMaterial. | |
− | + | ||
====SpecularColor==== | ====SpecularColor==== |
Revision as of 05:24, 17 January 2010
Object >> Surface >> MaterialInterface >> Material (properties) |
Contents
- 1 Properties
- 1.1 Property group 'Material'
- 1.2 Property group 'Translucency'
- 1.3 Property group 'Usage'
- 1.3.1 bUsedAsLightFunction
- 1.3.2 bUsedWithBeamTrails
- 1.3.3 bUsedWithDecals
- 1.3.4 bUsedWithFluidSurfaces
- 1.3.5 bUsedWithFogVolumes
- 1.3.6 bUsedWithFoliage
- 1.3.7 bUsedWithFracturedMeshes
- 1.3.8 bUsedWithGammaCorrection
- 1.3.9 bUsedWithInstancedMeshes
- 1.3.10 bUsedWithInstancedMeshParticles
- 1.3.11 bUsedWithLensFlare
- 1.3.12 bUsedWithMaterialEffect
- 1.3.13 bUsedWithMorphTargets
- 1.3.14 bUsedWithParticleSprites
- 1.3.15 bUsedWithParticleSubUV
- 1.3.16 bUsedWithRadialBlur
- 1.3.17 bUsedWithSkeletalMesh
- 1.3.18 bUsedWithSpeedTree
- 1.3.19 bUsedWithSplineMeshes
- 1.3.20 bUsedWithStaticLighting
- 1.4 Internal variables
- 1.4.1 AnisotropicDirection
- 1.4.2 bIsFallbackMaterial
- 1.4.3 bIsMasked
- 1.4.4 bIsPreviewMaterial
- 1.4.5 bUsedAsSpecialEngineMaterial
- 1.4.6 bUsedWithParticleSystem
- 1.4.7 bUsesDistortion
- 1.4.8 CustomLighting
- 1.4.9 CustomSkylightDiffuse
- 1.4.10 DefaultMaterialInstances
- 1.4.11 DiffuseColor
- 1.4.12 DiffusePower
- 1.4.13 Distortion
- 1.4.14 EditorComments
- 1.4.15 EditorCompounds
- 1.4.16 EditorParameters
- 1.4.17 EditorPitch
- 1.4.18 EditorX
- 1.4.19 EditorY
- 1.4.20 EditorYaw
- 1.4.21 EmissiveColor
- 1.4.22 Expressions
- 1.4.23 FallbackMaterial
- 1.4.24 MaterialResources
- 1.4.25 Normal
- 1.4.26 Opacity
- 1.4.27 OpacityMask
- 1.4.28 PhysicalMaterial
- 1.4.29 ReferencedTextureGuids
- 1.4.30 ReferencedTextures
- 1.4.31 SpecularColor
- 1.4.32 SpecularPower
- 1.4.33 TwoSidedLightingColor
- 1.4.34 TwoSidedLightingMask
- 1.4.35 WorldPositionOffset
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
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 |
|
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
Modifiers: deprecated, private, const
Legacy texture references, now handled by FMaterial.
SpecularColor
Type: ColorMaterialInput
Default value:
Member | Value | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constant |
|
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 |
|
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.