Skip to content

๐Ÿดโ€โ˜ ๏ธ Harvest every 3D animation on Mixamo. Leave no model behind. https://x.com/paulpierre

Notifications You must be signed in to change notification settings

paulpierre/MixamoHarvester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Mixamo Harvester

๐ŸŒพ MixamoHarvester

MixamoHarvester is a tool for downloading and managing ALL Mixamo animations in bulk. Project was inspired by the fantastic Mixamo Anims Downloader by gnuton.

โœจ Features

  • Automatically downloads all available Mixamo characters and animations.
  • Exports animations in .fbx format.
  • Monitors export progress and retries when necessary.
  • Uses multi-threading for faster processing.
  • Implements robust error handling and retry mechanisms.
  • Saves progress state to resume interrupted downloads.
  • Skips existing files to avoid redundant downloads.
  • Organizes animations by character ID for easy management.

โš™๏ธ How It Works

  1. Authentication: Make sure you have a valid Mixamo Bearer token and save it in mixamo_token.txt.
  2. Character Fetching: The tool fetches all available characters from Mixamo's API and stores them in characters.json.
  3. Animation Processing: For each character, the tool processes all available animations:
    • It skips animation packs and only processes individual motions.
    • For each animation, it retrieves the product data and exports the animation.
  4. Export and Download:
    • The tool initiates the export process for each animation.
    • It monitors the export progress until completion.
    • Once the export is ready, it downloads the animation as an .fbx file.
  5. Organization and State Management:
    • Downloaded files are saved in the animations directory with a naming convention of {animation_name}_{character_id}.fbx.
    • The script maintains a state file (state.json) to track processed animations and resume interrupted downloads.
  6. Concurrency: The tool uses multi-threading (with a default of 5 threads) to process animations concurrently, improving overall performance.
  7. Error Handling: Robust error handling and retry mechanisms are implemented to handle potential API failures or network issues.

๐Ÿš€ Getting Started

1. Clone the Repository

git clone https://github.com/paulpierre/MixamoHarvester.git
cd MixamoHarvester

2. Install Dependencies

# Create a new virtual environment
python -m venv env

# Activate the virtual environment
# On Windows:
# env\Scripts\activate

# On macOS and Linux:
source env/bin/activate

pip install -r requirements.txt

3. Add Mixamo Bearer Token

Ensure you have a valid bearer token from Mixamo. To retrieve it:

  1. Log into Mixamo: Open Mixamo and log into your account.
  2. Open Developer Tools:
    • On Windows/Linux: Press Ctrl + Shift + I or F12.
    • On macOS: Press Cmd + Option + I.
  3. Go to the Console Tab: In the developer tools, click the "Console" tab.
  4. Run the JavaScript Code: Paste the following JavaScript code into the console to retrieve the Bearer token from localStorage:
(function() {
    const token = localStorage.getItem('access_token');
    if (token) {
        console.log("๐Ÿ”‘ Your Bearer Token is: " + token);
    } else {
        console.log("Bearer Token not found. Make sure you are logged into Mixamo.");
    }
})();
  1. Copy the Token: The Bearer token will be displayed in the console output. Copy this token and save it to a file named mixamo_token.txt.

4. Run the Script

Run the script to start downloading animations:

python mixamo_harvester.py

๐Ÿ“ To Do

  • Hey, you tell me. Open an issue.

๐ŸŽ“ Credits

This project was inspired by gnutonโ€™s mixamo_anims_downloader.

๐Ÿ›ก๏ธ License

This project is licensed under the MIT License. See the LICENSE file for details.