Is there a way to import the animation of a motorbike chain that uses an empty as a path?

Hi,

I created a motorbike model where a bone is turning the back wheel, but it is also driving an empty that is rotating the bike chain.

The chain setup is fairly straightforward. With a bezier curve path for the chain links to follow - these are driven by an empty - which in turn is driven by the bone of the back wheel (so everything is in sync).

The problem is I cannot figure out a way to bring the chain animation into sketchfab, so the wheels turn but the chain stays static.

I have tried baking the animation and also used a bone and an empty to drive the bezier path, but this doesn’t seem to work as the chain links always need the path so they can be animated around it.

But (as far as I am aware) sketchfab preview/render system doesn’t recognise empties/curves from blender.

I may well of missed something in the process, but If there is anyway around this or any suggestions for how to fix this it would be very much appreciated!

Thanks

Link to the model and animation: https://skfb.ly/6YPwM

I have been tinkering a lot, and though it may not be a perfect solution, it may help with your issue. I suggest you try this on a seperate file to test this:

Alternative 1:

Building the Armature:

  1. Add a path

  2. Add a bone. Under Boneproperty->Transform->Rotationmode, choose XYZ Euler, because quaternion will mess up the keyframebaking(for sketchfab) later on.

  3. In Editmode Scale the Bone up and give it enough subdivisions(depending on your curvelentgh around 30 to 50 should be enough)

  4. In posemode, select the top bone and give it a spline IK constraint. You only need target and bonecount setup, rest wont be needed. Bones are auto aligned via IK but we need this as new standard pose. If the bones are to your liking, then hit ctrl+A -> Apply as Restpose. IK can be now removed, as we dont need it anymore.

The Animation:

  1. for this we will add a lot of emptys. The first one gets a follow path constraint, and needs to be placed in the world center, you will see why. Hit animate and play to see if it works. Once animated it will work for the other empty automatically.

  2. Duplicate the empty, and position it using constraint offset value, so that it cloesely matches each joint of the armature. Repeat as many times as needed.

  3. When done with empty placement, we now need to constrain bones to empty. The first bone should copy the location of the first empty, and Track to the second empty, again using constraints. Stretch to should also work.

  4. Finally, when everything works, we need to bake everything to keyframes.Check if EulerXYZ, Then hit F3, framestep should be 5(avoid too many keyframes),enable every checkmark for simplyness

  5. What is not needed can now be deleted.

Alternative 2:

  1. Just Follow path constraints, but depending on how many chainparts you got you may have to adjust a few, including rotation. Then baking to keyframes

Parenting Mesh can be done before or after Animation step, but as I said it may not be a perfect solution. I know this is a long text and setup, maybe there is a better solution to this, but I couldnt find any

3 Likes

Many thanks for the info and I will definitely try this solution in the coming week.

I think I have got this working as you described - at least with 3 bones (just to start with). Before I move forward to creating other bones/empties and then coupling with the model - if you have the time can you have a quick check?

Thanks

Link is below: https://www.dropbox.com/s/0ggg9obrflczlp7/Animated%20Chain.blend?dl=0

I took a look into this and noticed just two minor things

  1. Only the first needs both a copy location and track to, the others only need to track to, because they are connected to the first bone, thus inheriting the location.

  2. I dont think this is problematic, but I prefer to make the bone face the direction they go. Just gave the empty a negative offset

But in general this is how I did this. BTW you can change move direction when you edit the curve->rightclick-> switchdirection or segments->direction

Awesome - many thanks for the help. - It’s really appreciated.

As you mention this is a kinda labour intensive approach, but once done I will have a base model to use so won’t have to go through the set up again if ever needed.

Thanks!

No prblem.Glad I could be of help

1 Like