Forum

Object constraints

15 February 2016 04:31
I'm currently animating a car engine. Normally, I would use the "copy rotation" constraint so that each pulley on the front of the engine would rotate based on the highlighted circle empty's rotation.

How can this be done with Blend4Web? I know constraints aren't supported. Will I have to animate each pulley individually, then?

15 February 2016 10:28

How can this be done with Blend4Web? I know constraints aren't supported. Will I have to animate each pulley individually, then?
You can setup all your animation using constrains, then bake it with Blender Baking Tool into simple action. You can find a small tutorial here.
Blend4web and that kind of thing.
19 February 2016 04:27
That worked! Thanks :)

I have another question for you on the same model. I want to animate the belt on the front of the engine. Normally I would use the "curve" modifier and animate my object along some axis, as shown:



Of course modifiers don't export to Blend4Web, so I get this result:



I was looking into animating an armature along a path and baking the action as I did before, but it gets complex very quickly (link)

What is your suggestion to solve this? It's a pretty common technique – I was surprised I didn't find anything after a thorough search of the forums. Maybe I'm missing something obvious? I hope so!
19 February 2016 11:53

What is your suggestion to solve this? It's a pretty common technique – I was surprised I didn't find anything after a thorough search of the forums. Maybe I'm missing something obvious? I hope so!
Using of bones will be too complex and limits of bone amount (27 per armature for mobile devices) don't allow you to use this animation in app for mobile devices, so you have two ways to imitate this animation.
First is bake your aniamtion into vertex animation using blend4web vertex animation baker - it's just bike all vertex position of each frime into different mesh. Here you can read about vertex animation.
Second is most optimized and simple - is to animate texture in node material, like conveyor in Diary Plant. It's just textures: normal and diffuse maps that moves by the mesh. How to achive this effect you can read here in the tutorial.
Blend4web and that kind of thing.
19 February 2016 18:14
I see. I hadn't considered animating an image texture along the UVs, but that makes sense. I'm actually using that same technique (from the tutorial you linked) for other parts of my model, so I do know how it's done. Should be no problem. Thanks!
 
Please register or log in to leave a reply.