Jump to content

  • Log In with Google      Sign In   
  • Create Account


Kinematics


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Kaptein   Prime Members   -  Reputation: 1844

Like
0Likes
Like

Posted 16 December 2013 - 02:01 PM

I have some knowledge (creating my own multiplatform library) of game programming.

I want to start delving into animation, and so I thought I'd create the first component I could think of: A limb, i guess.

 

What are the (minimum) necessary components in such a concept?

My take:

class Bone
{
    Bone* parent;
    std::vector<Limb*> children
    
    vec3  position;
    vec3  orientation;
    float length;
    
    // possibly some precalculated matrices below for reducing calculations
}

What would you further add to this? Keep in mind I have all the prerequisites (eg. quaternions)

Joints, constraints, translation vector member of Bone?

 



Sponsor:

#2 Tutorial Doctor   Members   -  Reputation: 1362

Like
0Likes
Like

Posted 16 December 2013 - 02:11 PM


What would you further add to this?

 

So are you doing both forward and inverse kinematics? 

 

I think the way these things work in 3d packages can be done differently, or perhaps they can be done better. 

 

Taking your queues from how actual bones work (muscular system) I think you can get a better idea of how to progress. Seems such a system would be more complicated, but if done right, could revolutionize the way kinematics are done. 

 

For instance, our bones have natural constraints not limited by numbers. Our muscles are the constraints. The tension in our muscles determine the range of motion of our bones. 

 

The orientation of our bones have built in limits. The only calculation we do is the calculations from our brain which direct our bones, which are limited by our muscles. 

 

Also, every bone has a breaking point (something that is not seen in animation software which would be helpful to know when a pose is unnatural.) Tendons have a maximum stretching distance. 

 

Perhaps there is mathematical research done on muscles and bones which you could implement? I assume there are predefined CONSTANTS for kinematics already. 


Edited by Tutorial Doctor, 16 December 2013 - 02:12 PM.

They call me the Tutorial Doctor.


#3 Kaptein   Prime Members   -  Reputation: 1844

Like
0Likes
Like

Posted 16 December 2013 - 02:20 PM

I think that is stretching it a little. ;)  I wouldn't mind going all the way, seeing as I usually do anyways.

 

For the moment I am just starting out trying for the first time to create something of a tail; where all the components are moving in relation to its parent, if any. As such I would just programatically modulate all the orientations and render it.

 

All in the name of knowledge and wheel reinventing.



#4 Tutorial Doctor   Members   -  Reputation: 1362

Like
0Likes
Like

Posted 16 December 2013 - 02:32 PM

Hehe. Nice pun. Well, once I made an object trail the mouse with a delay in a non-conventional way. It made my code very small, and it also worked a lot better and faster. I used absolute value somehow (I need to find the file because I forgot how I did it). 

 

But I think that using absolute value will remove potential issues, because the only thing that makes motion negative is it's direction. So using absolute values and making them negative for different directions is a neater way to do it. Chances are you already are doing that though. I'm sure you are more advanced than I am, but you never know, maybe it will help. haha. 


Edited by Tutorial Doctor, 16 December 2013 - 02:33 PM.

They call me the Tutorial Doctor.


#5 cadjunkie   Members   -  Reputation: 1270

Like
0Likes
Like

Posted 17 December 2013 - 11:15 AM

Each link (limb) in your linkage should be connected to a Joint object, which would store the constraints. I would think the linked list pointers would go Limb1 -> Joint1 -> Limb2 -> ... etc. You could probably set up the position analysis equations by traversing the list to get all the constraints and then pass them and the input angles into a numerical solver to yield the final positions of each linkage.

 

Speaking as an engineer, kinematics is somewhat hard to do because the equations can become nonlinear really fast. Inverse kinematics is harder because you have multiple valid solutions for a given position, so you have to do some kind of least-squares method to get a good solution. However, most of the techniques that I know are there so that if you're designing a path for a robot, you don't crash the robot into itself. Maybe for animation more simplified equations are sufficient.



#6 warnexus   Prime Members   -  Reputation: 1372

Like
0Likes
Like

Posted 18 December 2013 - 07:31 PM

If I was to model joint animation assuming if it is in 2D, I would get the first limb to work first. There many ways to do it. If I were to do it, I would do it the most easiest and simplest way which is to fake it by letting the artwork do all of the illusion work. Then have my animation code drive the artwork or more technically speaking iterate through every frame of the artwork of the limb to make it move. This ensure my animation code is reusable regardless of what artwork it is because the effect I create is dependent on 

artwork and not code.

 

Some people would probably make it dependent on code and not the artwork.

 

After all, games is all about smoke and mirrors.

 

I remember when I watch Diablo III making of how they got the Demon Azmodan to bend forward even given its anatomy. In short, the Diablo III crew had their own tricks up their sleeves. 

 

At the most basic level, animation is a list of images and time pairs.


Edited by warnexus, 18 December 2013 - 07:39 PM.


#7 cadjunkie   Members   -  Reputation: 1270

Like
0Likes
Like

Posted 18 December 2013 - 09:28 PM

I guess it really depends on how detailed you want your kinematics to be. You can make your models accurate or you can do some illusion and tricks to make it seem accurate. It depends on your application.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS