Baking

Open the baker from Tools → NOT_Lonely → Vertex Animator → Vertex Animator Baker.

Until Source is assigned, only Bake Preset and Source are shown.

Main Settings

Field Meaning
Bake Preset Saved setup. The asset inspector hides the fields; edit them here, or click Open Vertex Animator Baker on the asset. The first successful bake writes {CharacterName}_BakePreset.asset and later bakes overwrite it
Source Scene object or project prefab with a SkinnedMeshRenderer. An Animator fills Animator Controller when that field is empty. A scene-only Source is not stored in the preset, so prefer a project prefab
Animator Controller Clips collected into the bake list. Blend trees expand to individual clips
Character Name Prefix for generated file names. Keep it stable so rebakes overwrite the same assets
Sample Rate (FPS) How densely poses are stored. Higher values make a taller atlas. At playback speed 1 the clip does not play faster
Shared Material Material that receives the atlas. Stored on the Baked Animation Set

Fill Controller

When this option is enabled, baker will fill the next field on the created controller asset:

  1. States. First looping clip → Idle, other looping clips → Locomotion, non-looping → OneShot.
  2. Trigger parameters named like the states.
  3. Transitions.

Create VAT Prefab

After a successful bake, if {SourceName}_VAT.prefab is not already in the output folder, the baker creates it there:

  • MeshFilter and MeshRenderer — Source sharedMesh and the Shared Material
  • VertexAnimPlayer — controller and mesh references wired, Play On Awake enabled
  • VertexAnimLocomotionDriver — wired to that player
  • VAT LOD Group

The file name comes from the Source object name, not from Character Name.

If that prefab is already in the folder, bake leaves it untouched. Turn the checkbox off to skip creation entirely.

Bake Vertex Normals

Object-space normals go into Texture2DArray slice 1.

Turn this off when mesh normals are enough. The atlas is then a single slice, bake skips normal sampling, and shader does not fetch slice 1 which improves performance. The Shared Material and BakedAnimationSet.hasNormals follow the checkbox.

Shader graphs that take normal from EvaluateVertexAnimation get a constant (0,0,1) when normals were not baked. Use the position-only overload, or source mesh normals in the shader graphs, when this option is off.

States

Built from the Animator Controller base layer. Get From Animator Controller rebuilds the list and keeps per-entry sample overrides when names match. Remove a row with the X button to the right to leave that clip out of the atlas.

Each row has the clip, Override Sample Rate, and Looping. Looping changes atlas padding and runtime wrap.

If a preset state name is missing from the current controller, a warning lists it above the rows. The baker does not invent that row. States that are found keep the preset’s clip (when the clip asset still exists), sample-rate override, looping, and playback speed.

LODs

Optional coarser meshes for distance. LOD0 is always the Source mesh. Each extra LOD is another skinned mesh under Source; the baker writes a separate atlas for it (same frame rows as LOD0, width = that mesh’s vertex count).

  • Get From LOD Group copies a Unity LOD Group under Source (size and screen percentages).
  • LOD Size is the object size used for screen-height tests, the same idea as Unity’s LOD Group size.
  • LOD0 Screen % and each extra Screen % are the end of that band, matching Unity’s Transition (% Screen Size). Below the last percentage the character is occluded.

Rebake keeps each extra LOD’s Update Interval, Material, and Render Attachments by list index. Runtime behavior: Runtime → VAT LOD Group.

Attachment Slots

Optional transforms sampled every baked frame (pose relative to Source). The slot name stored on the Baked Animation Set is the transform name.

Drag hierarchy objects into Drag Transforms/GameObjects here to add several at once, or use Add Empty Slot and assign a transform yourself. Duplicates are skipped.

At runtime, bind a mesh on the player’s attachment slot list, or call VertexAnimPlayer.SetAttachment. The mesh is drawn via InstancedRenderSystem. See Runtime → Attachments.

Bake

The Bake button asks for an output folder, then writes the atlas and related assets.

Size estimate

  • W = vertex count of that LOD’s mesh
  • H = sum over clips of (sampledFrames + 3) padding rows (shared by every LOD atlas)
  • Weight = W × H × slices × 8 bytes (RGBAHalf), summed across LOD atlases; slices = 2 with Bake Vertex Normals, else 1

Result

On success the Console logs an informational message. Assets land in the folder you picked.

Field-by-field reference for every output: Baked Assets.