Gears Animation


#1

I tried to make a “gears animation” from blender, i.e. two gears one rotatin clockwise and the other anti-clockwise,
The effect is trivially made in Blender (there are many tutorials for this), but when saved as fbx and exported to HigFidelity it seems that only the first animation is taken by the two gears, so that the two gears are both spinning clockwise.
So to try to render this thing I had to make TWO distinct objects and giving them two distinct animations (or equivalently having one object turned 180 degrees so to have the reverse spinning.
This however is quite difficult to synchronize and the final effect is not completely convincing, like in this example.

My question is:

a) how can i have a single entity having multiple animations operating on different part of itself right in this example of the two gears?

b) or if that is not possible, how can I set up a script for the two distinct entities to be sure they are spinning in synch?

I’d better appreciate to have the first solution so that I can build up the solution completely in Blender without “post processing” or scripting afterthat.


#2

I use scripting for the gears on my avatar. And that works great. Maybe not what you are look ing for but at least there is an alternative.


#3

@123.Basinsky.321 thanks for answering. I suspected that scripting could really help on synchronization or setting proper animation, but I don’t have any clue of what scripting I can use for that, can you please hint me on the scripting commands needed for doing that?


#4

Hi Claudio,

I think easiest way is to make two separate models and rotating them with the entity properties. Try this basic example of how to do this https://docs.highfidelity.com/learn-with-us/scripting-basics
You can acces the properties contained in the model with Entities.getEntityProperties(ID); Then do some changes to the properties and put it back in the model with Entities.editEntity(ID,{rotation:});


#5

Thanks for the link, it is a bit too generic however.
But I was able to find the correct documentation for this particular problem: https://docs.highfidelity.com/api-reference/namespaces/entities#.AnimationProperties

It appears that we cannot specify more than one action from fbx, which is quite unfortunate… Programming and synching actions via script is quite complex.

I’m studying godot opensource engine and it happily accept multiple animations for an object. I wonder why HighFidelity cannot animate similarly its entities :frowning: