freemocap / freemocap

Free Motion Capture for Everyone 💀✨
https://freemocap.org
GNU Affero General Public License v3.0
3.25k stars 253 forks source link

Export / Retarget to other skeletons, e.g. for game engines? #535

Open raphCode opened 6 months ago

raphCode commented 6 months ago

I recently worked together with someone who wanted to use the tracked animation in Unreal Engine and he was frustrated that the retargeting did not go as smooth (for multiple reasons, nothing particular to freemocap).

There seems to be a blender addon from Rokoko Studio which nowadays seems to be the recommended go-to retargeting solution. But after having a closer look, the addon actually is quite buggy in some regards and also requires a rokoko account / login. While it would certainly possible to write a new separate, standalone blender retargeter, it might be beneficial to develop one in close proximity to the freemocap project:

Is it in the interest of the freemocap project to support easier retargeting the animation to other commonly used skeletons? Possibly by adding a retargeter to the blender addon?

ajc27-git commented 6 months ago

Hi, have you checked this tutorial? https://youtu.be/6uMnf5haVVY?si=_njsPvnIfdkZqmZu While not being perfect it does a good job retargeting the Freemocap output to a Metahuman. With the addon the FBX export can be imported and used with no problems in Unreal. And it is easier to retarget to other UE skeletons inside Unreal (mannequin, Metahuman, Mixamo, etc).

philipqueen commented 6 months ago

@ajc27-git how hard would this be to automate? It would require making a Blender Add-On equivalent for Unreal, right? Is the main hurdle that Unreal requires C++?

ajc27-git commented 6 months ago

@philipqueen what I think this issue suggests is to have a retargeted animation directly from Freemocap or the Blender addon. That would mean to adapt the current constraints to different skeletons in the Blender output.

While this would be a great feature to have, I think that is not a priority to dedicate time now. Mainly because the current method of retargeting in Unreal is fairly accurate and only the first time requires more steps and time. Also, the video tutorial guides through the necessary steps. I'm curious if the not so smooth experience was following that guide.

What can be done to ease that process would be to provide the Unreal files necessary to retarget (IK rigs, retargeter, base position) so it would be just import the Freemocap FBX and the retarget the animation. I tried to export those some time ago without success, but I have seen it so it is possible.

I think higher priority tasks regarding animation are to improve the capture animation with postprocessing and better bone constraints (as mentioned in the other issue), and to prepare a real-time connection of freemocap/blender with UE by the time freemocap has the real-time feature (longer timeframe).