Skip to content

Implement Retarget feature in the importer #4510

Closed
godotengine/godot
#63854
@TokageItLab

Description

Describe the project you are working on

Godot Animation System for 3D Model

Describe the problem or limitation you are having in your project

It is difficult to share animations across multiple models.

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

It greatly improves the workflow of developing games with assets such as character models and animations.

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

Retargeting was discussed by #3379. As a result, I implemented godotengine/godot#56902 as a prototype, but the discussion led to the decision that the importer should do the most of the work. Of course, I agree with that.

But, in that prototype, I had implemented Global/Local(RestRelative)/Absolute animations, each of which could be blended, but such real-time retargeting was rejected by @reduz as it being over-tech for most users. I did not agree with it, but as a compromise, I agreed with him that it could be easily implemented as a custom-module. This means that some APIs need to be modularized, exposed, or virtualized so that the animation applying process can be overridden.

Based on the above, I will add an implementation for retargeting in the importer as shown in the following mock-up image:

ImporterRetargetMock

First of all, prerequisite is the need to unify the roles of the bones. This is accomplished as a bone mapping.

The retargeting process must then be performed after that. It is important to understand that retargeting is just a name given to multiple processes as workflows. In other words, the processes within a retarget can be completely separated into several processes. And I believe that it makes sense to modularize them as plug-ins.

With modularization, when more advanced processing is needed, add-on features such as custom modules can allow it to be highly integrated with the built-in processes in the importer. This allows us to create plug-ins outside of core such as "do real-time retargeting", "reproduce RestRelative animations like Godot 3" and "import original bone information before renaming or re-resting as dictionary".

So this proposal can be separated into several PRs, as follows:


(Basic feature)
1. Implement Bone Mapper Done in godotengine/godot#61610
2. Implement Bone Renamer Done in godotengine/godot#61610
3. Implement Rest Pose Fixer Done in godotengine/godot#62939
4. Implement Position Track Optimizer (Adjust for root motion) Done in godotengine/godot#63138


(Advance feature)
5. Change Animation API to expose the processes for custom-modules (Make RealtimeRetarget Extention as custom-module) API has been changed in godotengine/godot#63138
6. Improve Mapping GUI (Add Pulldown "Profile Bone" Selector & Highlight Bone Position In Scene) Added BoneTreeDialog in godotengine/godot#63854
7. Implement Mapping Estimation Done in godotengine/godot#63854


My plan is to try to implement 1 and 2 at the same time first, and if that goes well, we can work on the other PRs as well.

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

No.

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

A simple retargeting system is needed by most light users. It also needs to be changed to allow the Animation process API to be exposed for advanced users.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      Implemented

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions