Nodes for procedural hair #103730
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
24 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#103730
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Nodes for procedural hair
This is a list of various nodes required for a procedural workflow when creating hair with the new hair object in blender. Some nodes will be possible to create as node groups in geometry nodes and some will have to be converted or created as "proper" nodes.
Current approach
I (@DanielBystedt) will use my experience with grooming in other softwares and set up some node groups in geometry nodes as prototypes. @SimonThommes will iterate on those nodes and change any parts that he thinks can be improved (optimization, general usability etc)
Hair node designs that require a "proper" node instead of a node group will need help from C++ developers such as @JacquesLucke
Various issues
IMPORTANT:
It's not possible to resample hair curves in geometry nodes. This makes it hard to create high resolution dependent hair like curls for instance
NOTE:
The self node (or similair) should be able to read a hair objects surface and UV Map to minimize extra inputs per hair nodes (object and uv map)
Nodes list
Distribute child splines on faces
Prio (1-10): 10
Distribute child splines on a surface. Let it be possible to interpolate curve length and shape based on curve input. Patch D16642 by Jacques Lucke in progress
Hair info per point
Prio (1-10): 8
This node will give the user spline related data that is outputted per point. Since similair type of data is reused in a lot of the hair node groups it makes sense to have a node like this.
{F14132928, height = 400}
Node name
Prio (1-10): 8
Clump curves based on another set of curves. Curves will interpolate to the same length as the clump curves
{F14132937, height =250}
Frizz hair
Prio (1-10): 7
This node deforms the points of the curve based on a field (such as a noise texture). Each curve index should be usable as a "seed" for the noise to not get too uniform noise based only on point position. Uniform noise might also be desired. Perhaps implement a switch?
{F14132950, height =250}
Curl hair
Prio (1-10): 6
Curl hair along the tangent axis of another set of hair curves or a sparse set of the same hair curves.
{F14132957, height = 250}
Smooth hair
Prio (1-10): 6
Smooth/interpolate the position of the points per spline. Should have control for locking the tips of each hair/curve
{F14132967, height= 250}
Braid hair
Prio (1-10): 5
Braid curves along another set of curves or a sparse set of the same curves. It would be useful to both do "normal braids" but also "cornrows". Cornrows might need a separate node setup
{F14132963, height = 250}
Redistribute hair points
Prio (1-10): 5
Redistributes the points in each curve so that the distance between the points are equal
{F14132980, height = 250}
Points in the image are a temp debug tool for visualization
Rotate hair
Prio (1-10): 4
Rotate each curve by using the axis of the closest face surface normal or vector from curve root to tip. This is useful for creating some random overlap
{F14132986, height = 250}
Shrinkwrap hair
Prio (1-10): 4
Shrinkwrap hair to the surface with an offset. This should be blended with a factor. When deforming hair it is very common that some points end up inside of the surface that the hair is growing from. This node has an option to push those points outside of the surface
{F14132990, height = 250}
Bend hair
Prio (1-10): 4
Long hair has a tendency to bend a bit at the tip of the hair strand. I guess we would use a point from a slight lower value on the curve factor (e.g. slightly closer to the root) as pivot. The axis to bend would be the cross product of the first curve point position, the surface normal and the curve tip position.
Displace hair
Prio (1-10): 3
Displace hair along surface normal or object/world vector displacement. Useful for displacing hair with displacement maps that are used in rendertime on the surface object. Also for creating cheap wind effects
{F14132998, height = 250}
{F14133000, height = 250}
Straighten hair
Prio (1-10): 1
Straightens the hair with a factor. The user should be able to
{F14133005, height = 250}
Interpolate hair shape
Prio (1-10): 3
Interpolate shape of splines based on another set of splines. Splines interpolates based on distance to another spline so that the different curve sets can have different topology. This is useful when a hairstyle changes from one hairstyle to the next. For example: a person strokes the hair in front of their face to behind their ear.
Hair noise attribute
Prio (1-10): 3
Does NOT deform hair. This is a utility node that outputs random values per spline or point. This node can be used in more complex setups to assign random blend or frequency to other hair nodes
{F14133016, height = 250}
Set hair length
Prio (1-10): 3
Redistributes the points along the current shape of each curve. If length > 1, each curve will extend along the vector of the last two points of the curve.
{F14133020, height =250}
Scale hair
Prio (1-10): 3
Scales each curve uniformly from the root of each curve. The user can also set a target length. This is useful if a lot of hair deformations has resulted in a new length per curve
{F14133031, height = 250}
Related Link: Procedural Hair for Blender 3.5 Meeting Notes
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscribers: @SimonThommes, @DanielBystedt, @JacquesLucke, @dfelinto, @HooglyBoogly
Here is the current version of the file that I have been working on
{F14133049, height = 200}
procedural hair nodes v003.blend
Added subscriber: @mod_moder
It seems you did not specify the name of the 3rd node in the list
Not sure why such high level nodes need to be built in in C++. Although it is suspected that this may be necessary for several operations, in general it seems that all nodes are already implemented as groups of nodes.
Added subscriber: @zNight
Added subscriber: @guitargeek
If any of my experiments with hair node can be of use, please take:
https://johnnygizmo.gumroad.com/l/habif?layout=profile
This paper from Pixar is a great resource for cornrow braids vis a vis ‘Lightyear’.
https://graphics.pixar.com/library/Cornrows/paper.pdf
Added subscriber: @Dangry
Added subscriber: @VDC
Added subscriber: @lichtwerk
Added subscriber: @persun
Added subscriber: @uelix
HI, idk if you have seen this or are using a different implementation but Xeofrios shared this node group for blender 3.5 to create hair from curves and meshes on the hairs geometry nodes thread on blenderartist and it could be interesting.
GN hair.blend
Added subscriber: @AlexeyAdamitsky
Added subscriber: @n0ahg
Added subscriber: @TheRedWaxPolice
Added subscriber: @LouisLithium
Added subscriber: @GeorgiaPacific
Added subscriber: @strangerman
Added subscriber: @RedMser
Added subscriber: @AndyCuccaro
Added subscriber: @YegorSmirnov
Added subscriber: @Andruxa696
Added subscriber: @EvertonSchneider
Added subscriber: @Misha_dd
I updated the bend node group to the type of behavior I wanted and renamed it "roll".
procedural hair nodes v009.blend
Added subscriber: @Slowwkidd
Added subscriber: @Yuro
@DanielBystedt just to update a wip file to test, here is my current version:

procedural_hair_nodes.wip.blend
I include some modifier setup examples of how they can be combined
Unfortunately we're running a bit short on time to actually do proper testing and iteration, that's why I just want to have something uploaded that you can check out. It's still very WIP though and a bunch of nodes are still missing. But the main hurdles that I ran into for the guide propagation should be figured out and allow for easy automatic propagation of attributes from the surface object.
Some of the main things I still want to address are:
So for feedback it is better for now to focus on other aspects than the wants that are bound to change regardless.
I'll also post more updates from now on and start committing to the assets svn. Andy is also starting to test the nodes and finding several crashes already that are being fixed.
In a couple of days the status should give a much more complete picture, so feel also free to wait some days instead with testing.
The svn commits will be found here later:
https://svn.blender.org/svnroot/bf-blender/trunk/lib/assets/
Great work @SimonThommes ! It's fun to test out your setups. Since you mentioned that it might get a bit tight regarding time, I suggest you focus on the high priority hair nodes and leave lower prio nodes for later releases.
Here is some initial feedback. Please reach out if you have any questions.
General thoughts
Scale multiplier on all nodes
Since some studios use different scales when creating assets (i.e. 1 unit == 1 meter or 1 unit == 1 dm etc) it could be useful with a scale multipler per hair node. I guess this could be added in future releases as well.
I know that you will iterate braids and curl, but I thought I'd write some feedback just in case.
Braids feedback
Optimization
It's fast! I love it.
Shape
Much better than my setup! It makes sense that multiple parameters control the frequency, since braids needs higher frequency at lower "braid radius"
Missing end flare
i would love to get an end flare. Check my setup for reference.
"Subdivide" instead of "additional cuts"
Additional cuts was tricky to understand until I looked at the node it was connected to. I suggest to rename the parameter "Subdivide" which is a more recognizable term in CG
Curls feedback
Optimization
It feels a bit slow to use. When I compare it to my version of curls and using the same curve topology, my version runs at 56 ms and yours at 255 ms (I want to note that I am using "additional cuts" == 0)
Width of "ribbon shape"
My setup has a way of controlling the width of the "ribbon shape" of the curl. It's called "clump tangent offset". Your setup has a parameter called "thicknes" but it does not seem to be connected in the network. Is this the issue perhaps?
Too many parameters affect frequency
It's very tricky to control the general shape since too many parameters affect frequency. Only one parameter should control frequency. Currently radius, shape, factor min and factor max affect frequency.
"Subdivide" instead of "additional cuts"
Additional cuts was tricky to understand until I looked at the node it was connected to. I suggest to rename the parameter "Subdivide" which is a more recognizable term in CG
@DanielBystedt thanks for the feedback!
For the scale:
I was planning to change the setup a bit to split up the amount input into a
Distance
and aFactor
. That makes it easier to control the setups between 0-100% and helps with the scale, as the distance would have a unit attached that can be changed with the scene settings.The braids and curls I'll work on again after I have the rest of the basis figured out. In general they have the same base setup, that's also why the frequency is affected by so many factors in the curls, as that makes sure that the braid shape stays intact. Do you think it would be fine, if that behaved differently between braids and curls, in favor of having more control for curls and a nicer result for braids?
@SimonThommes your plan regarding scale sounds good to me.
Regarding curls: yes I think it would be great to have a separate setup compared to braids in order for the user to gain more control. As I wrote it was to many parameters that affected the frequency of the curls, which made it tricky to control the overall shape