Skeleton Animation

Hi,

I thought I would share a video of my skeletal animation project - there is still a long long way to go its a very large project since all joints are carefully modeled on medical research data/papers. The skeleton can squat and so on but the video offered here only shows hand movements, head movement, spinal twist and arm and scapulae movements its quite subtle. If you can please watch in HD 1080p on a decent sized screen.

https://www.youtube.com/watch?v=MAgPpgiKwyc

Jon.

9 Likes

Pretty neat! good job!

Thanks Deltakosh, I will try and put up a link to a more ‘active’ one at some stage.

1 Like

As promised a more active video although there are so many sub projects required to do this well, the list of work required is huge.

One aspect of this kind of simplistic animation is that I am using a plain linear interpolation between key poses, of course real movements are not like this - one arm might start moving before the other and perhaps finish its movement earlier, speeds vary throughout a movement, limbs accelerate and de-accelerate etc - all do-able its simply a matter of ticking off items on a long list of “to-do’s”.

Ideally the next stage would be to create the kind of timeline used in video editing software, this would help to get more realism, each track on the timeline would correspond to one mode of movement of one active joint so for decent usability it will require a lot of thought and design.

The video also suffers as the foot has not yet been articulated so the motion is only realistic if you imagine someone staying flat foot and allowing it to roll over the rounded edge of a poolside. Shadows and ground ( well I guess water ) are turned on for this video. I could have posed the hands but I left them as defaults - it looks more like someone who is still learning to dive ( my excuse ) - I think it looks more lifelike if you think of it representing a child learning to dive.

Best viewed on a larger screen in HD 1080p

Mistake: I got the “in video” text wrong - its supposed to say that many improvements will be required to animate this properly.

https://www.youtube.com/watch?v=aaX5MovNK1Q&feature=youtu.be

1 Like

Subject GUI timeline editor.

Just in case its of interest to others.

I mentioned in earlier text that one of the limitations of the current code is that it can only do a linear interpolation between two poses. This means that between poses all joints are moving the same fraction of their “journey” per frame which leads to instant acceleration and de-acceleration and a synchronicity that is unnatural. Of course granularity can be improved by adding more poses - I have a limit of ten but its still awkward, the ideal solution is a timeline editor.

I came across this open source code which is intended to animate CSS properties on a webpage but could possibly be adapted to control BabylonJS mesh transforms. Its easy enough to get the gui showing in my code - seems good enough as a GUI - you can expand the screen and then push it down so its just a line at the bottom of the page, you can scroll if there is a long list of tracks, and edit events.

Right now its designed for controlling 2D CSS animations so not immediately plug and play with a Babylon application but I think it might at least give me a gui - possibly easier than a start from ground level.

I thought I would pass it on, others might find it useful.

http://marcinignac.com/blog/timeline-js/

Example

http://vorg.github.io/timeline.js/examples/cssAnimation.html

2 Likes

Another time line project which I opted to try out

https://github.com/zz85/timeliner

In order to get it to work with my code I had to use webpack to bundle the javascript as it is coded as a module - I would have to refactor my code otherwise. At the present time I have two leg joints one axis of rotation ( anterior posterior ) configured with the timeliner - it works great but I will need to wrap it all up in a class and figure out how I want it to work for the user.

I do not want to add every joint in the skeleton to the timeline as defacto - especially considering that each joint may have several principle axis of rotation. I also have the existing concept of a pose which can be saved to file, it is intuitively more obvious to create a pose.

I am thinking along the lines of the user being able to create poses and then add a whole pose to the timeline at a specified time. All joints that have been moved relative to the default pose would be added to the timeline.

After dragging and droping a number of poses onto the timeline the user would then be able to advance or delay a particular movement relative to the others as well as adding addition key frames and specify the usual linear, quadEaseIN quadEaseOut and quadEaseInOut modifiers to give movements with acceleration and de-acceleration. This means that the poses are simply representative stages on the timeline which subsequently get smeared, blended and merged into more organic sequences of movements - the point of a pose is like the point of a line drawing before starting an oil painting - its a guide on which additional layers of smudging and alteration will occur.

I can see just running on the two joints I am now animating how important these levels of sophistication are to a more lifelike animation - if I animated a few more joints and I reckon I could get a realistic slow-mo of a jogging stride.

The pose in the screen shot is non-sensical - it does not matter at this stage, the top two tracks are each controlling the knee joint ( swing forward or backward ).

This is getting better and better :slight_smile:

1 Like

Thanks Sebavan,

I am pursuing two options simultaneously - the first is mentioned above which I believe might be overkill, the second is to develop my own code, to that end I started working on my own easing functions.

It is interesting how important this is to realistic movement. After playing around with quad and cubic I found I needed a finer level of control so I have gone for a method that takes the power as argument and can deal with non-integer powers.

I found for instance that in the next video ( attached as a link ) a value of 1.8 was best, I suspect I will have to delve deeper into easing function I reckon human movement may need various types of response / easing curve - might be interesting to use the Babylon curve functionality to give full freedom of design here.

Here is a “simple squat twice and then check the time” sequence with easing functions, one foot slides, pay no attention to that I have to do more work on angles to allow squats where the knees move away from each other.

I am pleased I think that adding easing has gone a long way to injecting a bit of life into the movements.

https://www.youtube.com/watch?v=XQ9sY1V1jfU&feature=youtu.be

1 Like