Hair object - design proposal #78606
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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 & 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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
21 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#78606
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
IMPORTANT: Please note that this document is subject to change and will most likely not represent the final product of the new hair object in Blender
Reference links
Hair object - project description
#68981 (New curves object type)
Hair object - node design
#78515 (Hair object - Node types design)
Hair object design
Guide curves
This is a list of guides in the hair object. "myGuides" in image example. On the same hair object there can be multiple guide curves ("eyebrows", "hair", "eyelashes" etc). Guide curves are the curves are what the user grooms with the particle brush. The guide curves are sourced into the node tree graph via an input node.
Growth mesh
This is the mesh that the guide curves are attached to.
Node tree
This is a slot that referers to the node tree containing the nodes for creating and deforming the instanced hair curves. See design task #78515 (Hair object - Node types design) for more info regarding hair object node design
Hair simulation properties
I don’t currently have a strong opinion about where to place simulation related controls/UI. Perhaps this could be integrated somehow with particle nodes? See example of simulation influence node in #78515 (Hair object - Node types design). We should check with @JacquesLucke, since he is working on particle nodes and physics.
Alembic cache
Reading curves from alembic file as hair is supposed to be implemented as noted in the project description #68981 . I've been going back and forth regarding if I think alembic settings should be placed in the Hair object UI or in the Input node in the node network. I ended up with the conclusion that alembic settings should be placed in the hair object node networks input node.
{F8664085, height = 400}
Notes on guide curves geometry data
This is likely relatable to
https://developer.blender.org/T76659
Deformed instances
Imagine the blue poly strip on the image to the left is a deformed instance along a guide curve. The goal is to have it conform to the normal of the surface of the growth mesh (head geometry). This type of workflow is important for creating hair for real time rendering (e.g games) or feathers for offline rendering
{F8664030, height = 400}
Sometimes the sampled normals from the surface is too noisy (ear area) and needs to be averaged based on neighboring guide curve vertex normals. The smoothing should propably be done with an operator that is triggered by the user.
{F8664033, height = 400}
Normal per guide curve vertex
Transfer normal vector from growth mesh surface (CYAN) to guide curve vertices. This normal vector is not used for shading, but for aligning tilt/twist of instances to the growth mesh surface. This is very important for creating hair cards for real time graphics/games.
Guide curve vertices that does not get a ray hit from growth mesh surface can inherit normal vector from the closest guide curve vertex that got a ray hit (YELLOW). We could also use this normal vector to displace the guide curves along the normal of the growth mesh surface with the deform node that is described in the Hair object node design https://developer.blender.org/T78515
If transferring normal vectors from the growth mesh is slow, perhaps it’s a good idea to transfer normals with an operator that is run by the user when desired. I guess it’s important to note that we would not want normal transfer to happen post simulation
It seems likely that this task is related to storing custom data on hair vertices: #76659 (Geometry Attributes Design)
Direction per guide curve vertex
Another important vector to use would be the direction of the guide curve. The direction of the last guide curve vertex will need to be inherited from its closest neighbor. The direction could be used by the tilt for deformed instances and also, the deform node that is described here: #78515 (Hair object - Node types design)
Tangent per guide curve vertex
The cross product of the transferred surface normal and guide curve direction would result in a tangent. One potential problem is that the transferred surface normal and guide curve direction could sometimes be almost aligned (eg when hair is pointing along the surface normal). I’m not sure how big of a problem that could be. In case the tangent is zero, perhaps it should just get some arbitrary vector? Perhaps pointing along the X-axis?
The tangent can be used by the deform node that is described here: #78515 (Hair object - Node types design)
Operators
IMPORTANT: Nodes are to be developed first, so operators will not be a first priority
select random
existing operator that is extremely useful while grooming. Selects random hair/points
transfer normals from growth mesh
Transfer growth mesh normals to guide curves. Vertecies that does not get a ray hit to growth mesh should inherit from closest guide curve vertex on same guide curve. Normals on guide curves can be useful for aligning instanced mesh. Very important for real time hair (eg hair cards) or feathers in off line rendering
smooth guide curve normals
sometimes growth mesh normals might be pointing in a lot of different directions (close to an ear for example). Then smoothing out normals can be useful. This is very simililair to smooth curve tilt for curves
{F8664672, height = 150}
create guide curves from curves
Useful for interoperability between other softwares. I think it would be useful to rearrange vertex order per guide curve so that vertex index 0 is closest to growth mesh surface. Only the two ends of the curve needs to be sampled to determine which is closer to the growth mesh. This would be very useful for converting hair using old hair system to the new hair system
{F8664681, height = 400}
resample guide curves
Based on current selection. Change number of vertices per guide curve. Vertices should always be equally spaced. When going from a low amount of vertices to a higher amount, it might be needed to "change curvature" in order to avoid linear interpolation between each new vertex. The current operator Rekey does a very good job, but doesn't solve issues where hair vertices that is not evenly spaced per hair.
{F8664686, height = 200}
Create curves from hair nodes
Convert current hair node setup to curves. Useful for interoperability with other softwares. Current operator hides in the particle system modifier
{F8664691, height= 300}}
Tilt normal
Tilt normal on selected guide curve vertices. Very similair to tilt operator for curves
{F8664702, height= 200}
select by length
usable for deleting/pruning very small hairs. Small hairs can sometimes be accidentally too short by using the "cut brush"
{F8664699, height= 200}
smooth length
smooth length on selected guide curves by sampling surrounding guide curves. This is useful for making sure there are no guide curves that are shorter or longer than they should be
{F8664705, height = 200}
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscribers: @sebbas, @DanielBystedt, @JacquesLucke, @lichtwerk, @ideasman42
Added subscriber: @Josephbburg
Hello, I created a discussion thread on Devtalk, since I expect people will have a lot to say about this. (And we're not supposed to use the task page for discussion, right?)
Feel free to remove this comment and put the discussion thread in the task, if you want.
Thanks for preparing this. :)
It seems you put a lot of focus on the transfer of a coordinate system along a hair strand. I understand that this is important, but it's probably not the right abstraction level for this task. Also, the solution you propose probably won't work well, for the reason you mentioned already. I'm quite sure that this will become a problem, because hair goes in many directions and some will come close to the singularity with high probability. It's probably best to just define a coordinate system at the root of a strand and then move that along the hair (instead of the normal and tangent separately). I've implemented something similar for Animation Nodes in the past and Blender probably has some code for this already, because it's doing the same thing when you select the "Minimum" twist method on curves.
The other examples for operators seem sensible. I don't really have anything to add to them yet.
Thanks for the feedback, @JacquesLucke. I'm very open to any type of solution for aligning deformed instances to the growth mesh. Perhaps I was to keen on suggesting a solution instead of presenting clearly what the goal is. I'm just going to drop the image of the "goal shape" of deformed instances in this post so that it's clear.
https://dev-files.blender.org/file/data/5hmrqbjg42uuipiu5kkz/PHID-FILE-ker5nuslhpfll7gdempy/image.png
Cheers :-D
Hair object - designto Hair object - design proposalAdded subscriber: @brecht
Thanks for the feedback @brecht. This really helps with refining the Hair object design proposal :-)
I feel that it is important to distinguish the hair curves that the user groom with the particle edit brush and the hair curves that are procedurally generated by nodes/modifiers with two different names. Both for communicating clearly and also to align with the terminology used in other software used for grooming.
Based on your input I will use the following names
Guide curves = Curves that the user groom with the particle edit brush (no primarily render visibility)
Hair curves = Curves that are procedurally generated with nodes/modifiers (visible in render)
Good point. I hadn't concidered modifiers in the hair object design proposal. I'll have a look at that
That sounds really good and aligns with what @JacquesLucke wrote above
Great feedback! I think that this is something to consider for further discussions. It will be mostly up to you developers to decide on how instances and deformed instances technically should be implemented. I'm thinking that I should add an object output node for geometry instances (trees/rocks) and deformed geometry instances (game hair / feathers) in #78515 (Hair object - Node types design). The only thing that is important to me is to add functionality to add deformed geometry instances with random/multiple geometry input so that we can get random hair shapes and uv for feathers and game hair (current modifier particle instance does not support this)
I totally agree when it comes to export/output of curves. Importing curves from another software and converting them to hair would be really useful, since that functionality is currently missing in Blender (unless using external addons)
But what does it mean exactly to give them two different names? Are you also proposing that they would be two different data structures, that we would have two different Hair geometry types? Or would it be the same data structure but a different name is used in different parts of the UI? Or is it just something to describe workflow, but there would be only one name in the Blender UI?
At least with the design I had in mind, there would be one data structure, and nodes and modifiers would work on both curves used for guiding and rendering. The distinction between the different types of curves would basically be a node that converts hair geometry to more dense hair geometry, like a subdivision surface modifier for meshes.
When I read your description it seems to align with how I picture the hair object as well. Much like a mesh object with modifiers where each modifier is a node in the hair object node graph editor and
The purpose of having two different names (Guide curves & Hair curves) is mainly for communicating which "thing" we are talking about during development and describing workflow. It's basically the same as things are in the current version of blender where there are particles and children. I want to change the name so the definition is more clear and also to align with the terminology used in other software used for grooming.
Here is an example of where the guide curves are accessed in the hair object UI mockup. This specific part is very much how hair works today in blender (i.e. you currently select a specific particle setting in the hair particle properties UI in order to groom those particles.
On a high level, I have the following design in mind currently:
Geometry
andSimulation
ID type.Geometry Node Editor
and aSimulation Node Editor
.Geometry
andSimulation
node tree. (Similar to what theSimulation
modifier is doing currently.)[EDIT] Maybe I should have posted this in one of the other threads regarding hair or geometry node design..
Added subscriber: @frameshift
Added subscriber: @Pipeliner
Added subscriber: @KenzieMac130
Added subscriber: @KidTempo
Added subscriber: @zanqdo
Added subscriber: @DonCoyote
Added subscriber: @CobraA
Have you guys checked Pixar's system? they made a SIGGRAPH talk & published some docs.
Added subscriber: @Brunomendesgussoni
Removed subscriber: @Brunomendesgussoni
Added subscriber: @nox.cg
Added subscriber: @ddade
Added subscriber: @rwman
Added subscriber: @Roughy
Added subscriber: @Defka
Added subscriber: @1seby
Added subscriber: @Floreum
Added subscriber: @Robert-Hintz
There needs to be a function where you can create vector fields to groom short fur or hair. Houdini and the Ornatrix plugin for Maya have this function.
https://www.sidefx.com/docs/houdini/shelf/sop_groom_curveadvect.html
https://ephere.com/plugins/autodesk/maya/ornatrix/docs/3/Surface_Comb_Operator.html
Work is now tracked in #68981, #105253, and #125700.