Class in XFurStudio.Core. Used for dynamic painting and styling at runtime and in the Editor.
Methods
LoadPaintResources
void LoadPaintResources( )
Loads all the necessary resources to paint and edit the fur at runtime, including all color mixing and 3D painting shaders.
Groom
void Groom( XFurStudioInstance target, int matIndex, Vector3 brushCenter, Vector3 brushNormal, float brushSize, float brushOpacity, float brushHardness, Vector3 groomDirection, bool invert = false )
Parameter |
Description |
XFurStudioInstance target |
The XFur Studio Instance we will be grooming |
int matIndex |
The fur material that we will be applying the grooming effect to |
Vector3 brushCenter |
The center in world space coordinates of the virtual 3D brush |
Vector3 brushNormal |
The direction in which the brush is “looking” or being applied |
float brushSize |
The size of the brush, its radius as a 3D sphere |
float brushOpacity |
The opacity of the brush. Affects the strength of the effect |
float brushHardness |
The hardness of the brush. Makes the strength of the effect more or less uniform when going from the center to the outer portion of the brush |
Vector3 groomDirection |
The direction in which the brush is moving, in world space coordinates |
bool invert |
Whether the effect should be inverted (grooming should be removed instead of being applied over the fur) |
Allows dynamic grooming of the fur of an XFur Studio instance through code at runtime. For implementations of this function you can look at the XFur Studio™ Designer code or, for a more runtime-oriented application, to the XFur Painter Object source code.
Paint
void Paint( XFurStudioInstance target, PaintDataMode painterMode, int matIndex, Vector3 brushCenter, Vector3 brushNormal, float brushSize, float brushOpacity, float brushHardness, Color brushColor )
Parameter |
Description |
XFurStudioInstance target |
The XFur Studio Instance we will be grooming |
PaintDataMode painterMode |
Enum indicating the kind of value that will be painted into the fur |
int matIndex |
The fur material that we will be applying the grooming effect to |
Vector3 brushCenter |
The center in world space coordinates of the virtual 3D brush |
Vector3 brushNormal |
The direction in which the brush is “looking” or being applied |
float brushSize |
The size of the brush, its radius as a 3D sphere |
float brushOpacity |
The opacity of the brush. Affects the strength of the effect |
float brushHardness |
The hardness of the brush. Makes the strength of the effect more or less uniform when going from the center to the outer portion of the brush |
Color brushColor |
The color of the brush we will be painting with |
Allows dynamic data painting for the different fur property maps of an XFur Instance using a virtual world space based brush. For implementations of this function you can look at the XFur Studio™ Designer code or, for a more runtime-oriented application, to the XFur Painter Object source code.