Game Development Community

Torque Skeleton Generator script v0.7

by Jeff Gran · in Artist Corner · 10/20/2007 (1:40 pm) · 37 replies

Hi everyone.

I've had this script sitting around half-done for a long time, waiting to finish it before I release it to the public...

but I haven't been able to find time to work on it, and when I do, my lack of experience with Blender makes the going really slow.

So I thought I'd put it up for download in its unfinished state:

Download TS_Blend0.7

What it does: it creates a custom skeleton based on markers you can position. Try it out and let me know how it works.

--------------------------------

I need help! The next and final step to getting this "done", is getting all the IK and constraints and custom controls set up. The goal is to make it match exactly the functionality of the 3dsmax and Maya versions of the script I made.

I need someone who knows Blender's armature system to help me figure out how to make it work like I want, so I can then add those setup steps to the script. I believe the latest version of Blender can do everything I need it to, I just don't know how.

Anybody? Reply here or send an email.

Thanks!
Page «Previous 1 2
#1
10/20/2007 (6:07 pm)
...
#2
10/21/2007 (9:42 am)
I'm excited to see you both coming together on this one. I have nothing to add. Just want to be on the notification as it progresses.
#3
10/21/2007 (11:39 am)
...
#4
10/21/2007 (12:03 pm)
Hey Joseph, thanks for taking a look man.

Hmm, why do you need to call the create functions again? If you're creating more bones, I think the creation should either be added to the existing create* functions or add a new one and insert it in the proper place in the list of create* functions.

I'm around computing/watching football today... you can IM me on Yahoo at jboy_123 or AIM at jboy331
#5
10/21/2007 (2:30 pm)
...
#6
10/21/2007 (3:27 pm)
...
#7
10/21/2007 (3:46 pm)
Nice! That sounds perfect. So you rig to the TS bones but drive it with the properly-oriented Blender-style rig.

Is the same hierarchy preserved in both rigs?

Right, so yes, the plan is to next create the IK chains in the foot setup and make custom the "foot-roll" and "knee swivel" attributes and to drive them.

Here is the setup I use:

http://www.jawa9000.com/technical/foot-roll/foot-roll.htm

You should see that I added all the necessary empties and IK chains, but what I don't know how to do is set up the custom attribute and controls. In Max and Maya there is functionality to add a custom attribute to an object, name it, and have it drive anything you want. Is there something similar in Blender? Ideally it would be an attribute of the "Foot Control" pentagonal object that the script is creating, but it could be anything, really. A box moving up and down to drive the values (rotation values of specific empties in the IK setup) would work too.

I have seen in some Blender rigs little extra placeholder bones that drive other parts of the rig. Is that what we'd have to do? Again, ideally I'd like to have a slider in the UI drive it all, but whatever works works.

Jeff
#8
10/21/2007 (4:01 pm)
...
#9
10/21/2007 (4:12 pm)
Yeah, you probably don't really need to digest all of it and understand it all. I don't. But when you follow the instructions it works nicely. :)

Basically we need a way to drive the rotation of an empty or two using some other attribute. And I agree.. if anyone knows how to accomplish this in Blender, let us know.

I think you may be right that the IPO system may be what we're looking for. But I don't know how to use it.
#10
10/21/2007 (7:10 pm)
...
#11
10/21/2007 (9:20 pm)
Nice. You're a machine! Thanks for all the help so far. I think if we have to have a separate object driving the roll, it should be a shape like a square that's point constrained to the foot control object, with the X rotation driving the roll. I'm going to see if I can reconstruct what you've done and get that in there to try to duplicate with script.

------------------

BTW, anyone who's reading this: someone asked me what we're talking about with the TS style rig vs. the Blender style rig, so I'm reposting the answer here for public consumption.


One of the nice things about the Torque Skeleton (to toot my own horn a bit :) ) is that no matter what height, arm length, torso/leg ratio, etc, all bones are always created with their local axis of orientation equal to [0, 0, 0]. They are all aligned with world space. Everything starts as zeros, so it makes the math easy. If you're a programmer, I'm sure you can see the value in that.

Kork, Biped(Adam), Bravetree's Girl Pack, etc, all have skeletons with all kinds of odd bone angles. If you look at the Orange Guy skeleton Joseph made, you can see what the internal numbers of Kork's skeleton look like. It's ugly.

So, with that in mind, when we create the TorqueSkeleton rig from script in Blender, we have to create each bone aligned with world space so that DSQs exported from it will be compatible with DTS characters exported from any program using TSG.

The snag is that Blender does not have a feature to allow the local rotation axis to be different from the actual orientation of the bone. So every bone has to be created sticking out along the Y axis, instead of connecting down to the next bone in the chain. Make sense?

So Joseph's solution was to make two rigs, bind the mesh to one, and have the one that looks prettier "drive" the hidden, necessary, slightly uglier one. It does add another layer of complexity to deal with in Blender, but it's a pretty good solution.
#12
10/21/2007 (9:33 pm)
...
#13
10/21/2007 (11:58 pm)
Hm, I see...

Well, I struggled and struggled and came up with a small victory. I'm putting it up here in case you want to take a look as I'll be out of town till wednesday and probably not able to work on this for a little while after. I started with your modifications and went from there. It crashes currently, but before it does it creates an IK chain on the ankle. It used to create all of them but I think the recent changes to the API broke it.

jboy.menlofarms.net/TorqueSkeleton/TorqueSkeletonv-0.75.py

I'm still using an empty as the IK target here, as I couldn't get it to work using the CT_* bone... probably because I was trying to use a constrain one bone to another bone in the same armature. If I were Blender, I wouldn't like that. Does there have to be a third? Or can we use empties for the Constraint targets while using a bone to drive the constraint rotations? ...meh...
#14
10/22/2007 (5:36 am)
...
#15
10/23/2007 (7:54 pm)
...
#16
10/24/2007 (1:01 am)
Hm, I remember doing some experiments a while back using Blender's "scriptlink constraint" or something like that... can't remember the term. but it was where you can drive something with something else via a script. I did some matrix math stuff and had some cool things going on... I'll see if I can find that. It may come into play here.

Quote:unfortunately it's not possible to use bones as IPO drivers.

Now, I'm still not up to snuff on my Blender animation terminology/technology, but this statement seems bizarre. Previously you said that Actions can only contain IPO curves of Bone objects, but here you say Bone objects can not be IPO drivers? That seems kinda backwards.
#17
10/24/2007 (6:23 am)
...
#18
10/24/2007 (12:32 pm)
So, our brick wall is that you can't use a bone as a driver, but any other true "Object" that we use as a driver cannot be animated as part of an Action (or multiple Actions)? That's the part that still confuses me. Isn't the whole point of using drivers/drivens to animate them? Why would there be this restriction?
#19
10/24/2007 (12:54 pm)
...
#20
10/24/2007 (1:06 pm)
Yeah, I hear you. I've had the exact same frustrations with Blender... hence my script sitting unfinished for more than a year. I actually emailed Ton one time to ask him about something or other, and he came off as a bit dismissive and "not to be bothered". *shrug* OK, so we'll have to work with what we've got.
Page «Previous 1 2