I can’t believe I missed this post… all I can say is this is absolutely fantastic thank you for making it available!
I do have a question though… the generated rigs possess DEF and ORG variants of all points on the rig. Are both required? Also where was the naming scheme for this defined in the script? For some reason I can’t see it… (my head is swimming with all of the rigging info I’ve looked up today though!)
I don’t know if both are required. As you see ORG is only used to create a hierarchy, I doubt it is there for anything else. I’ve put it on my TODO list to check it out.
The script first goes through the whole hierarchy and remembers all the needed ones. The parents of those nodes are also needed of course, which is the reason why you get those ORGs. After that step it removes all the truly unneeded ones.
Maybe you understand the script a little bit better with this explanation.
After several tests, I decided to leave it as it is now. It would be possible to make a new hierarchy withouth the ORGs. The consequence of that would, that all animation clips would need to be updated accordingly. As I don’t have time at the moment to seriously work on that, I have to say, I won’t do it now. Keep in mind, that it is a free extension.
If you see that as a critical part for your work, you may explain me the reasons and we could try to find a solution.
I was just attempting to use existing bvh motion capture data with a rigify rigged model from blender. But this is impossible unless you can obtain the same bone name hierarchy. I found another way to get mocap data to a model though.
If you can code and are interested in spending time on that, we may collaborate for that task. But as I already wrote, I can not spend a lot of time on that at the moment. The code base for that already exists, so tell me if you are interested.
Things are likely going to be a bit tight for a week or so for me, but I’ll have a gander at the code. I’m not a programming genius, but I’m not a novice either. I’ll see what I can come up with and post back here
Hey guys, thanks for working on this, I was just wondering if you had any updates.
It works great for me but like said, it would be a little better if it recreated the hierarchy without the ORG bones in.
Actually the ORG bones look like they might better in some cases, eg low detail models where twist bones are not needed in every limb bone but I have to admit I’m still learning blender so haven’t quite worked how only use the ORG bones (although I think I’m close with the deform tags in the bone properties!)
Anway thanks again, really great to see work like this!
Removing the ORG bones as such is not very difficult. The difficult part is, that all animations need to be recalculated by the script as well. It is unlikely that I will do that in the near future, as I don’t see it as very important.
If any one is looking at this thinking the org bones (basically the meta rig layout) would be idea for game use, you can go though in blender and untick deform from the bone properties on all the DEF_ prefixed bones and tick deform on the one properties on all the ORG_prefixed bones to get almost the minimum number of bones.
It’s basically this http://dl.dropbox.com/u/1693140/blenderdeform.jpg setting. It looks like, as you said, the org bones are just used to move the DEF bones, that probably stand for deform and are the only bones being used to deform the mesh. Turning it off on these bones and turning it on on the ORG bones gives a more game friendly rig with little effort and thanks to your script unity dosen’t bother with the extra unweighted bones.
Every time I’ve done it, I’ve manually deleted the Vertex groups for the bones from object data (triangle with dots) GUI before re parenting it so that step might be required if your getting any problems.
edit: it is ofc possible to leave the def bones you want still in there, like forearm twist. I’m not really in a position to say how much better this whole process be for performance in most cases so maybe not worth doing for everything…
Now I see your point. I was unsure because you did not mention any kind of weight painting. What you describe should definitely work. It even allows you to have a nice workflow. That’s very nice!
From a performance point of view, I don’t think there is a difference at all. The number of bones that are moved is always the same, so I don’t think you can even measure the difference.
The advantage of your solution is, that you can do things like simple animations in Unity without too many problems. Without that, it would be horrible for only to make a winking arm animation that does not stretch the arm length. I also assume that e.g. the Locomotion System will not work without your modification.
It’s fairly simple to use the ORG bones instead of the DEF bones. In scripts\addons\rigify\generate.py change:
if obj.data.bones[bone].name.startswith(DEF_PREFIX):
to:
if obj.data.bones[bone].name.startswith(ORG_PREFIX):
Then continue on as normal and when you parent armature to the mesh then the ORG bones will be used instead of the DEF bones. If you want you can delete the DEF bones in Blender, but it won’t hurt anything to leave them in there as this Unity import script will remove them upon import.
This sounds very interesting! I haven’t tested it yet and need to check it in-depth.
If I understand you correctly, it doesn’t influence the workflow that much. It would be awesome if it could be integrated into Rigify!
What do you think, would that make sense as default behaviour or would a special “game rig” option make more sense?
I think the best way would be either a “Game Rig” checkbox or a separate “Generate Game Rig” button. My Blender UI scripting experience is limited to adding a button that runs a function, so I’d have to do some research on how to do the checkbox method. I don’t think that making it the default in rigify is the way to go, as having the twist bones in the DEF rig might be useful for some people.
I personally think a check box would be more elegant. We’ll see, I should have some time in this or the next week for testing. The UI shouldn’t be a big deal at the end. As you know there are quite a few very friendly Blender developers out there :-).
Hey niosop. I tested it in depth and I have to say it is pretty impressive for such a small change :-). I would like to make your idea production ready, such that it can be merged with the official Rigify. Are you interested in a collaboration?