Hair guides created from mesh objects


(OwenJames) #101

Hi

I have been trying to get this to work, but it isn’t playing along.

At first, despite marking the seam, I kept getting an error saying that no seams were marked. I removed the seams I put in, then re-applied them.

Now I am getting the following error…


Any idea what is happening?

I am using the latest build of Blender…

Cheers.


(Jandals) #102

That error suggests to me that the proxy mesh you are using to shape your hair might appear to the script to be set-up improperly. Or that you have found a case where the script THINKS there’s something wrong.

If you can share a blend file with me or an image of the mesh object you are using I may be able to help more.


(riteshlakra) #103

i am also looking for some braided hair…gonna try this out…


(artchitect) #104

having this issue, even though i applied the scale, location, and rotation, the hair lines are way off


(Jandals) #105

Artchitech, just to be clear, have you applied scale, location, and rotation to both the proxy object and the receiving object (the “head”)? I can’t think of anything else that would cause the kind of offset. I’ll look into it some more and see if I can come up with another possibility.


(SaltyCowdawg) #106

Hi there, tried to follow directions… really I did…

Here’s what I’m seeing (step by step):


Here’s the lovely Tara in her ship suit. The mesh for her was generated by MakeHuman V1.0.1 and imported into Blender 2.71.

She looks a bit silly with no hair so I decide to go with HairNet and give it a whirl.

I add a plane to the picture to serve as a guide thusly.


I go into edit mode on the plane and add some cuts.



Jump out of edit mode and apply scale. Go back into edit mode, select an edge and mark it as a seam. while I’m there I edit the mesh to approximate the shape of hair I’m looking for. (well… work with me here…)

I then (since the hair guide is already selected) select the body mesh, go to the particle system. I hit “Add Hair from Sheets” and expect to see a nice pony tail… sorta…

First thing I notice it has only created six hairs and if I try to bump up the number all hell breaks loose and I got hair coming out of every orifice of Tara’s body. The other thing I notice the plane is still there (is that normal?)

What to do?


(SaltyCowdawg) #107

Ignore the above. I finally figured out what the heck was going on. Now I have a new problem that is driving me insane.

Why does the script complain about hair guides being different lengths? I look at the mesh involved and it looks all the same to me…


(SaltyCowdawg) #108

So,

I figured out one problem, thinking we got something going here. Here is what my model looks like so far:


Not too shabby… kinda like it.

So I do a preview render…


Wow… looks good.

Then I do a real render


WHAT THE H…? What in the world causes this?

Mind officially blown…


(Jandals) #109

SaltyCowdog: It sounds like you have solved all the issues you’ve encountered except for that crazy render. That usually happens when you go into edit mode on the head object. There is something in Blender that doesn’t properly save the positions of particles. Switching to edit mode (and a few other actions) make the hairs reset to a random position. It is less likely to happen using Blender’s tools but when particles are created by Python scripts it’s pretty easy to run into.

If that’s what’s going on and your hair style is getting reset because you’re going into edit mode (or something else that’s causing the reset), the workaround is to:

•Create your hair system like you’ve been doing (“Add Hair from Sheets”)
•Before doing anything else, select your character/hair-growing object and switch into Particle Edit mode.
•Choose the Comb brush, make it very large and very weak, and click enough times that you “touch” every point in all the hair strands.
•Switch back to Object Mode

Doing this forces Blender to store/update the location data for each hair so it doesn’t get lost when you switch modes.

If you’re already doing that, let me know and we’ll see if we can figure out what is going on.


(SaltyCowdawg) #110

One thing I want to mention to the group at large. I started with a mesh from MakeClothes (a MakeHuman utility) for the hair. It would seem there are issues with doing that that I had to mitigate.


Those two triangular faces gave me fits. I deleted the faces, extruded the edges of the what was left and tucked the edges under their neighbors.

I also had to break the mesh up into several sub meshes each with their own particle system.

(RealityFox) #111

This is reallyyyyy awesome. I’ll need to test this out when i get the time someday.

I’ll need to experiment with this and using zbrush. I could definitely see using this with a basic hair sculpt. I presume that this plugin requires the layers to be separate geometry and I the geometry needs to be flat planes? Does it work well with tubes that are capped? Or does the hair do some sort of looping because of it being a solid object?

Anyway, thanks for this creation. It’s freaking sweet. Hopefully this gets put into trunk.


(VANDERHORST) #112

very nice addon

when i switch in edit mode while the emitter is selected all postions of the particles get lost, is this a known behaviour?.
Tried version 2.73 and 2.72b.


(SaltyCowdawg) #113

Clearly I’m missing something here…

After creating the mesh, marking a seam, Apply location, rotation, scale. Added hair from the mesh. Combed it lightly. Go to render it and this happens.

What the heck am I forgetting?



(Jandals) #114

SaltyCowdawg, I haven’t got a guess at what’s going on there but I’d like to figure it out. If you’re willing to share that blend file with me, please do send it to me so that I can try to replicate what you’re seeing.


(SaltyCowdawg) #115

For some reason I can’t upload the blend file here so I put it somewhere I can hand it off.

http://3d-art.berghold.net/downloads/blender/misc/hairnet-test2.blend


(Jandals) #116

Thanks, SaltyCowdawg. It appears that the Mask and Subsurf modifiers on your character model are interfering with the hair system. If I disable all four of those modifiers for rendering, your hair shows up without that crazy positioning.


Someone just suggested that the script be changed so that hair is applied to the proxy objects instead of the character itself. This situation is a pretty good argument for making that an option. If it were done that way, you would be able to put all the modifiers you like on you character and it wouldn’t affect the hair because the particle system would be on a separate object.

I don’t think I can do anything about the way the hair interacts with those modifiers. For now, as a workaround, you could apply the hair to a different object without any mesh modifiers on it. I did this:

  1. Duplicate the body mesh (Shift-D not Alt-D). Name this copy something like “Hair Mesh”
  2. Delete all the modifiers from “Hair Mesh”
  3. Delete all the vertices in “Hair Mesh” except for a few faces from the top of the head.
  4. Add an Armature modifier to “Hair Mesh” so that this extra object moves with the character’s head.
  5. Use HairNet to add hair
  6. In the Particle System Properties and with “Hair Mesh” selected, uncheck Render -> Emitter so that the faces in “Hair Mesh” are not rendered, just the hair.
  7. Remove the hair system from the original character mesh, which still has all the modifiers on it.


Thanks for bringing this issue to light. I wish the workaround wasn’t so cumbersome. The silver lining is that a better solution can be added to the script’s next version.


(blurymind) #117

should be in trunk


(SaltyCowdawg) #118

damn… forgot about the modifiers. The mesh is a separated copy of the hair mesh from MakeClothes so of course it would have all the modifiers. DOH!

I’m going to have to learn how to add armatures. I’ve never done this and there’s other projects of mine that need them…


(Mikel007) #119

Hello everyone. It seems to me that the mesh for the hairs have to be 0.8 Units or greater. If the mesh is smaller then the hairs are not in the correkt position. The hair-meshes in my example are both equal. But the size is 0.8 units for the green hairs and 0.25 units for the red hairs. Both meshes have the same scale (1.0), no rotation (x=y=z=0). As you can see the red hairs go more to the front (is the size under 0.1 Unit the hairs will be confusing). Is that a problem from Blender or from the script ? If I scale the green hairs smaller then the positions will go wrong. The second problem is the moving of the hairs. If i move the mesh the positions of the hairs will kompletly destroy. First I have to go into the particle edit mode and do anything with the hairs (e.g. a little smooth) before i can move the hairs.

Have others the same “problems” or make I a mistake ? Thanks for your answers. With Greetings Mikel007



(Mikel007) #120

Hello Jandals, thanks for your answer and sorry for my english, it’s about 30 years old. I haven’t seen your post #109 (sorry, it’s so much to read in this thread :eek: ). The units show the diameter of the mesh with the hairs. It has is not scaled (scale = 1) and a rotation of 0. I think if the surface of the mesh is to small the hairs have not enough place and destroy the hairstrucutre themselves.
I work currently on a greater project and need real sized figures (eg. the woman is 1.8 m and therefore the head has a middle diameter of 30 cm). With this parameters I can`t make a good frisure with your script. If the women has a size of 6 m then I have no problems with your script. Here is another picture and the blend - File for your tests. I hope you can help me. In Layer 1 are the meshes with the hairs and in layer 2 the meshes for the hairs form. With greetings, Mikel007


hairs problem.blend (1010 KB)