Using cloth to simulate Daz hair?
I used to do this in 3d Studio Max, and I need to know if this (or something similar) is possible in Blender.
So I'd import a Daz model with hair into Max, and turn the hair into cloth. Now, since most Daz hair is nicely mapped vertically, I could easily make a gradient weight map, and stick the root end to the scalp, and use the gradient weight map to have the rest of the hair follow, the darker areas of the map more strictly to hold the general shape of the hair, and the lighter areas less strictly to allow it to flow. Then I'd set up the character as a collision object to prevent the hair from going through the character. It worked out nice and gave some pretty nice results.
Does this make sense, or am I describing something that's already well known? I tried searching, of course, but wasn't really able to come up with anything that didn't involve modeling a soft body, or rigging a bunch of bones.
Or am I crazy, and there's a much simpler way to simulate Daz hair in Blender?
Thanks in advance.
Comments
Blender does have a cloth sim, yes. And it lets you use weight maps--called vertex groups in Blender--to control the stiffness.
https://docs.blender.org/manual/en/latest/physics/cloth/settings/property_weights.html
What you described is exactly how to do it and I do it all the time! And a lot of hairs when you transfer them in have the vertex group setup under "head" already so you just pin that in cloth sim spot and go from there!
Excellent! Thanks!
Whoa. So you mean the root ends already have a group selection? How do I select that? (I'm new to Blender, and definitely haven't broached cloth yet.) Or will it be pretty obvious once I get in there?
Once my render is done, I'll make some screenshots to walk you through!
That would be amazing! Thank you!
Any reason why you stopped using 3ds max? Just curious :)
Probably because there's not diffeo for max.
Okay, so in the first image, you'll see I have the menu set to weight paint up in the top left hand corner where you normally see object, edit, pose. You just need to click on the hair and then you can select weight paint. And then you'll see the object data properties tab is open and there are the vertex groups. Like I said, most times, at least for newer hair I don't know about things earlier than G8, there's a vertex group already set up called hair, scalp, cap, something like that and as you can see, it's perfectly weight painted, so all you have to do is go in the cloth sim and as you'll see in the second photo, just set the pin to head and simulate!
Now, lets say there is no head vertex group, no problemo! Just click the plus sign in the vertex groups to set up a new one and click on the gradient tool in the weight paint (it's the fifth button down) and then you can do your gradient and then just set the pin to group or whatever you happen to call it.
And then in the collisions section in the cloth sim, bump up the quality, I usually go to like 12, and in object collisions, just change it to 0 and it'll default at like .001 or something. I find the hair breaks if this isn't set this way.
If you're using the most up-to-date Diffeomorphic tool, the body mesh already is set up for collisions, so you really don't have to do anything there.
One thing I like to do is set the hair to silk as I find that's the perfect setting for it. In the third picture, I show you where you can change that setting, or you can make it any of the options. It's set to cotton by default. And under that, you might want to up the quality steps to like 10 or 15 as well. I don't know which is more important, that one or the quality under collisions, I just do both to be safe.
Then just go to cache and bake it after you do your pose! Obviously there's so much more you can do with damping and stuff like that, but you'll just have to play around with things, but this here will get ya started down the right path!
And you could totally lower the quality steps and collisions to the default numbers and the sim will go way faster, but the hair could easily crinkle up, so it's a matter of playing around and finding what suits you best.
Thanks for the walkthrough, got this bookmarked to try, hopefully this weekend if I get a chance. Still working on my outpost scene, and IRL decided to recycle a bunch of old furnature instead of buying new lumber to build what I wanted to build.
Sort of, Padone. And if there was a Diffeo for Max, I may still be trying to hammer out something there.
Basically, my workflow was insane. In. sane. And I knew it. But I kept doing it anyway because, well, Max and V-Ray. Also, I've been doing Max for longer than I care to admit. (Hint: since well before there was a Blender or a Daz anything.) But as I got deeper into animating, it quickly became apparent that Daz Studio's animating tools weren't going to cut it (Padone's "ik chains explained" notwithstanding) and the Bridge for Max doesn't work. It just doesn't.
So, it was with a heavy heart recently that I decided to leave Max behind, and try my luck with Blender to see if I might not fair better. I knew I needed to be in Blender. I was just being stubborn. When Blender first came out, I scoffed at it and swore, "I will never use Blender." And I'm here to say...crow doesn't taste so bad if you fry it. ;p
And benniewoodell, that is amazing. Thank you so very much! It sounds pretty straight forward. It also sounds like it might even be a little easier than what I was doing in Max. I can't wait to get started on all this!
You're very welcome! I'm glad it seems straight forward too. Let me know how it goes when you get a chance to play around with it!
I absolutely will! And thanks again!
@RealityHack I hear you. Ex lightwave user here. It took me a while to pass to blender and I still miss lightwave sometime but blender is just so sexy.
edit. As a suggestion for the nice tip by @benniewoodell. In my opinion you don't need to set the cloth quality to 15 since most hairs are just strands and anything will do. So try setting the cloth quality to 1, yes 1, it should work the same and much faster. As for the collision quality 4 to 8 should do fine. Then blender is very sensible to the collision distance and the larger it is the more blender gets time to foresee a collision. So set the collision distance to 2 or even 5 mm if you can, this will help blender to simulate better.
Below a draping example with the Monica Hair for G8F.
https://www.daz3d.com/monica-hair-for-genesis-8-females
Okay, so I'm finally back. I gave this a good go, but I'm getting stuck on a couple of things. I'm using Sara Hair which does have one main weight map for the hair, but it includes the hair cap, and it doesn't seem to work that great. It's too much weighted at the bottom, and not enough in the middle. I tried painting my own gradient, but got similar results.
So I'm wondering, is there any way I can use something like the Vertex Weight Edit modifier to apply my own texture as the weight map? It seems like I could, but I couldn't get the texture added to the group. Either that, or is there any other way to edit the Gradient tool in Weight Paint?
And then, if so, how do I get the hair cap to then stay on the head?
As I know it, weight paint actually paints vertices, so there's no relation at all with a texture. That is, you don't even need the geometry to be uv mapped to use weight paint. As for the hair cap you can separate or even delete it in edit mode if you don't need it. One way to do it is below.
select > select linked > linked
mesh > separate > selection
Okay, so this is what I have so far using the main weight map for Sara Hair. (I apologize for the low quality. I was mostly concerned with the motion.)
https://youtu.be/zGdD2u1NNdo
As you can see, it appears as though only the bottom half of her hair is reacting. I tried Blender's Weight Paint, but it's' just way too clunky to really work with.
What I'd like to be able to do (and what I've done in the past in 3d Studio Max) is use a texture map to make the selection. I believe that this is done through the Vertex Weight Edit modifier, using the Mask Texture option. (See attached.) I think it's what they're talking about here, but I can't seem to follow it. I think I'd need a step-by-step with how to make the initial Vertex Group (if needed) where in the stack the Vertex Weight Edit modifier should go, and what should come before and/or after it. Again, I'm a total newb at Blender, and I fully realize I may be trying to run before I can walk here.
And this may be nit-picking, but it would also be great it there were a way to have the hair tend to hold its original shape. For instance, as soon as the simulation starts, you can see the ends of her hair sort of drop down a bit. It would be great if, while the hair was at rest, it would retain that little curl inward at the ends. In Max, this was done with something called a Preserve modifier. In Cloth terms, I suppose this would be something like a collar, made of the same material, but tends to retain the folded shape. I could live without this though.
Also the file size. Holy geez. The figure is fully outfitted and Rigified, but after this simple 100 frame animation, the file size blew up to well over 2GB! Is there any way to get that file size down? I don't think a simple point cache should be taking up that much room.
And thanks once again!
Here is an example using the modifier on a plane with a grayscale texture. But, since strands are overlapped in the uv map, I don't think textures will be so much useful, unless you remap it yourself but it will be a mess to spread all the strands around.
Yeah! Like that! How do I do that?
Since the strands are all headed in the same direction (roots at the top, ends at the bottom) it doesn't matter if they overlap. The only thing that matters is the length. Some have different lengths in the texture map, so you just make sure the gradient covers however long they are. Unless you wanted to do something where just the back of the hair didn't move or something.
The template for Sara's hair goes long, then short, and repeats. (SaraHair_template.jpg) So I put in gradients, making sure to cover each of those lengths. (SaraHair_weight.jpg) That becomes my weight map, so the top of the hair will be selected (and remain where it is) while the bottom of the hair is not (and free to move).
Does that make sense?
Just add the modifier to the hair and select your vertex group and texture. The parameters are those in the picture but you can experiment and change them of course. Example scene included v-edit.blend. It's renamed as zip because the dumb forum doesn't upload blend files (that are already zipped).
As for the uv map I mean that you'll have the same weight map for all the overlapped strands that may not be the desired result. I know I don't want that myself.
That did it! Thank you so much! Here is what I came up with:
https://youtu.be/9163ITT7-HU
The falloff isn't quite as smooth as I would have liked, but I'll take it.
Thank you again so much. You seriously are awesome.
I did nothing really but you're welcome I'm glad it helped.