logo

Hifer

UE Plugin HumanOkGenerator

 

 

●Link

1.  Demo video               YouTube BiliBili

2.  Demo project Ue5.2  Google Drive

3.  Plugins Ue5.0-Ue5.5 Google Drive

 

 

 

●Support

1.  Unreal Engine versions: Ue5.0-5.5 , If you need a different Unreal Engine version or Unreal Engine source code version, please contact us by email

2.  Platform: Windows, Android. If you need Ios, please contact us by email

3.  Runtime mode, Support packaging

4.  Now server location China, USA, Europe. And in the future we will support Russia, Japan, Korea, India, etc.

 

 

 

●Advantages of plugin

1.  Easy to use

2.  Runtime mode, Support packaging

3.  Comes with binding and blendshapes(morph targets)

4.  3D topological structure that conforms to art, Such as metahuman and so on

5.  Fast speed, Less than 20 seconds

6.  Getting cheaper and cheaper

 

 

 

●Credits for plugin

Item

Basic Head Generation

With Hair Sparse

With Hair Normal

With Hair Thick

Albedo Texture

Credits(each time)

39

5

7

10

1

 

 

 

●Features of plugin

1.  1 to 3 images to generate a 3d head model

2.  Image generation 3d hair

3.  Random generate

4.  Export the generated 3d model to a local disk

5.  Load the generated 3d model from a local disk

6.  Import Images

7.  Albedo texture generation

8.  Complete texture using diffusion model(To be developed)

9.  Support cartoon style input(To be developed)

10.  Generate hair from multiple images(To be developed)

11.  Generate 3d model from text(To be developed)

 

 

 

●Conditions for plugins

1.  You need to buy the right to use the plugin

2.  The SkeletalMesh that needs to be generated in UnrealEngine can only have Metahuman Lod0, Cannot include other Lods, And the UV is MetaHumanLod0's UV

 

 

 

 

●Blueprint node

1.  GenerateInit:  Initialize plugins and create plugin object, Global initialization can only be performed once, Multiple executions can cause a crash

 

 

Input

 

 

 

 

Account

FString

https://hifer.ai/account Your Account

 

SecretKey

FString

https://hifer.ai/account Your SecretKey

 

MeshType

Enum

Ignore

 

SaveInProject

Bool

If true, the 3D head generated each time will be saved to your project's saved/HumanOkGenerator folder

Output

 

 

 

 

Target

UObject

Plugin object

 

Return Message

FString

Server return message

 

Return Success

Bool

Whether the initialization was successful

 

 

2.  ImportImages:  Import JPG/PNG images from local disk

 

 

Input

 

 

 

 

Paths

FString

Absolute path of local disk image

Output

 

 

 

 

Return Value

TArray<Texture2D*>

Return the image type in Ue

 

 

3.  GenerateByImage:  Generate a model from a Texture2D * array containing facial information from various angles (up to 3 images)

 

 

Input

 

 

 

 

Target

UObject

Plugin object

 

Images

TArray<Texture2D*>

Texture2D* array containing facial information input

 

TargetMesh

SkeletalMesh*

The MetahuanLod0 head SkeletalMesh that needs to be deformed, Face is the Metahuan head SkeletalMesh component

 

MaterialSlotsIndex

 

The index in MaterialSlotsIdex needs to correspond to the order of Metahuman material slots, If your Metahuman is not an official standard Metahuman, The material slot order may not match the MaterialSlotsIdex, In this case, just change the index in the MaterialSlotsIndex to your MetaHuman material slot index, If the corresponding index of MaterialSlotsIndex does not exist, So this non-existent index must be written as -1

 

 

 

MorphSetting

 

Set morph parameters

MorphName

FName

Morph target name of the generated new face , There can be multiple new faces on a SkeletalMesh

UseTeethMorph

Bool

Whether or not to use teeth morph

UseEyeMorph

Bool

Whether or not to use eye morph

TeethOffset

FVector3f

Set the relative offset of the teeth

EyeLOffset

FVector3f

Set the relative offset of the left eye

EyeROffset

FVector3f

Set the relative offset of the right eye

 

 

 

RequestSetting

 

Set request parameters

SymmetryType

int32

Whether to generate a symmetric model about the X-axis, 0 asymmetry, 1 symmetry

UseSmooth

int32

Whether to generate a smooth model, 0 smooth, 1 detail model

KeepMouth

int32

Whether to keep the mouth shape, 0 keep, 1 the mouth closed

HaveBrow

int32

Whether the texture has eyebrows, 0 with, 1 without eyebrows

FillType

int32

Fill the map type, which will be canceled when the diffusion model comes out

AlbedoType

int32

Albedo texture, 0 disable, 1 albedo, 2 raw

WithHair

int32

Hair density, 0 bald, 1 sparse, 2 normal, 3 thick

 

 

Output

 

 

 

 

Proccess Message

FString

Current generation progress

 

Return Message

FString

Server return message

 

Return Success

Bool

Whether the current generation was successful

 

Return Result

 

Current generated result

MorphName

FName

Name of morph target in MorphSetting

Textures

TMap<FString, UTexture2D*>

The generated texture, input the Key to obtain the corresponding texture, where the Key includes {"headColor", "headNormal", "hairColor", "hairNormal", "eyeColorL", "eyeColorR"}, etc

Meshs

TMap<FString, FHGMeshData>

The generated model, input the Key to obtain the corresponding model, where the Key contains {"hairObj"}

Locations

TMap<FString, FVector3f>

The offset of the eyes/teeth relative to the initial model is obtained by inputting the Key, where the Key contains {"eyeL", "eyeR",”teeth”}

 

 

 

 

4.  FileExport:  Export generated 3d model resources from engine memory to local disk

 

 

Input

 

 

 

 

Target

UObject

Plugin object

 

Path

FString

Need to save the absolute path of model resources on the local disk

Output

 

 

 

 

 

 

 

 

 

5.  FileLoad, GenerateByFile:  Runtime import of models into the engine from the save path of ExportFile, Two nodes implement local import, Or you can create a LoadFileResult struct, And implementing network loading through FileGenerate node, It's no longer local

 

 

Input

 

 

 

LoadFile

Path

 

Need to load the absolute path of model resources on the local disk

FileGenrate

LoadFileResult

 

 

FHOGBinaryData

TArray<uint8>

File binary data, You can use Ue's own function FFileHelper::LoadFileToArray() to load the file, And get TArray<uint8>

TextureFiles

TMap<FString, FHOGBinaryData>

Texture name, Texture binary data

ObjFiles

TMap<FString, FString>

Obj name, Obj str data

FbxFiles

TMap<FString, FHOGBinaryData>

Fbx name, Fbx binary data, It can be empty

MtlFiles

TMap<FString, FString>

Mtl name, Mtl str data, It can be empty

 

 

 

Other

 

Same parameters as above

 

 

6.  GenrateStop:  Stop generation

 

 

7.  RemoveAllMorphTargets:  Removed the All MorphTarges generated by the HumanOkGenerator plugin. In editor mode, when exiting play mode, It is called to reduce editor crashes caused by plugins, Especially in the Animation Blueprints. In editor mode, you should execute this node when exiting play or exiting debug mode. Do not execute in the game, as this will cause the generate to fail. But if not executed, it will also cause crashes(such as in Animation Blueprints)

 

 

8.  GenerateByRandom:  Random generate

 

 

Input

 

 

 

 

RequestSetting

 

 

SymmetryType

int32

Whether to generate a symmetric model about the X-axis, 0 asymmetry, 1 symmetry

HaveBrow

int32

Whether the texture has eyebrows, 0 with, 1 without eyebrows

Gender

int32

0, 1

TopModel

int32

0, 1, 2, 3

 

 

 

Other

 

Same parameters as above

 

 

 

●Demo

1.  The face compoent is Metahuman's default face compoent

 

 

2.  Note:

SetMorphTarget Value :   After packaging, If the value remains unchanged, this node will not work, So a random result around 1 needs to be set

RemoveAllMorphTarget:  This node is best used when the main level exits Play, But now it is only for demonstration purposes

 

 

 

 

●With Hair

1.  Hair Material

 

 

2.  Set With Hair

 

 

 

3.  Hair Blueprint

 

 

4.  Add a socket to the skeleton of the head, And modify the socket position to the center of the world

    After creating a socket, You can use the GetSocketTransform node to get location data, The data can be used to set the RelativeLocation, But the data on the y and z axes need to be exchanged with each other, then the Z value * -1, RelativeRotation X set -90

 

 

 

 

 

 

●The plugin cause crashes in editor mode

1.  This is an editor-only problem, but it runs just fine once packaged, You can set Use GPU for commputing morph targets false and restart your project, This avoids a crash under the editor. But when you're packing, you need to set Use GPU for commputing morph targets true, If it is not true, the morph on the SkeletalMesh will not work.

 

 

2.  When runtime in editor mode, If you have open an Animation / Animation Blueprint window, At this point, when you use the plugin to generate operations, it may crash. So when you use the generation function of this plugin, You need to close all the windows of the Animations / Animation Blueprints.

 

 

 

3.  If you use the plugin, When you reimport a SkeletalMesh, you need to save the project and then restart it, otherwise it may crash

 

 

 

●Eye rotation is not at the center point

To solve this problem, it is best to import MetaHuman from Fbx instead of using MetaHuman Ue assets. Then turn off UseEyeMorph, and finally use “eyeL” and “eyeR” values to set the corresponding joints offset in the Animation Blueprint

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

    HumanOkGenerator Unreal Engine Skeletal Mesh Plugin | Hifer