All fur properties to be edited through code must be accessed through the XFur Studio Instance component by accessing the internal XFur Template (the struct containing all the fur properties for said materials) by its material index. The array of XFur Templates inside the XFur Studio Instance is called FurDataProfiles and it should be accessed as follows :
using XFurStudio3; using UnityEngine; public class MyClass:MonoBehaviour{ void Start(){ XFurStudioInstance xfurInstance = GetComponent<XFurStudioInstance>(); int matIndex = 0; //Will print to the console the current length of the fur in the material with index 0 for the //XFurStudioInstance component attached to this GameObject Debug.Log( xfurInstance.FurDataProfiles[matIndex].FurLength ); } }
Below you can find a list of all the accessible properties within each Fur Data Profile element.
Variable Type | Variable Name | Variable’s Purpose |
---|---|---|
bool | CastShadows | Whether this fur material will cast accurate shadows |
bool | ReceiveShadows | Controls the maximum length of the fur |
int | FurSamples | The amount of samples / passes used on this fur material |
float | FurUVTiling | The tiling applied to the Fur Strands map |
float | FurLength | Controls the maximum length of the fur |
float | FurThickness | Controls the thickness of the fur as it goes towards the tips |
float | FurThicknessCurve | Controls the variation of the thickness from root to tips |
float | FurOcclusion | Controls the overall self shadowing / occlusion in the fur |
float | FurOcclusionCurve | Controls the strength of the shadowing over the strand |
float | FurRimPower | Controls the thickness of the rim lighting outline |
float | SelfWindStrength | The local multiplier for the overall wind simulation strength |
float | SkinSmoothness | The smoothness of the “skin” pass on Basic Shell shaders |
Color | FurMainTint | The final tint to be applied to the fur |
Color | FurColorA | The color to be blended by the red channel of the Color Variation Map |
Color | FurColorB | The color to be blended by the green channel of the Color Variation Map |
Color | FurColorC | The color to be blended by the blue channel of the Color Variation Map |
Color | FurColorD | The color to be blended by the alpha channel of the Color Variation Map |
Color | FurShadowsTint | The tint of the occlusion / self-shadowing effect |
Color | FurRim | The color used for the Rim lighting effect |
Color | FurEmissionColor | The color used for the emission channel when Emissive Fur is enabled |
Color | SkinColor | The final tint applied to the “skin” pass of Basic Shells shaders |
Texture | FurColorMap | The texture containing the color to be applied to the fur |
Texture | FurData0 | The texture that controls fur coverage, length, occlusion and thickness |
Texture | FurData1 | The texture that controls fur grooming direction (RGB) and stiffness (A) |
Texture | FurEmissionMap | The texture that controls the emission channel of the fur |
Texture | SkinColorMap | The color map of the “skin” pass on the Basic Shell shaders |
Texture | SkinNormalMap | The normal map of the “skin” pass on the Basic Shell shaders |
XFurStudioStrandsAsset | FurStrandsAsset | The fur generation map (procedural or Texture) stored in an asset |