How can i animate a pipe for use in a game engine?

Hi, I am struggling to figure out a way to animate the pipes which make up this brain in such a way that the animation can be exported and used in Unity.

This is exactly the effect I wish to get in the engine. where the pipes ‘snake’ away revealing the character inside.

I was thinking maybe of making multiple shape keys to get a fairly smooth transition. but I can’t figure out how I could generate the shape keys, without baking the mesh first, and that would mean I need to create the animation in edit mode manually moving vertexes which would be ridiculously harder than just tweaking the curve as I do above.

any ideas would be much appreciated! been bashing my head against a wall for days on this.

Hi @zagoalie,

If you’re able to use the Alembic format in your Unity project, then you can set up the spline vertices that need animating by assigning them Hook modifiers ( one each). The hooks ( I use empties ) can then be animated as required to move those vertices as you please …

Then you can export the mesh as an Alembic file … here it is re-imported back into blender to show that it behaves exactly as the vertex hook animated version.

Here’s the Blend file for you to see the set up :slight_smile:
pipe.blend (1.3 MB)

Hope that’s of help,
Cheers,
Dj.

Thank you so much this is awesome!!!

1 Like