Skip to content

VRM Avatar — Point-to-Walk Companion Demo - #239

Merged
ruofeidu merged 8 commits into
google:mainfrom
Peter-Pater:vrm-demo
May 8, 2026
Merged

VRM Avatar — Point-to-Walk Companion Demo#239
ruofeidu merged 8 commits into
google:mainfrom
Peter-Pater:vrm-demo

Conversation

@Peter-Pater

Copy link
Copy Markdown
Collaborator

VRM Avatar — Point-to-Walk Companion Demo

Adds a working VRM avatar demo to demos/vrm-avatar/ using @pixiv/three-vrm. Click or pinch a floor location and the avatar walks there, then returns to idle.

What's included:

  • VRM loading via GLTFLoader + VRMLoaderPlugin (direct, not xb.ModelViewer — see below)
  • Mixamo FBX animation retargeting onto the VRM humanoid skeleton with full MIXAMO_VRM_RIG_MAP
  • Idle/walk crossfade via AnimationMixer
  • Procedural eye blink via VRM expression manager
  • Point-to-walk: raycasts against xb.core.depth.depthMesh on device, falls back to y=0 ground plane in simulator
  • Spring bone physics active via vrm.update(delta)
  • Works in the XRBlocks desktop simulator and WebXR

Why not xb.ModelViewer?
VRMLoaderPlugin must be registered on the GLTFLoader instance before the load call. xb.ModelViewer has no loader injection point, so direct loading is the only viable approach.

Assets:

  • VRM model loaded from jsDelivr CDN (three-vrm sample model, no local file)
  • animations/Idle.fbx and animations/Walking.fbx — free Mixamo downloads, included in repo

@dli7319
dli7319 self-requested a review April 3, 2026 16:51
@dli7319

dli7319 commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator

Very neat! It's quite laggy on my device, but we can improve it later.

Dancing.fbx seems unused?

Do you know the license for the other two FBX files?
Would it be okay if I move them to another repo (proprietary-assets) to keep this repo lean?

@dli7319

dli7319 commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator

The reticle also isn't showing on the depth mesh in this demo which is odd.

@Peter-Pater

Peter-Pater commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator Author

Dancing.fbx is not used. The animations are from Mixamo, which allow for even commercial use, but I am not entirely familiar with the details.

@Peter-Pater

Peter-Pater commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator Author

Okay, I looked more into the Maximo terms, and looks like they are against redistributing the raw files, and having them in public repos probably counts. So I can remove the files and add a note in the readme about how to download them?

@dli7319

dli7319 commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator

Having some instructions isn't ideal but we can go with that for now if it's the only option.

Have you looked into how https://pixiv.github.io/three-vrm/packages/three-vrm/examples/humanoidAnimation/index.html works?

Do they have it hosted on a CDN somewhere?

@Peter-Pater

Copy link
Copy Markdown
Collaborator Author

I think this three-vrm example lets the user drop in a fdx animation file they download themselves instead of hosting in on a CDN. Maybe we can go with letting users download their own animation for now. I can find sometime to create animations myself (e.g., with mesh2motion) and update this demo in another iteration?

@dli7319

dli7319 commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator

Sgtm. Let me know when you want to merge the code.

@ruofeidu

ruofeidu commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator

Thank you Xincheng for the contribution and looking into the license!

@ruofeidu ruofeidu self-assigned this May 7, 2026
@ruofeidu
ruofeidu merged commit 7a1fd48 into google:main May 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants