0
$\begingroup$

I am relatively new to Blender and Unity. Please help me understand what do I do wrong. I try to have a simple curve animation imported into Unity. Idea is that curve grows along his path and then turns back. Here is that animation in Blender: https://www.screencast.com/t/t9FedC1Jh I achieved that by making keyframes for Bevel Factor property of a curve.

BUT, I can not import this animation into Unity. I want to have that curve as an object in Unity that animates repeatedly.

When I import .blender file into unity I have some "Default Take" animation but it does nothing. When I export Blender project into .fbx - there is no animation there at all. See here: https://www.screencast.com/t/0NMko6TGFoxy

Please point me into right direction - how can I import that object into Unity correctly? Thank you in advance!

$\endgroup$
2
  • 1
    $\begingroup$ I'm not sure if it's possible at all. To transfer animation from Blender to Unity you need to use bones or shapekeys and exported object is no longer a spline, but mesh. Doesn't have Bevel Factor feature any more, so Unity can't translate it to anything useful. I think that it would be easier to create that animation in Unity using f.ex. this package:assetstore.unity.com/packages/tools/utilities/surge-107312 $\endgroup$
    – Mzidare
    Jul 9, 2018 at 8:30
  • $\begingroup$ I was able to export with this method: youtu.be/ZtWWHLHXWq4 Note: They only started supporting alembic files in both unity and blender in the recent months. Blender needs to be 2.81 and unity needs to be 2019.3.0a6 or higher and also have the alembic package installed in unity. Mine didn't work until I restarted my computer also. Second note: Even after accomplishing this, the amount of data the water animation took once it was in the game was humongous. I'm going back to the drawing board for a water fountain. Good luck! $\endgroup$ Dec 5, 2019 at 4:02

2 Answers 2

2
$\begingroup$

Unity uses Blender's FBX export functionality to throw your model over the wall to Unity. The FBX file spec only allows for Meshes (and derivatives thereof, such as bones and bone weights), Animations of Meshes, Materials, and Textures, and Blender's FBX implementation is incomplete. Right now, there is no way to export bezier animations directly.

You could, theoretically, export your animations by binding your animation to an armature, exporting the armature to Unity through FBX, and using a plugin like Bezier Mesh to render the curve and parenting it's controls to your imported mesh. This is pure speculation on my part, though.

$\endgroup$
1
$\begingroup$

You need to export it as an alembic file. The alembic file will store your animation properly. Then you have to use an importer, like this one: https://github.com/unity3d-jp/AlembicForUnity

After you've imported the package and you import an alembic file and drag it into a scene you will see that it has an alembic player script attached. From here you can modify it.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .