UGroomAsset

Implements an asset that can be used to store hair strands

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

HairStrandsCore

Header

/Engine/Plugins/Runtime/HairStrands/Source/HairStrandsCore/Public/GroomAsset.h

Include

#include "GroomAsset.h"

Syntax

UCLASS(BlueprintType, AutoExpandCategories=("HairRendering", "HairPhysics", "HairInterpolation"),
       HideCategories=(Object, "Hidden"))
class UGroomAsset :
    public UObject,
    public IInterface_AssetUserData

Remarks

Implements an asset that can be used to store hair strands

Variables

Name Description

Public variable UProperty Category instanced, visibleanywhere

TObjectPtr< cla...

 

AssetImportData

Asset data to be used when re-importing

Public variable UProperty Category, EditAnywhere, AdvancedDisplay instanced

TArray< TObject...

 

AssetUserData

Array of user data stored with the asset

Public variable UProperty Category, EditAnywhere, AdvancedDisplay

FPerPlatformBoo...

 

DisableBelowMinLodStripping

When true all LODs below MinLod will still be cooked

Public variable UProperty

TArray< float >

 

EffectiveLODBias

The LOD bias to use after LOD stripping, regardless of MinLOD. Computed at cook time

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite editfixedsize

bool

 

EnableGlobalInterpolation

Enable radial basis function interpolation to be used instead of the local skin rigid transform

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

TArray< FHairGr...

 

HairGroupsCards

Cards - Source description data

Public variable

TArray< FHairGr...

 

HairGroupsData

Store strands/cards/meshes data

Public variable UProperty Category, EditAnywhere, Meta Transient editfixedsize

TArray< FHairGr...

 

HairGroupsInfo

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite editfixedsize

TArray< FHairGr...

 

HairGroupsInterpolation

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite editfixedsize

TArray< FHairGr...

 

HairGroupsLOD

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

TArray< FHairGr...

 

HairGroupsMaterials

Meshes - Source description data

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

TArray< FHairGr...

 

HairGroupsMeshes

Meshes - Source description data

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite editfixedsize

TArray< FHairGr...

 

HairGroupsPhysics

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite editfixedsize

TArray< FHairGr...

 

HairGroupsRendering

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite editfixedsize

EGroomInterpola...

 

HairInterpolationType

Type of interpolation used

Public variable UProperty Category, EditAnywhere, Meta

FPerPlatformInt

 

MinLOD

Minimum LOD to cook

Public variable

FOnGroomAssetCh...

 

OnGroomAssetChanged

Private :

Public variable

FOnGroomAssetRe...

 

OnGroomAssetResourcesChanged

Public variable

FOnGroomAsyncLo...

 

OnGroomAsyncLoadFinished

Constructors

Name Description

Public function

UGroomAsset

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

bool

 

AreGroupsValid()

Public function

bool

 

BuildCardsGeometry()

Public function

bool

 

BuildMeshesGeometry()

Public function

bool

 

CacheCardsGeometry

(
    uint32 GroupIndex,
    const FString& StrandsKey
)

Public function

bool

 

CacheDerivedData

(
    uint32 GroupIndex
)

Caches the computed (group) groom data with the given build settings from/to the Derived Data Cache, building it if needed.

Public function

bool

 

CacheDerivedDatas()

Caches the computed (group) groom data with the given build settings from/to the Derived Data Cache, building it if needed.

Public function

bool

 

CacheMeshesGeometry

(
    uint32 GroupIndex
)

Public function

bool

 

CacheStrandsData

(
    uint32 GroupIndex,
    FString& OutDerivedDataKey
)

Public function Const

bool

 

CanRebuildFromDescription()

Returns true if the asset has the HairDescription needed to recompute its groom data

Public function

void

 

CommitHairDescription

(
    FHairDescription&& HairDescription
)

Commits a HairDescription to buffer for serialization

Public function

void

 

CreateDebugData()

Public function

uint8

 

GenerateClassStripFlags

(
    FArchive& Ar
)

Public function Const

EGroomBindin...

 

GetBindingType

(
    int32 GroupIndex,
    int32 LODIndex
)

Public function

FString

 

GetDerivedDataKey()

Public function

FString

 

GetDerivedDataKeyForCards

(
    uint32 GroupIt,
    const FString& StrandsKey
)

Public function

FString

 

GetDerivedDataKeyForMeshes

(
    uint32 GroupIndex
)

Public function

FString

 

GetDerivedDataKeyForStrands

(
    uint32 GroupIndex
)

Public function Const

EGroomGeomet...

 

GetGeometryType

(
    int32 GroupIndex,
    int32 LODIndex
)

Public function

bool

 

GetHairCardsGuidesDatas

(
    const int32 GroupIndex,
    const int32 LODIndex,
    FHairStrandsDatas& OutCardsGuidesD...
)

Public function Const

FHairDescrip...

 

GetHairDescription()

Public function

bool

 

GetHairStrandsDatas

(
    const int32 GroupIndex,
    FHairStrandsDatas& OutStrandsData,
    FHairStrandsDatas& OutGuidesData
)

Get/Build render & guides data based on the hair description and interpolation settings

Public function Const

int32

 

GetLODCount()

Public function Const

int32

 

GetMaterialIndex

(
    FName MaterialSlotName
)

Return the material slot index corresponding to the material name

Public function Const

TArray< FNam...

 

GetMaterialSlotNames()

Public function Const

int32

 

GetNumHairGroups()

Public function

FOnGroomAsse...

 

GetOnGroomAssetChanged()

Public function

FOnGroomAsse...

 

GetOnGroomAssetResourcesChanged()

Public function

FOnGroomAsyn...

 

GetOnGroomAsyncLoadFinished()

Public function Const

bool

 

HasDebugData()

Debug data for derived asset generation (strands textures, ...).

Public function Const

bool

 

HasGeometryType

(
    uint32 GroupIndex,
    EGroomGeometryType Type
)

Public function Const

bool

 

HasGeometryType

(
    EGroomGeometryType Type
)

Public function

void

 

InitCardsResources()

Public function

void

 

InitGuideResources()

Public function

void

 

InitMeshesResources()

Public function

void

 

InitResources()

Initialize/Update/Release resources.

Public function

void

 

InitStrandsResources()

Public function Const

bool

 

IsGlobalInterpolationEnable

(
    int32 GroupIndex,
    int32 LODIndex
)

Public function Const

bool

 

IsMaterialSlotNameValid

(
    FName MaterialSlotName
)

Public function Const

bool

 

IsMaterialUsed

(
    int32 MaterialIndex
)

Public function Const

bool

 

IsSimulationEnable

(
    int32 GroupIndex,
    int32 LODIndex
)

Public function Const

bool

 

IsSimulationEnable()

Public function Const

bool

 

IsValid()

Public function Const

bool

 

IsVisible

(
    int32 GroupIndex,
    int32 LODIndex
)

Public function

void

 

MarkMaterialsHasChanged()

Public function Const

bool

 

NeedsInterpolationData

(
    int32 GroupIndex
)

Public function Const

bool

 

NeedsInterpolationData()

Public function

void

 

ReleaseCardsResource

(
    uint32 GroupIndex
)

Public function

void

 

ReleaseGuidesResource

(
    uint32 GroupIndex
)

Public function

void

 

ReleaseMeshesResource

(
    uint32 GroupIndex
)

Public function

void

 

ReleaseResource()

Public function

void

 

ReleaseStrandsResource

(
    uint32 GroupIndex
)

Public function

void

 

SaveProceduralCards

(
    uint32 CardsGroupIndex
)

Save out a static mesh based on generated cards.

Public function

void

 

SetHairWidth

(
    float Width
)

Public function

void

 

SetNumGroup

(
    uint32 InGroupCount,
    bool bResetGroupData
)

Public function

void

 

SetScatterSceneLighting

(
    bool Enable
)

Public function

void

 

SetStableRasterization

(
    bool bEnable
)

Helper functions for setting options on all hair groups.

Public function

void

 

StripLODs

(
    const TArray< int32 >& LODsToKeep,
    bool bRebuildResources
)

Public function

void

 

UpdateCachedSettings()

Public function

void

 

UpdateHairGroupsInfo()

Public function

void

 

UpdateResource()

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual Const

void

 

GetAssetRegistryTags

(
    TArray< FAssetRegistryTag >& OutTa...
)

Retrievde the asset tags

Public function Virtual

void

 

GetResourceSizeEx

(
    FResourceSizeEx& CumulativeResourc...
)

Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific).

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Part of Uobject interface

Public function Virtual

void

 

PostInitProperties()

Part of Uobject interface

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

PreSave

(
    FObjectPreSaveContext SaveContext
)

Presave function.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Overridden from IInterface_AssetUserData

Name Description

Public function Virtual

void

 

AddAssetUserData

(
    UAssetUserData* InUserData
)

Public function Virtual Const

const TArray...

 

GetAssetUserDataArray()

Public function Virtual

UAssetUserDa...

 

GetAssetUserDataOfClass

(
    TSubclassOf< UAssetUserData > InUse...
)

Public function Virtual

void

 

RemoveUserDataOfClass

(
    TSubclassOf< UAssetUserData > InUse...
)

Enums

Name

Description

Public enum

EClassDataStripFlag

Typedefs

Name

Description

FOnGroomAssetChanged

Notification when anything changed

FOnGroomAssetResourcesChanged

FOnGroomAsyncLoadFinished

Deprecated Functions

Name Description

Public function Virtual

void

 

PreSave

(
    const ITargetPlatform* TargetP...
)

Use version that takes FObjectPreSaveContext instead.