Particle Hair from Meshes, Bezier Curves, Nurbs

I reorganized the options in groups of 5 pairs. The first option in each pair controls the tangent and the second the normal. I also added 2 bias options to the 3 existing spacial randomness options.

Setting a negative uniform bias for the normal (second field of the pair) should be able to fill out the hollow bundles.

I just fixed some Python API related issues and now it should run in Blender 2.83

Hey, I really like your addon, it’s just amazing!
There is only one thing that would make it perfect:
How about one more option that does pretty much the same thing as Rand at root tangent, but does it for each hair vertex step (each “edge loop”) separate and relative to the middle point of the “edge loop” (just calculate the average point of the loop)? It would randomly distribute the Hair inside the cross-section of a 3d mesh (but would also work/not break with flat planes). This would basically allow us to generate volumetric hair from a single 3d mesh with volume…
You would just have to make the relative probability go down the further it gets to the middle, so it generates an evenly distributed slice from a cylinder and not many more hairs in the middle.

I don’t know if you are actually still maintaining this addon (2.90 support would be great ;D) or how fast you reply, so I will start testing if this could work by modifying the addon now, and if it actually does I can send you the modifications.

Until then, peace :v:

edit: To be more clear what this modification should be able to do, I found this paper by Disney about their hair creation workflow in frozen (The new option should make the step possible that leads to image (e)):

1 Like

Hi, thanks for the proposal.
But, I am not sure if I understand correctly.
Can’t you already create volumetric hair from cylindric meshes using a negative uniform bias for the normal?

yeah, that’s what you wrote before, but the problem is that it doesn’t work with meshes that have a non-uniform thickness. I want to get a similar result as in the image i linked, which means that the ends should end in one point and in the middle it’s a bit thicker…

This is the mesh i’m using for this test:

(split into multiple posts because I can yet only upload one image at a time)

This is how it should end up (but filled with hairs):

But this is how it ends up (if I add root randomness, otherwise it would just be offset to the middle):

As you can see it works ok at the beginning, but the ends don’t line up in one point.
I hope I’m doing this right but an option like I mentioned would defenitly be a good solution ;D

Ah, ok so you want the randomness to decrease (not increase) towards the end / tip?

yes, but this should work with no randomness at all except towards the center of the mesh.

We can work together a bit if you want… I just need to get the vertex positions from the current edge loop the hair is bending at for each of the loops the hair is using to bend, if you know how you could implement that.

try it /

ok, I will try it, but can you use a single point as endpoint (floor) or can you scale down the floor to 0 after marking it?

you did not understand his logic of work

I think I know how to do it. Will be implemented in a few minutes. Together with 2.90 support.

OMG you are awesome… didn’t expect you to react that fast ;D

@mod1 I need to use cycles (real hair would be best) and also rounder geometry than rectangular, but thanks anyway.

1 Like

Ok, the update is available on GitHub. To get the pointy ends / tips do the following:

  • Use a cylindric mesh which already has a pointy tip
  • Set a positive randomness at the root
  • Set a negative randomness towards the tip
  • Enable coupling of randomness between root and tip

The approach could be improved by offering more control with an interpolation curve.

Example result:

By the way: 2.90 is on the master branch now.

nice, it works much better now!
Although I still think I’m going to tinker with the script a bit to see if I can get my method to work, because it still has some problems. Mainly, the hair goes quite a bit outside of the mesh with this method, especially with non-cylindrical meshes (which you stated it not working for). And also it looks very “rough”, even when you don’t add any other randomness.

Thanks for all your work!

edit: The API documentation is not very helpful with this, so just a quick question, at the line:
loop = loop.link_loop_next.link_loop_next
does this go around the face by 2 corners to get the next “edge loop” in the mesh?
And then how can I go to the next one in the other direction (around the edge loop)?

edit2: nevermind, I think I found a way ;D

Wow! I didn’t think I could do this but I have successfully implemented exactly what I was talking about into your addon (even works with random length, but that was the trickiest part ;D). It works with any shape of mesh (didn’t test, but probably also curves etc as they internally get converted to meshes), it doesn’t go out of the mesh, no weird randomness if you don’t turn up randomness (all the options still work with this) and it’s 100% evenly distributed (at least in a cylinder, other shapes are of course not perfectly distributed, but if it’s at least somewhat of a “simple” closed shape it looks fine).

I’m from germany too, so I have to go to bed now, but maybe tomorrow we can discuss how you want to integrate the feature into your addon (don’t really want to go through all the github contributor hustle just for these some changed lines ;D). Also I could show you some results then, or you can just test it yourself.

peace :v:

Cool, I can integrate the feature into the addon after some testing.
You can send me the code if you don’t have a GitHub account. But then you will not be directly credited there.

Also: Some pics / images of your results would be nice!

Hello! I don’t know if this is useful, but seems so.