Forum

Procedural animation of armature

05 August 2015 09:29 #3319
Just beginning to work with blender4web, I happen to have a blender model of a surgical table.
It is fully rigged; I want the segments to be placed at positions and angles that are stored in javascript variables.
The solution should be used as realtime visualization of a real table that my computer is connected to (project goal).
All configuration and state data gets read from the table.
So I am able to bake animations and run them in blend4web, but how can I accomplish the animation of an armature based on realtime data?

Thanks so much for your hints and support, I really appreciate it.
Kind regards
05 August 2015 11:44 #3323
Hello and welcome to our forum!

Currently, we don't have API for transforming bones independently, but you can simulate the described behavior with parenting to some key objects (for example "EMPTY" ones) and moving them instead of bones.

We have procedural bones transformation in our TODO list, so this kind of tasks should become more intuitive in future.
Blend4Web developer
10 August 2015 09:28 #3369
Hey Evgeny,

thanks for the very quick answer, though it's some kind of negative :-(

I am able to do procedural animations on empties? How can I then do that with the API, please quickly point me the way to go.
I need to have the project done by the end of August, so this week I should be done with the animation stuff.

Thanks for the help!
By the way, when will procedural bones transformation be implemented, roughly?
10 August 2015 14:04 #3374
OK, just a short update. I've accomplished adding the empty that the bone is constrained to. It works.
The second step is, to interactively move the empty (I've also constrained the empty to a cube for this reason) interactively, and furthermore by API calls.
18 August 2015 12:52 #3463
Hello.

By the way, when will procedural bones transformation be implemented, roughly?

Unfortunatelly, the engine doesn't support procedural bones transformation.

The second step is, to interactively move the empty

Please, take a look at this example to create procedural object animation.
Blend4Web developer
18 August 2015 14:59 #3468
We have procedural bones transformation in our TODO list, so this kind of tasks should become more intuitive in future.
Actually Evgeny wrote this initially, This proofes wrong then?

Thanks for the example. This solves how to procedurally animate the object.
What is still missing is how can I interactively grab and move objects, like in the curiosity rover demo?
18 August 2015 15:46 #3471
What is still missing is how can I interactively grab and move objects, like in the curiosity rover demo?

Please take a look at this demo.
Development Lead | Twitter
19 August 2015 11:14 #3476
Hello.

What is still missing is how can I interactively grab and move objects, like in the curiosity rover demo?

Take a look at this example. May be it'll be useful for your project

example



Blend4Web developer
20 August 2015 14:04 #3499
Thanks for all the hints. I got further with them.
At first I implemented the suggestion by Evgeny with a bone constraint "track-to" towards a key object, which doesn't do the trick. (At least not in the browser, in blender it works)
Now, when I parent the bone in Edit mode to the key object it simply hops onto it. I need to play around with the options I guess.
Is this the right way to go?…sorry, I am a little confused right now.
20 August 2015 15:16 #3502
Hi,

I'd recommend to not use skeletal animation at all. Instead you might just set rotation for the separated parts of your table, according to Roman's example.
Development Lead | Twitter
 
Please register or log in to leave a reply.