Im talking about skinning models. As in rigging them for animation. (I reckon the whole industry is stupid, you should call it "rigging" not "skinning")

When your working with vectors, you get advantages and disadvantages. When your working with angles, you get advantages and disadvantages.

Like how do I limit the head rotation so it cant spin all the way around facing backwards.

If I do it with a vector stick man, then how am I supposed to restrict the bone.

I am indeed in knowledge that if I used a rotational angle tree I would be able to limit it between two scalars... its just I wanted to work with vectors.

Note my stickmen are just vertices and lines connecting them, then I bind the model with orientation matrices so it acts to the skeleton. This gives me ragdoll physics, its just now im stuck in vector representation and I dont know what to do...

Id perhaps want mouselook in an first person situation, but I dont want you to be able to mouselook all the way around, and what if the body changes angles, id want to keep the head so it couldnt spin back.

I realize if I did it with an angle heirarchy this would work, but then I possibly couldnt direct the head in the look vector. [EDIT] turned out I could [/EDIT]

So whats a solution?

rouncer
—
2010-09-24T08:47:47Z —
#2

Dont tell me itll take measuring angles from vectors, holy crap.

rouncer
—
2010-09-24T08:53:40Z —
#3

Oh who cares, I know how to fix it now... I just have to measure the x of the vector and the y of the vector, and convert it to rotations.

Then I could go from there.

rouncer
—
2010-09-24T08:55:37Z —
#4

Oh hang on I figured it out.

I just link the mouse vector to the actual body direction, then I can limit it to angles yes, Then when the body moves right I just move the look left.

Then I can restrict it to the shoulders.

So I guess the moral of this story is maybe you should use a bit of both.

Im talking about skinning models. As in rigging them for animation. (I reckon the whole industry is stupid, you should call it "rigging" not "skinning")

Rigging is the process of defining a skeleton and assigning vertices to them. Skinning is the process of transforming the verts using the bone matrices. I have never seen those words used differently.

Anyway, you should read up on joint constraints. Angles aren't that useful either, as they only let you constraint the rotations on the X, Y and Z axis, and not on arbitrary axes. What you could do, is defining a constraint as an axis and a minimum and maximum value. You dotproduct the axis with the bone direction, and the result should be between min and max.

rouncer
—
2010-09-24T10:09:55Z —
#6

Whats it got to do with whats on the skin anyway? I thought "skinning" was more to do with sub surface scattering.

Guess what this does, it sets instance.si[1], which happens to be if the object spins left or right. only problem is, if you measure an angle of a vector to go left is to go to the nearest left, which could be right the complete other way on the circle... so this bit of logic picks the least difference, 2 ways to go around the circle and outputs "right" and "left."

Shit, what you said made me think tho - so theres better ways than just YawPitchRoll matrices?

Why yaw-pitch-roll matrices if you could simply use general matrices. And some use quaternions, which are faster to multiply than matrices, which is especially handy in the hierarchical nature of skeletons.