Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maya VAT Encoder

Maya Python License Version

🌐 English | 한국어 · 🔗 Project Page · ⬇️ Download

Vertex Animation Texture Encoder for Maya - Convert skinned meshes, deformers, and anything that moves into VAT!

A free, open-source Maya VAT baker — bake skeletal (skinCluster), blend shape, and deformer animation into vertex animation textures directly inside Autodesk Maya, no Houdini required. Outputs a position texture, optional normal texture, bounds JSON and a proxy FBX that you can play back with a vertex shader in real-time engines (Unreal Engine, Unity, PlayCanvas, three.js / WebGL) — ideal for crowds and large numbers of animated instances.

Demo Astro Bot™ © Sony Interactive Entertainment. Unofficial fan remake.


Features

  • Zero Dependencies - Pure Python, no additional installation required
  • Object/World Space - Choose coordinate space for your needs
  • Auto VAT UV Generation - Automatic UV assignment based on vertex ID
  • Skip First Frame - Option to exclude T-Pose
  • One-Click Export - Batch generation of PNG + JSON + FBX

Quick Start

import maya_vat
maya_vat.show()

Installation

  1. Download the latest release (or Code > Download ZIP) and extract it.
  2. Rename the extracted folder (e.g. Maya-Vertex-Animation-Texture-Baker-main) to maya_vat — the folder name is the Python package name.
  3. Copy the maya_vat folder to your Maya scripts path
   # Windows
   C:/Users/<username>/Documents/maya/<version>/scripts/

   # macOS
   ~/Library/Preferences/Autodesk/maya/<version>/scripts/

   # Linux
   ~/maya/<version>/scripts/
  1. Restart Maya or run the code above in Script Editor

Output File Structure

output_dir/
+-- mesh_vat/
    +-- mesh_vat.png       # Position texture
    +-- mesh_vnrm.png      # Normal texture (optional)
    +-- mesh_remap.json    # Bounding box metadata
    +-- mesh.fbx           # Proxy mesh (optional)

Main Options

Image

Coordinate Space

Option Use Case
Object (Local) Character needs runtime movement/rotation (Recommended)
World Fixed transform (background objects, etc.)

Skip First Frame

Situation Setting
First frame is T-Pose/Bind Pose ON
Animation starts from first frame OFF

Workflow

[Select Mesh] -> [Bake Proxy] -> [Compute Deltas] -> [Export VAT]
                      |                                    |
                First frame position             PNG + JSON + FBX

Texture Structure

Width  = Number of vertices
Height = Number of frames

        V0    V1    V2    V3   ...   Vn
      +-----+-----+-----+-----+---+-----+
  F0  | RGB | RGB | RGB | RGB |...| RGB |  <- Row 0
  F1  | RGB | RGB | RGB | RGB |...| RGB |  <- Row 1
  F2  | RGB | RGB | RGB | RGB |...| RGB |  <- Row 2
   :  |     |     |     |     |   |     |
      +-----+-----+-----+-----+---+-----+

Pixel RGB = (deltaX, deltaY, deltaZ) normalized to 0-255

File Structure

maya_vat/
+-- __init__.py      # Package entry point
+-- core.py          # VAT encoding logic
+-- utils.py         # Maya API utilities
+-- exporter.py      # FBX/OBJ export
+-- ui.py            # PySide2/6 UI
+-- README.md

Code API

VAT Encoding

from maya_vat import core, utils

result = core.encode_vat(
    mesh_name="pCube1",
    output_dir="C:/output",
    frame_start=0,
    frame_end=60,
    include_normals=True,
    export_mesh=True,
    use_world_space=False,      # Object Space recommended
    uv_set_name="VAT_UV",
    force_uv=False,
    skip_first_frame=True       # Exclude T-Pose
)

# Returns
# {
#     "success": True,
#     "png_path": "C:/output/pCube1_vat/pCube1_vat.png",
#     "json_path": "C:/output/pCube1_vat/pCube1_remap.json",
#     "fbx_path": "C:/output/pCube1_vat/pCube1.fbx",
#     "width": 8,
#     "height": 60,
#     ...
# }

Standalone VAT UV Generation

uv_result = utils.create_vat_uv(
    mesh_name="pCube1",
    num_verts=1024,
    num_frames=60,
    uv_set_name="VAT_UV",
    force=False  # Skip if exists
)

# Check if UV set exists
exists = utils.uv_set_exists("pCube1", "VAT_UV")

JSON Metadata

{
    "position": {
        "min": [-2.5, -1.0, -0.5],
        "max": [3.2, 4.5, 1.2],
        "frames": 60,
        "vertices": 1024,
        "space": "object"
    },
    "normal": {
        "min": [-1, -1, -1],
        "max": [1, 1, 1]
    }
}

Notes

Object Space vs World Space

Situation Object World
Runtime movement/rotation O X
Root motion animation O X (double transformation)
Fixed transform O O

UV Sets

  • Avoid name conflicts with existing UV sets
  • Checking Overwrite if exists deletes and regenerates existing UV
  • Verify in UV Editor > UV Sets

FBX Export

  • Skinning-free (VAT replaces skeletal deformation)
  • Excludes blend shapes
  • Excludes animation (first frame only)

License

MIT License


Contact: 555hyuns@gmail.com

About

Free Maya VAT baker: bake skinned mesh, blend shape & deformer animation into Vertex Animation Textures (PNG+JSON+FBX) for Unreal, Unity & WebGL. No Houdini required.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages