Navigation
API > API/Plugins > API/Plugins/MetaHumanCoreTechLib
UE API for creating MH Face textures based on the Texture Synthesis module feature set developed in titan
| Name | FMetaHumanFaceTextureSynthesizer |
| Type | class |
| Header File | /Engine/Plugins/MetaHuman/MetaHumanCoreTechLib/Source/MetaHumanCoreTechLib/Public/MetaHumanFaceTextureSynthesizer.h |
| Include Path | #include "MetaHumanFaceTextureSynthesizer.h" |
Syntax
class FMetaHumanFaceTextureSynthesizer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| MetaHumanFaceTextureSynthesizer.h | |||
FMetaHumanFaceTextureSynthesizer
(
const FMetaHumanFaceTextureSynthesizer& InOther |
MetaHumanFaceTextureSynthesizer.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FMetaHumanFaceTextureSynthesizer() |
MetaHumanFaceTextureSynthesizer.h |
Structs
| Name | Remarks |
|---|---|
| FImpl | |
| FTextureSynthesisParams | Parameters for synthesizing a texture from the model |
Enums
Public
| Name | Remarks |
|---|---|
| EMapType | Enum with indices corresponding to the TS model supported maps |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Impl | TPimplPtr< FImpl > | MetaHumanFaceTextureSynthesizer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Clear() |
Releases any memory allocated by the Texture Synthesis object | MetaHumanFaceTextureSynthesizer.h | |
FVector3f GetBodyAlbedoGain
(
const FVector2f& InUV |
Gets the body albedo gain for a given Skin UV value | MetaHumanFaceTextureSynthesizer.h | |
const FMetaHumanFaceTextureAttributeMap & GetFaceTextureAttributeMap() |
Gets the texture attribute map associated with the face texture synthesizer. | MetaHumanFaceTextureSynthesizer.h | |
int32 GetMaxHighFrequencyIndex() |
Get the maximum value for the HF index the model supports | MetaHumanFaceTextureSynthesizer.h | |
FLinearColor GetSkinTone
(
const FVector2f& InUV |
Gets the Skin Tone for a given Skin UV value | MetaHumanFaceTextureSynthesizer.h | |
| Returns the albedo map types that can be synthesized by this model (without input HF maps) | MetaHumanFaceTextureSynthesizer.h | ||
| Returns the normal map types that can be selected by this model | MetaHumanFaceTextureSynthesizer.h | ||
EGammaSpace GetTextureColorSpace() |
Color space of the generated textures | MetaHumanFaceTextureSynthesizer.h | |
ERawImageFormat::Type GetTextureFormat() |
Image format of the generated textures | MetaHumanFaceTextureSynthesizer.h | |
int32 GetTextureSizeX() |
Size of the generated Textures along the first dimension | MetaHumanFaceTextureSynthesizer.h | |
int32 GetTextureSizeY() |
Size of the generated Textures along the second dimension | MetaHumanFaceTextureSynthesizer.h | |
bool Init
(
const FString& InTextureSynthesisFolderPath, |
Initialize the Texture Synthesis object by loading all the necessary model data from the MetaHumanCharacter content InTextureSynthesisFolderPath should point to a folder with the texture synthesis model data as used by the UE data loader InNumThreads is the number of threads to use for each texture synthesis map, pass 0 for single thread synthesis | MetaHumanFaceTextureSynthesizer.h | |
bool IsValid() |
Returns whether the Texture Synthesis object has been initialized and the internal model data are valid | MetaHumanFaceTextureSynthesizer.h | |
FVector2f ProjectSkinTone
(
const FLinearColor& InSkinTone, |
Projects a skin tone to the texture model and returns the Skin UV Value The returned UV value is clamped to [0,1] if the input skin tone is projected outside the bounds what the texture model can represent. | MetaHumanFaceTextureSynthesizer.h | |
bool SelectCavity
(
int32 HighFrequencyIndex, |
Select the cavity texture map to be used for this HF index OutCavityImage should be pre-allocated with the appropriate size and format | MetaHumanFaceTextureSynthesizer.h | |
bool SelectNormal
(
const FTextureSynthesisParams& InTextureSynthesisParams, |
Select a normal texture map based on the input parameters OutNormalImage should be pre-allocated with the appropriate size and format | MetaHumanFaceTextureSynthesizer.h | |
bool SynthesizeAlbedo
(
const FTextureSynthesisParams& InTextureSynthesisParams, |
Synthesize an albedo texture map with the input parameters and store in the passed ImageView object OutAlbedoImage should be pre-allocated with the appropriate size and format | MetaHumanFaceTextureSynthesizer.h | |
bool SynthesizeAlbedoWithHF
(
const FTextureSynthesisParams& InTextureSynthesisParams, |
Synthesize an albedo texture map using the input HF maps OutAlbedoImage should be pre-allocated with the same target resolution of the input HFMap and this model output format | MetaHumanFaceTextureSynthesizer.h |