Navigation
API > API/Developer > API/Developer/MaterialUtilities
Inheritance Hierarchy
- IModuleInterface
- FMaterialUtilities
References
| Module | MaterialUtilities |
| Header | /Engine/Source/Developer/MaterialUtilities/Public/MaterialUtilities.h |
| Include | #include "MaterialUtilities.h" |
Syntax
class FMaterialUtilities : public IModuleInterface
Remarks
Material utilities
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AnalyzeMaterial
(
UMaterialInterface* InMaterial, |
||
| void | AnalyzeMaterial
(
UMaterialInterface* InMaterial, |
Analyzes given material to determine how many texture coordinates and whether or not vertex colors are used within the material Graph | |
| float | ComputeRequiredTexelDensityFromDrawDistance
(
const float InDrawDistance, |
Compute the required texel density needed to properly represent an object/objects covering the provided world space radius | |
| float | ComputeRequiredTexelDensityFromScreenSize
(
const float InScreenSize, |
Compute the required texel density needed to properly represent an object/objects covering the provided world space radius | |
| UMaterialInstanceConstant * | CreateFlattenMaterialInstance
(
UPackage* InOuter, |
Creates a flatten material instance and the required texture assets | |
| FFlattenMaterial | CreateFlattenMaterialWithSettings
(
const FMaterialProxySettings& InMaterialLODSettings |
Creates a FFlattenMaterial instance with the given MaterialProxySettings data | |
| UMaterialInstanceConstant * | CreateInstancedMaterial
(
UMaterialInterface* BaseMaterial, |
Creates an instanced material based of BaseMaterial | |
| UMaterial * | CreateMaterial
(
const FFlattenMaterial& InFlattenMaterial, |
Creates UMaterial object from a flatten material | |
| UMaterialInterface * | CreateProxyMaterialAndTextures
(
const FString& PackageName, |
Creates a proxy material and the required texture assets | |
| UMaterialInterface * | CreateProxyMaterialAndTextures
(
UPackage* OuterPackage, |
Creates a proxy material and the required texture assets | |
| UTexture2D * | CreateTexture
(
UPackage* Outer, |
Generates a texture from an array of samples | |
| UTexture2D * | Generates a texture from an array of samples | ||
| void | DetermineMaterialImportance
(
const TArray< UMaterialInterface* >& InMaterials, |
Calculates an importance value for the given set of materials according to the texture sampler usage | |
| bool | ExportBaseColor
(
ULandscapeComponent* LandscapeComponent, |
Creates bakes textures for a ULandscapeComponent | |
| bool | ExportLandscapeMaterial
(
const ALandscapeProxy* InLandscape, |
Flattens specified landscape material | |
| bool | ExportLandscapeMaterial
(
const ALandscapeProxy* InLandscape, |
Flattens specified landscape material | |
| bool | ExportMaterialUVDensities
(
UMaterialInterface* InMaterial, |
Get the material texcoord scales applied on each textures | |
| FIntPoint | FindMaxTextureSize
(
UMaterialInterface* InMaterialInterface, |
End IModuleInterface implementation Iterate through all textures used by the material and return the maximum texture resolution used | |
| void | GeneratedBinnedTextureSquares
(
const FVector2D DestinationSize, |
Generates a set of texture boxes according to the given weights and final atlas texture size | |
| FString | GetFlattenMaterialTextureName
(
EFlattenMaterialProperties InProperty, |
Get the name of the Texture parameter associated with a given flatten material property | |
| int32 | GetTextureSizeFromTargetTexelDensity
(
const UE::Geometry::FDynamicMesh3& Mesh, |
Compute the required texture size to achieve a target texel density for the given mesh. | |
| int32 | GetTextureSizeFromTargetTexelDensity
(
const FMeshDescription& InMesh, |
Compute the required texture size to achieve a target texel density for the given mesh. | |
| int32 | GetTextureSizeFromTargetTexelDensity
(
double InMesh3DArea, |
Compute the required texture size to achieve a target texel density, given the world to UV space ratio. | |
| bool | IsValidFlattenMaterial
(
const UMaterialInterface* InBaseMaterial |
Validate that the provided material has all the required parameters needed to be considered a flattening material | |
| void | OptimizeFlattenMaterial
(
FFlattenMaterial& InFlattenMaterial |
Tries to optimize the flatten material's data by picking out constant values for the various properties | |
| void | OptimizeSampleArray
(
TArray< FColor >& InSamples, |
Tries to optimize the sample array (will set to const value if all samples are equal) | |
| void | RemapUniqueMaterialIndices
(
const TArray< struct FSectionInfo >& InSections, |
Remaps material indices where possible to reduce the number of materials required for creating a proxy material | |
| void | ResizeFlattenMaterial
(
FFlattenMaterial& InFlattenMaterial, |
Resizes flatten material's data if applicable by comparing it with the original settings |
Overridden from IModuleInterface
| Type | Name | Description | |
|---|---|---|---|
| void | Called before the module is unloaded, right before the module object is destroyed. | ||
| void | Begin IModuleInterface implementation |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FExportErrorManager | Contains errors generated when exporting material texcoord scales. |
Constants
| Name | Description |
|---|---|
| CurrentlyRendering | Flag to indicate whether or not a texture is currently being rendered out |
| RenderTargetPool | Pool of available render targets, cached for re-using on consecutive property rendering |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | SupportsExport
(
EBlendMode InBlendMode, |
Use SupportsExport(bool bIsOpaque, ...) function instead | |
| bool | SupportsExport
(
bool bIsOpaque, |
Use SupportsExport(bool bIsOpaque, ...) function instead |