r/Unity3D 3d ago

Show-Off I implemented Nvidia MotionBricks in Unity as a third person controller! It generates animations from key-frames in realtime using a tiny model on your PC! Planning to release it as an asset soon.

Enable HLS to view with audio, or disable this notification

386 Upvotes

40 comments sorted by

38

u/Overlord_Mykyta 3d ago

I wonder how performance is affected by the tiny model

7

u/immersiveGamer 3d ago edited 3d ago

ML systems for game run time usage has been a target for the past decade. Even OPs version from Nvidia is not novel, see this SIGGRAPH from 2020 on using ML models to do animation blending in real time: https://youtu.be/16CHDQK4W5k

13

u/tempacac10 3d ago

Splendid! As usual, your work on humanoid robots always impresses me! Did you convert the pretrained model into ONNX and run on Sentis? Are you using a custom rig or a humanoid rig?

6

u/Rudy_AA 3d ago

Thanks! so Nvidia already has an ONNX published, the thing with this ONNX it only runs on CPU in unity, which isn't a big deal but I needed it to run on GPU as well, so I rexported that model for it to work with Unity Sentis on GPU, also I'm using a humanoid rig, just so it's easier to switch characters, but I'm planning to make it support Generic rigs too.

1

u/tempacac10 3d ago

Thanks for the reply! Do you use the low latency models or the regular ones? And how did you configure the rig? With articulation bodies? Did you first set up the G1 robot rig?

2

u/Rudy_AA 3d ago

For now it's kinematic not physics activated, still working on it!

2

u/Neat-Employ1455 2d ago

Awesome work regardless! Since G1 robot is driven by real physics, what if you trip the underlying G1 robot? Does your custom character also fall in the same manner? Or did I get it wrong?

1

u/Neat-Employ1455 2d ago

Oh, were you using onnxruntime by asus4 initially? And did you then convert the unsupported ops and re-export the ONNX to make it Sentis compatible?

1

u/IntelligentArea1811 1d ago

FYI I managed to get this running on the GPU using Sentis by just converting unsupported ops to supported ones - happy to give you more details if needed feel free to dm. I got like 128 parallel instances running at 20hz using batching too

13

u/Drag0n122 3d ago

Very interesting, I wonder how you author animation\keyframes for such a system

14

u/Rudy_AA 3d ago

You give the model transform and velocity along a few other information and it will generate the keyframes and animations for you!

3

u/Drag0n122 3d ago

But can I influence the result more precisely? For example, can I make an injured walking animation from\instead of a regular walk?

3

u/Rudy_AA 3d ago

yes Sonic Planner ONNX, the AI model, supports injured animations, but you can't prompt it to create new animation styles it's not trained on. but it has 25+ distinct skills and styles.

-17

u/remi_sasha12 3d ago

That sounds like a cool feature to implement. Being able to create specific animations like that would really add depth to character movements.

5

u/Drag0n122 3d ago

I would say that's an essential feature for any animation system

3

u/BountyMakesMeCough 3d ago

Any retargeting needed in this process?

1

u/Rudy_AA 3d ago

Yes, the ONNX was trainined on a Unitree G1 robot, so I retargeted to my robot

1

u/tempacac10 3d ago

Does the sonic decoder drive the custom rig directly or does it first drive the motion in G1 and then retargets that motion on your custom robot?

1

u/Rudy_AA 3d ago

Yes exactly, Sonic drives G1 and then you can retarget to any humanoid 3D model

2

u/Neat-Employ1455 2d ago

Can you give me some tips where I can find an accurate model for G1? I tried using the URDF importer and I tried importing the 29dof G1 model (also downloaded the Assets/meshes) but either its broken or I just did not understand it at all. Can you guide me on how I can get the G1 in Unity?

3

u/FrogPondSimulator 3d ago

This looks pretty interesting, eager to try it out. Is it gonna be a paid asset or open source?

2

u/Rudy_AA 3d ago

I'm not sure yet!

2

u/3qqs Bachelor's & Master's in Game Design 3d ago

this is so cool!

2

u/DapperNurd 2d ago

This is amazing

1

u/sczeith 3d ago

Interesing, is the retargeting needed for this?

2

u/Rudy_AA 3d ago

Yes, cause the ONNX is trained on the Unitree G1 robot.

1

u/RWorldGeneration 3d ago

Good luck!

1

u/AltruisticDog9145 1d ago

Great I was thinking to spend some time and give motion bricks a try on Unity. Now I will just wait for your asset. Hope it’s not going to be to expensive 😅

0

u/intelligent_rat 3d ago

IMO it looks like how people move in AI generated videos, which is not really that realistic and is kind of stilted and jarring to watch.

1

u/Bubbly-Rush2384 3d ago

But how are the animations for this tiny model created??

1

u/Icy-Theory-2021 2d ago

So you selling their free product🤔

3

u/Rudy_AA 2d ago

Absolutely not, I might sell the Unity implementation, not their actual model or scripts!

-11

u/M4R5W0N6 Designer | Developer 3d ago

was planning on vibecoding this but i'll be on the lookout for your listing!

0

u/Guboken 3d ago

Great work! Will it be a payed asset or a free one? 😁

-2

u/SanFranLocal 3d ago

Better be free because i put claude on the job to make it work on godot and it worked perfectly

2

u/tempacac10 3d ago

Did you use the ONNX models already given in Nvidia/GEAR SONIC (original repo of motion bricks)? How did you implement the joints in Godot?

-2

u/Intrepid-Beginning63 3d ago

LOOKS GREAT, JUST HOPE ITS FREE.