Note
This package is currently in early preview and is subject to changes at any time.
Text2Motion's Blender integration client, can be use to make request to Text2Motion's API for generating Animation on a given Mixamo model.
Currently, the animation can only be generated for character with Mixamo rig name and structure. Also only model imported as GLB are supported, FBX currently does not work. This repo contains an example Mixamo model in GLB that can be downloaded and imported to Blender to test out the package. Support for retargeting to other humanoid rig structure may be introduced in the future.
In order to use Text2Motion, you must sign up for an account and obtain the API Key via the developer portal.
- Go to https://developer.text2motion.ai/
- Click on Sign in on the upper right corner
- Click on LOGIN WITH SAML
- Choose either Continue with Google for Google SSO, or Sign Up with any email you own
- Click on your username on the upper right corner of the site
- Click on Apps
- Click on + NEW APP on the right side of the screen
- Put in an App Name, it could be
Blender Client
or whatever you want - Click Enable for Text2motion Free Tier
- Click Save
- You should now have an API Key. This will be needed later
The minimum supported Blender version is 4.2.0
. This package was only tested for Blender version 4.2.3
. Other version have not been tested.
- Download the extension from the Releases page.
- Go to Edit > Preferences...
- Go to Extensions, click on the down arrow on the right and Select Install from Disk
- Select the downloaded extension zip file and click Install from Disk
- After that, the extension should be installed
Note
All generated animations are licensed under CC-by-4.0
This instruction uses an example Mixamo Rig provided in the repository. You may try using your own model as long as it is using Mixamo Rig.
- Download Y Bot.glb
- In Blender, go to File > Import > glTF 2.0 (.glb/gltf)
- Select the downloaded
Y Bot.glb
and click Import glTF 2.0 - Go to the Animation workspace
- In the 3D View port, locate the left arrow on the upper right corner of the screen, expand it and select the Animation tab
- Fill in the key you obtained from Obtaining the API Key here
- After that, you should be able to generate animation by providing a prompt
We recommend using Visual Studio Code for developing this package. This package comes with a devcontainer with Blender installed and uses the Blender Developer Visual Studio Code extension.
To get started:
- Install Visual Studio Code
- Install Dev Container extension
- Press
Ctrl+shift+P
and selectDev Containers: Reopen in Container
- From here, you can launch Blender with the extension installed by pressing
Ctrl+shift+P
and selectBlender: Build and Start
. To reload the changes, selectBlender: Reload Addons
Make sure changes follows the Extension Moderation Guideline before submitting the new revision.
Run a linter on all scripts:
find "." -iname "*.py" | xargs ruff check --output-format=concise --ignore=E402,E741,E731
While this doesn't need to pass without warnings: large numbers of unused imports, undefined variables or invalid syntax are a bad sign and might hint at inclusion of outdated/unused code.
Sometimes Blender would get in a state such that it crashes when you open Preferences > Add-on or Extension. To recover from that issue, comment out wheels
in blender_manifest.tom.template
, start Blender, open Preference and attempt to install Text2Motion. From here you should get an error saying the dependencies are missing, but it won't crash. After that, you can uncomment wheels
and it should go back to normal again.
To build the extension, press Ctrl+shift+P
, select Tasks: Run Task
then select Build Extension
. The resulting extension will be located under build/
at the root of the package.
By default, Text2Motion apply root motion to the generated animation. This means the resulting animation can leave the initial position. If you want to disable root motion and have the model animated in place, you can uncheck Apply Root Motion under Advanced Options
Note that with Apply Root Motion unchecked, there will be no keyframe for the root bone. If the initial position of the model is away from the origin when the animation is generated, it will render from where the last position was instead of from the origin. You can t-pose the model to move it back to the origin by pressing A
, alt+G
, alt+R
, alt+S
.
By default, Text2Motion will generate animation with estimated duration decided by the model. This means the animation duration could varies from request to request. If you want to control the duration of the animation, you can uncheck Auto and enter the durations you want for the generated animation.
Note that since the server only accept duration in seconds, the frames option is rounded to the nearest seconds based on the frame-per-second configuration. By default it is 24
, frames can only be incremented by multiple of 24
.
You can also change the Animation timeline's unit from frames to seconds by pressing Ctrl+T