Game Development 12 min read

Unlocking Unity Avatar Creation with Bilibili’s Open‑Source BVA Format

This article introduces Bilibili’s self‑developed BVA avatar file format, compares it with VRM, details its features such as unified model specifications, advanced material support, dynamic bone physics, and provides step‑by‑step Unity integration, export procedures for avatars, scenes, and runtime loading, along with sample code and resources.

Bilibili Tech
Bilibili Tech
Bilibili Tech
Unlocking Unity Avatar Creation with Bilibili’s Open‑Source BVA Format

Background and Motivation

Bilibili introduced the open‑source BVA (Bilibili Virtual Avatar) file format to overcome limitations of existing formats such as VRM and MMD. While VRM is widely adopted for virtual live streaming and social games, it lacks support for complex scene loading, richer interaction models, extensible third‑party integration, and advanced rendering pipelines. BVA is designed as a unified, engine‑agnostic specification that can store avatar geometry, facial and motion capture data, multiple material types, scene lighting, camera paths, multimedia assets, and physics information in a single container.

Key Features of BVA

Unified avatar model specification with explicit support for facial‑capture (blendshapes) and motion‑capture data.

Multiple shader/material types: Lit, Complex Lit, Unlit, Skybox, UTS2, LiliumToonGraph, MToon (URP), ZeldaToon, ToonLit.

Single‑file packaging of avatar, scene, animation, outfit swaps, lighting, camera paths, and embedded media, eliminating external asset dependencies.

High‑performance parallel dynamic‑bone physics for cloth and hair simulation.

Code‑generation utilities that produce import/export shader code and component serialization for custom shaders.

Unity SDK Overview

The BVA Unity SDK is released under an open‑source license and provides editor tools for importing and exporting both avatars and complete scenes. Core components include: BlendshapeMixer – bridges facial blendshape data to face‑capture pipelines. KHR_materials_unlitExtension – automatically added to custom shaders to indicate unlit material handling. BVAMetaInfo – stores optional metadata without affecting runtime behavior.

Exporting an Avatar

Prerequisite: a Unity‑compatible Humanoid avatar model.

Configure dynamic‑bone physics on the model (BVA uses bone‑based parallel physics).

Replace the model’s materials with one of the BVA standard shaders (Lit, Complex Lit, Unlit, etc.).

Optionally add a BlendshapeMixer component to enable face‑capture support.

Ensure normal maps follow Unity’s naming convention and select the Exponential Squared fog mode to minimise shader variants.

From the Unity menu choose BVA / Export / Export Avatar and specify the output path.

The resulting .bva file contains the avatar mesh, blendshapes, physics settings, material definitions (including the KHR_materials_unlitExtension flag), and any attached audio clips.

Exporting a Scene

The scene export workflow demonstrates importing glTF assets, configuring lighting, baking global illumination, and adding post‑processing effects before exporting.

Import glTF models into the Unity project (e.g., via the UnityGLTF importer).

Set up lighting: add Area Lights, Spot Lights, and configure them for Baked GI; mark static geometry with the layer BVA Scene Static (Lightmap) .

Open the Lighting window, disable Realtime GI, enable Baked GI, adjust bake parameters, and click Generate Lighting .

Add a Directional Light set to Realtime and assign the layer BVA Scene Realtime to objects that should receive dynamic lighting.

Attach a Global Volume and enable Bloom and Tonemapping.

From the Unity menu choose BVA / Export / Export Scene , enable Export Original Texture , and optionally export Render Settings and Lightmaps.

Save the scene as a single .bva file.

Runtime Loading Strategies

Fast multithreaded loading – optimized for small avatars or prop files. The loader spawns background threads but may block the main thread for very large scenes.

Payload‑based progressive loading – suitable for large scenes. Resources are loaded on demand using asynchronous Tasks, preventing frame‑rate stalls. The export adds a Generator flag to distinguish Avatar versus Scene files, allowing the runtime to select the appropriate strategy automatically.

Resources

GitHub repository with samples and source code:

https://github.com/bilibili/UnityBVA/tree/main/Assets/Samples

For a complete specification and additional documentation, refer to the original announcement (URL omitted to avoid hyperlink tags).

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Game Development3D ModelingUnityBVAExportavatarVRM
Bilibili Tech
Written by

Bilibili Tech

Provides introductions and tutorials on Bilibili-related technologies.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.