1. Creating FXHair from curves
Prepare a polygon mesh which will become the scalp, and then draw a starting point curve near the mesh. (Create >> CV curve Tool) you can specify the points on the mesh using a snap function
Generate ‘FXHair’ by selecting the mesh and the curve drawn (multiple available).
(FXHair >> Create Hair)
The newly created curve is the output curve of ‘FXHair’ for the simulation.
The simulation starts when you play the animation.
// Press the ESC key to stop playback.
// hrSimulatorShape1 : FRAME:2 UPD:0 INT:0 LIN:0.018 COL:0 TOT:0.018
// hrSimulatorShape1 : FRAME:3 UPD:0 INT:0 LIN:0.016 COL:0 TOT:0.016
// hrSimulatorShape1 : FRAME:4 UPD:0.001 INT:0 LIN:0.017 COL:0 TOT:0.018
// hrSimulatorShape1 : FRAME:5 UPD:0 INT:0 LIN:0.015 COL:0 TOT:0.015
// hrSimulatorShape1 : FRAME:6 UPD:0 INT:0 LIN:0.019 COL:0 TOT:0.019
// hrSimulatorShape1 : FRAME:7 UPD:0 INT:0 LIN:0.015 COL:0 TOT:0.015
// hrSimulatorShape1 : FRAME:8 UPD:0 INT:0 LIN:0.014 COL:0 TOT:0.014
If the information above is displayed in ‘Script Editor’, it means the simulation is running.
The played frame cache will be saved in the system memory, and then for the second time you play the simulation the saved cache will be read. The cache stored in the system memory can be exported as a cache file from ‘FXHair’.
2. Editing the curve
The input curve provides ‘hrSmiluator’ the original shape of the curve to create the output curve.
Select the output curve ‘hrSimulator1’ from ‘Outliner’ or ‘Viewport’ >> Show >> Show Input Curves
This will display the input curve used for the simulation.
Two curves are shaped different because the output curve is rebuilt as a uniform space of the segment depending on the shape of the input curve. You can adjust the number of the segment from resolution attribute of ‘hrSimulator1’ .
If you want to change the shape of the curve, you, move around the input curve CVs
(However, it wouldn’t react interactive so change the resolution or relative resolution attribute to rebuild it.)
3. Display of the curve
Show/Hide menu is used to display/non-display the curve.
Or changing ‘Intermediate Object’ in ‘Attribute Editor’ can also turn On/Off.
It is also possible to use MEL Script to control the display.
setAttr "curveShape2.intermediateObject" 1;//Hide
setAttr "curveShape2.intermediateObject" 0;//Show
It is more convenient if you use display layers.
4. The main configuration of node
‘Input Curve’ has the original shape of the curve.
‘hrFollicle’ means the follicle. Moving with the scalp to be object will become the starting point of the curve. Also, the Goal Attraction, Bending Stiffness, Interaction Depth attribute can be set independently for each curve.(Override Dynamics)
‘hrProperty’ determines the physical properties of the simulation. Details will be covered later in the tutorial.
‘hrSimulator’ is a (solver) node which determines the rebuilding of the output curve and the properties of hair simulation. Details will be discussed later in the tutorial.
Output curve is the simulated curve.
Written by Sol Kim