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?
Vector representation VS Angle representation
Started by rouncer, Sep 24 2010 08:39 AM
8 replies to this topic
#1
Posted 24 September 2010 - 08:39 AM
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.
#2
Posted 24 September 2010 - 08:47 AM
Dont tell me itll take measuring angles from vectors, holy crap.
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.
#3
Posted 24 September 2010 - 08:53 AM
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.
Then I could go from there.
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.
#4
Posted 24 September 2010 - 08:55 AM
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.
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.
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.
#5
Posted 24 September 2010 - 09:25 AM
rouncer said:
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")
(I reckon the whole industry is stupid, you should call it "rigging" not "skinning")
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.
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.
-
Currently working on: the 3D engine for Tomb Raider.
#6
Posted 24 September 2010 - 10:09 AM
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."
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."
float angle1,angle2;
angle1=atan2(instance[j].walkvector.z,instance[j].walkvector.x);
angle2=atan2(actualvector.z,actualvector.x);
if(angle2<angle1)
{
if(angle2-angle1<(6.28f-angle2)+angle1) instance[j].si[1]=1; else instance[j].si[1]=2;
}
else
{
if(angle1-angle2<(6.28f-angle1)+angle2) instance[j].si[1]=2; else instance[j].si[1]=1;
}
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.
#7
Posted 24 September 2010 - 10:16 AM
Shit, what you said made me think tho - so theres better ways than just YawPitchRoll matrices?
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.
#8
Posted 24 September 2010 - 10:46 AM
ehm excuse me
modification. :)
if(angle2<angle1)
{
if(angle1-angle2<(6.28f-angle1)+angle2) instance[j].si[1]=1; else instance[j].si[1]=2;
}
else
{
if(angle2-angle1<(6.28f-angle2)+angle1) instance[j].si[1]=2; else instance[j].si[1]=1;
}
modification. :)
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.
#9
Posted 24 September 2010 - 11:00 AM
rouncer said:
Whats it got to do with whats on the skin anyway?
Quote
I thought "skinning" was more to do with sub surface scattering.
rouncer said:
Shit, what you said made me think tho - so theres better ways than just YawPitchRoll matrices?
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.
-
Currently working on: the 3D engine for Tomb Raider.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












