GROOM WORKFLOW

Houdini 19.5.403


EXAMPLE .HIP FILE CLICK TO DOWNLOAD


I apologize for the inconvenience - I have an Indie license at the time, if you have access to a full commercial license you can request to support@sidefx.com to convert to .hip instead of current .hiplc, and then you can save the subnets included in the file as .hda instead of .hdalc. The tools are very simple but I’ve found that I’ve needed to reuse them repeatedly for groom creation and Vellum during my experience at different studios, do feel free to make any changes or improvements as needed.
———————————————————————————————————————————————————————————————————————————————
SUBNET TOOLS:
  • CFX_curve_colorize
Works on curves. Applies ramped colors on the curve ordered from root to tip. For visualization purposes.
  • CFX_groom_attribs
Works on curves. Creates curve hair attributes that can be picked up by Houdini’s hairgen system - specifically creates clumpid and tightness attributes driven by a ramped falloff from root to tip. Greatly useful to have full control of the interpolated hairgen shape.
  • CFX_curve_custom_attrib
Works on curves. Adds a specified attribute with values ranging the length of a curve from root to tip, the falloff can be controlled by a ramp, there is also the ability to multiply the attribute values with a preexisting attributes. You can also create width with better control on root to tip variation as well as randomized prim values.
  • CFX_blendshape_per_point
Works on geometry and curves. Per point blendshape, can be driven by a masked attribute, or additionally for curves a ramped falloff from root to tip. Special thanks to Christian Bohm from hdbp.io website for clarification on VEX lerp function.
———————————————————————————————————————————————————————————————————————————————
THE FOLLOWING INFORMATION DETAILS THE WORKFLOW FOR CREATING A GROOM IN HOUDINI:
Groom at rest pose
INPUTS:
  • Body geometry at rest.
  • (Optional) Scan data, reference images, textures, etc.
  • (Optional) Premade guides exported from other software such as Maya, .abc format.
    1. When importing curves from Maya, you need to apply a reverse node to invert the point order, since Houdini will by default read the tips as roots and roots as tips.
OUTPUTS:
  • Static full density groom at rest.
    • Main groom guides at rest.
    • Interpolated hairgen curves at rest.
———————————————————————————————————————————————————————————————————————————————
Groom deforming to animation
INPUTS:
  • Static full density groom at rest.
    • Main groom guides at rest.
    • Interpolated hairgen curves at rest.
  • Body geometry at rest.
  • Body geometry that is animated.
OUTPUTS:
  • Interpolated, full density hair deforming with animation.
  • Attributes for rendering:
    • width (required, output by hairgen by default)
    • id (optional, can be created by connectivity node set to prims)
    • clumpid (optional, can be output or modified by clump node - alternatively can be defined by the main groom guides using the method for id listed above and transferring this attribute from main groom guides to hairgen curves via the attribute tab settings)
    • Any other custom attribute to drive hair shaders
VRAY:
In order to be able to read Houdini point attributes in Maya Vray, it’s necessary to convert the Houdini point attributes into a 3 float clr type and it’s also needed to add the prefix vrayUserColor.
There are probably better ways to do this, to convert a default 3 float type attrib to 3 float clr type: convert the attrib to Cd using Color SOP node set to “Ramp from Attribute”, then rename Cd back to the desired attribute name.
ARNOLD:
See requirement in previous Vray point, only difference is Arnold does not seem to require the naming convention prefix but 3 float clr type is needed.
PRMAN:
Does not seem that naming convention or specific attribute type is required. Confirmation pending.
———————————————————————————————————————————————————————————————————————————————
HOUDINI GROOM FILE STRUCTURE OVERVIEW:
1. Rest geo
a. Separate Skin geo
b. Add attributes
2. Anim geo (Optional during groom stage)
a. Point count needs to match Rest geo
3. Main groom guides
a. Can be procedural
b. Can be hand planted and brushed
c. They can also be imported from other software instead, please beware of flipped root to tip order as mentioned in Groom at rest pose>INPUTS section above.
4. Guide Deform (Requires Anim geo, deformation can be disabled through a checkbox)
5. Guide Simulate (Requires Anim geo, dynamics can be disabled through a checkbox)
a. You can use default Guide Simulate node but I feel it’s fairly limited in options
b. Alternatively you can create your own custom Vellum setup via the “Use External Simulation” checkbox, set to “SOP Node” and then click the button “Create External Simulation”. Once inside the newly created geo container I’d advise in disconnecting the incoming middle constraints input and setting up from scratch your own “Vellum Constraints” nodes.
6. Hairgen (Anim deformation & dynamics can be disabled through a checkbox)
a. Aside from frizz, clumping, length, etc processes to affect the hair shape you can also, at this stage, create attributes that drive the look of the shader, such as isolating the tips of the hair, just be sure that the attribute is output properly on the Hairgen “Attributes” tab, be mindful if its a primitive or point attribute type.
7. Export as .abc
a. Adjust to Maya units if exported to this package software
———————————————————————————————————————————————————————————————————————————————
———————————————————————————————————————————————————————————————————————————————
Houdini File Structure Example:
{Will add soon images of groom scene sample}
———————————————————————————————————————————————————————————————————————————————
———————————————————————————————————————————————————————————————————————————————
STEPS TO TAKE, ON A CFX GROOM TASK
1. Import .abc geo at rest, import textures and cameras.
a. Separate skin geo from clothing, or extra pieces not needed for the groom (eye geometry, teeth, etc)
b. If you prefer you can add float 0-1 attributes to be used as masks on this isolated skin geo to drive density, length variation, areas with certain frizz or clumping, etc. In the example below I’m using a “Group Paint” node to isolate the primitives I want to affect first and then I add an “Attribute Create” node to apply a named attribute set to one on this group.
  • There are other multiple ways to create attributes such as “Attribute Wrangle” or “Paint Mask” nodes, or even convert bitmaps to attributes using “Attribute from Map” node, it’s all up to personal preference. Keep in mind that you can do math operations with wrangles as well, in case you want to do simple things like subtraction, addition, multiplication, clamp or fit.
2. Make initial setup of main guides
a. Hair can be grown procedurally via attribute masks.
b. Hair can also be done in a destructive sculpting oriented method, such as planting rows of hair and brushing them by hand - this is most useful for long hair with a very specific shape to match.
3. Make initial setup of full density hair using hairgen node, that interpolates extra curves from the main guides. (On the relevant screenshots below, on the Houdini test file make sure to turn off on gudedeform1 “enable deformation” checkbox, and on guidesim1 node “enable dynamics” to be able to change the pose of the groom to rest pose rather than anim)
a. Adjust and refine look with procedural processes like clumping, frizz, set length, etc
b. You can also at any point revisit the shapes of the main guides, grooming requires a lot of iterating between these two steps.
4. Make initial setup for shaders, cameras, lights for Houdini lookdev.
5. At any point you can deform and test the groom/simulation with the animation - if available
6. At any point is possible to create the simulation setup, addressing the simulation helps in getting it out of the way as soon as possible if it's simple or in the opposite case it’s always useful to plan ahead for more complex grooms (For example a braided ponytail groom can be simulated using a single curve - simplifying things with proxies is efficient).
In the image below the vellum simulation is done through the option on the Guide Simulate note of “Use External Simulation” checkbox, set to “SOP Node” and then clicking the button “Create External Simulation” to create a customizable Vellum simulation setup as the default options found on the Guide Simulate node are rather limited.
{Will add images of Use External Sim setup}
7. Take into consideration what attributes you need to export the groom with, on the outline on page 1 of this document are the listed common attributes you could use - you can always choose to add more of your own custom attributes if needed to drive a complex shader that can use masks to layer or isolate.
8. (Optional) In case it’s needed to export to Maya, aside from including the necessary attributes you also need to correct the units, use a transform scale set to 100 and multiply width by 100 using an Attribute Wrangle node using the expression @width*=100
9. Taking a look at hair lookdev, we are able to drive the look with mix/lerp operations using attributes that are applied to the groom points, the main setup of hair shaders such as Vray and Prman, we can see that the main color of the hair is split between melanin and dye;
-Melanin is the normal “natural” color.
-Dye can be treated as an unnatural shade added to the “natural” melanin values.
10. END RESULT RENDERED IN HOUDINI:
{Will add render turntable test}
———————————————————————————————————————————————————————————————————————————————
Things to consider before starting the groom:
  • How far away is the groom going to be from the camera?
    • Not only affects how detailed the shape of the groom needs to be, but also what width values you can get away with.
  • Are there specific references to match each section of the groom?
    • Is there a camera lineup available for A/B comparison?
  • Standardized naming for the model elements.
  • Is the model going to change throughout groom development? you can do groom transfers using default vertex order, or use uv as driver instead, depending on what has changed.
———————————————————————————————————————————————————————————————————————————————
———————————————————————————————————————————————————————————————————————————————
PLUGINS I CAN RECOMMEND
  • Groombear for destructive sculpt brush workflow offers a wide range of tools with intuitive control and hotkeys.
———————————————————————————————————————————————————————————————————————————————
———————————————————————————————————————————————————————————————————————————————
VRAY SHADER NOTES:
  • V-Ray TexRemap node can be used to read in attributes from the curve geometry
PRMAN SHADER NOTES:
  • pxrprimvar node can be used to read in attributes from the curve geometry