Help Needed With Modified Blender Workflow For Clothing Creation


https://forum.reallusion.com/Topic357861.aspx
Print Topic | Close Window

By Lord Ashes - 6 Years Ago
Both DAZ Studio (via the Transfer Utility) and Blender have functionality for generating automatic weight maps. While professional content should have weight maps that are hand painted or adjusted, these functions provide a good starting point.

In the suggested Blender Workflow, the OBJ (or similar) clothing content is added to the FBX character, then parented to the armature using With Empty Weight Groups, and then the Transfer Weights function is used to transfer the weight maps from the CC Body to the clothing content. While this works for some clothing it does not work for others. For example, it does not work well for long dresses or gowns because the transferred weight maps cause the cloth to act like pants and not a long dress.

I was hoping to leverage Blender's automatic weight maps function to provide a good starting point for weight maps which can than be touched up. As such instead of using the With Empty Weight Groups, I tried the Automatic Weight Groups but the resulting file does not import into CC. While the weight paint appears good in Blender and seems to be applied to bones with the same names as those used with the Empty Weight Groups, CC gives an error that says "Mesh is bound to wrong bones". I even tried tricks like adding the content once with With Empty Weight Group and then adding it as second time With Automatic Weight Groups and then trying to transfer the automatic generated weight paint to the Empty Groups version (and then deleting the source to only contain the Empty Weight Groups version)...but in all cases as soon as I do the transfer to try to apply the automatic weight paint, it seems to cause the "mesh is bound to wrong bones" error.

Has anyone figured out how to get around this so that we can use Blender's Automatic Weight Maps functionality?

(In another post that I made earlier I tried to do the same using DAZ Studio but there I was unable to get the iClone armature into DAZ Studio in order to try if the Transfer Utility will work with a non-DAZ armature).



By Kelleytoons - 6 Years Ago
No offense intended (I've spent weeks on this myself so I understand perfectly) but why don't you just wait a few months?

I seriously think that's the best alternative nowadays.  Unless we need to do something immediately (and I think you're a dev so I would understand if it's a case of "I need the money NOW") I think banging our heads against a wall that's shortly about to be removed is just wasteful (and I've got a VERY limited time left on this earth, so if I'm willing to wait then anyone else really ought to).
By Lord Ashes - 6 Years Ago
Kelleytoons (2/23/2018)
No offense intended (I've spent weeks on this myself so I understand perfectly) but why don't you just wait a few months?

I seriously think that's the best alternative nowadays.  Unless we need to do something immediately (and I think you're a dev so I would understand if it's a case of "I need the money NOW") I think banging our heads against a wall that's shortly about to be removed is just wasteful (and I've got a VERY limited time left on this earth, so if I'm willing to wait then anyone else really ought to).

<Grin> Partially because I am impatient...partially because a few months may turn into more than just a few months...and partially because I'd like to understand why using the Blender Automatic feature does not work.
Ideally I would like to get all 3 solutions working (DAZ, Blender and whatever RL comes up with) because I am guessing that each may have their advantages and disadvantages. The more options we have the more likely we will be to select the best tool for a specific job.
By Rampa - 6 Years Ago
There are some bones that you should not weight to. I think that is what's causing the error. The root, "CC_Base_BoneRoot", is one. The hand and feet contact points also need to be not weighted to.

I think you can remove bone-influence completely in weight-paint mode. Might be a menu selection. You can also weight to just selected bones in weight-paint. Might want to google that to find good tutorials.

I don't think any type of automatic weighting can blend the weights properly for a skirt/dress. It will always require some manual work. A trick to make it easier is to get it just right on a snug-fitting full length dress (arms too) and then transfer the weights from that specific dress to any new dresses you make. That way you only have to do it once. Hopefully! Wink

DAZ is a no-go It cannot import skeletons or rigged meshes without horribly corrupting them.
By Kelleytoons - 6 Years Ago
Well, if you do get it working be sure to let us know here <g>.

By 4u2ges - 6 Years Ago
Agree with Rampa. Why do you think Automatic Weight Group would give you a better result?
Aside from that, the physic weight map would most likely take over the weight painted parts at run time (this of course would depend on the type of the dress).
Eventually, the amount of the manual work would be overwhelming in any case. So lets see what RL is cooking for us Smile

I just made a quick test for the base RL Dress:


This is for Spine.

Default RL paint
https://forum.reallusion.com/uploads/images/ebd3b01a-d5fa-4d71-8372-f126.jpg

Automatic Weight Group (after "re-rigging"). Excuse me?? No influence at all?
https://forum.reallusion.com/uploads/images/20135fed-1291-44b5-a296-084e.jpg

Empty Group rig / Weight Transfer
https://forum.reallusion.com/uploads/images/365cdd01-2534-46a7-bd7a-97b0.jpg

Same as above, but worked out a little with Mix and Blur


https://forum.reallusion.com/uploads/images/1ef04c96-8baa-40c2-b4cb-9a5e.jpg
By Rampa - 6 Years Ago
If you happen to own the newest Poser that can import FBX, I think you might be able to get the figure into DAZ. If I recall, the weighting of a skirt will give you the same pants-like result though. Plus, it is actually harder to use than Blender! (my opinion)

But if you then saved it as a CR2 (poser format), it should then be DAZ compatible. But you would probably just rig/weight in Poser if you had it, I suppose.

Regarding the physics fixing things. It will, but with a caveat. I found that I always had to start the character from a T-pose in the scene, otherwise the mesh started in a distorted shape, and the physics would not fix it. So I ended up with the center of the skirt being a flat slab, but the pant-like "legs" having physics. If I started from a T-pose, and let the physics settle, then it had no distortion to worry about, as the mesh was in its original shape with nothing stretched.
By vidi - 6 Years Ago
Poser is not more compatieble with DAZ since Genesis no matter ti save cr2 ,because is the exchange format cr2  was for parametric riged character not for weihtmapping rigs 
Also btw Poser import  fbx is mess 
By Rampa - 6 Years Ago
vidi (2/23/2018)
Poser is not more compatieble with DAZ since Genesis no matter ti save cr2 ,because is the exchange format cr2  was for parametric riged character not for weihtmapping rigs 
Also btw Poser import  fbx is mess 


That's good to know. Thanks Vidi for the update.


By 4u2ges - 6 Years Ago
Rampa (2/23/2018)
I found that I always had to start the character from a T-pose in the scene, otherwise the mesh started in a distorted shape, and the physics would not fix it.


So true. Spent whole weekend some time ago until I finally figured that out. Posted this a while ago in the other thread. So just a reminder:
(Skip to 00:40)


By Kelleytoons - 6 Years Ago
Rampa (2/23/2018)
There are some bones that you should not weight to. I think that is what's causing the error. The root, "CC_Base_BoneRoot", is one. The hand and feet contact points also need to be not weighted to..


Rampa,

I'm revisiting this process, because the default weighting is not at all smooth for my purposes.  I find I can't alter it at all (after Transfer weights I can't get the weight paint to do a thing) but that's probably my lack of Blender experience.  However, I'm confused about what you say here.  If the BaseRoot bone and hand and feet contact points aren't to be weighted, why do they show up in the Vextex groups when you do Assign Weights?  They don't give you an error if you follow that procedure (i.e. if you go ahead and do Assign Weights and then bring into CC) but they DO give an error if you run Automatic Weights even though no weighting is assigned to those bones (you can tell by selecting the vertex groups -- they remain unweighted just as they are when you do the Assign Weights transfer).

By Lord Ashes - 6 Years Ago
Thanks for the suggestion of removing automatic weight mapping from some bones to try to get it working...as soon as I get some time, I will give that a try.
By Rampa - 6 Years Ago
Looks like I missed answering KT here. Also important for everyone else. It shouldn't matter if those bones have groups, just that nothing is weighted to them.

Always use the "with empty groups" when you bind to the armature in Blender. That way you don't end up with vertices weighted to the wrong bones.
By Lord Ashes - 6 Years Ago
4u2ges (2/23/2018)
Agree with Rampa. Why do you think Automatic Weight Group would give you a better result?

I don't necessarily think that...but I think it would be a better starting point. The current Blender to iClone work flow is to transfer weight from CC Body. This works well with pants like clothing but causes problems when used for long dresses, long skirts, and robes. I believe both the Blender automatic weights or the DAZ transfer utility create better weight map starting points because they take the mesh (somewhat) into consideration. I am not saying that using their of these methods would result in a final weight map...but I am saying it would be a better starting point (for long dresses, long skirts and robes) than simply transferring weights from CC Body.
Thinking back to my pre-iClone experience with DAZ Studio, although one can weight paint clothing (or other stuff) in DAZ Studio for clothing in most cases it was not necessary because the Transfer Utility generated reasonable weight maps on its own.
Can I create the weight maps myself? Yes. With it take a huge amount of time? No but it does take time. So if I can get a utility that will generate, for example, a 75% good weight map which only needs to be touched up to correct 25% of it, I am not going to reject it. 

By Kelleytoons - 6 Years Ago
Rampa (3/11/2018)
Looks like I missed answering KT here. Also important for everyone else. It shouldn't matter if those bones have groups, just that nothing is weighted to them.

Always use the "with empty groups" when you bind to the armature in Blender. That way you don't end up with vertices weighted to the wrong bones.


That's okay, Rampa -- I would have nagged at you if I had needed an answer, but I found it shortly afterwards.  I also wrote an automated blur routine for my Blender weighting that is giving excellent results, with very little (or no) touchup needed afterwards.  So far it's working well even on long dresses (although, obviously, a key is to create a physics weight map and let Blender take care of those things at the ends).
By Delerna - 6 Years Ago
Kelleytoons (3/12/2018)

I also wrote an automated blur routine for my Blender weighting that is giving excellent results, with very little (or no) touchup needed afterwards.  So far it's working well even on long dresses (although, obviously, a key is to create a physics weight map and let Blender take care of those things at the ends).


I have been wanting to get into that but just haven't had time to look into it yet.
Actually, my not having time to look into it is a bit silly because spending time on something like that saves a lot of time in future developments
Yep I will definitely look into that now
By Rampa - 6 Years Ago
Kelleytoons (3/12/2018)
Rampa (3/11/2018)
Looks like I missed answering KT here. Also important for everyone else. It shouldn't matter if those bones have groups, just that nothing is weighted to them.

Always use the "with empty groups" when you bind to the armature in Blender. That way you don't end up with vertices weighted to the wrong bones.


That's okay, Rampa -- I would have nagged at you if I had needed an answer, but I found it shortly afterwards.  I also wrote an automated blur routine for my Blender weighting that is giving excellent results, with very little (or no) touchup needed afterwards.  So far it's working well even on long dresses (although, obviously, a key is to create a physics weight map and let Blender take care of those things at the ends).

Now that sounds extremely useful! Smile
By Kelleytoons - 6 Years Ago
It certainly is for me, Rampa.