Jandals / HairNet

HairNet addon for Blender
223 stars 37 forks source link

Error #41

Open Darkrain111 opened 2 years ago

Darkrain111 commented 2 years ago

I've used it on simple things like planes, but trying it on a hair mesh from sfm, imported into blender using the source tools addon gives me this error - Error

The mesh - mesh

And the seams, just in case I did them wrong - seams

I really hope this can be figured out, I was going to use hairnet for a project.

I'm thinking the source tools addon has something to do with this but that's probably unlikely.

Jandals commented 2 years ago

This looks like an error that ought to be handled, but it also looks like you may be trying to use HairNet in a way it wasn't meant to be used. If the object you're showing in these pictures is the one you want hair to grow on, then you'll need a second object to show where you want hairs to grow. That second object would most commonly be a subdivided plane with an edge marked as a seam to determine where the root of the hairs will be. With both objects selected, HairNet will use the plane object as a guide for adding hairs to the object that will "grow" them.

Darkrain111 commented 2 years ago

Sorry I didn't explain that part, but I have another mesh in the scene that would receive the hair. I was using the mesh in the pictures as the guide, this is when I tried the emit hair on self option to see if it changed anything, which didn't.

Darkrain111 commented 2 years ago

@Jandals I went back and it turns out fibermesh is the only thing that's doing this, and with everything, meaning this could be caused by blender 3.0

Darkrain111 commented 2 years ago

Even tried previous versions, 2.9 for example, with 6.3, then appending the mesh into 3.0, but for some reason I'm getting a new error in the previous version, fibermesh just doesn't do anything no matter what I try

Darkrain111 commented 2 years ago

@Jandals do you know what's causing it?

Jandals commented 2 years ago

I would expect that having the guide mesh be triangulated is causing the problem. The routine that "walks" the mesh figures out where to put guides assumes a rectangular grid and depends on that assumption.

If you want to use that exact mesh, it would have to be converted to quads first. Then, I think you'd run into another problem having some of the base-to-tip edges be different lengths where the notches are cut out. Each edge needs to have to have the same number of segments.

Darkrain111 commented 2 years ago

Sorry I didn't respond sooner but I searched a bit and do you think the curves option would work if I gave the hair mesh a particle system, combed it so it's covered and the hair somewhat has it's shape, converted the hair to mesh, then curve, and used it as a guide?

Darkrain111 commented 2 years ago

So I did that and it just closes blender no matter what, I don't know if it's because it's so many curves or something

Darkrain111 commented 2 years ago

Well I'm stumped now

Jandals commented 2 years ago

What you suggested sounds like a very long work around and I'm not sure how HairNet would react to the mesh that gets generated. From what I understand it wold be doing a lot of work to avoid doing a small amount of work so I may be misunderstanding some part of the problem.

I'd suggest using a quad mesh to generate hair strands. It really does need quads to function. If you want to add those spikes and notches, I suggest either adjusting a regular quad mesh into the shape you want, or adjusting the guide curves themselves after you've generated the particle system.

Darkrain111 commented 2 years ago

Tried after making them quads (receiver already has quads), it gives me this different error now, image Went with sheets instead and it told me there were no seams, tried drawing bezier curves and the curve option just crashes it in general, so I did sheets again but switched selection between the receiver and the mesh, and another showed up, saying "mesh guides have different lengths."