Méthode | Description | |
---|---|---|
CreateBoundingSphere ( ) : void |
Implicitly initializes the bounding sphere. Calculates the bounding sphere automatically
|
|
CreateIndices ( ) : void |
Implicitly initializes the indices of this hair. This calculates the indices automatically
|
|
CreateUVs ( ) : void |
UV-Maps the hair. The uv-coordinates will look like this: { STRAND_INDEX / STRAND_COUNT, VERTEX_INDEX / VERTEX_COUNT_IN_STRAND, 0, 0 }
|
|
Export ( HairFormat format, string path ) : void |
Exports this hair to the given file format output.
|
|
Export ( IHairFormat format, string path ) : void |
Exports this hair to the given file format class instance.
|
|
GenerateFollowHairs ( int followHairsPerGuidanceHair, float maxRadiusAroundGuideHair ) : void |
Performs follow hair generation. If a hair file gets imported from a "not-tressfx" format like ase every hair will be set to be a guidance hair. With this functions its possible to generate hairs which will not get simulated, but moved along their guidance hair. This can get used to make hair more dense without simulation overhead.
|
|
Import ( HairFormat format, string path, TressFXLib.HairImportSettings importSettings = null ) : |
Loads / imports hair from the given file with given format.
|
|
InitializeBoundingSphere ( System.Vector3 center, float radius ) : void |
Explicitly initializes the bounding sphere. Only used if the bounding sphere is loaded on import, for example in tfxb.
|
|
InitializeIndices ( int lineIndices, int triangleIndices ) : void |
Explicitly initialized the indices of this hair. This function is only used if the indices are imported with the hair data, for example in tfxb. Only initialize them manually if you know what you are doing. They will get generated automatically in the getter functions.
|
|
InitializeSimulationData ( TressFXLib.HairSimulationData hairSimulationData ) : void |
Explicitly initializes the simulation data. This is used in for example the tressfx binary importer.
|
|
NormalizeStrands ( int normalizedVertexCount ) : void |
This function is used to make sure that every hair strand has the same vertex position. It uses linear interpolation in order to do so. After calling this, the simulation data must get reprepared, because the hair vertices will get reset.
|
|
PrepareSimulationParamatersAssetConverter ( int followHairs, float maxRadiusAround, string assetConverterExePath ) : |
TEMPORARY FUNCTION! THIS WILL GET REMOVED IN THE NEAR FUTURE! Prepares the simulation parameters by using a binary executable of the assetconverter from amd. Will return a new hair instance!
|
|
PrepareSimulationParameters ( ) : void |
This function will get used by importers for example if there were only strand vertex positions available. It will calculate everything inside of the HairStrand and HairStrandVertex based off the vertex positions. It also calculates the bounding sphere parameters.
|
|
SetHairMesh ( int index, |
Sets the given hairmesh into the given index. NOTE: TressFX only supports indices 0-3 (so max. 4 meshes).
|
|
SimulationPrecheck ( ) : bool |
Returns true if the hair strands are all having a vertex count of 16. Developer Note: This will may get extended later on in order to do more advanced checks if simulation will run correctly.
|
Méthode | Description | |
---|---|---|
BranchingAvoidance ( uint threadGroupSize = 64 ) : void |
This is called in PrepareSimulationParameters(). It may deletes some hairs in order to avoid branching in the compute shader.
|
|
CreateHairSimulationData ( ) : TressFXLib.HairSimulationData |
Creates a new HairSimulationData object and fills it with data from this hair's hair meshes. It can get used to "easy-export" tressfx-ready data-arrays from hair objects.
|
public Export ( HairFormat format, string path ) : void | ||
format | HairFormat | |
path | string | |
Résultat | void |
public Export ( IHairFormat format, string path ) : void | ||
format | IHairFormat | |
path | string | |
Résultat | void |
public GenerateFollowHairs ( int followHairsPerGuidanceHair, float maxRadiusAroundGuideHair ) : void | ||
followHairsPerGuidanceHair | int | |
maxRadiusAroundGuideHair | float | |
Résultat | void |
public static Import ( HairFormat format, string path, TressFXLib.HairImportSettings importSettings = null ) : |
||
format | HairFormat | |
path | string | |
importSettings | TressFXLib.HairImportSettings | |
Résultat |
public InitializeBoundingSphere ( System.Vector3 center, float radius ) : void | ||
center | System.Vector3 | |
radius | float | |
Résultat | void |
public InitializeIndices ( int lineIndices, int triangleIndices ) : void | ||
lineIndices | int | |
triangleIndices | int | |
Résultat | void |
public InitializeSimulationData ( TressFXLib.HairSimulationData hairSimulationData ) : void | ||
hairSimulationData | TressFXLib.HairSimulationData | |
Résultat | void |
public NormalizeStrands ( int normalizedVertexCount ) : void | ||
normalizedVertexCount | int | |
Résultat | void |
public PrepareSimulationParamatersAssetConverter ( int followHairs, float maxRadiusAround, string assetConverterExePath ) : |
||
followHairs | int | |
maxRadiusAround | float | |
assetConverterExePath | string | |
Résultat |
public PrepareSimulationParameters ( ) : void | ||
Résultat | void |
public SetHairMesh ( int index, |
||
index | int | |
mesh | ||
Résultat | void |