godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.11k stars 69 forks source link

Add RBF solver for blend shape blending #9860

Open Broken1334 opened 3 months ago

Broken1334 commented 3 months ago

Describe the project you are working on

Complex character rig for games (and I want to use it in Godot)

Describe the problem or limitation you are having in your project

Character deformation quality is too limited with usual game skeleton. Proper topology and weights is only a partial solution.
It's possible to do nice deformations in Blender or Maya (using helper joints with RBF plugin), but need a way to transfer it to game engine (for IK, ragdoll, procedural anims etc.)

Describe the feature / enhancement and how it helps to overcome the problem or limitation

RBF (Radial Basis Function) solver can effectively interpolate an arbitrary number of values based on any number of poses. A common application for a RBF solver is the blending of corrective shapes/joints or blend shapes in general, especially when it comes to problematic areas like the shoulder, wrist or hip area.

RBF solver is used in UE5 (Metahuman), Cyberpunk 2077, God of War Ragnarok.

OWLmaDHXqR

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

There are several open source RBF implementations for DCC apps. For example, weightDriver for Maya and RBF Nodes for Blender. Both under MIT license. Github links: weightDriver, RBF Nodes

uploads_1611393068294-correctives_800x450

If this enhancement will not be used often, can it be worked around with a few lines of script?

Nope

Is there a reason why this should be core and not an add-on in the asset library?

RBF solver could be very important for high quality character animation, so I think it should be a core feature.

lyuma commented 3 months ago

Linking the slides from the 2023 GDC talk by the God of War: Ragnarok team. It was an excellent talk, and they covered tons of interesting human anatomy as well as the depths of the vertex buffers they used for skin deformation.

https://sms.playstation.com/media/documents/GOWR_Tenghao_Wang_JointBasedSkin_GDC23.pdf

Broken1334 commented 3 months ago

RBF workflow for Metahuman https://youtu.be/7BURJvP0Vjg?si=RH-FeF9Pl9fm5T-r&t=324