Open 3D Engine AtomTressFX Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AMD::TressFXAsset Class Reference

Public Member Functions

bool LoadHairData (FILE *ioObject)
 
bool GenerateFollowHairs (int numFollowHairsPerGuideHair=0, float tipSeparationFactor=0, float maxRadiusAroundGuideHair=0)
 
bool ProcessAsset ()
 
void GetBonesNames (FILE *ioObject, std::vector< std::string > &boneNames)
 
bool LoadBoneData (FILE *ioObject, std::vector< int32_t > skeletonBoneIndices)
 
bool LoadCombinedHairData (AZ::Data::AssetDataStream *stream)
 
bool LoadHairData (AZ::Data::AssetDataStream *stream)
 
void GetBonesNames (AZ::Data::AssetDataStream *stream, std::vector< std::string > &boneNames)
 
bool LoadBoneData (AZ::Data::AssetDataStream *stream)
 
AMD::uint32 GetNumHairSegments ()
 
AMD::uint32 GetNumHairTriangleIndices ()
 
AMD::uint32 GetNumHairLineIndices ()
 
bool GenerateLocaltoGlobalHairBoneIndexLookup (const BoneNameToIndexMap &globalBoneIndexMap, LocalToGlobalBoneIndexLookup &outLookup)
 
bool GenerateLocaltoGlobalCollisionBoneIndexLookup (const BoneNameToIndexMap &globalBoneIndexMap, LocalToGlobalBoneIndexLookup &outLookup)
 

Public Attributes

std::vector< Vector3m_positions
 
std::vector< AMD::float2m_strandUV
 
std::vector< AMD::float4m_tangents
 
std::vector< Vector3m_followRootOffsets
 
std::vector< AMD::int32 > m_strandTypes
 
std::vector< AMD::real32 > m_thicknessCoeffs
 
std::vector< AMD::real32 > m_restLengths
 
std::vector< AMD::int32 > m_triangleIndices
 
std::vector< TressFXBoneSkinningDatam_boneSkinningData
 
std::vector< std::string > m_boneNames
 
AMD::int32 m_numTotalStrands
 
AMD::int32 m_numTotalVertices
 
AMD::int32 m_numVerticesPerStrand
 
AMD::int32 m_numGuideStrands
 
AMD::int32 m_numGuideVertices
 
AMD::int32 m_numFollowStrandsPerGuide
 
std::unique_ptr< TressFXCollisionMeshm_collisionMesh
 

Member Function Documentation

◆ GetBonesNames()

void AMD::TressFXAsset::GetBonesNames ( FILE *  ioObject,
std::vector< std::string > &  boneNames 
)

Given the *.tfxbon file that contains bones hair skinning data, this method returns the used bones names array of the current hair object so it can be matched with the skeleton bones names to get the indices in the global skeleton array.

◆ LoadBoneData()

bool AMD::TressFXAsset::LoadBoneData ( FILE *  ioObject,
std::vector< int32_t >  skeletonBoneIndices 
)

Given the bones hair skinning data file and the pairing local indices to skeleton indices array, this method convert all bones indices per vertex and creates the skinning data array.


The documentation for this class was generated from the following file: